re PR target/13354 (internal compiler error: in sparc_emit_set_const32)
authorEric Botcazou <ebotcazou@libertysurf.fr>
Wed, 10 Dec 2003 15:25:41 +0000 (16:25 +0100)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Wed, 10 Dec 2003 15:25:41 +0000 (15:25 +0000)
PR target/13354
* config/sparc/sparc.c (sparc_output_mi_thunk): Load DELTA
manually if one can do that with only one instruction.

From-SVN: r74499

gcc/ChangeLog
gcc/config/sparc/sparc.c

index c10568e595f0693208a0454d03ba386a7c99b9dc..71dfb7e95429e333e878d1514660400e4069e6e9 100644 (file)
@@ -1,3 +1,9 @@
+2003-12-10  Eric Botcazou  <ebotcazou@libertysurf.fr>
+
+       PR target/13354
+       * config/sparc/sparc.c (sparc_output_mi_thunk): Load DELTA
+       manually if one can do that with only one instruction.
+
 2003-12-10  Nick Clifton  <nickc@redhat.com>
 
        * config.gcc (arm-linux): Include linux.h in tm_file so that
index d33fd18a5b48de817fc3d7836cf48b739c9eef58..a3fdcc6cdb26675ce883afe9760eb24a55c40172 100644 (file)
@@ -9085,10 +9085,17 @@ sparc_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
   if (!SPARC_SIMM13_P (delta))
     {
       rtx scratch = gen_rtx_REG (Pmode, 1);
-      if (TARGET_ARCH64)
-       sparc_emit_set_const64 (scratch, delta_rtx);
+
+      if (input_operand (delta_rtx, GET_MODE (scratch)))
+       emit_insn (gen_rtx_SET (VOIDmode, scratch, delta_rtx));
       else
-       sparc_emit_set_const32 (scratch, delta_rtx);
+       {
+         if (TARGET_ARCH64)
+           sparc_emit_set_const64 (scratch, delta_rtx);
+         else
+           sparc_emit_set_const32 (scratch, delta_rtx);
+       }
+
       delta_rtx = scratch;
     }