diff options
author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2007-10-09 03:01:19 +0000 |
---|---|---|
committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2007-10-09 03:01:19 +0000 |
commit | 0a6040063fd9419041a81ada8f75b389381eb6b9 (patch) | |
tree | f96bfd9537505a69ca0bf1f817f71074d7ba0675 /lib/Target/Mips/MipsMachineFunction.h | |
parent | e78080c4dc1942fe8e2a1f28a280903868282e48 (diff) |
Position Independent Code (PIC) support [2]
- Added a function to hold the stack location
where GP must be stored during LowerCALL
- AsmPrinter now emits directives based on
relocation type
- PIC_ set to default relocation type (same as GCC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42779 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsMachineFunction.h')
-rw-r--r-- | lib/Target/Mips/MipsMachineFunction.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Target/Mips/MipsMachineFunction.h b/lib/Target/Mips/MipsMachineFunction.h index 0f9a1e0e6a..2515aa0438 100644 --- a/lib/Target/Mips/MipsMachineFunction.h +++ b/lib/Target/Mips/MipsMachineFunction.h @@ -33,6 +33,11 @@ private: /// the Return Address must be saved int RAStackOffset; + /// When PIC is used the GP must be saved on the stack + /// on the function prologue, so a reference to its stack + /// location must be kept. + int GPStackOffset; + /// MipsFIHolder - Holds a FrameIndex and it's Stack Pointer Offset struct MipsFIHolder { @@ -69,6 +74,9 @@ public: int getRAStackOffset() const { return RAStackOffset; } void setRAStackOffset(int Off) { RAStackOffset = Off; } + int getGPStackOffset() const { return GPStackOffset; } + void setGPStackOffset(int Off) { GPStackOffset = Off; } + int getTopSavedRegOffset() const { return (RAStackOffset > FPStackOffset) ? (RAStackOffset) : (FPStackOffset); |