diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2004-02-27 12:33:11 +0000 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2004-02-27 12:33:11 +0000 |
commit | 1d6d62a4827d7b67fb6fe8ee62377a3544c67d88 (patch) | |
tree | b8a0ed25dd599c767ff22f1f720efc6ad85d6df2 /gas/config/tc-s390.c | |
parent | 4aa3e325e038349730ecd5d41848b98a1cdcdf4b (diff) | |
download | gdb-1d6d62a4827d7b67fb6fe8ee62377a3544c67d88.zip gdb-1d6d62a4827d7b67fb6fe8ee62377a3544c67d88.tar.gz gdb-1d6d62a4827d7b67fb6fe8ee62377a3544c67d88.tar.bz2 |
* config/tc-s390.c (s390_insn): Correct range check for opcode in
.insn pseudo operation.
Diffstat (limited to 'gas/config/tc-s390.c')
-rw-r--r-- | gas/config/tc-s390.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gas/config/tc-s390.c b/gas/config/tc-s390.c index ef51bca..c450eae 100644 --- a/gas/config/tc-s390.c +++ b/gas/config/tc-s390.c @@ -1614,9 +1614,15 @@ s390_insn (ignore) expression (&exp); if (exp.X_op == O_constant) { - 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))) + if ( ( opformat->oplen == 6 + && exp.X_add_number >= 0 + && (addressT) exp.X_add_number < (1ULL << 48)) + || ( opformat->oplen == 4 + && exp.X_add_number >= 0 + && (addressT) exp.X_add_number < (1ULL << 32)) + || ( opformat->oplen == 2 + && exp.X_add_number >= 0 + && (addressT) exp.X_add_number < (1ULL << 16))) md_number_to_chars (insn, exp.X_add_number, opformat->oplen); else as_bad (_("Invalid .insn format\n")); |