From 68882f0f81044cb3bdd5e270f6ed1bdc2a55571c Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 22 Mar 2002 20:29:21 +0100 Subject: [PATCH] v850.c (v850_reorg): Only call alter_subreg on REG or MEM subregs, pass rtx * instead of rtx to it. * config/v850/v850.c (v850_reorg): Only call alter_subreg on REG or MEM subregs, pass rtx * instead of rtx to it. * config/i860/i860.c (output_delayed_branch, output_delay_insn): Pass rtx * instead of rtx to alter_subreg. * config/m32r/m32r.c (gen_split_move_double): Likewise. * config/pj/pj.c (pj_output_rval): Likewise. From-SVN: r51182 --- gcc/ChangeLog | 9 +++++++++ gcc/config/i860/i860.c | 6 +++--- gcc/config/m32r/m32r.c | 4 ++-- gcc/config/pj/pj.c | 4 ++-- gcc/config/v850/v850.c | 17 ++++++++++------- 5 files changed, 26 insertions(+), 14 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4dfc46acee2..ce9c9b3cbd8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2002-03-22 Jakub Jelinek + + * config/v850/v850.c (v850_reorg): Only call alter_subreg on + REG or MEM subregs, pass rtx * instead of rtx to it. + * config/i860/i860.c (output_delayed_branch, output_delay_insn): Pass + rtx * instead of rtx to alter_subreg. + * config/m32r/m32r.c (gen_split_move_double): Likewise. + * config/pj/pj.c (pj_output_rval): Likewise. + 2002-03-22 Richard Henderson PR target/3177 diff --git a/gcc/config/i860/i860.c b/gcc/config/i860/i860.c index f79af15c76a..5538baffae7 100644 --- a/gcc/config/i860/i860.c +++ b/gcc/config/i860/i860.c @@ -1,5 +1,5 @@ /* Subroutines for insn-output.c for Intel 860 - Copyright (C) 1989, 1991, 1997, 1998, 1999, 2000, 2001 + Copyright (C) 1989, 1991, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Derived from sparc.c. @@ -1470,7 +1470,7 @@ output_delayed_branch (template, operands, insn) for (i = 0; i < insn_data[insn_code_number].n_operands; i++) { if (GET_CODE (recog_data.operand[i]) == SUBREG) - recog_data.operand[i] = alter_subreg (recog_data.operand[i]); + alter_subreg (&recog_data.operand[i]); } insn_extract (delay_insn); @@ -1511,7 +1511,7 @@ output_delay_insn (delay_insn) for (i = 0; i < insn_data[insn_code_number].n_operands; i++) { if (GET_CODE (recog_data.operand[i]) == SUBREG) - recog_data.operand[i] = alter_subreg (recog_data.operand[i]); + alter_subreg (&recog_data.operand[i]); } if (! constrain_operands (1)) diff --git a/gcc/config/m32r/m32r.c b/gcc/config/m32r/m32r.c index acc6b5edb2a..32dff3ab23c 100644 --- a/gcc/config/m32r/m32r.c +++ b/gcc/config/m32r/m32r.c @@ -1281,9 +1281,9 @@ gen_split_move_double (operands) subregs to make this code simpler. It is safe to call alter_subreg any time after reload. */ if (GET_CODE (dest) == SUBREG) - dest = alter_subreg (dest); + alter_subreg (&dest); if (GET_CODE (src) == SUBREG) - src = alter_subreg (src); + alter_subreg (&src); start_sequence (); if (GET_CODE (dest) == REG) diff --git a/gcc/config/pj/pj.c b/gcc/config/pj/pj.c index 8e6488399ce..736a30a0966 100644 --- a/gcc/config/pj/pj.c +++ b/gcc/config/pj/pj.c @@ -1,5 +1,5 @@ /* Output routines for GCC for picoJava II - Copyright (C) 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU CC. @@ -509,7 +509,7 @@ pj_output_rval (op, mode, outer_op) break; case SUBREG: - pj_output_rval (alter_subreg (op), mode, outer_op); + pj_output_rval (alter_subreg (&op), mode, outer_op); break; case POST_INC: diff --git a/gcc/config/v850/v850.c b/gcc/config/v850/v850.c index 76872edd1b0..f3b17aa7f9b 100644 --- a/gcc/config/v850/v850.c +++ b/gcc/config/v850/v850.c @@ -1,5 +1,5 @@ /* Subroutines for insn-output.c for NEC V850 series - Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 + Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Jeff Law (law@cygnus.com). @@ -1249,12 +1249,15 @@ void v850_reorg (start_insn) int unsignedp = FALSE; /* We might have (SUBREG (MEM)) here, so just get rid of the - subregs to make this code simpler. It is safe to call - alter_subreg any time after reload. */ - if (GET_CODE (dest) == SUBREG) - dest = alter_subreg (dest); - if (GET_CODE (src) == SUBREG) - src = alter_subreg (src); + subregs to make this code simpler. */ + if (GET_CODE (dest) == SUBREG + && (GET_CODE (SUBREG_REG (dest)) == MEM + || GET_CODE (SUBREG_REG (dest)) == REG)) + alter_subreg (&dest); + if (GET_CODE (src) == SUBREG + && (GET_CODE (SUBREG_REG (src)) == MEM + || GET_CODE (SUBREG_REG (src)) == REG)) + alter_subreg (&src); if (GET_CODE (dest) == MEM && GET_CODE (src) == MEM) mem = NULL_RTX;