diff options
author | Chenghua Xu <paul.hua.gm@gmail.com> | 2018-08-29 17:39:33 +0800 |
---|---|---|
committer | Chenghua Xu <paul.hua.gm@gmail.com> | 2018-08-29 19:33:09 +0800 |
commit | 716c08de28589a5560b3337f1b935ed84a49b5e5 (patch) | |
tree | 2da190bad9fdefcdace20dfdbac83ddbff79fc4c /gas/testsuite | |
parent | 36eb4c5f9bbe675a4522a763652f463e5519a955 (diff) | |
download | fsf-binutils-gdb-716c08de28589a5560b3337f1b935ed84a49b5e5.zip fsf-binutils-gdb-716c08de28589a5560b3337f1b935ed84a49b5e5.tar.gz fsf-binutils-gdb-716c08de28589a5560b3337f1b935ed84a49b5e5.tar.bz2 |
[MIPS/GAS] Split Loongson CAM Instructions from loongson3a
bfd/
* elfxx-mips.c (print_mips_ases): Add CAM extension.
binutils/
* readelf.c (print_mips_ases): Add CAM extension.
gas/
* NEWS: Mention Loongson Content Address Memory (CAM)
support.
* config/tc-mips.c (options): Add OPTION_LOONGSON_CAM and
OPTION_NO_LOONGSON_CAM.
(md_longopts): Likewise.
(mips_ases): Define availability for CAM.
(mips_convert_ase_flags): Map ASE_LOONGSON_CAM to
AFL_ASE_LOONGSON_CAM.
(mips_cpu_info_table): Add ASE_LOONGSON_CAM for loongson3a.
(md_show_usage): Add help for -mloongson-cam and
-mno-loongson-cam.
* doc/as.texi: Document -mloongson-cam, -mno-loongson-cam.
* doc/c-mips.texi: Document -mloongson-cam, -mno-loongson-cam,
.set loongson-cam and .set noloongson-cam.
* testsuite/gas/mips/loongson-3a-2.d: Move cam test to ...
* testsuite/gas/mips/loongson-cam.d: Here. Add ISA/ASE
flag verification.
* testsuite/gas/mips/loongson-3a-2.s: Move cam test to ...
* testsuite/gas/mips/loongson-cam.s: Here.
* testsuite/gas/mips/loongson-3a-mmi.d: Add ASE flag.
* testsuite/gas/mips/mips.exp: Run loongson-cam test.
include/
* elf/mips.h (AFL_ASE_LOONGSON_CAM): New macro.
(AFL_ASE_MASK): Update to include AFL_ASE_LOONGSON_CAM.
* opcode/mips.h (ASE_LOONGSON_CAM): New macro.
opcodes/
* mips-dis.c (mips_arch_choices): Add CAM to loongson3a
descriptors.
(parse_mips_ase_option): Handle -M loongson-cam option.
(print_mips_disassembler_options): Document -M loongson-cam.
* mips-opc.c (LCAM): New macro.
(mips_opcodes): Replace IL2F|IL3A marking with LCAM for CAM
instructions.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/gas/mips/loongson-3a-2.d | 4 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/loongson-3a-2.s | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/loongson-3a-mmi.d | 1 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/loongson-cam.d | 27 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/loongson-cam.s | 7 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/mips.exp | 2 |
6 files changed, 37 insertions, 9 deletions
diff --git a/gas/testsuite/gas/mips/loongson-3a-2.d b/gas/testsuite/gas/mips/loongson-3a-2.d index 8ef4c8e..ff2f553 100644 --- a/gas/testsuite/gas/mips/loongson-3a-2.d +++ b/gas/testsuite/gas/mips/loongson-3a-2.d @@ -7,10 +7,6 @@ Disassembly of section .text: [0-9a-f]+ <.text>: -.*: 70601075 campi \$2,\$3 -.*: 70a02035 campv \$4,\$5 -.*: 70e830b5 camwi \$6,\$7,\$8 -.*: 714048f5 ramri \$9,\$10 .*: 716c0026 gsle \$11,\$12 .*: 71ae0027 gsgt \$13,\$14 .*: c8622010 gslble \$2,\$3,\$4 diff --git a/gas/testsuite/gas/mips/loongson-3a-2.s b/gas/testsuite/gas/mips/loongson-3a-2.s index 7e35dd3..551ce64 100644 --- a/gas/testsuite/gas/mips/loongson-3a-2.s +++ b/gas/testsuite/gas/mips/loongson-3a-2.s @@ -1,11 +1,6 @@ .text .set noreorder - campi $2,$3 - campv $4,$5 - camwi $6,$7,$8 - ramri $9,$10 - gsle $11,$12 gsgt $13,$14 diff --git a/gas/testsuite/gas/mips/loongson-3a-mmi.d b/gas/testsuite/gas/mips/loongson-3a-mmi.d index de69d3e..81503cb 100644 --- a/gas/testsuite/gas/mips/loongson-3a-mmi.d +++ b/gas/testsuite/gas/mips/loongson-3a-mmi.d @@ -15,6 +15,7 @@ FP ABI: .* ISA Extension: Loongson 3A ASEs: Loongson MMI ASE + Loongson CAM ASE FLAGS 1: .* FLAGS 2: .* diff --git a/gas/testsuite/gas/mips/loongson-cam.d b/gas/testsuite/gas/mips/loongson-cam.d new file mode 100644 index 0000000..ae973ea --- /dev/null +++ b/gas/testsuite/gas/mips/loongson-cam.d @@ -0,0 +1,27 @@ +#as: -mloongson-cam -mabi=64 +#objdump: -M reg-names=numeric -M loongson-cam -dp +#name: Loongson CAM tests + +.*: file format .* + +private flags = .* + +MIPS ABI Flags Version: 0 +ISA: .* +GPR size: .* +CPR1 size: .* +CPR2 size: .* +FP ABI: .* +ISA Extension: None +ASEs: + Loongson CAM ASE +FLAGS 1: .* +FLAGS 2: .* + +Disassembly of section .text: + +[0-9a-f]+ <.text>: +.*: 70601075 campi \$2,\$3 +.*: 70a02035 campv \$4,\$5 +.*: 70e830b5 camwi \$6,\$7,\$8 +.*: 714048f5 ramri \$9,\$10 diff --git a/gas/testsuite/gas/mips/loongson-cam.s b/gas/testsuite/gas/mips/loongson-cam.s new file mode 100644 index 0000000..688e9d4 --- /dev/null +++ b/gas/testsuite/gas/mips/loongson-cam.s @@ -0,0 +1,7 @@ + .text + .set noreorder + + campi $2,$3 + campv $4,$5 + camwi $6,$7,$8 + ramri $9,$10 diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp index ad371e1..2f6ddc9 100644 --- a/gas/testsuite/gas/mips/mips.exp +++ b/gas/testsuite/gas/mips/mips.exp @@ -1394,6 +1394,8 @@ if { [istarget mips*-*-vxworks*] } { run_dump_test "loongson-2f-mmi" run_dump_test "loongson-3a-mmi" + run_dump_test "loongson-cam" + if { $has_newabi } { run_dump_test_arches "octeon" [mips_arch_list_matching octeon] } |