aboutsummaryrefslogtreecommitdiff
path: root/opcodes/i386-gen.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2016-05-27 06:55:42 -0700
committerH.J. Lu <hjl.tools@gmail.com>2016-05-27 06:55:53 -0700
commite89c5eaa7208f06e927a79facff0316f4e550f6f (patch)
tree88846361ac9d76f53790b695c27b6f5d5fe894bc /opcodes/i386-gen.c
parent1690f1db1ac7a4e91d81ae968b8158af2b7ff91f (diff)
downloadgdb-e89c5eaa7208f06e927a79facff0316f4e550f6f.zip
gdb-e89c5eaa7208f06e927a79facff0316f4e550f6f.tar.gz
gdb-e89c5eaa7208f06e927a79facff0316f4e550f6f.tar.bz2
Correct CpuMax in i386-opc.h
CpuMax should be CpuIntel64, not CpuNo64. i386-gen.c is updated to verify that CpuMax is correct. X86 assembler is updated to properly set cpuamd64 and cpuintel64. gas/ PR gas/20154 * config/tc-i386.c (intel64): New. (cpu_flags_match): Set cpuamd64 and cpuintel64. (md_parse_option): Set intel64 instead of cpuamd64 and cpuintel64. opcodes/ PR gas/20154 * i386-gen.c (main): Fail if CpuMax is incorrect. * i386-opc.h (CpuMax): Set to CpuIntel64. * i386-tbl.h: Regenerated.
Diffstat (limited to 'opcodes/i386-gen.c')
-rw-r--r--opcodes/i386-gen.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/opcodes/i386-gen.c b/opcodes/i386-gen.c
index b19bbe1..0afdc90 100644
--- a/opcodes/i386-gen.c
+++ b/opcodes/i386-gen.c
@@ -1379,7 +1379,16 @@ main (int argc, char **argv)
srcdir, xstrerror (errno));
/* Check the unused bitfield in i386_cpu_flags. */
-#ifndef CpuUnused
+#ifdef CpuUnused
+ if (cpu_flags[ARRAY_SIZE (cpu_flags) - 2].position != CpuMax)
+ fail (_("CpuMax != %d!\n"),
+ cpu_flags[ARRAY_SIZE (cpu_flags) - 2].position);
+
+#else
+ if (cpu_flags[ARRAY_SIZE (cpu_flags) - 1].position != CpuMax)
+ fail (_("CpuMax != %d!\n"),
+ cpu_flags[ARRAY_SIZE (cpu_flags) - 1].position);
+
c = CpuNumOfBits - CpuMax - 1;
if (c)
fail (_("%d unused bits in i386_cpu_flags.\n"), c);