This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hello! Attached patch optimizes x86_64 gtm_jmpbuf layout to avoid copying return address. Optimized layout uses the same trick as x86_32 - call used registers are saved just below return address. And there is just enough space in the call alignment hole to put all of them there. 2012-01-24 Uros Bizjak <ubizjak@gmail.com> * config/x86/target.h (gtm_jmpbuf) [__x86_64__]: Move rip to the end of struct. * config/x86/sjlj.S (_ITM_beginTransaction) [__x86_64__]: Update offset values. Do not copy return address. Decrement stack by 56 bytes only. (GTM_longjump) [__x86_64__]: Update offset values. Tested on x86_64-pc-linux-gnu. OK for mainline? BTW: Do we really need move at the end of GTM_longjump: movq 48(%rsi), %r15 movq 56(%rsi), %rdx >> movl %edi, %eax cfi_def_cfa(%rcx, 0) cfi_register(%rip, %rdx) movq %rcx, %rsp jmp *%rdx Uros.
Attachment:
i.diff.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |