26 lines
1.1 KiB
Text
26 lines
1.1 KiB
Text
|
implement -msave-args in clang/llvm, like the sun did for gcc
|
||
|
|
||
|
Index: lib/Target/X86/X86MachineFunctionInfo.h
|
||
|
--- lib/Target/X86/X86MachineFunctionInfo.h.orig
|
||
|
+++ lib/Target/X86/X86MachineFunctionInfo.h
|
||
|
@@ -45,6 +45,9 @@ class X86MachineFunctionInfo : public MachineFunctionI
|
||
|
/// stack frame in bytes.
|
||
|
unsigned CalleeSavedFrameSize = 0;
|
||
|
|
||
|
+ // SaveArgSize - Number of register arguments saved on the stack
|
||
|
+ unsigned SaveArgSize = 0;
|
||
|
+
|
||
|
/// BytesToPopOnReturn - Number of bytes function pops on return (in addition
|
||
|
/// to the space used by the return address).
|
||
|
/// Used on windows platform for stdcall & fastcall name decoration
|
||
|
@@ -145,6 +148,9 @@ class X86MachineFunctionInfo : public MachineFunctionI
|
||
|
|
||
|
unsigned getCalleeSavedFrameSize() const { return CalleeSavedFrameSize; }
|
||
|
void setCalleeSavedFrameSize(unsigned bytes) { CalleeSavedFrameSize = bytes; }
|
||
|
+
|
||
|
+ unsigned getSaveArgSize() const { return SaveArgSize; }
|
||
|
+ void setSaveArgSize(unsigned bytes) { SaveArgSize = bytes; }
|
||
|
|
||
|
unsigned getBytesToPopOnReturn() const { return BytesToPopOnReturn; }
|
||
|
void setBytesToPopOnReturn (unsigned bytes) { BytesToPopOnReturn = bytes;}
|