OSDN Git Service

PR target/13354
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 10 Dec 2003 15:25:41 +0000 (15:25 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 10 Dec 2003 15:25:41 +0000 (15:25 +0000)
* config/sparc/sparc.c (sparc_output_mi_thunk): Load DELTA
manually if one can do that with only one instruction.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74499 138bc75d-0d04-0410-961f-82ee72b054a4

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

index c10568e..71dfb7e 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 d33fd18..a3fdcc6 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;
     }