aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/1750a
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1995-09-15 17:29:37 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1995-09-15 17:29:37 -0400
commitb8076552689fa812fc189ce5e45904ee8f9061c8 (patch)
tree1948c05f5b1dce636bbdf3008ca901c258d8cad1 /gcc/config/1750a
parent760607e80cc4a2308e90e328f9997b5018d8d493 (diff)
downloadgcc-b8076552689fa812fc189ce5e45904ee8f9061c8.zip
gcc-b8076552689fa812fc189ce5e45904ee8f9061c8.tar.gz
gcc-b8076552689fa812fc189ce5e45904ee8f9061c8.tar.bz2
(b_mode_operand): New function.
(print_operand): Added code 'Q'. From-SVN: r10360
Diffstat (limited to 'gcc/config/1750a')
-rw-r--r--gcc/config/1750a/1750a.c33
1 files changed, 32 insertions, 1 deletions
diff --git a/gcc/config/1750a/1750a.c b/gcc/config/1750a/1750a.c
index 5871f90..e7a98dd 100644
--- a/gcc/config/1750a/1750a.c
+++ b/gcc/config/1750a/1750a.c
@@ -291,6 +291,32 @@ small_nonneg_const (op, mode)
return 0;
}
+
+/* predicate for 1750 `B' addressing mode (Base Register with Offset)
+ memory operand */
+int
+b_mode_operand (op)
+ rtx op;
+{
+ if (GET_CODE (op) == MEM)
+ {
+ rtx inner = XEXP (op, 0);
+ if (GET_CODE (inner) == PLUS)
+ {
+ rtx plus_op0 = XEXP (inner, 0);
+ if (GET_CODE (plus_op0) == REG && REG_OK_FOR_INDEX_P (plus_op0))
+ {
+ rtx plus_op1 = XEXP (inner, 1);
+ if (GET_CODE (plus_op1) == CONST_INT
+ && INTVAL (plus_op1) >= 0
+ && INTVAL (plus_op1) <= 255)
+ return 1;
+ }
+ }
+ }
+ return 0;
+}
+
/* Decide whether to output a conditional jump as a "Jump Conditional"
or as a "Branch Conditional": */
@@ -384,7 +410,12 @@ print_operand (file, x, kode)
case LABEL_REF:
case CONST:
case MEM:
- output_address (XEXP (x, 0));
+ if (kode == 'Q')
+ fprintf (file, "r%d,%d",
+ REGNO (XEXP (XEXP (x, 0), 0)),
+ INTVAL (XEXP (XEXP (x, 0), 1)));
+ else
+ output_address (XEXP (x, 0));
break;
case CONST_DOUBLE:
/* {