Also update cpu_arch_isa_flags for ISA extensions.
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 8 Feb 2011 18:12:25 +0000 (18:12 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 8 Feb 2011 18:12:25 +0000 (18:12 +0000)
gas/

2011-02-08  H.J. Lu  <hongjiu.lu@intel.com>

* config/tc-i386.c (set_cpu_arch): Also update cpu_arch_isa_flags
for ISA extensions.
(md_parse_option): Likewise.

gas/testsuite/

2011-02-08  H.J. Lu  <hongjiu.lu@intel.com>

* gas/i386/i386.exp: Run nops-4a-i686 and nops-6.

* gas/i386/nops-4a-i686.d: New.
* gas/i386/nops-6.d: Likewise.
* gas/i386/nops-6.s: Likewise.

gas/ChangeLog
gas/config/tc-i386.c
gas/testsuite/ChangeLog
gas/testsuite/gas/i386/i386.exp
gas/testsuite/gas/i386/nops-4a-i686.d [new file with mode: 0644]
gas/testsuite/gas/i386/nops-6.d [new file with mode: 0644]
gas/testsuite/gas/i386/nops-6.s [new file with mode: 0644]

index bf75bbf..636e9e8 100644 (file)
@@ -1,3 +1,9 @@
+2011-02-08  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * config/tc-i386.c (set_cpu_arch): Also update cpu_arch_isa_flags
+       for ISA extensions.
+       (md_parse_option): Likewise.
+
 2011-02-04  Bernd Schmidt  <bernds@codesourcery.com>
 
        * doc/as.texinfo (Target TIC6X options): Don't mention "-matomic".
index 0028f17..777d7cf 100644 (file)
@@ -2176,6 +2176,7 @@ set_cpu_arch (int dummy ATTRIBUTE_UNUSED)
                  else
                    cpu_sub_arch_name = xstrdup (cpu_arch[j].name);
                  cpu_arch_flags = flags;
+                 cpu_arch_isa_flags = flags;
                }
              *input_line_pointer = e;
              demand_empty_rest_of_line ();
@@ -8343,6 +8344,7 @@ md_parse_option (int c, char *arg)
                      else
                        cpu_sub_arch_name = xstrdup (cpu_arch[j].name);
                      cpu_arch_flags = flags;
+                     cpu_arch_isa_flags = flags;
                    }
                  break;
                }
index 166d8db..16efa6d 100644 (file)
@@ -1,3 +1,11 @@
+2011-02-08  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * gas/i386/i386.exp: Run nops-4a-i686 and nops-6.
+
+       * gas/i386/nops-4a-i686.d: New.
+       * gas/i386/nops-6.d: Likewise.
+       * gas/i386/nops-6.s: Likewise.
+
 2011-02-07  Vincent Riviere  <vincent.riviere@freesbee.fr>
 
        PR gas/3041
index a0abf28..306da65 100644 (file)
@@ -91,8 +91,10 @@ if [expr ([istarget "i*86-*-*"] ||  [istarget "x86_64-*-*"]) && [gas_32_check]]
     run_dump_test "nops-4"
     run_dump_test "nops-4-i386"
     run_dump_test "nops-4-i686"
+    run_dump_test "nops-4a-i686"
     run_dump_test "nops-5"
     run_dump_test "nops-5-i686"
+    run_dump_test "nops-6"
     run_dump_test "addr16"
     run_dump_test "addr32"
     run_dump_test "sse4_1"
