From 68c37dc9015b5dd1a5692bdf5d4e8729caac40b7 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Fri, 19 Jan 2001 22:31:21 +0000 Subject: [PATCH] sh.c (prepare_move_operands): Use operands[0] as temporary if no_new_pseudos. * config/sh/sh.c (prepare_move_operands) [PIC]: Use operands[0] as temporary if no_new_pseudos. From-SVN: r39145 --- gcc/ChangeLog | 5 +++++ gcc/config/sh/sh.c | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 24f4796ef8a..0f050d48ae5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2001-01-19 Alexandre Oliva + + * config/sh/sh.c (prepare_move_operands) [PIC]: Use operands[0] as + temporary if no_new_pseudos. + 2001-01-19 Neil Booth * cppinternals.texi: Update. diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index ce50f519c45..c89db668b90 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -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); } } -- 2.30.2