* config/tc-s390.c (s390_insn): Correct range check for opcode in

.insn pseudo operation.
This commit is contained in:
Martin Schwidefsky 2004-02-27 12:33:11 +00:00
parent 4aa3e325e0
commit 1d6d62a482
2 changed files with 14 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2004-02-27 Hannes Reinecke <hare@suse.de>
* config/tc-s390.c (s390_insn): Correct range check for opcode in
.insn pseudo operation.
2004-02-27 Anil Paranjpe <anilp1@kpitcummins.com>
* config/tc-sh.c (get_operand): In case of #Imm, check has been

View File

@ -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"));