diff --git a/gas/testsuite/gas/i386/nops-4a-i686.d b/gas/testsuite/gas/i386/nops-4a-i686.d
new file mode 100644 (file)
index 0000000..b8ac733
--- /dev/null
@@ -0,0 +1,210 @@
+#as: -march=i686+nop
+#source: nops-4.s
+#objdump: -drw
+#name: i386 -march=i686+nop nops 4a
+
+.*: +file format .*
+
+Disassembly of section .text:
+
+0+ <nop31>:
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00    data32 data32 data32 data32 data32 nopw %cs:0x0\(%eax,%eax,1\)
+[      ]*[a-f0-9]+:    66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00    data32 data32 data32 data32 data32 nopw %cs:0x0\(%eax,%eax,1\)
+
+0+20 <nop30>:
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00    data32 data32 data32 data32 data32 nopw %cs:0x0\(%eax,%eax,1\)
+[      ]*[a-f0-9]+:    66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00    data32 data32 data32 data32 data32 nopw %cs:0x0\(%eax,%eax,1\)
+
+0+40 <nop29>:
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00       data32 data32 data32 data32 nopw %cs:0x0\(%eax,%eax,1\)
+[      ]*[a-f0-9]+:    66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00    data32 data32 data32 data32 data32 nopw %cs:0x0\(%eax,%eax,1\)
+
+0+60 <nop28>:
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    66 66 66 66 2e 0f 1f 84 00 00 00 00 00  data32 data32 data32 nopw %cs:0x0\(%eax,%eax,1\)
+[      ]*[a-f0-9]+:    66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00    data32 data32 data32 data32 data32 nopw %cs:0x0\(%eax,%eax,1\)
+
+0+80 <nop27>:
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    66 66 66 2e 0f 1f 84 00 00 00 00 00     data32 data32 nopw %cs:0x0\(%eax,%eax,1\)
+[      ]*[a-f0-9]+:    66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00    data32 data32 data32 data32 data32 nopw %cs:0x0\(%eax,%eax,1\)
+
+0+a0 <nop26>:
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    66 66 2e 0f 1f 84 00 00 00 00 00        data32 nopw %cs:0x0\(%eax,%eax,1\)
+[      ]*[a-f0-9]+:    66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00    data32 data32 data32 data32 data32 nopw %cs:0x0\(%eax,%eax,1\)
+
+0+c0 <nop25>:
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    66 2e 0f 1f 84 00 00 00 00 00   nopw   %cs:0x0\(%eax,%eax,1\)
+[      ]*[a-f0-9]+:    66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00    data32 data32 data32 data32 data32 nopw %cs:0x0\(%eax,%eax,1\)
+
+0+e0 <nop24>:
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    66 0f 1f 84 00 00 00 00 00      nopw   0x0\(%eax,%eax,1\)
+[      ]*[a-f0-9]+:    66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00    data32 data32 data32 data32 data32 nopw %cs:0x0\(%eax,%eax,1\)
+
+0+100 <nop23>:
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    0f 1f 84 00 00 00 00 00         nopl   0x0\(%eax,%eax,1\)
+[      ]*[a-f0-9]+:    66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00    data32 data32 data32 data32 data32 nopw %cs:0x0\(%eax,%eax,1\)
+
+0+120 <nop22>:
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    0f 1f 80 00 00 00 00    nopl   0x0\(%eax\)
+[      ]*[a-f0-9]+:    66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00    data32 data32 data32 data32 data32 nopw %cs:0x0\(%eax,%eax,1\)
+
+0+140 <nop21>:
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    66 0f 1f 44 00 00       nopw   0x0\(%eax,%eax,1\)
+[      ]*[a-f0-9]+:    66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00    data32 data32 data32 data32 data32 nopw %cs:0x0\(%eax,%eax,1\)
+
+0+160 <nop20>:
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    0f 1f 44 00 00          nopl   0x0\(%eax,%eax,1\)
+[      ]*[a-f0-9]+:    66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00    data32 data32 data32 data32 data32 nopw %cs:0x0\(%eax,%eax,1\)
+
+0+180 <nop19>:
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    0f 1f 40 00             nopl   0x0\(%eax\)
+[      ]*[a-f0-9]+:    66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00    data32 data32 data32 data32 data32 nopw %cs:0x0\(%eax,%eax,1\)
+
+0+1a0 <nop18>:
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    0f 1f 00                nopl   \(%eax\)
+[      ]*[a-f0-9]+:    66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00    data32 data32 data32 data32 data32 nopw %cs:0x0\(%eax,%eax,1\)
+
+0+1c0 <nop17>:
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    66 90                   xchg   %ax,%ax
+[      ]*[a-f0-9]+:    66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00    data32 data32 data32 data32 data32 nopw %cs:0x0\(%eax,%eax,1\)
+
+0+1e0 <nop16>:
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00    data32 data32 data32 data32 data32 nopw %cs:0x0\(%eax,%eax,1\)
+#pass
diff --git a/gas/testsuite/gas/i386/nops-6.d b/gas/testsuite/gas/i386/nops-6.d
new file mode 100644 (file)
index 0000000..6b45d31
--- /dev/null
@@ -0,0 +1,17 @@
+#objdump: -drw
+#name: i386 nops 6
+
+.*: +file format .*
+
+Disassembly of section .text:
+
+0+ <i386>:
+[      ]*[a-f0-9]+:    0f be f0                movsbl %al,%esi
+[      ]*[a-f0-9]+:    8d b6 00 00 00 00       lea    0x0\(%esi\),%esi
+[      ]*[a-f0-9]+:    8d bc 27 00 00 00 00    lea    0x0\(%edi,%eiz,1\),%edi
+
+0+10 <i386_nop>:
+[      ]*[a-f0-9]+:    0f be f0                movsbl %al,%esi
+[      ]*[a-f0-9]+:    66 0f 1f 44 00 00       nopw   0x0\(%eax,%eax,1\)
+[      ]*[a-f0-9]+:    0f 1f 80 00 00 00 00    nopl   0x0\(%eax\)
+#pass
diff --git a/gas/testsuite/gas/i386/nops-6.s b/gas/testsuite/gas/i386/nops-6.s
new file mode 100644 (file)
index 0000000..a634c52
--- /dev/null
@@ -0,0 +1,10 @@
+       .text
+       .arch i386
+i386:
+       movsbl %al,%esi
+       .p2align 4
+
+       .arch .nop
+i386_nop:
+       movsbl %al,%esi
+       .p2align 4