diff options
author | Richard Henderson <rth@redhat.com> | 2011-11-30 14:29:33 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2011-11-30 14:29:33 -0800 |
commit | 062f93f255e4b793edb00849336bf6c4e8239b6e (patch) | |
tree | 9f60b09cc1447fb54c59835052aa947c7643e8ec /libitm/config/x86 | |
parent | c08472eaf611a76fa2545b5a45f32d274ac0d25d (diff) | |
download | gcc-062f93f255e4b793edb00849336bf6c4e8239b6e.zip gcc-062f93f255e4b793edb00849336bf6c4e8239b6e.tar.gz gcc-062f93f255e4b793edb00849336bf6c4e8239b6e.tar.bz2 |
Swap the action and jmpbuf arguments to GTM_longjmp
On several ABIs, the first register parameter is the same as
the return value register. Moving the action parameter first
avoids the need for register shuffling on these targets.
* libitm_i.h (GTM_longjmp): Swap first and second arguments.
* beginend.c (_ITM_abortTransaction): Update to match.
(GTM::gtm_thread::restart): Likewise.
* config/alpha/sjlj.S (GTM_longjmp): Likewise.
* config/x86/sjlj.S (GTM_longjmp): Likewise.
From-SVN: r181863
Diffstat (limited to 'libitm/config/x86')
-rw-r--r-- | libitm/config/x86/sjlj.S | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/libitm/config/x86/sjlj.S b/libitm/config/x86/sjlj.S index 39e0c75..8faa0c6 100644 --- a/libitm/config/x86/sjlj.S +++ b/libitm/config/x86/sjlj.S @@ -113,21 +113,20 @@ SYM(_ITM_beginTransaction): SYM(GTM_longjmp): cfi_startproc #ifdef __x86_64__ - movq (%rdi), %rcx - movq 8(%rdi), %rdx - movq 16(%rdi), %rbx - movq 24(%rdi), %rbp - movq 32(%rdi), %r12 - movq 40(%rdi), %r13 - movq 48(%rdi), %r14 - movq 56(%rdi), %r15 - movl %esi, %eax + movq (%rsi), %rcx + movq 8(%rsi), %rdx + movq 16(%rsi), %rbx + movq 24(%rsi), %rbp + movq 32(%rsi), %r12 + movq 40(%rsi), %r13 + movq 48(%rsi), %r14 + movq 56(%rsi), %r15 + movl %edi, %eax cfi_def_cfa(%rcx, 0) cfi_register(%rip, %rdx) movq %rcx, %rsp jmp *%rdx #else - xchgl %eax, %edx movl (%edx), %ecx movl 4(%edx), %ebx movl 8(%edx), %esi |