Commit 68882f0f by Jakub Jelinek Committed by Jakub Jelinek

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
parent 648fe28b
2002-03-22 Jakub Jelinek <jakub@redhat.com>
* 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 <rth@redhat.com> 2002-03-22 Richard Henderson <rth@redhat.com>
PR target/3177 PR target/3177
......
/* Subroutines for insn-output.c for Intel 860 /* 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. Free Software Foundation, Inc.
Derived from sparc.c. Derived from sparc.c.
...@@ -1470,7 +1470,7 @@ output_delayed_branch (template, operands, insn) ...@@ -1470,7 +1470,7 @@ output_delayed_branch (template, operands, insn)
for (i = 0; i < insn_data[insn_code_number].n_operands; i++) for (i = 0; i < insn_data[insn_code_number].n_operands; i++)
{ {
if (GET_CODE (recog_data.operand[i]) == SUBREG) 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); insn_extract (delay_insn);
...@@ -1511,7 +1511,7 @@ output_delay_insn (delay_insn) ...@@ -1511,7 +1511,7 @@ output_delay_insn (delay_insn)
for (i = 0; i < insn_data[insn_code_number].n_operands; i++) for (i = 0; i < insn_data[insn_code_number].n_operands; i++)
{ {
if (GET_CODE (recog_data.operand[i]) == SUBREG) 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)) if (! constrain_operands (1))
......
...@@ -1281,9 +1281,9 @@ gen_split_move_double (operands) ...@@ -1281,9 +1281,9 @@ gen_split_move_double (operands)
subregs to make this code simpler. It is safe to call subregs to make this code simpler. It is safe to call
alter_subreg any time after reload. */ alter_subreg any time after reload. */
if (GET_CODE (dest) == SUBREG) if (GET_CODE (dest) == SUBREG)
dest = alter_subreg (dest); alter_subreg (&dest);
if (GET_CODE (src) == SUBREG) if (GET_CODE (src) == SUBREG)
src = alter_subreg (src); alter_subreg (&src);
start_sequence (); start_sequence ();
if (GET_CODE (dest) == REG) if (GET_CODE (dest) == REG)
......
/* Output routines for GCC for picoJava II /* 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. This file is part of GNU CC.
...@@ -509,7 +509,7 @@ pj_output_rval (op, mode, outer_op) ...@@ -509,7 +509,7 @@ pj_output_rval (op, mode, outer_op)
break; break;
case SUBREG: case SUBREG:
pj_output_rval (alter_subreg (op), mode, outer_op); pj_output_rval (alter_subreg (&op), mode, outer_op);
break; break;
case POST_INC: case POST_INC:
......
/* Subroutines for insn-output.c for NEC V850 series /* 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. Free Software Foundation, Inc.
Contributed by Jeff Law (law@cygnus.com). Contributed by Jeff Law (law@cygnus.com).
...@@ -1249,12 +1249,15 @@ void v850_reorg (start_insn) ...@@ -1249,12 +1249,15 @@ void v850_reorg (start_insn)
int unsignedp = FALSE; int unsignedp = FALSE;
/* We might have (SUBREG (MEM)) here, so just get rid of the /* We might have (SUBREG (MEM)) here, so just get rid of the
subregs to make this code simpler. It is safe to call subregs to make this code simpler. */
alter_subreg any time after reload. */ if (GET_CODE (dest) == SUBREG
if (GET_CODE (dest) == SUBREG) && (GET_CODE (SUBREG_REG (dest)) == MEM
dest = alter_subreg (dest); || GET_CODE (SUBREG_REG (dest)) == REG))
if (GET_CODE (src) == SUBREG) alter_subreg (&dest);
src = alter_subreg (src); 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) if (GET_CODE (dest) == MEM && GET_CODE (src) == MEM)
mem = NULL_RTX; mem = NULL_RTX;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment