From eb42fac1bb1f3b74b2d0b9bff7035a494c0cb9c5 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 30 Apr 2007 00:27:57 +0000 Subject: [PATCH] opcodes/ PR 4436 * ppc-opc.c (powerpc_operands): Correct bitm for second entry of MBE. gas/ PR 4436 * config/tc-ppc.c (ppc_insert_operand): Disable range check if min > max. --- gas/ChangeLog | 6 ++++++ gas/config/tc-ppc.c | 5 ++--- opcodes/ChangeLog | 5 +++++ opcodes/ppc-opc.c | 2 +- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 6a7deecc50..4d5bf6ae1b 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2007-04-30 Alan Modra + + PR 4436 + * config/tc-ppc.c (ppc_insert_operand): Disable range check if + min > max. + 2007-04-28 Thiemo Seufer * config/tc-mips.c: Fix comment. diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c index 978f0f3dd8..4fe9f5aec8 100644 --- a/gas/config/tc-ppc.c +++ b/gas/config/tc-ppc.c @@ -1516,7 +1516,7 @@ ppc_insert_operand (insn, operand, val, file, line) { long min, max, right; offsetT test; - + max = operand->bitm; right = max & -max; min = 0; @@ -1554,8 +1554,7 @@ ppc_insert_operand (insn, operand, val, file, line) else test = val; - if (test < (offsetT) min - || test > (offsetT) max + if ((min <= max && (test < (offsetT) min || test > (offsetT) max)) || (test & (right - 1)) != 0) as_bad_value_out_of_range (_("operand"), test, (offsetT) min, (offsetT) max, file, line); diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index a3849e538f..0fa39c13a0 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,8 @@ +2007-04-30 Alan Modra + + PR 4436 + * ppc-opc.c (powerpc_operands): Correct bitm for second entry of MBE. + 2007-04-27 H.J. Lu * i386-dis.c (modrm): Put reg before rm. diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c index 50a33f3ce9..5e2fb281ad 100644 --- a/opcodes/ppc-opc.c +++ b/opcodes/ppc-opc.c @@ -317,7 +317,7 @@ const struct powerpc_operand powerpc_operands[] = description in opcode/ppc.h for what this means. */ #define MBE ME + 1 { 0x1f, 6, NULL, NULL, PPC_OPERAND_OPTIONAL | PPC_OPERAND_NEXT }, - { 0xff, 0, insert_mbe, extract_mbe, 0 }, + { -1, 0, insert_mbe, extract_mbe, 0 }, /* The MB or ME field in an MD or MDS form instruction. The high bit is wrapped to the low end. */