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