This is an automated email from the git hooks/post-receive script.
unknown user pushed a commit to branch hjl/pr58066/gcc-5-branch in repository gcc.
commit b923fb41b04003cdb2f6cd340198e886b5536646 Author: H.J. Lu hjl.tools@gmail.com Date: Mon Jul 13 05:10:31 2015 -0700
Revert "Align stack before calling __tls_get_addr"
This reverts commit a357dd284a180086f43a0e0bdad927efe670f028. --- gcc/config/i386/i386.c | 19 ------------------- gcc/config/i386/i386.md | 21 ++++++--------------- 2 files changed, 6 insertions(+), 34 deletions(-)
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 3822107..7c28a55 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -14046,13 +14046,6 @@ legitimize_tls_address (rtx x, enum tls_model model, bool [...] && model == TLS_MODEL_LOCAL_DYNAMIC) model = TLS_MODEL_GLOBAL_DYNAMIC;
- int preferred_stack_alignment - = ix86_preferred_stack_boundary / BITS_PER_UNIT; - int stack_adjustment = (((stack_pointer_delta - % preferred_stack_alignment) - - preferred_stack_alignment) - % preferred_stack_alignment); - switch (model) { case TLS_MODEL_GLOBAL_DYNAMIC: @@ -14093,9 +14086,6 @@ legitimize_tls_address (rtx x, enum tls_model model, bool for_mov) rtx rax = gen_rtx_REG (Pmode, AX_REG); rtx_insn *insns;
- if (stack_adjustment) - adjust_stack (GEN_INT (stack_adjustment)); - start_sequence (); emit_call_insn (ix86_gen_tls_global_dynamic_64 (rax, x, caddr)); @@ -14107,9 +14097,6 @@ legitimize_tls_address (rtx x, enum tls_model model, bool for_mov)
RTL_CONST_CALL_P (insns) = 1; emit_libcall_block (insns, dest, rax, x); - - if (stack_adjustment) - anti_adjust_stack (GEN_INT (stack_adjustment)); } else emit_insn (gen_tls_global_dynamic_32 (dest, x, pic, caddr)); @@ -14153,9 +14140,6 @@ legitimize_tls_address (rtx x, enum tls_model model, bool for_mov) rtx_insn *insns; rtx eqv;
- if (stack_adjustment) - adjust_stack (GEN_INT (stack_adjustment)); - start_sequence (); emit_call_insn (ix86_gen_tls_local_dynamic_base_64 (rax, caddr)); @@ -14169,9 +14153,6 @@ legitimize_tls_address (rtx x, enum tls_model model, bool for_mov)
RTL_CONST_CALL_P (insns) = 1; emit_libcall_block (insns, base, rax, eqv); - - if (stack_adjustment) - anti_adjust_stack (GEN_INT (stack_adjustment)); } else emit_insn (gen_tls_local_dynamic_base_32 (base, pic, caddr)); diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 810ea44..6b6f44c 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -13237,8 +13237,7 @@ (call:P (mem:QI (match_operand 2 "constant_call_address_operand" "Bz")) (match_operand 3))) - (unspec:P [(match_operand 1 "tls_symbolic_operand") - (reg:P SP_REG)] + (unspec:P [(match_operand 1 "tls_symbolic_operand")] UNSPEC_TLS_GD)] "TARGET_64BIT" { @@ -13262,8 +13261,7 @@ (mem:QI (plus:DI (match_operand:DI 2 "register_operand" "b") (match_operand:DI 3 "immediate_operand" "i"))) (match_operand 4))) - (unspec:DI [(match_operand 1 "tls_symbolic_operand") - (reg:P SP_REG)] + (unspec:DI [(match_operand 1 "tls_symbolic_operand")] UNSPEC_TLS_GD)] "TARGET_64BIT && ix86_cmodel == CM_LARGE_PIC && !TARGET_PECOFF && GET_CODE (operands[3]) == CONST @@ -13285,8 +13283,7 @@ (call:P (mem:QI (match_operand 2)) (const_int 0))) - (unspec:P [(match_operand 1 "tls_symbolic_operand") - (reg:P SP_REG)] + (unspec:P [(match_operand 1 "tls_symbolic_operand")] UNSPEC_TLS_GD)])] "TARGET_64BIT" "ix86_tls_descriptor_calls_expanded_in_cfun = true;") @@ -13336,9 +13333,7 @@ (call:P (mem:QI (match_operand 1 "constant_call_address_operand" "Bz")) (match_operand 2))) - (unspec:P [(const_int 0) - (reg:P SP_REG)] - UNSPEC_TLS_LD_BASE)] + (unspec:P [(const_int 0)] UNSPEC_TLS_LD_BASE)] "TARGET_64BIT" { output_asm_insn @@ -13356,9 +13351,7 @@ (mem:QI (plus:DI (match_operand:DI 1 "register_operand" "b") (match_operand:DI 2 "immediate_operand" "i"))) (match_operand 3))) - (unspec:DI [(const_int 0) - (reg:DI SP_REG)] - UNSPEC_TLS_LD_BASE)] + (unspec:DI [(const_int 0)] UNSPEC_TLS_LD_BASE)] "TARGET_64BIT && ix86_cmodel == CM_LARGE_PIC && !TARGET_PECOFF && GET_CODE (operands[2]) == CONST && GET_CODE (XEXP (operands[2], 0)) == UNSPEC @@ -13379,9 +13372,7 @@ (call:P (mem:QI (match_operand 1)) (const_int 0))) - (unspec:P [(const_int 0) - (reg:P SP_REG)] - UNSPEC_TLS_LD_BASE)])] + (unspec:P [(const_int 0)] UNSPEC_TLS_LD_BASE)])] "TARGET_64BIT" "ix86_tls_descriptor_calls_expanded_in_cfun = true;")