aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1996-06-19 18:34:30 +0000
committerIan Lance Taylor <ian@airs.com>1996-06-19 18:34:30 +0000
commit9753202d00b3bdbbda6e66b42aab00a4440e81ff (patch)
tree7213d0c8c0f1eb76f71962d61f6557df95bd85de /gas
parent9ee759fc91ac119af567847c01b4c21b02f88f25 (diff)
downloadgdb-9753202d00b3bdbbda6e66b42aab00a4440e81ff.zip
gdb-9753202d00b3bdbbda6e66b42aab00a4440e81ff.tar.gz
gdb-9753202d00b3bdbbda6e66b42aab00a4440e81ff.tar.bz2
* config/tc-mips.c (mips_ip): In cases 'I', 'i', and 'j', set
insn_error rather than calling check_absolute_expr.
Diffstat (limited to 'gas')
-rw-r--r--gas/config/tc-mips.c36
1 files changed, 23 insertions, 13 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index b68a092..932bfc7 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -5039,8 +5039,7 @@ mips_ip (str, ip)
}
if ((insn = (struct mips_opcode *) hash_find (op_hash, str)) == NULL)
{
- as_warn ("`%s' not in hash table.", str);
- insn_error = "ERROR: Unrecognized opcode";
+ insn_error = "unrecognized opcode";
return;
}
argsStart = s;
@@ -5075,7 +5074,8 @@ mips_ip (str, ip)
++insn;
continue;
}
- as_warn ("Instruction not supported on this processor");
+ insn_error = "opcode not supported on this processor";
+ return;
}
ip->insn_mo = insn;
@@ -5279,7 +5279,10 @@ mips_ip (str, ip)
else
goto notreg;
}
- if (regno == AT && ! mips_noat)
+ if (regno == AT
+ && ! mips_noat
+ && *args != 'E'
+ && *args != 'G')
as_warn ("Used $at without \".set noat\"");
c = *args;
if (*s == ' ')
@@ -5421,8 +5424,9 @@ mips_ip (str, ip)
case 'I':
my_getExpression (&imm_expr, s);
- if (imm_expr.X_op != O_big)
- check_absolute_expr (ip, &imm_expr);
+ if (imm_expr.X_op != O_big
+ && imm_expr.X_op != O_constant)
+ insn_error = "absolute expression required";
s = expr_end;
continue;
@@ -5589,18 +5593,20 @@ mips_ip (str, ip)
imm_reloc = BFD_RELOC_HI16;
}
}
- else if (imm_expr.X_op != O_big)
- check_absolute_expr (ip, &imm_expr);
if (*args == 'i')
{
- if (imm_expr.X_op == O_big
+ if (imm_expr.X_op != O_constant
|| imm_expr.X_add_number < 0
|| imm_expr.X_add_number >= 0x10000)
{
if (insn + 1 < &mips_opcodes[NUMOPCODES] &&
!strcmp (insn->name, insn[1].name))
break;
- as_bad ("16 bit expression not in range 0..65535");
+ if (imm_expr.X_op != O_constant
+ && imm_expr.X_op != O_big)
+ insn_error = "absolute expression required";
+ else
+ as_bad ("16 bit expression not in range 0..65535");
}
}
else
@@ -5623,7 +5629,7 @@ mips_ip (str, ip)
max = 0x8000;
else
max = 0x10000;
- if (imm_expr.X_op == O_big
+ if (imm_expr.X_op != O_constant
|| imm_expr.X_add_number < -0x8000
|| imm_expr.X_add_number >= max
|| (more
@@ -5634,7 +5640,11 @@ mips_ip (str, ip)
{
if (more)
break;
- as_bad ("16 bit expression not in range -32768..32767");
+ if (imm_expr.X_op != O_constant
+ && imm_expr.X_op != O_big)
+ insn_error = "absolute expression required";
+ else
+ as_bad ("16 bit expression not in range -32768..32767");
}
}
s = expr_end;
@@ -5745,7 +5755,7 @@ mips_ip (str, ip)
s = argsStart;
continue;
}
- insn_error = "ERROR: Illegal operands";
+ insn_error = "illegal operands";
return;
}
}