aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-sh.c
diff options
context:
space:
mode:
authorJoern Rennecke <joern.rennecke@embecosm.com>1999-08-05 22:09:04 +0000
committerJoern Rennecke <joern.rennecke@embecosm.com>1999-08-05 22:09:04 +0000
commit5fc44b2d43d20982cdb455f25f34a55b1803c744 (patch)
tree9cab1fbb7ecc14ca71ea4780226031c584f10257 /gas/config/tc-sh.c
parentc1687039ebb6da080ce43dd66a493485ad22aa62 (diff)
downloadgdb-5fc44b2d43d20982cdb455f25f34a55b1803c744.zip
gdb-5fc44b2d43d20982cdb455f25f34a55b1803c744.tar.gz
gdb-5fc44b2d43d20982cdb455f25f34a55b1803c744.tar.bz2
* config/tc-sh.c (md_assemble): Call as_bad when there are excess
operands.
Diffstat (limited to 'gas/config/tc-sh.c')
-rw-r--r--gas/config/tc-sh.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/gas/config/tc-sh.c b/gas/config/tc-sh.c
index 2752d03..9f7a6c1 100644
--- a/gas/config/tc-sh.c
+++ b/gas/config/tc-sh.c
@@ -1066,9 +1066,16 @@ md_assemble (str)
}
else
{
- if (opcode->arg[0] != A_END)
+ if (opcode->arg[0] == A_END)
{
- get_operands (opcode, op_end, operand);
+ /* Ignore trailing whitespace. If there is any, it has already
+ been compressed to a single space. */
+ if (*op_end == ' ')
+ op_end++;
+ }
+ else
+ {
+ op_end = get_operands (opcode, op_end, operand);
}
opcode = get_specific (opcode, operand);
@@ -1083,6 +1090,9 @@ md_assemble (str)
return;
}
+ if (*op_end)
+ as_bad (_("excess operands: '%s'"), op_end);
+
build_Mytes (opcode, operand);
}