Add ix86_gen_tls_global_dynamic_64 and ix86_gen_tls_local_dynamic_base_64
2012-03-12 H.J. Lu <hongjiu.lu@intel.com> * config/i386/i386.c (ix86_gen_tls_global_dynamic_64): New. (ix86_gen_tls_local_dynamic_base_64): Likewise. (ix86_option_override_internal): Set ix86_gen_tls_global_dynamic_64 and ix86_gen_tls_local_dynamic_base_64. (legitimize_tls_address): Use ix86_gen_tls_global_dynamic_64 and ix86_gen_tls_local_dynamic_base_64. * config/i386/i386.md (*tls_global_dynamic_64): Renamed to ... (*tls_global_dynamic_64_<mode>): This. (tls_global_dynamic_64): Renamed to ... (tls_global_dynamic_64_<mode>): This. (*tls_local_dynamic_base_64): Renamed to ... (*tls_local_dynamic_base_64_<mode>): This. (tls_local_dynamic_base_64): Renamed to ... (tls_local_dynamic_base_64_<mode>): This. From-SVN: r185250
This commit is contained in:
parent
0738fdbda9
commit
79eeab2348
|
@ -1,3 +1,21 @@
|
||||||
|
2012-03-12 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
* config/i386/i386.c (ix86_gen_tls_global_dynamic_64): New.
|
||||||
|
(ix86_gen_tls_local_dynamic_base_64): Likewise.
|
||||||
|
(ix86_option_override_internal): Set ix86_gen_tls_global_dynamic_64
|
||||||
|
and ix86_gen_tls_local_dynamic_base_64.
|
||||||
|
(legitimize_tls_address): Use ix86_gen_tls_global_dynamic_64 and
|
||||||
|
ix86_gen_tls_local_dynamic_base_64.
|
||||||
|
|
||||||
|
* config/i386/i386.md (*tls_global_dynamic_64): Renamed to ...
|
||||||
|
(*tls_global_dynamic_64_<mode>): This.
|
||||||
|
(tls_global_dynamic_64): Renamed to ...
|
||||||
|
(tls_global_dynamic_64_<mode>): This.
|
||||||
|
(*tls_local_dynamic_base_64): Renamed to ...
|
||||||
|
(*tls_local_dynamic_base_64_<mode>): This.
|
||||||
|
(tls_local_dynamic_base_64): Renamed to ...
|
||||||
|
(tls_local_dynamic_base_64_<mode>): This.
|
||||||
|
|
||||||
2012-03-12 H.J. Lu <hongjiu.lu@intel.com>
|
2012-03-12 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* config/i386/i386.c (ix86_option_override_internal): Properly
|
* config/i386/i386.c (ix86_option_override_internal): Properly
|
||||||
|
|
|
@ -2444,6 +2444,8 @@ static rtx (*ix86_gen_andsp) (rtx, rtx, rtx);
|
||||||
static rtx (*ix86_gen_allocate_stack_worker) (rtx, rtx);
|
static rtx (*ix86_gen_allocate_stack_worker) (rtx, rtx);
|
||||||
static rtx (*ix86_gen_adjust_stack_and_probe) (rtx, rtx, rtx);
|
static rtx (*ix86_gen_adjust_stack_and_probe) (rtx, rtx, rtx);
|
||||||
static rtx (*ix86_gen_probe_stack_range) (rtx, rtx, rtx);
|
static rtx (*ix86_gen_probe_stack_range) (rtx, rtx, rtx);
|
||||||
|
static rtx (*ix86_gen_tls_global_dynamic_64) (rtx, rtx, rtx);
|
||||||
|
static rtx (*ix86_gen_tls_local_dynamic_base_64) (rtx, rtx);
|
||||||
|
|
||||||
/* Preferred alignment for stack boundary in bits. */
|
/* Preferred alignment for stack boundary in bits. */
|
||||||
unsigned int ix86_preferred_stack_boundary;
|
unsigned int ix86_preferred_stack_boundary;
|
||||||
|
@ -3754,9 +3756,19 @@ ix86_option_override_internal (bool main_args_p)
|
||||||
{
|
{
|
||||||
ix86_gen_leave = gen_leave_rex64;
|
ix86_gen_leave = gen_leave_rex64;
|
||||||
if (Pmode == DImode)
|
if (Pmode == DImode)
|
||||||
ix86_gen_monitor = gen_sse3_monitor64_di;
|
{
|
||||||
|
ix86_gen_monitor = gen_sse3_monitor64_di;
|
||||||
|
ix86_gen_tls_global_dynamic_64 = gen_tls_global_dynamic_64_di;
|
||||||
|
ix86_gen_tls_local_dynamic_base_64
|
||||||
|
= gen_tls_local_dynamic_base_64_di;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
ix86_gen_monitor = gen_sse3_monitor64_si;
|
{
|
||||||
|
ix86_gen_monitor = gen_sse3_monitor64_si;
|
||||||
|
ix86_gen_tls_global_dynamic_64 = gen_tls_global_dynamic_64_si;
|
||||||
|
ix86_gen_tls_local_dynamic_base_64
|
||||||
|
= gen_tls_local_dynamic_base_64_si;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -12549,7 +12561,8 @@ legitimize_tls_address (rtx x, enum tls_model model, bool for_mov)
|
||||||
rtx rax = gen_rtx_REG (Pmode, AX_REG), insns;
|
rtx rax = gen_rtx_REG (Pmode, AX_REG), insns;
|
||||||
|
|
||||||
start_sequence ();
|
start_sequence ();
|
||||||
emit_call_insn (gen_tls_global_dynamic_64 (rax, x, caddr));
|
emit_call_insn (ix86_gen_tls_global_dynamic_64 (rax, x,
|
||||||
|
caddr));
|
||||||
insns = get_insns ();
|
insns = get_insns ();
|
||||||
end_sequence ();
|
end_sequence ();
|
||||||
|
|
||||||
|
@ -12597,7 +12610,8 @@ legitimize_tls_address (rtx x, enum tls_model model, bool for_mov)
|
||||||
rtx rax = gen_rtx_REG (Pmode, AX_REG), insns, eqv;
|
rtx rax = gen_rtx_REG (Pmode, AX_REG), insns, eqv;
|
||||||
|
|
||||||
start_sequence ();
|
start_sequence ();
|
||||||
emit_call_insn (gen_tls_local_dynamic_base_64 (rax, caddr));
|
emit_call_insn (ix86_gen_tls_local_dynamic_base_64 (rax,
|
||||||
|
caddr));
|
||||||
insns = get_insns ();
|
insns = get_insns ();
|
||||||
end_sequence ();
|
end_sequence ();
|
||||||
|
|
||||||
|
|
|
@ -12623,13 +12623,13 @@
|
||||||
(clobber (match_scratch:SI 5 ""))
|
(clobber (match_scratch:SI 5 ""))
|
||||||
(clobber (reg:CC FLAGS_REG))])])
|
(clobber (reg:CC FLAGS_REG))])])
|
||||||
|
|
||||||
(define_insn "*tls_global_dynamic_64"
|
(define_insn "*tls_global_dynamic_64_<mode>"
|
||||||
[(set (match_operand:DI 0 "register_operand" "=a")
|
[(set (match_operand:P 0 "register_operand" "=a")
|
||||||
(call:DI
|
(call:P
|
||||||
(mem:QI (match_operand:DI 2 "constant_call_address_operand" "z"))
|
(mem:QI (match_operand:P 2 "constant_call_address_operand" "z"))
|
||||||
(match_operand:DI 3 "" "")))
|
(match_operand:P 3 "" "")))
|
||||||
(unspec:DI [(match_operand 1 "tls_symbolic_operand" "")]
|
(unspec:P [(match_operand:P 1 "tls_symbolic_operand" "")]
|
||||||
UNSPEC_TLS_GD)]
|
UNSPEC_TLS_GD)]
|
||||||
"TARGET_64BIT"
|
"TARGET_64BIT"
|
||||||
{
|
{
|
||||||
if (!TARGET_X32)
|
if (!TARGET_X32)
|
||||||
|
@ -12646,14 +12646,15 @@
|
||||||
(set (attr "length")
|
(set (attr "length")
|
||||||
(symbol_ref "TARGET_X32 ? 15 : 16"))])
|
(symbol_ref "TARGET_X32 ? 15 : 16"))])
|
||||||
|
|
||||||
(define_expand "tls_global_dynamic_64"
|
(define_expand "tls_global_dynamic_64_<mode>"
|
||||||
[(parallel
|
[(parallel
|
||||||
[(set (match_operand:DI 0 "register_operand" "")
|
[(set (match_operand:P 0 "register_operand" "")
|
||||||
(call:DI
|
(call:P
|
||||||
(mem:QI (match_operand:DI 2 "constant_call_address_operand" ""))
|
(mem:QI (match_operand:P 2 "constant_call_address_operand" ""))
|
||||||
(const_int 0)))
|
(const_int 0)))
|
||||||
(unspec:DI [(match_operand 1 "tls_symbolic_operand" "")]
|
(unspec:P [(match_operand:P 1 "tls_symbolic_operand" "")]
|
||||||
UNSPEC_TLS_GD)])])
|
UNSPEC_TLS_GD)])]
|
||||||
|
"TARGET_64BIT")
|
||||||
|
|
||||||
(define_insn "*tls_local_dynamic_base_32_gnu"
|
(define_insn "*tls_local_dynamic_base_32_gnu"
|
||||||
[(set (match_operand:SI 0 "register_operand" "=a")
|
[(set (match_operand:SI 0 "register_operand" "=a")
|
||||||
|
@ -12690,12 +12691,12 @@
|
||||||
(clobber (match_scratch:SI 4 ""))
|
(clobber (match_scratch:SI 4 ""))
|
||||||
(clobber (reg:CC FLAGS_REG))])])
|
(clobber (reg:CC FLAGS_REG))])])
|
||||||
|
|
||||||
(define_insn "*tls_local_dynamic_base_64"
|
(define_insn "*tls_local_dynamic_base_64_<mode>"
|
||||||
[(set (match_operand:DI 0 "register_operand" "=a")
|
[(set (match_operand:P 0 "register_operand" "=a")
|
||||||
(call:DI
|
(call:P
|
||||||
(mem:QI (match_operand:DI 1 "constant_call_address_operand" "z"))
|
(mem:QI (match_operand:P 1 "constant_call_address_operand" "z"))
|
||||||
(match_operand:DI 2 "" "")))
|
(match_operand:P 2 "" "")))
|
||||||
(unspec:DI [(const_int 0)] UNSPEC_TLS_LD_BASE)]
|
(unspec:P [(const_int 0)] UNSPEC_TLS_LD_BASE)]
|
||||||
"TARGET_64BIT"
|
"TARGET_64BIT"
|
||||||
{
|
{
|
||||||
output_asm_insn
|
output_asm_insn
|
||||||
|
@ -12707,13 +12708,14 @@
|
||||||
[(set_attr "type" "multi")
|
[(set_attr "type" "multi")
|
||||||
(set_attr "length" "12")])
|
(set_attr "length" "12")])
|
||||||
|
|
||||||
(define_expand "tls_local_dynamic_base_64"
|
(define_expand "tls_local_dynamic_base_64_<mode>"
|
||||||
[(parallel
|
[(parallel
|
||||||
[(set (match_operand:DI 0 "register_operand" "")
|
[(set (match_operand:P 0 "register_operand" "")
|
||||||
(call:DI
|
(call:P
|
||||||
(mem:QI (match_operand:DI 1 "constant_call_address_operand" ""))
|
(mem:QI (match_operand:P 1 "constant_call_address_operand" ""))
|
||||||
(const_int 0)))
|
(const_int 0)))
|
||||||
(unspec:DI [(const_int 0)] UNSPEC_TLS_LD_BASE)])])
|
(unspec:P [(const_int 0)] UNSPEC_TLS_LD_BASE)])]
|
||||||
|
"TARGET_64BIT")
|
||||||
|
|
||||||
;; Local dynamic of a single variable is a lose. Show combine how
|
;; Local dynamic of a single variable is a lose. Show combine how
|
||||||
;; to convert that back to global dynamic.
|
;; to convert that back to global dynamic.
|
||||||
|
|
Loading…
Reference in New Issue