aboutsummaryrefslogtreecommitdiff
path: root/opcodes/i386-opc.h
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2018-07-11 10:24:44 +0200
committerJan Beulich <jbeulich@suse.com>2018-07-11 10:24:44 +0200
commitf0a85b07061964d6c608e6280ce61aa3fed1eabf (patch)
tree92cfb6b1173c5a95998b008397233f810a447efa /opcodes/i386-opc.h
parent76d3a78a498e814fa1fea713091849cba7896f7a (diff)
downloadgdb-f0a85b07061964d6c608e6280ce61aa3fed1eabf.zip
gdb-f0a85b07061964d6c608e6280ce61aa3fed1eabf.tar.gz
gdb-f0a85b07061964d6c608e6280ce61aa3fed1eabf.tar.bz2
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.
Diffstat (limited to 'opcodes/i386-opc.h')
-rw-r--r--opcodes/i386-opc.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/opcodes/i386-opc.h b/opcodes/i386-opc.h
index 9a22b3c..4f12830 100644
--- a/opcodes/i386-opc.h
+++ b/opcodes/i386-opc.h
@@ -765,18 +765,18 @@ enum
/* Bound register. */
RegBND,
- /* The last bitfield in i386_operand_type. */
- OTMax
+ /* The number of bitfields in i386_operand_type. */
+ OTNum
};
#define OTNumOfUints \
- (OTMax / sizeof (unsigned int) / CHAR_BIT + 1)
+ ((OTNum - 1) / sizeof (unsigned int) / CHAR_BIT + 1)
#define OTNumOfBits \
(OTNumOfUints * sizeof (unsigned int) * CHAR_BIT)
/* If you get a compiler error for zero width of the unused field,
comment it out. */
-#define OTUnused (OTMax + 1)
+#define OTUnused OTNum
typedef union i386_operand_type
{