From 1c1a29a7589d31ff023a5293fb0ac406343d6080 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 8 Feb 2011 18:12:22 +0000 Subject: [PATCH] Also update cpu_arch_isa_flags for ISA extensions. gas/ 2011-02-08 H.J. Lu * 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 * 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 | 6 + gas/config/tc-i386.c | 2 + gas/testsuite/ChangeLog | 8 ++ gas/testsuite/gas/i386/i386.exp | 2 + gas/testsuite/gas/i386/nops-4a-i686.d | 210 ++++++++++++++++++++++++++++++++++ gas/testsuite/gas/i386/nops-6.d | 17 +++ gas/testsuite/gas/i386/nops-6.s | 10 ++ 7 files changed, 255 insertions(+) create mode 100644 gas/testsuite/gas/i386/nops-4a-i686.d create mode 100644 gas/testsuite/gas/i386/nops-6.d create mode 100644 gas/testsuite/gas/i386/nops-6.s diff --git a/gas/ChangeLog b/gas/ChangeLog index bf75bbf91..636e9e8fd 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2011-02-08 H.J. Lu + + * 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 * doc/as.texinfo (Target TIC6X options): Don't mention "-matomic". diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 0028f1769..777d7cf67 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -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; } diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 166d8db22..16efa6dcc 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2011-02-08 H.J. Lu + + * 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 PR gas/3041 diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp index a0abf2882..306da65b6 100644 --- a/gas/testsuite/gas/i386/i386.exp +++ b/gas/testsuite/gas/i386/i386.exp @@ -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 index 000000000..b8ac733b5 --- /dev/null +++ b/gas/testsuite/gas/i386/nops-4a-i686.d @@ -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+ : +[ ]*[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 : +[ ]*[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 : +[ ]*[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 : +[ ]*[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 : +[ ]*[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 : +[ ]*[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 : +[ ]*[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 : +[ ]*[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 : +[ ]*[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 : +[ ]*[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 : +[ ]*[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 : +[ ]*[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 : +[ ]*[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 : +[ ]*[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 : +[ ]*[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 : +[ ]*[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 index 000000000..6b45d311f --- /dev/null +++ b/gas/testsuite/gas/i386/nops-6.d @@ -0,0 +1,17 @@ +#objdump: -drw +#name: i386 nops 6 + +.*: +file format .* + +Disassembly of section .text: + +0+ : +[ ]*[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 : +[ ]*[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 index 000000000..a634c520d --- /dev/null +++ b/gas/testsuite/gas/i386/nops-6.s @@ -0,0 +1,10 @@ + .text + .arch i386 +i386: + movsbl %al,%esi + .p2align 4 + + .arch .nop +i386_nop: + movsbl %al,%esi + .p2align 4 -- 2.11.4.GIT