summaryrefslogtreecommitdiff
path: root/opcodes/i386-opc.h
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2021-03-09 08:54:32 +0100
committerJan Beulich <jbeulich@suse.com>2021-03-09 08:54:32 +0100
commit742732c7f0a989eaba7c1acac3ca5eeaa274df0e (patch)
tree32ec72bb67be1d97b75aac567debc8630c3aae09 /opcodes/i386-opc.h
parente93a3b27b23ca2850c01dfc8fdf1aa237d819193 (diff)
downloadbinutils-gdb-742732c7f0a989eaba7c1acac3ca5eeaa274df0e.tar.gz
x86: fold some prefix related attributes into a single one
RepPrefixOk, HLEPrefixOk, and NoTrackPrefixOk can't be specified together, so can share an enum-like field. IsLockable can be inferred from HLE setting and hence only needs specifying when neither of them is present.
Diffstat (limited to 'opcodes/i386-opc.h')
-rw-r--r--opcodes/i386-opc.h31
1 files changed, 11 insertions, 20 deletions
diff --git a/opcodes/i386-opc.h b/opcodes/i386-opc.h
index 898b01f8cb9..d3f7070b124 100644
--- a/opcodes/i386-opc.h
+++ b/opcodes/i386-opc.h
@@ -505,27 +505,21 @@ enum
RegMem,
/* quick test if branch instruction is MPX supported */
BNDPrefixOk,
- /* quick test if NOTRACK prefix is supported */
- NoTrackPrefixOk,
- /* quick test for lockable instructions */
- IsLockable,
/* fake an extra reg operand for clr, imul and special register
processing for some instructions. */
RegKludge,
/* An implicit xmm0 as the first operand */
Implicit1stXmm0,
- /* The HLE prefix is OK:
- 1. With a LOCK prefix.
- 2. With or without a LOCK prefix.
- 3. With a RELEASE (0xf3) prefix.
- */
-#define HLEPrefixNone 0
-#define HLEPrefixLock 1
-#define HLEPrefixAny 2
-#define HLEPrefixRelease 3
- HLEPrefixOk,
- /* An instruction on which a "rep" prefix is acceptable. */
- RepPrefixOk,
+#define PrefixNone 0
+#define PrefixRep 1
+#define PrefixHLERelease 2 /* Okay with an XRELEASE (0xf3) prefix. */
+#define PrefixNoTrack 3
+ /* Prefixes implying "LOCK okay" must come after Lock. All others have
+ to come before. */
+#define PrefixLock 4
+#define PrefixHLELock 5 /* Okay with a LOCK prefix. */
+#define PrefixHLEAny 6 /* Okay with or without a LOCK prefix. */
+ PrefixOk,
/* Convert to DWORD */
ToDword,
/* Convert to QWORD */
@@ -734,12 +728,9 @@ typedef struct i386_opcode_modifier
unsigned int isstring:2;
unsigned int regmem:1;
unsigned int bndprefixok:1;
- unsigned int notrackprefixok:1;
- unsigned int islockable:1;
unsigned int regkludge:1;
unsigned int implicit1stxmm0:1;
- unsigned int hleprefixok:2;
- unsigned int repprefixok:1;
+ unsigned int prefixok:3;
unsigned int todword:1;
unsigned int toqword:1;
unsigned int addrprefixopreg:1;