aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorTomer Levi <Tomer.Levi@nsc.com>2004-10-25 09:30:55 +0000
committerTomer Levi <Tomer.Levi@nsc.com>2004-10-25 09:30:55 +0000
commite92c9d66d3ea1298dd34f857faf4d85e9c5d2407 (patch)
treead3b3e793d8ef841b6f6d433a509d96ad03535bf /gas
parentb2a7b577d1a27420bd17db2db2f86dff835c81f8 (diff)
downloadgdb-e92c9d66d3ea1298dd34f857faf4d85e9c5d2407.zip
gdb-e92c9d66d3ea1298dd34f857faf4d85e9c5d2407.tar.gz
gdb-e92c9d66d3ea1298dd34f857faf4d85e9c5d2407.tar.bz2
1. Check unsigned immediate operands validity. 2. Update coprocessor id to be unsigned immediate.
Diffstat (limited to 'gas')
-rw-r--r--gas/config/tc-crx.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/gas/config/tc-crx.c b/gas/config/tc-crx.c
index b1063a0..e3145f5 100644
--- a/gas/config/tc-crx.c
+++ b/gas/config/tc-crx.c
@@ -2071,6 +2071,21 @@ assemble_insn (char *mnemonic, ins *insn)
done_flag = (post_inc_mode == IS_INSN_TYPE (LD_STOR_INS_INC));
}
+ if (done_flag)
+ {
+ for (i = 0; i < insn->nargs; i++)
+ {
+ if (((instruction->operands[i].op_type == us3)
+ || (instruction->operands[i].op_type == us4)
+ || (instruction->operands[i].op_type == us5))
+ && (insn->arg[i].signflag == 1))
+ {
+ done_flag = 0;
+ break;
+ }
+ }
+ }
+
if (done_flag == 0)
{
/* Try again with next instruction. */
@@ -2118,7 +2133,7 @@ assemble_insn (char *mnemonic, ins *insn)
|| IS_INSN_TYPE (COP_BRANCH_INS))
{
/* The coprocessor id is always the first argument. */
- if ((instruction->operands[0].op_type == i4)
+ if ((instruction->operands[0].op_type == us4)
&& (insn->arg[0].constant == 0)
&& (! IS_INSN_MNEMONIC ("mtcr")
&& ! IS_INSN_MNEMONIC ("mfcr")))