mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user