sh.c (prepare_move_operands): Use emit_call_insn when the TLS address is generated...
authorKaz Kojima <kkojima@gcc.gnu.org>
Tue, 6 Apr 2004 05:58:44 +0000 (05:58 +0000)
committerKaz Kojima <kkojima@gcc.gnu.org>
Tue, 6 Apr 2004 05:58:44 +0000 (05:58 +0000)
* config/sh/sh.c (prepare_move_operands): Use emit_call_insn
when the TLS address is generated by a function call.
* config/sh/sh.md (tls_global_dynamic): Use a call expression.
(tls_local_dynamic): Likewise.

From-SVN: r80450

gcc/ChangeLog
gcc/config/sh/sh.c
gcc/config/sh/sh.md

index 110559388af61eb1a58a27a95a20cc75346fd3b0..7cf0c67666be5557c02a1c6af8030c36135d9fd9 100644 (file)
@@ -1,3 +1,10 @@
+2004-04-05  Kaz Kojima  <kkojima@gcc.gnu.org>
+
+       * config/sh/sh.c (prepare_move_operands): Use emit_call_insn
+       when the TLS address is generated by a function call.
+       * config/sh/sh.md (tls_global_dynamic): Use a call expression.
+       (tls_local_dynamic): Likewise.
+
 2004-04-05  Andrew Pinski  <pinskia@physics.uc.edu>
 
        * tree.c (reconstruct_complex_type): Use TYPE_READONLY
index 32c8ef99d0f3632ad59839a03efeeb7a72b797f2..a790c43a04368033381425fc5d09571ff4087077 100644 (file)
@@ -944,13 +944,13 @@ prepare_move_operands (rtx operands[], enum machine_mode mode)
            {
            case TLS_MODEL_GLOBAL_DYNAMIC:
              tga_ret = gen_rtx_REG (Pmode, R0_REG);
-             emit_insn (gen_tls_global_dynamic (tga_ret, op1));
+             emit_call_insn (gen_tls_global_dynamic (tga_ret, op1));
              op1 = tga_ret;
              break;
 
            case TLS_MODEL_LOCAL_DYNAMIC:
              tga_ret = gen_rtx_REG (Pmode, R0_REG);
-             emit_insn (gen_tls_local_dynamic (tga_ret, op1));
+             emit_call_insn (gen_tls_local_dynamic (tga_ret, op1));
 
              tmp = gen_reg_rtx (Pmode);
              emit_move_insn (tmp, tga_ret);
index 73cd17d9e5c633fcda1ef8fac5550daad1e4554c..a31e8b125c1b44b5d53c4c202451e6dd5538afb1 100644 (file)
 
 (define_insn "tls_global_dynamic"
   [(set (match_operand:SI 0 "register_operand" "=&z")
-       (unspec:SI [(match_operand:SI 1 "" "")]
-                   UNSPEC_TLSGD))
+       (call (unspec:SI [(match_operand:SI 1 "" "")]
+                         UNSPEC_TLSGD)
+             (const_int 0)))
    (use (reg:PSI FPSCR_REG))
    (use (reg:SI PIC_REG))
    (clobber (reg:SI PR_REG))
@@ -6891,8 +6892,9 @@ mov.l\\t1f,r4\\n\\
 
 (define_insn "tls_local_dynamic"
   [(set (match_operand:SI 0 "register_operand" "=&z")
-       (unspec:SI [(match_operand:SI 1 "" "")]
-                   UNSPEC_TLSLDM))
+       (call (unspec:SI [(match_operand:SI 1 "" "")]
+                         UNSPEC_TLSLDM)
+             (const_int 0)))
    (use (reg:PSI FPSCR_REG))
    (use (reg:SI PIC_REG))
    (clobber (reg:SI PR_REG))