Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/gnu/dist/gcc4/gcc/config/vax Fix a bug in movmemsi in which ...
details: https://anonhg.NetBSD.org/src/rev/ac8e950b2605
branches: trunk
changeset: 773445:ac8e950b2605
user: matt <matt%NetBSD.org@localhost>
date: Thu Feb 02 13:32:17 2012 +0000
description:
Fix a bug in movmemsi in which couldn't handle sym(reg) expressions properly.
diffstat:
gnu/dist/gcc4/gcc/config/vax/vax.c | 25 +++++++++++++++++++++++--
1 files changed, 23 insertions(+), 2 deletions(-)
diffs (35 lines):
diff -r 3410a0e03d6d -r ac8e950b2605 gnu/dist/gcc4/gcc/config/vax/vax.c
--- a/gnu/dist/gcc4/gcc/config/vax/vax.c Thu Feb 02 13:11:25 2012 +0000
+++ b/gnu/dist/gcc4/gcc/config/vax/vax.c Thu Feb 02 13:32:17 2012 +0000
@@ -1545,8 +1545,29 @@
if (GET_CODE (base) == PLUS)
{
- off += INTVAL (XEXP (base, 1));
- base = XEXP (base, 0);
+ rtx a = XEXP (base, 0);
+ rtx b = XEXP (base, 1);
+ if (GET_CODE (b) == CONST_INT)
+ {
+ off += INTVAL (b);
+ base = a;
+ }
+ else if (GET_CODE (a) == REG && GET_CODE (b) == SYMBOL_REF)
+ {
+ if (off != 0)
+ {
+ base = gen_rtx_PLUS (Pmode, a, plus_constant(b, off));
+ off = 0;
+ }
+ }
+ else if (GET_CODE (a) == REG && GET_CODE (b) == PLUS)
+ {
+ off += INTVAL (XEXP (b, 1));
+ base = gen_rtx_PLUS (Pmode, a, plus_constant(XEXP (b, 0), off));
+ off = 0;
+ }
+ else
+ gcc_assert(0);
}
if (code == POST_INC)
tmp = gen_rtx_POST_INC (SImode, base);
Home |
Main Index |
Thread Index |
Old Index