]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Properly handle EVEX register aliases
authorIlya Tocar <ilya.tocar@intel.com>
Thu, 17 Jul 2014 09:59:32 +0000 (13:59 +0400)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 17 Jul 2014 15:59:16 +0000 (08:59 -0700)
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.

gas/ChangeLog
gas/config/tc-i386.c
gas/testsuite/ChangeLog
gas/testsuite/gas/i386/i386.exp
gas/testsuite/gas/i386/x86-64-equ.d [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-equ.s [new file with mode: 0644]

index cbdf74f2313d94a37c2a680069ccad59ab90d49a..fa74e3d9def12820b37ed470e2429378e107327b 100644 (file)
@@ -1,3 +1,10 @@
+2014-07-17  Ilya Tocar  <ilya.tocar@intel.com>
+
+       Backport mainline patches
+       2014-07-17  Ilya Tocar  <ilya.tocar@intel.com>
+
+       * config/tc-i386.c (parse_register): Set need_vrex.
+
 2014-06-12  Alan Modra  <amodra@gmail.com>
 
        Backport mainline patches
index b0a584b20b7bc4bee2be9c65cf046e293fa32f35..4d93906385b138b40ede18135a4238381cd08bfd 100644 (file)
@@ -9410,6 +9410,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;
index 1f96c172e98f4c98d1740add0cbabc0783d8a0e9..52cb17fac8205f272b698764306603dab1aa0dea 100644 (file)
@@ -1,3 +1,12 @@
+2014-07-17  Ilya Tocar  <ilya.tocar@intel.com>
+
+       Backport mainline patches
+       2014-07-17  Ilya Tocar  <ilya.tocar@intel.com>
+
+       * gas/i386/x86-64-equ.d: New.
+       * gas/i386/x86-64-equ.s: New.
+       * gas/i386/i386.exp: Run x86-64-equ.
+
 2014-07-08  Ilya Tocar  <ilya.tocar@intel.com>
 
        * gas/i386/evex-lig256-intel.d: Updated.
index 19fe0f3a0331c5aeb53694d704f3cc524f19b91a..30953f22cd591738de5816c496dc4d6e8c2301f5 100644 (file)
@@ -570,6 +570,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t
     run_dump_test "x86-64-xsaves-intel"
     run_dump_test "x86-64-prefetchwt1"
     run_dump_test "x86-64-prefetchwt1-intel"
+    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 (file)
index 0000000..3ecb0bb
--- /dev/null
@@ -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 (file)
index 0000000..26cfd72
--- /dev/null
@@ -0,0 +1,10 @@
+ .text
+_start:
+
+ .set  ACC, %xmm17
+       vaddss   %xmm0,%xmm1,ACC
+
+ .intel_syntax noprefix
+
+ .set  ACC, xmm17
+       vaddss   xmm0,xmm1,ACC