aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1993-05-06 12:58:33 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1993-05-06 12:58:33 -0400
commitab6155b74f075dee48d39dd00f77cab0fd6b4fe4 (patch)
tree2d0c64f288d0ad6bdf5ee5672a4c34bee2c33446 /gcc
parent36aa0bf595347b210b80a80be4fc561673fa5deb (diff)
downloadgcc-ab6155b74f075dee48d39dd00f77cab0fd6b4fe4.zip
gcc-ab6155b74f075dee48d39dd00f77cab0fd6b4fe4.tar.gz
gcc-ab6155b74f075dee48d39dd00f77cab0fd6b4fe4.tar.bz2
(walk_fixup_memory_subreg): Add new arg UNCRITICAL.
(fixup_var_refs_insn): Call with UNCRITICAL of 1 when processing REG_NOTES. From-SVN: r4360
Diffstat (limited to 'gcc')
-rw-r--r--gcc/function.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/gcc/function.c b/gcc/function.c
index b4e03c3..58add12 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -1146,7 +1146,8 @@ fixup_var_refs_insns (var, promoted_mode, unsignedp, insn, toplevel)
we will get them elsewhere. */
for (note = REG_NOTES (insn); note; note = XEXP (note, 1))
if (GET_CODE (note) != INSN_LIST)
- XEXP (note, 0) = walk_fixup_memory_subreg (XEXP (note, 0), insn);
+ XEXP (note, 0)
+ = walk_fixup_memory_subreg (XEXP (note, 0), insn, 1);
}
insn = next;
}
@@ -1649,7 +1650,7 @@ fixup_var_refs_1 (var, promoted_mode, loc, insn, replacements)
If any insns must be emitted to compute NEWADDR, put them before INSN.
UNCRITICAL nonzero means accept paradoxical subregs.
- This is used for subregs found inside of ZERO_EXTRACTs. */
+ This is used for subregs found inside of ZERO_EXTRACTs and in REG_NOTES. */
static rtx
fixup_memory_subreg (x, insn, uncritical)
@@ -1687,12 +1688,15 @@ fixup_memory_subreg (x, insn, uncritical)
If X itself is a (SUBREG (MEM ...) ...), return the replacement expression.
Otherwise return X, with its contents possibly altered.
- If any insns must be emitted to compute NEWADDR, put them before INSN. */
+ If any insns must be emitted to compute NEWADDR, put them before INSN.
+
+ UNCRITICAL is as in fixup_memory_subreg. */
static rtx
-walk_fixup_memory_subreg (x, insn)
+walk_fixup_memory_subreg (x, insn, uncritical)
register rtx x;
rtx insn;
+ int uncritical;
{
register enum rtx_code code;
register char *fmt;
@@ -1704,7 +1708,7 @@ walk_fixup_memory_subreg (x, insn)
code = GET_CODE (x);
if (code == SUBREG && GET_CODE (SUBREG_REG (x)) == MEM)
- return fixup_memory_subreg (x, insn, 0);
+ return fixup_memory_subreg (x, insn, uncritical);
/* Nothing special about this RTX; fix its operands. */
@@ -1712,13 +1716,13 @@ walk_fixup_memory_subreg (x, insn)
for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
{
if (fmt[i] == 'e')
- XEXP (x, i) = walk_fixup_memory_subreg (XEXP (x, i), insn);
+ XEXP (x, i) = walk_fixup_memory_subreg (XEXP (x, i), insn, uncritical);
if (fmt[i] == 'E')
{
register int j;
for (j = 0; j < XVECLEN (x, i); j++)
XVECEXP (x, i, j)
- = walk_fixup_memory_subreg (XVECEXP (x, i, j), insn);
+ = walk_fixup_memory_subreg (XVECEXP (x, i, j), insn, uncritical);
}
}
return x;