When -march= or .arch is used, we can't use anything beyond
cpu_arch_isa_flags. */
- if (flag_code == CODE_16BIT)
+ if (fragP->tc_frag_data.code == CODE_16BIT)
{
patt = f16_patt;
max_single_nop_size = sizeof (f16_patt) / sizeof (f16_patt[0]);
if (fragP->tc_frag_data.isa == PROCESSOR_UNKNOWN)
{
/* PROCESSOR_UNKNOWN means that all ISAs may be used. */
- switch (cpu_arch_tune)
+ switch (fragP->tc_frag_data.tune)
{
case PROCESSOR_UNKNOWN:
/* We use cpu_arch_isa_flags to check if we SHOULD
run_dump_test "nops-7"
run_dump_test "nops-8"
run_dump_test "nops-9"
+ run_dump_test "nops-10"
run_dump_test "noreg16"
run_list_test "noreg16"
run_dump_test "noreg16-data32"
--- /dev/null
+#objdump: -drw
+#name: nops 10
+
+.*: +file format .*
+
+
+Disassembly of section .text:
+
+0+ <default>:
+[ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi
+[ ]*[a-f0-9]+: 8d b4 26 00 00 00 00 lea 0x0\(%esi,%eiz,1\),%esi
+[ ]*[a-f0-9]+: 8d b6 00 00 00 00 lea 0x0\(%esi\),%esi
+#pass
--- /dev/null
+ .text
+default:
+ movsbl %al,%esi
+ .p2align 4
+
+ .code16
--- /dev/null
+#objdump: -drw
+#name: x86-64 nops 6
+
+.*: +file format .*
+
+
+Disassembly of section .text:
+
+0+ <default>:
+[ ]*[a-f0-9]+: 0f be f0 movsbl %al,%esi
+[ ]*[a-f0-9]+: 66 66 2e 0f 1f 84 00 00 00 00 00 data16 cs nopw (0x)?0\(%rax,%rax,1\)
+[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax
+#pass
--- /dev/null
+ .text
+default:
+ movsbl %al,%esi
+ .p2align 4
+
+ .code32
+ .arch generic32
run_dump_test "x86-64-nops-4-k8"
run_dump_test "x86-64-nops-5"
run_dump_test "x86-64-nops-5-k8"
+run_dump_test "x86-64-nops-6"
run_dump_test "x86-64-nops-7"
run_dump_test "x86-64-sysenter"
run_dump_test "x86-64-sysenter-intel"