projects
/
platform
/
upstream
/
coreclr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1163d34
)
[x86/Linux] Fix stack alignment in helper stub
author
SaeHie Park
<saehie.park@samsung.com>
Thu, 9 Feb 2017 07:27:33 +0000
(16:27 +0900)
committer
SaeHie Park
<saehie.park@samsung.com>
Thu, 9 Feb 2017 07:29:39 +0000
(16:29 +0900)
Add 8 byte padding for stack alignment before making a call
src/vm/i386/jitinterfacex86.cpp
patch
|
blob
|
history
diff --git
a/src/vm/i386/jitinterfacex86.cpp
b/src/vm/i386/jitinterfacex86.cpp
index
a80b5e6
..
01d8119
100644
(file)
--- a/
src/vm/i386/jitinterfacex86.cpp
+++ b/
src/vm/i386/jitinterfacex86.cpp
@@
-1397,6
+1397,10
@@
void EmitFastGetSharedStaticBase(CPUSTUBLINKER *psl, CodeLabel *init, bool bCCto
// DoInit:
psl->EmitLabel(DoInit);
+#if defined(UNIX_X86_ABI)
+ // sub esp, 8 ; to align the stack
+ psl->X86EmitSubEsp(8);
+#endif
// push edx (must be preserved)
psl->X86EmitPushReg(kEDX);
@@
-1406,6
+1410,10
@@
void EmitFastGetSharedStaticBase(CPUSTUBLINKER *psl, CodeLabel *init, bool bCCto
// pop edx
psl->X86EmitPopReg(kEDX);
+#if defined(UNIX_X86_ABI)
+ // add esp, 8
+ psl->X86EmitAddEsp(8);
+#endif
// ret
psl->X86EmitReturn(0);
}