sh.c (prepare_move_operands): Use operands[0] as temporary if no_new_pseudos.
authorAlexandre Oliva <aoliva@redhat.com>
Fri, 19 Jan 2001 22:31:21 +0000 (22:31 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Fri, 19 Jan 2001 22:31:21 +0000 (22:31 +0000)
* config/sh/sh.c (prepare_move_operands) [PIC]: Use operands[0] as
temporary if no_new_pseudos.

From-SVN: r39145

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

index 24f4796ef8a03f88c381194ae6496c4cc40e2c91..0f050d48ae5ef94fc2f42e532acd776fd39262db 100644 (file)
@@ -1,3 +1,8 @@
+2001-01-19  Alexandre Oliva  <aoliva@redhat.com>
+
+       * config/sh/sh.c (prepare_move_operands) [PIC]: Use operands[0] as
+       temporary if no_new_pseudos.
+
 2001-01-19  Neil Booth  <neil@daikokuya.demon.co.uk>
 
         * cppinternals.texi: Update.
index ce50f519c4585cfbce70b6432dbe40de028e1902..c89db668b90a1173695ffff8cc0654917dff484b 100644 (file)
@@ -475,11 +475,14 @@ prepare_move_operands (operands, mode)
               && GET_CODE (XEXP (operands[1], 0)) == PLUS
               && SYMBOLIC_CONST_P (XEXP (XEXP (operands[1], 0), 0)))
        {
+         temp = no_new_pseudos ? operands[0] : gen_reg_rtx (Pmode);
          temp = legitimize_pic_address (XEXP (XEXP (operands[1], 0), 0),
-                                        SImode, gen_reg_rtx (Pmode));
+                                        SImode, temp);
          operands[1] = expand_binop (SImode, add_optab, temp,
                                      XEXP (XEXP (operands[1], 0), 1),
-                                     gen_reg_rtx (Pmode), 0, OPTAB_LIB_WIDEN);
+                                     no_new_pseudos ? temp
+                                     : gen_reg_rtx (Pmode),
+                                     0, OPTAB_LIB_WIDEN);
        }
     }