diff options
-rw-r--r-- | gas/config/tc-i386.c | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/i386.exp | 1 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/iamcu-6.d | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/iamcu-6.s | 2 | ||||
-rw-r--r-- | opcodes/i386-gen.c | 2 | ||||
-rw-r--r-- | opcodes/i386-init.h | 2 |
6 files changed, 12 insertions, 6 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index e063268..e1fd758 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -2839,8 +2839,8 @@ check_cpu_arch_compatible (const char *name ATTRIBUTE_UNUSED, } /* If we are targeting Intel MCU, we must enable it. */ - if (get_elf_backend_data (stdoutput)->elf_machine_code != EM_IAMCU - || new_flag.bitfield.cpuiamcu) + if ((get_elf_backend_data (stdoutput)->elf_machine_code == EM_IAMCU) + == new_flag.bitfield.cpuiamcu) return; /* If we are targeting Intel L1OM, we must enable it. */ @@ -2873,10 +2873,10 @@ set_cpu_arch (int dummy ATTRIBUTE_UNUSED) { if (strcmp (string, cpu_arch[j].name) == 0) { - check_cpu_arch_compatible (string, cpu_arch[j].flags); - if (*string != '.') { + check_cpu_arch_compatible (string, cpu_arch[j].flags); + cpu_arch_name = cpu_arch[j].name; cpu_sub_arch_name = NULL; cpu_arch_flags = cpu_arch[j].flags; diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp index 0ecd4ea..5e52c6b 100644 --- a/gas/testsuite/gas/i386/i386.exp +++ b/gas/testsuite/gas/i386/i386.exp @@ -698,6 +698,7 @@ if [gas_32_check] then { run_dump_test "iamcu-3" run_dump_test "iamcu-4" run_dump_test "iamcu-5" + run_dump_test "iamcu-6" run_list_test "iamcu-inval-1" "-march=iamcu -al" } } diff --git a/gas/testsuite/gas/i386/iamcu-6.d b/gas/testsuite/gas/i386/iamcu-6.d new file mode 100644 index 0000000..fd60f07 --- /dev/null +++ b/gas/testsuite/gas/i386/iamcu-6.d @@ -0,0 +1,3 @@ +#as: -J -march=iamcu -I${srcdir}/$subdir +#objdump: -dw +#dump: iamcu-1.d diff --git a/gas/testsuite/gas/i386/iamcu-6.s b/gas/testsuite/gas/i386/iamcu-6.s new file mode 100644 index 0000000..a6fc0f2 --- /dev/null +++ b/gas/testsuite/gas/i386/iamcu-6.s @@ -0,0 +1,2 @@ + .arch iamcu + .include "iamcu-1.s" diff --git a/opcodes/i386-gen.c b/opcodes/i386-gen.c index 6770b34..deb33e8 100644 --- a/opcodes/i386-gen.c +++ b/opcodes/i386-gen.c @@ -250,7 +250,7 @@ static initializer cpu_flag_init[] = { "CPU_K1OM_FLAGS", "unknown" }, { "CPU_IAMCU_FLAGS", - "Cpu186|Cpu286|Cpu386|Cpu486|Cpu586" }, + "Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|CpuIAMCU" }, { "CPU_ADX_FLAGS", "CpuADX" }, { "CPU_RDSEED_FLAGS", diff --git a/opcodes/i386-init.h b/opcodes/i386-init.h index fa73bd2..265e39b 100644 --- a/opcodes/i386-init.h +++ b/opcodes/i386-init.h @@ -939,7 +939,7 @@ #define CPU_IAMCU_FLAGS \ { { 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ |