diff options
author | Jan Beulich <jbeulich@novell.com> | 2016-07-05 11:14:51 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2016-07-05 11:14:51 +0200 |
commit | 33d0ab95489cb3cf7ec98bee63c3541b5295adb6 (patch) | |
tree | c4fa4293d1924556b396eb8af7cb36d2b2d7645f /gas | |
parent | 13cdc2afb7873547ec2910ba647fb4a68602252f (diff) | |
download | gdb-33d0ab95489cb3cf7ec98bee63c3541b5295adb6.zip gdb-33d0ab95489cb3cf7ec98bee63c3541b5295adb6.tar.gz gdb-33d0ab95489cb3cf7ec98bee63c3541b5295adb6.tar.bz2 |
x86: fix register check in check_qword_reg()
A missing 'r' (or wrong 'e') register prefix needs to be complained
about if the template allows for a 64-bit register, not a 32-bit one.
I assume this was a copy-and-paste type of mistake
(from check_long_reg()).
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 9 | ||||
-rw-r--r-- | gas/config/tc-i386.c | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-suffix-bad.l | 4 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-suffix-bad.s | 5 |
4 files changed, 19 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 9e24bcd..d4f2e9b 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,12 @@ +2016-07-04 Jan Beulich <jbeulich@suse.com> + + * config/tc-i386.c (check_qword_reg): Correct register kind + checked. + * testsuite/gas/i386/x86-64-suffix-bad.s: Add q-suffix with + 16-bit register cases. + * testsuite/gas/i386/x86-64-suffix-bad.l: Adjust expectations. + + 2016-07-02 Maciej W. Rozycki <macro@imgtec.com> * testsuite/gas/mips/ecoff@ld.d: Remove test. diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 4ba05ba..a3b85c8 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -5670,7 +5670,7 @@ check_qword_reg (void) /* Warn if the r prefix on a general reg is missing. */ else if ((i.types[op].bitfield.reg16 || i.types[op].bitfield.reg32) - && (i.tm.operand_types[op].bitfield.reg32 + && (i.tm.operand_types[op].bitfield.reg64 || i.tm.operand_types[op].bitfield.acc)) { /* Prohibit these changes in the 64bit mode, since the diff --git a/gas/testsuite/gas/i386/x86-64-suffix-bad.l b/gas/testsuite/gas/i386/x86-64-suffix-bad.l index febdc0c..00adbf0 100644 --- a/gas/testsuite/gas/i386/x86-64-suffix-bad.l +++ b/gas/testsuite/gas/i386/x86-64-suffix-bad.l @@ -11,3 +11,7 @@ .*:15: Error: .* .*:16: Error: .* .*:17: Error: .* +.*:19: Error: .* +.*:20: Error: .* +.*:21: Error: .* +.*:22: Error: .* diff --git a/gas/testsuite/gas/i386/x86-64-suffix-bad.s b/gas/testsuite/gas/i386/x86-64-suffix-bad.s index c4462f6..83837f5 100644 --- a/gas/testsuite/gas/i386/x86-64-suffix-bad.s +++ b/gas/testsuite/gas/i386/x86-64-suffix-bad.s @@ -15,3 +15,8 @@ start: orb %rax, (%rax) orw %rax, (%rax) orl %rax, (%rax) + + pushq %ax + popq %ax + callq *%ax + jmpq *%ax |