From: Ilya Tocar Date: Thu, 17 Jul 2014 09:59:32 +0000 (+0400) Subject: Properly handle EVEX register aliases X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d3bb6b49b6f13617b953bfa0ef25a992b41128ef;p=binutils-gdb.git Properly handle EVEX register aliases gas/ * config/tc-i386.c (parse_register): Set need_vrex. gas/testsuite/ * gas/i386/x86-64-equ.d: New. * gas/i386/x86-64-equ.s: New. * gas/i386/i386.exp: Run x86-64-equ. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 512bd031f9c..9180b52c155 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,7 @@ +2014-07-17 Ilya Tocar + + * config/tc-i386.c (parse_register): Set need_vrex. + 2014-07-15 Jiong Wang * config/tc-arm.c (add_to_lit_pool): Use "inst.operands[1].imm" for diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index d0d4d6c9300..c947250fe28 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -9428,6 +9428,8 @@ parse_register (char *reg_string, char **end_op) know (e->X_add_number >= 0 && (valueT) e->X_add_number < i386_regtab_size); r = i386_regtab + e->X_add_number; + if ((r->reg_flags & RegVRex)) + i.need_vrex = 1; *end_op = input_line_pointer; } *input_line_pointer = c; diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 4e91b37ef70..a96af2e3170 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2014-07-17 Ilya Tocar + + * gas/i386/x86-64-equ.d: New. + * gas/i386/x86-64-equ.s: New. + * gas/i386/i386.exp: Run x86-64-equ. + 2014-07-12 David Majnemer * gas/pe/set.s, * gas/pe/set.d: New test. diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp index 6389a07f4e5..e30e4e6fa23 100644 --- a/gas/testsuite/gas/i386/i386.exp +++ b/gas/testsuite/gas/i386/i386.exp @@ -576,6 +576,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t run_dump_test "x86-64-prefetchwt1" run_dump_test "x86-64-prefetchwt1-intel" run_dump_test "x86-64-se1" + run_dump_test "x86-64-equ" if { ![istarget "*-*-aix*"] && ![istarget "*-*-beos*"] diff --git a/gas/testsuite/gas/i386/x86-64-equ.d b/gas/testsuite/gas/i386/x86-64-equ.d new file mode 100644 index 00000000000..3ecb0bbd277 --- /dev/null +++ b/gas/testsuite/gas/i386/x86-64-equ.d @@ -0,0 +1,11 @@ +#objdump: -drw +#name: evex equates + +.*: +file format .* + +Disassembly of section .text: + +0+000 <_start>: +[ ]*[a-f0-9]+: 62 e1 76 08 58 c8 vaddss %xmm0,%xmm1,%xmm17 +[ ]*[a-f0-9]+: 62 b1 76 08 58 c1 vaddss %xmm17,%xmm1,%xmm0 +#pass diff --git a/gas/testsuite/gas/i386/x86-64-equ.s b/gas/testsuite/gas/i386/x86-64-equ.s new file mode 100644 index 00000000000..26cfd72c531 --- /dev/null +++ b/gas/testsuite/gas/i386/x86-64-equ.s @@ -0,0 +1,10 @@ + .text +_start: + + .set ACC, %xmm17 + vaddss %xmm0,%xmm1,ACC + + .intel_syntax noprefix + + .set ACC, xmm17 + vaddss xmm0,xmm1,ACC