2021-05-13 23:54:24 +00:00
|
|
|
$OpenBSD: patch-lib_Target_X86_X86MachineFunctionInfo_h,v 1.5 2021/05/13 23:54:25 jca Exp $
|
2019-02-11 05:24:16 +00:00
|
|
|
|
|
|
|
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
|
2021-05-13 23:54:24 +00:00
|
|
|
@@ -45,6 +45,9 @@ class X86MachineFunctionInfo : public MachineFunctionI
|
2019-02-11 05:24:16 +00:00
|
|
|
/// 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
|
2021-05-13 23:54:24 +00:00
|
|
|
@@ -138,6 +141,9 @@ class X86MachineFunctionInfo : public MachineFunctionI
|
2019-02-11 05:24:16 +00:00
|
|
|
|
|
|
|
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;}
|