diff options
author | Jan Beulich <jbeulich@novell.com> | 2018-04-26 08:46:39 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2018-04-26 08:46:39 +0200 |
commit | 1adf7f5604558489bca6e3f8e6ee5e12089f06ef (patch) | |
tree | 3b2a7524a55fbdac663e0e4bddbe66afa738a25f /gas | |
parent | 0e0eea782025d92f894f6d132aae2507c6a90a7b (diff) | |
download | gdb-1adf7f5604558489bca6e3f8e6ee5e12089f06ef.zip gdb-1adf7f5604558489bca6e3f8e6ee5e12089f06ef.tar.gz gdb-1adf7f5604558489bca6e3f8e6ee5e12089f06ef.tar.bz2 |
x86: don't recognize bnd<N> as registers without CpuMPX
This is just like for all other extended/optional register sets.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 7 | ||||
-rw-r--r-- | gas/config/tc-i386.c | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/bnd.l | 12 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/bnd.s | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/i386.exp | 1 |
5 files changed, 29 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 3131982..a13f86f 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,12 @@ 2018-04-26 Jan Beulich <jbeulich@suse.com> + * config/tc-i386.c (parse_real_register): Check bnd<N> + registers. + * testsuite/gas/i386/bnd.s, testsuite/gas/i386/bnd.l: New. + * testsuite/gas/i386/i386.exp: Run new test. + +2018-04-26 Jan Beulich <jbeulich@suse.com> + * config/tc-i386.c (parse_real_register): Check FPU register earlier. * testsuite/gas/i386/fpu.s, testsuite/gas/i386/fpu.l, diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index fcd40e2..ccecdda 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -10170,6 +10170,9 @@ parse_real_register (char *reg_string, char **end_op) && !cpu_arch_flags.bitfield.cpuregmask) return (const reg_entry *) NULL; + if (r->reg_type.bitfield.regbnd && !cpu_arch_flags.bitfield.cpumpx) + return (const reg_entry *) NULL; + /* Don't allow fake index register unless allow_index_reg isn't 0. */ if (!allow_index_reg && (r->reg_num == RegEiz || r->reg_num == RegRiz)) diff --git a/gas/testsuite/gas/i386/bnd.l b/gas/testsuite/gas/i386/bnd.l new file mode 100644 index 0000000..4222896 --- /dev/null +++ b/gas/testsuite/gas/i386/bnd.l @@ -0,0 +1,12 @@ +.*: Assembler messages: +.*:6: Error: .*`bndmov'.* +GAS LISTING .* + + +[ ]*1[ ]+\.text +[ ]*2[ ]+\.intel_syntax noprefix +[ ]*3[ ]+\.arch generic32 +[ ]*4[ ]+bnd: +[ ]*5[ ]+\?\?\?\? A1000000[ ]+mov eax, bnd0 +[ ]*5[ ]+00 +[ ]*6[ ]+bndmov bnd0, bnd0 diff --git a/gas/testsuite/gas/i386/bnd.s b/gas/testsuite/gas/i386/bnd.s new file mode 100644 index 0000000..9ca4ce7 --- /dev/null +++ b/gas/testsuite/gas/i386/bnd.s @@ -0,0 +1,6 @@ + .text + .intel_syntax noprefix + .arch generic32 +bnd: + mov eax, bnd0 + bndmov bnd0, bnd0 diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp index 95e3469..62c03d8 100644 --- a/gas/testsuite/gas/i386/i386.exp +++ b/gas/testsuite/gas/i386/i386.exp @@ -294,6 +294,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]] run_list_test "mpx-inval-1" "-al" run_list_test "mpx-inval-2" "-al" run_dump_test "mpx-add-bnd-prefix" + run_list_test "bnd" "-al" run_dump_test "sha" run_dump_test "clflushopt" run_dump_test "clflushopt-intel" |