aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-s390.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2001-09-18 15:41:33 +0000
committerNick Clifton <nickc@redhat.com>2001-09-18 15:41:33 +0000
commitb6849f55b93759fa93a28c749cee6b799000067e (patch)
tree81746f85b1463c2b72ecb67aa1b9a234d5e77b84 /gas/config/tc-s390.c
parent55c808902f95f3394179ca67a0e54dea4d1c8cdb (diff)
downloadfsf-binutils-gdb-b6849f55b93759fa93a28c749cee6b799000067e.zip
fsf-binutils-gdb-b6849f55b93759fa93a28c749cee6b799000067e.tar.gz
fsf-binutils-gdb-b6849f55b93759fa93a28c749cee6b799000067e.tar.bz2
s390 assembler improvements and testsuite
Diffstat (limited to 'gas/config/tc-s390.c')
-rw-r--r--gas/config/tc-s390.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/gas/config/tc-s390.c b/gas/config/tc-s390.c
index 7bdf65e..6b93796 100644
--- a/gas/config/tc-s390.c
+++ b/gas/config/tc-s390.c
@@ -1354,8 +1354,9 @@ s390_insn (ignore)
expression (&exp);
if (exp.X_op == O_constant)
{
- if (opformat->oplen == 4 ||
- (opformat->oplen == 2 && exp.X_op < 0x10000))
+ if ((opformat->oplen == 6 && exp.X_op > 0 && exp.X_op < (1ULL << 48)) ||
+ (opformat->oplen == 4 && exp.X_op > 0 && exp.X_op < (1ULL << 32)) ||
+ (opformat->oplen == 2 && exp.X_op > 0 && exp.X_op < (1ULL << 16)))
md_number_to_chars (insn, exp.X_add_number, opformat->oplen);
else
as_bad (_("Invalid .insn format\n"));
@@ -1375,12 +1376,14 @@ s390_insn (ignore)
}
else
as_bad (_("second operand of .insn not a constant\n"));
- if (*input_line_pointer++ != ',')
- as_bad (_("missing comma after insn constant\n"));
+ if (strcmp (opformat->name, "e") != 0 && *input_line_pointer++ != ',')
+ as_bad (_("missing comma after insn constant\n"));
+
if ((s = strchr (input_line_pointer, '\n')) != NULL)
*s = '\0';
- input_line_pointer = md_gather_operands (input_line_pointer, insn, opformat);
+ input_line_pointer = md_gather_operands (input_line_pointer, insn,
+ opformat);
if (s != NULL)
*s = '\n';
demand_empty_rest_of_line ();