x86: replace off-by-one OTMax
With its name it should equal to the largest prior enumerator, which is not very helpful as that will change every once in a while. Rename it to OTNum instead to make name and value match, and correct use sites to no longer use one too large a value.
This commit is contained in:
parent
76d3a78a49
commit
f0a85b0706
|
@ -1,3 +1,9 @@
|
||||||
|
2018-07-11 Jan Beulich <jbeulich@suse.com>
|
||||||
|
|
||||||
|
* i386-opc.h: Rename OTMax to OTNum.
|
||||||
|
(OTNumOfUints): Adjust calculation.
|
||||||
|
(OTUnused): Directly alias to OTNum.
|
||||||
|
|
||||||
2018-07-09 Maciej W. Rozycki <macro@mips.com>
|
2018-07-09 Maciej W. Rozycki <macro@mips.com>
|
||||||
|
|
||||||
* s12z-dis.c (lea_reg_xys_opr): Rename `reg' local variable to
|
* s12z-dis.c (lea_reg_xys_opr): Rename `reg' local variable to
|
||||||
|
|
|
@ -765,18 +765,18 @@ enum
|
||||||
/* Bound register. */
|
/* Bound register. */
|
||||||
RegBND,
|
RegBND,
|
||||||
|
|
||||||
/* The last bitfield in i386_operand_type. */
|
/* The number of bitfields in i386_operand_type. */
|
||||||
OTMax
|
OTNum
|
||||||
};
|
};
|
||||||
|
|
||||||
#define OTNumOfUints \
|
#define OTNumOfUints \
|
||||||
(OTMax / sizeof (unsigned int) / CHAR_BIT + 1)
|
((OTNum - 1) / sizeof (unsigned int) / CHAR_BIT + 1)
|
||||||
#define OTNumOfBits \
|
#define OTNumOfBits \
|
||||||
(OTNumOfUints * sizeof (unsigned int) * CHAR_BIT)
|
(OTNumOfUints * sizeof (unsigned int) * CHAR_BIT)
|
||||||
|
|
||||||
/* If you get a compiler error for zero width of the unused field,
|
/* If you get a compiler error for zero width of the unused field,
|
||||||
comment it out. */
|
comment it out. */
|
||||||
#define OTUnused (OTMax + 1)
|
#define OTUnused OTNum
|
||||||
|
|
||||||
typedef union i386_operand_type
|
typedef union i386_operand_type
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue