aboutsummaryrefslogtreecommitdiff
path: root/opcodes/sparc-opc.c
diff options
context:
space:
mode:
authorJim Wilson <wilson@tuliptree.org>1992-09-15 19:55:26 +0000
committerJim Wilson <wilson@tuliptree.org>1992-09-15 19:55:26 +0000
commit866e23d0559dba5051e403485745b54415ea7eb9 (patch)
treeafdbeeeedb7115592d067242adec0c7d6cca6808 /opcodes/sparc-opc.c
parente25e2b2ccca2f36298fd9a7c68f3d5bb95dffa9e (diff)
downloadgdb-866e23d0559dba5051e403485745b54415ea7eb9.zip
gdb-866e23d0559dba5051e403485745b54415ea7eb9.tar.gz
gdb-866e23d0559dba5051e403485745b54415ea7eb9.tar.bz2
In brx macro, check for XCC bit set in xcc insns, and not set in icc insns.
In cond macro, do brx before br, to avoid getting extra symbol table entries due to failed pattern matches.
Diffstat (limited to 'opcodes/sparc-opc.c')
-rw-r--r--opcodes/sparc-opc.c31
1 files changed, 18 insertions, 13 deletions
diff --git a/opcodes/sparc-opc.c b/opcodes/sparc-opc.c
index 86405f1..40240f8 100644
--- a/opcodes/sparc-opc.c
+++ b/opcodes/sparc-opc.c
@@ -945,18 +945,18 @@ struct sparc_opcode sparc_opcodes[] = {
{ opcode, (mask) , (lose)|ANNUL, "l", (flags), v6 }
#define brx(opcode, mask, lose, flags) /* v9 */ \
- { opcode, (mask), (lose)|ANNUL|BPRED, "Z,G", (flags), v9 }, \
- { opcode, (mask), (lose)|ANNUL|BPRED, ",N Z,G", (flags), v9 }, \
- { opcode, (mask)|ANNUL, (lose)|BPRED, ",a Z,G", (flags), v9 }, \
- { opcode, (mask)|ANNUL, (lose)|BPRED, ",a,N Z,G", (flags), v9 }, \
- { opcode, (mask)|BPRED, (lose)|ANNUL, ",T Z,G", (flags), v9 }, \
- { opcode, (mask)|ANNUL|BPRED, (lose), ",a,T Z,G", (flags), v9 }, \
- { opcode, (mask), (lose)|ANNUL|BPRED, "z,G", (flags), v9 }, \
- { opcode, (mask), (lose)|ANNUL|BPRED, ",N z,G", (flags), v9 }, \
- { opcode, (mask)|ANNUL, (lose)|BPRED, ",a z,G", (flags), v9 }, \
- { opcode, (mask)|ANNUL, (lose)|BPRED, ",a,N z,G", (flags), v9 }, \
- { opcode, (mask)|BPRED, (lose)|ANNUL, ",T z,G", (flags), v9 }, \
- { opcode, (mask)|ANNUL|BPRED, (lose), ",a,T z,G", (flags), v9 }
+ { opcode, (mask)|(2<<20), (lose)|ANNUL|BPRED, "Z,G", (flags), v9 }, \
+ { opcode, (mask)|(2<<20), (lose)|ANNUL|BPRED, ",N Z,G", (flags), v9 }, \
+ { opcode, (mask)|(2<<20)|ANNUL, (lose)|BPRED, ",a Z,G", (flags), v9 }, \
+ { opcode, (mask)|(2<<20)|ANNUL, (lose)|BPRED, ",a,N Z,G", (flags), v9 }, \
+ { opcode, (mask)|(2<<20)|BPRED, (lose)|ANNUL, ",T Z,G", (flags), v9 }, \
+ { opcode, (mask)|(2<<20)|ANNUL|BPRED, (lose), ",a,T Z,G", (flags), v9 }, \
+ { opcode, (mask), (lose)|(2<<20)|ANNUL|BPRED, "z,G", (flags), v9 }, \
+ { opcode, (mask), (lose)|(2<<20)|ANNUL|BPRED, ",N z,G", (flags), v9 }, \
+ { opcode, (mask)|ANNUL, (lose)|(2<<20)|BPRED, ",a z,G", (flags), v9 }, \
+ { opcode, (mask)|ANNUL, (lose)|(2<<20)|BPRED, ",a,N z,G", (flags), v9 }, \
+ { opcode, (mask)|BPRED, (lose)|(2<<20)|ANNUL, ",T z,G", (flags), v9 }, \
+ { opcode, (mask)|ANNUL|BPRED, (lose)|(2<<20), ",a,T z,G", (flags), v9 }
/* Define four traps: reg+reg, reg + immediate, immediate alone, reg alone. */
#define tr(opcode, mask, lose, flags) \
@@ -973,10 +973,15 @@ struct sparc_opcode sparc_opcodes[] = {
{ opcode, (mask), IMMED|(lose), "1+2", (flags), v6 }, /* rs1 + rs2 */ \
{ opcode, (mask), IMMED|(lose)|RS2_G0, "1", (flags), v6 } /* rs1 + %g0 */
+/* v9: We must put `brx' before `br', to ensure that we never match something
+ v9: against an expression unless it is an expression. Otherwise, we end
+ v9: up with undefined symbol tables entries, because they get added, but
+ v9: are not deleted if the pattern fails to match. */
+
/* Define both branches and traps based on condition mask */
#define cond(bop, top, mask, flags) \
- br(bop, F2(0, 2)|(mask), F2(~0, ~2)|((~mask)&COND(~0)), F_DELAYED|(flags)), \
brx(bop, F2(0, 1)|(mask), F2(~0, ~1)|((~mask)&COND(~0)), F_DELAYED|(flags)), /* v9 */ \
+ br(bop, F2(0, 2)|(mask), F2(~0, ~2)|((~mask)&COND(~0)), F_DELAYED|(flags)), \
tr(top, F3(2, 0x3a, 0)|(mask), F3(~2, ~0x3a, 0)|((~mask)&COND(~0)), (flags))
/* Define all the conditions, all the branches, all the traps. */