diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2016-09-07 09:16:25 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2016-09-07 09:22:19 -0700 |
commit | 5b64d091e9ede49e402cb9697d35a40559ee7ff0 (patch) | |
tree | d7503f7c047d39bf4b67de16e5d297f41f0aadf1 /gas/testsuite | |
parent | 27e5a270962fb92c07e7d476966ba380fa3bb68e (diff) | |
download | gdb-5b64d091e9ede49e402cb9697d35a40559ee7ff0.zip gdb-5b64d091e9ede49e402cb9697d35a40559ee7ff0.tar.gz gdb-5b64d091e9ede49e402cb9697d35a40559ee7ff0.tar.bz2 |
X86: Allow additional ISAs for IAMCU in assembler
Originally only Pentium integer instructions are allowed for IAMCU.
This patch removes such a restriction. For example, 387 and SSE2
instructions can be enabled by passing "-march=iamcu+sse2+387" to
assembler.
gas/
* config/tc-i386.c (valid_iamcu_cpu_flags): Removed.
(set_cpu_arch): Updated.
(md_parse_option): Likewise.
* testsuite/gas/i386/i386.exp: Run iamcu-4 and iamcu-5. Remove
iamcu-inval-2 and iamcu-inval-3.
* testsuite/gas/i386/iamcu-4.d: New file.
* testsuite/gas/i386/iamcu-4.s: Likewise.
* testsuite/gas/i386/iamcu-5.d: Likewise.
* testsuite/gas/i386/iamcu-5.s: Likewise.
* testsuite/gas/i386/iamcu-inval-2.l: Removed.
* testsuite/gas/i386/iamcu-inval-2.s: Likewise.
* testsuite/gas/i386/iamcu-inval-3.l: Likewise.
* testsuite/gas/i386/iamcu-inval-3.s: Likewise.
opcodes/
* i386-gen.c (cpu_flag_init): Remove CPU_IAMCU_COMPAT_FLAGS.
* i386-init.h: Regenerated.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/gas/i386/i386.exp | 4 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/iamcu-4.d | 12 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/iamcu-4.s | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/iamcu-5.d | 12 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/iamcu-5.s | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/iamcu-inval-2.l | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/iamcu-inval-2.s | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/iamcu-inval-3.l | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/iamcu-inval-3.s | 1 |
9 files changed, 32 insertions, 9 deletions
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp index a546c26..c2cdf60 100644 --- a/gas/testsuite/gas/i386/i386.exp +++ b/gas/testsuite/gas/i386/i386.exp @@ -441,9 +441,9 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]] run_dump_test "iamcu-1" run_dump_test "iamcu-2" run_dump_test "iamcu-3" + run_dump_test "iamcu-4" + run_dump_test "iamcu-5" run_list_test "iamcu-inval-1" "-march=iamcu -al" - run_list_test "iamcu-inval-2" "-march=iamcu -al" - run_list_test "iamcu-inval-3" "-march=iamcu+sse4 -al" } } diff --git a/gas/testsuite/gas/i386/iamcu-4.d b/gas/testsuite/gas/i386/iamcu-4.d new file mode 100644 index 0000000..afd8a8e --- /dev/null +++ b/gas/testsuite/gas/i386/iamcu-4.d @@ -0,0 +1,12 @@ +#as: -J -march=iamcu+sse2+387 +#objdump: -dw +#not-target: *-*-nacl* + +.*: +file format elf32-iamcu.* + +Disassembly of section .text: + +0+ <.text>: + +[a-f0-9]+: d9 ff fcos + +[a-f0-9]+: 66 0f 58 01 addpd \(%ecx\),%xmm0 +#pass diff --git a/gas/testsuite/gas/i386/iamcu-4.s b/gas/testsuite/gas/i386/iamcu-4.s new file mode 100644 index 0000000..253763e --- /dev/null +++ b/gas/testsuite/gas/i386/iamcu-4.s @@ -0,0 +1,3 @@ + .text + fcos + addpd (%ecx),%xmm0 diff --git a/gas/testsuite/gas/i386/iamcu-5.d b/gas/testsuite/gas/i386/iamcu-5.d new file mode 100644 index 0000000..dde6977 --- /dev/null +++ b/gas/testsuite/gas/i386/iamcu-5.d @@ -0,0 +1,12 @@ +#as: -J -march=iamcu -I${srcdir}/$subdir +#objdump: -dw +#not-target: *-*-nacl* + +.*: +file format elf32-iamcu.* + +Disassembly of section .text: + +0+ <.text>: + +[a-f0-9]+: d9 ff fcos + +[a-f0-9]+: 66 0f 58 01 addpd \(%ecx\),%xmm0 +#pass diff --git a/gas/testsuite/gas/i386/iamcu-5.s b/gas/testsuite/gas/i386/iamcu-5.s new file mode 100644 index 0000000..afc558e --- /dev/null +++ b/gas/testsuite/gas/i386/iamcu-5.s @@ -0,0 +1,3 @@ + .arch .sse2 + .arch .387 +.include "iamcu-4.s" diff --git a/gas/testsuite/gas/i386/iamcu-inval-2.l b/gas/testsuite/gas/i386/iamcu-inval-2.l deleted file mode 100644 index e62e29d..0000000 --- a/gas/testsuite/gas/i386/iamcu-inval-2.l +++ /dev/null @@ -1,2 +0,0 @@ -.*: Assembler messages: -.*:2: Fatal error: `.sse4.1' isn't valid for Intel MCU diff --git a/gas/testsuite/gas/i386/iamcu-inval-2.s b/gas/testsuite/gas/i386/iamcu-inval-2.s deleted file mode 100644 index 46ef3ff..0000000 --- a/gas/testsuite/gas/i386/iamcu-inval-2.s +++ /dev/null @@ -1,2 +0,0 @@ -# Invalid .arch for Intel MCU - .arch .sse4.1 diff --git a/gas/testsuite/gas/i386/iamcu-inval-3.l b/gas/testsuite/gas/i386/iamcu-inval-3.l deleted file mode 100644 index a9762a5..0000000 --- a/gas/testsuite/gas/i386/iamcu-inval-3.l +++ /dev/null @@ -1,2 +0,0 @@ -Assembler messages: -Fatal error: `sse4' isn't valid for Intel MCU diff --git a/gas/testsuite/gas/i386/iamcu-inval-3.s b/gas/testsuite/gas/i386/iamcu-inval-3.s deleted file mode 100644 index 1c255e2..0000000 --- a/gas/testsuite/gas/i386/iamcu-inval-3.s +++ /dev/null @@ -1 +0,0 @@ -.include "iamcu-1.s" |