diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 2e4f3b3c8cf..abf583be18b 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,7 @@ +2016-01-24 Maciej W. Rozycki + + * elfxx-mips.c (BZ16_REG_FIELD): Simplify calculation. + 2016-01-24 Maciej W. Rozycki * elfxx-mips.c (BZ16_REG): Correct calculation. diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index 176970a82c3..fa14e8dd343 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -13111,8 +13111,7 @@ static const struct opcode_descriptor bz_insns_16[] = { /* Switch between a 5-bit register index and its 3-bit shorthand. */ #define BZ16_REG(opcode) ((((((opcode) >> 7) & 7) + 0x1e) & 0xf) + 2) -#define BZ16_REG_FIELD(r) \ - (((2 <= (r) && (r) <= 7) ? (r) : ((r) - 16)) << 7) +#define BZ16_REG_FIELD(r) (((r) & 7) << 7) /* 32-bit instructions with a delay slot. */