diff options
author | Jan Beulich <jbeulich@suse.com> | 2022-03-17 11:05:11 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2022-03-17 11:05:11 +0100 |
commit | 13ed231a0fad6e5988673dc8fde3996ad0136735 (patch) | |
tree | a07c547405db4bbd487bc1983b2f9bd5e5e57e1b /opcodes/i386-opc.h | |
parent | ad9de929c3ef0b3b6c32db05cf3dc33ff3904990 (diff) | |
download | gdb-13ed231a0fad6e5988673dc8fde3996ad0136735.zip gdb-13ed231a0fad6e5988673dc8fde3996ad0136735.tar.gz gdb-13ed231a0fad6e5988673dc8fde3996ad0136735.tar.bz2 |
x86: never set i386_cpu_flags' "unused" field
Setting this field risks cpu_flags_all_zero() mistakenly returning
"false" when the object passed in was e.g. the result of ANDing together
two objects which had the bit set, or ANDNing together an object with
the field set and one with the field clear.
While there also avoid setting CpuNo64: Like Cpu64 this is driven
differently anyway and hence shouldn't be set anywhere by default.
Note that the moving of the two items in i386-gen.c's cpu_flags[] is
only for documentation purposes (and slight reducing of overhead), as
the fields are sorted anyway upon program start.
Diffstat (limited to 'opcodes/i386-opc.h')
-rw-r--r-- | opcodes/i386-opc.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/opcodes/i386-opc.h b/opcodes/i386-opc.h index a7acaeb..cba7cd2 100644 --- a/opcodes/i386-opc.h +++ b/opcodes/i386-opc.h @@ -272,6 +272,9 @@ enum CpuTLBSYNC, /* SNP instructions required */ CpuSNP, + + /* NOTE: These last three items need to remain last and in this order. */ + /* 64bit support required */ Cpu64, /* Not supported in the 64bit mode */ @@ -417,6 +420,7 @@ typedef union i386_cpu_flags unsigned int cpuinvlpgb:1; unsigned int cputlbsync:1; unsigned int cpusnp:1; + /* NOTE: These last three fields need to remain last and in this order. */ unsigned int cpu64:1; unsigned int cpuno64:1; #ifdef CpuUnused |