Skip to content

Instantly share code, notes, and snippets.

@richlowe richlowe/sibcall.diff Secret
Last active Apr 26, 2019

Embed
What would you like to do?
**** TODO ./gcc/testsuite/gcc/gcc.log:FAIL: gcc.target/i386/sibcall-4.c scan-assembler-not jmp[ \t]*.%eax
without the frame-pointer patch, we jmp *dispatch(...), with we mov from dispatch to
eax, and jmp *%eax
no patch and -fno-omit-frame-pointer does what we'd hope
--- stock 2019-04-26 18:26:35.049772917 +0000
+++ patched 2019-04-26 18:26:35.049792249 +0000
@@ -4,8 +4,12 @@
.globl male_indirect_jump
.type male_indirect_jump, @function
male_indirect_jump:
- movl 4(%esp), %eax
- jmp *dispatch(,%eax,4)
+ pushl %ebp
+ movl %esp, %ebp
+ movl 8(%ebp), %eax
+ popl %ebp
+ movl dispatch(,%eax,4), %eax
+ jmp *%eax
.size male_indirect_jump, .-male_indirect_jump
.comm dispatch,1024,32
- .ident "GCC: (Illumos heads/il-8_3_0) 8.3.0"
+ .ident "GCC: (OpenIndiana 8.3.0-OI-0) 8.3.0"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.