diff options
author | Sanjoy Das <sanjoy@playingwithpointers.com> | 2011-12-03 09:21:07 +0000 |
---|---|---|
committer | Sanjoy Das <sanjoy@playingwithpointers.com> | 2011-12-03 09:21:07 +0000 |
commit | 165ca1d4ba4385ab5ca1fe98976921f03e61f9cf (patch) | |
tree | 1298522dd06e4e9daabb54be530a358de2993c7a /llvm/test/CodeGen | |
parent | 901c5ca15bc297f2974f1d5e63916e33422e9a84 (diff) | |
download | bcm5719-llvm-165ca1d4ba4385ab5ca1fe98976921f03e61f9cf.tar.gz bcm5719-llvm-165ca1d4ba4385ab5ca1fe98976921f03e61f9cf.zip |
Fix a bug in the x86-32 code generated for segmented stacks.
Currently LLVM pads the call to __morestack with a add and sub of 8
bytes to esp. This isn't correct since __morestack expects the call
to be followed directly by a ret.
This commit also adjusts the relevant test-case.
llvm-svn: 145765
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r-- | llvm/test/CodeGen/X86/segmented-stacks.ll | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/test/CodeGen/X86/segmented-stacks.ll b/llvm/test/CodeGen/X86/segmented-stacks.ll index a92aca5abb2..c28c31911d2 100644 --- a/llvm/test/CodeGen/X86/segmented-stacks.ll +++ b/llvm/test/CodeGen/X86/segmented-stacks.ll @@ -23,11 +23,9 @@ false: ; X32: leal -12(%esp), %ecx ; X32-NEXT: cmpl %gs:48, %ecx -; X32: subl $8, %esp -; X32-NEXT: pushl $4 +; X32: pushl $4 ; X32-NEXT: pushl $12 ; X32-NEXT: calll __morestack -; X32-NEXT: addl $8, %esp ; X32-NEXT: ret ; X32: movl %esp, %eax @@ -72,11 +70,9 @@ define i32 @test_nested(i32 * nest %closure, i32 %other) { ; X32-NEXT: cmpl %gs:48, %edx -; X32: subl $8, %esp -; X32-NEXT: pushl $4 +; X32: pushl $4 ; X32-NEXT: pushl $0 ; X32-NEXT: calll __morestack -; X32-NEXT: addl $8, %esp ; X32-NEXT: ret ; X64: leaq (%rsp), %r11 |