aboutsummaryrefslogtreecommitdiff
path: root/libitm
diff options
context:
space:
mode:
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2012-01-24 07:23:57 +0000
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2012-01-24 07:23:57 +0000
commite5f7c42c31a837a235331b9e416f641dceae5d30 (patch)
treeea1f1508165784c7e07892824eb4e82074787ce6 /libitm
parentcb0e02f374ac9416604837127d3a13fe6ce93df8 (diff)
* config/x86/target.h (gtm_jmpbuf) [__x86_64__]: Move rip to the
end of structure. * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183467 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libitm')
-rw-r--r--libitm/ChangeLog9
-rw-r--r--libitm/config/x86/sjlj.S34
-rw-r--r--libitm/config/x86/target.h2
3 files changed, 26 insertions, 19 deletions
diff --git a/libitm/ChangeLog b/libitm/ChangeLog
index bf29f4efc3f..4b6d156d750 100644
--- a/libitm/ChangeLog
+++ b/libitm/ChangeLog
@@ -1,3 +1,12 @@
+2012-01-24 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/x86/target.h (gtm_jmpbuf) [__x86_64__]: Move rip to the
+ end of structure.
+ * 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.
+
2012-01-23 Uros Bizjak <ubizjak@gmail.com>
PR libitm/51830
diff --git a/libitm/config/x86/sjlj.S b/libitm/config/x86/sjlj.S
index c30c216f229..0571a4ab658 100644
--- a/libitm/config/x86/sjlj.S
+++ b/libitm/config/x86/sjlj.S
@@ -61,20 +61,18 @@ SYM(_ITM_beginTransaction):
cfi_startproc
#ifdef __x86_64__
leaq 8(%rsp), %rax
- movq (%rsp), %r8
- subq $72, %rsp
- cfi_def_cfa_offset(80)
+ subq $56, %rsp
+ cfi_def_cfa_offset(64)
movq %rax, (%rsp)
- movq %r8, 8(%rsp)
- movq %rbx, 16(%rsp)
- movq %rbp, 24(%rsp)
- movq %r12, 32(%rsp)
- movq %r13, 40(%rsp)
- movq %r14, 48(%rsp)
- movq %r15, 56(%rsp)
+ movq %rbx, 8(%rsp)
+ movq %rbp, 16(%rsp)
+ movq %r12, 24(%rsp)
+ movq %r13, 32(%rsp)
+ movq %r14, 40(%rsp)
+ movq %r15, 48(%rsp)
movq %rsp, %rsi
call SYM(GTM_begin_transaction)
- addq $72, %rsp
+ addq $56, %rsp
cfi_def_cfa_offset(8)
ret
#else
@@ -115,13 +113,13 @@ SYM(GTM_longjmp):
cfi_startproc
#ifdef __x86_64__
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
+ movq 8(%rsi), %rbx
+ movq 16(%rsi), %rbp
+ movq 24(%rsi), %r12
+ movq 32(%rsi), %r13
+ movq 40(%rsi), %r14
+ movq 48(%rsi), %r15
+ movq 56(%rsi), %rdx
movl %edi, %eax
cfi_def_cfa(%rcx, 0)
cfi_register(%rip, %rdx)
diff --git a/libitm/config/x86/target.h b/libitm/config/x86/target.h
index a59608f388c..1d81a4777f3 100644
--- a/libitm/config/x86/target.h
+++ b/libitm/config/x86/target.h
@@ -29,13 +29,13 @@ namespace GTM HIDDEN {
typedef struct gtm_jmpbuf
{
void *cfa;
- unsigned long rip;
unsigned long rbx;
unsigned long rbp;
unsigned long r12;
unsigned long r13;
unsigned long r14;
unsigned long r15;
+ unsigned long rip;
} gtm_jmpbuf;
#else
typedef struct gtm_jmpbuf