diff options
author | Maciej W. Rozycki <macro@imgtec.com> | 2017-06-30 07:21:56 +0100 |
---|---|---|
committer | Maciej W. Rozycki <macro@imgtec.com> | 2017-06-30 07:21:56 +0100 |
commit | 909b4e3d5fb8579b3721651c9e64a11e7ec27e5f (patch) | |
tree | d92e54585582d8bfacd97d0602cedef8c2f59ba1 /gas/testsuite | |
parent | f5b2fd523f8f180e11f77b84a107279c562672cd (diff) | |
download | gdb-909b4e3d5fb8579b3721651c9e64a11e7ec27e5f.zip gdb-909b4e3d5fb8579b3721651c9e64a11e7ec27e5f.tar.gz gdb-909b4e3d5fb8579b3721651c9e64a11e7ec27e5f.tar.bz2 |
MIPS: Add microMIPS XPA support
Add support for the base and Virtualization ASE microMIPS instructions
as per the architecture specifications[1][2][3][4].
Most of this change by Andrew Bennett.
[1] "MIPS Architecture for Programmers Volume II-B: The microMIPS32
Instruction Set", MIPS Technologies, Inc., Document Number: MD00582,
Revision 5.04, January 15, 2014, Section 5.5 "Recoded 32-Bit
Instructions", p. 340
[2] "microMIPS32 Architecture for Programmers Volume IV-i:
Virtualization Module of the microMIPS32 Architecture", MIPS
Technologies, Inc., Document Number: MD00848, Revision 1.06,
December 10, 2013, Section 6.1 "Overview", pp. 133, 136
[3] "MIPS Architecture for Programmers Volume II-B: The microMIPS64
Instruction Set", MIPS Technologies, Inc., Document Number: MD00594,
Revision 5.04, January 15, 2014, Section 5.5 "Recoded 32-Bit
Instructions", pp. 415, 444
[4] "microMIPS64 Architecture for Programmers Volume IV-i:
Virtualization Module of the microMIPS64 Architecture", MIPS
Technologies, Inc., Document Number: MD00849, Revision 1.06,
December 10, 2013, Section 6.1 "Overview", pp. 134-135, 139-140
binutils/
* NEWS: Mention microMIPS XPA support.
opcodes/
* micromips-opc.c (XPA, XPAVZ): New macros.
(micromips_opcodes): Add "mfhc0", "mfhgc0", "mthc0" and
"mthgc0".
gas/
* config/tc-mips.c (mips_ases): Add microMIPS XPA support.
* testsuite/gas/mips/micromips@xpa.d: New test.
* testsuite/gas/mips/mips.exp: Run the new test. Enable
`xpa-virt-err' test for `micromips'.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/gas/mips/micromips@xpa.d | 25 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/mips.exp | 7 |
2 files changed, 28 insertions, 4 deletions
diff --git a/gas/testsuite/gas/mips/micromips@xpa.d b/gas/testsuite/gas/mips/micromips@xpa.d new file mode 100644 index 0000000..a8ab640 --- /dev/null +++ b/gas/testsuite/gas/mips/micromips@xpa.d @@ -0,0 +1,25 @@ +#objdump: -dr --prefix-addresses --show-raw-insn -M cp0-names=mips32r2 +#name: XPA instructions +#source: xpa.s +#as: -32 -mxpa -mvirt + +.*: +file format .*mips.* + +Disassembly of section \.text: +[0-9a-f]+ <[^>]*> 0041 00f4 mfhc0 v0,c0_random +[0-9a-f]+ <[^>]*> 0050 00f4 mfhc0 v0,c0_config +[0-9a-f]+ <[^>]*> 0040 10f4 mfhc0 v0,c0_mvpconf0 +[0-9a-f]+ <[^>]*> 0040 38f4 mfhc0 v0,\$0,7 +[0-9a-f]+ <[^>]*> 0041 02f4 mthc0 v0,c0_random +[0-9a-f]+ <[^>]*> 0050 02f4 mthc0 v0,c0_config +[0-9a-f]+ <[^>]*> 0040 12f4 mthc0 v0,c0_mvpconf0 +[0-9a-f]+ <[^>]*> 0040 3af4 mthc0 v0,\$0,7 +[0-9a-f]+ <[^>]*> 0041 04f4 mfhgc0 v0,c0_random +[0-9a-f]+ <[^>]*> 0050 04f4 mfhgc0 v0,c0_config +[0-9a-f]+ <[^>]*> 0040 14f4 mfhgc0 v0,c0_mvpconf0 +[0-9a-f]+ <[^>]*> 0040 3cf4 mfhgc0 v0,\$0,7 +[0-9a-f]+ <[^>]*> 0041 06f4 mthgc0 v0,c0_random +[0-9a-f]+ <[^>]*> 0050 06f4 mthgc0 v0,c0_config +[0-9a-f]+ <[^>]*> 0040 16f4 mthgc0 v0,c0_mvpconf0 +[0-9a-f]+ <[^>]*> 0040 3ef4 mthgc0 v0,\$0,7 + \.\.\. diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp index 793505f..81dfd34 100644 --- a/gas/testsuite/gas/mips/mips.exp +++ b/gas/testsuite/gas/mips/mips.exp @@ -1561,10 +1561,9 @@ if { [istarget mips*-*-vxworks*] } { run_dump_test_arches "msa-relax" [mips_arch_list_matching mips32r2 !mips32r6] run_dump_test_arches "msa-branch" [mips_arch_list_matching mips32r2] - run_dump_test_arches "xpa" [mips_arch_list_matching mips32r2 !micromips] - run_dump_test_arches "xpa-err" [mips_arch_list_matching mips32r2 !micromips] - run_dump_test_arches "xpa-virt-err" \ - [mips_arch_list_matching mips32r2 !micromips] + run_dump_test_arches "xpa" [mips_arch_list_matching mips32r2] + run_dump_test_arches "xpa-err" [mips_arch_list_matching mips32r2] + run_dump_test_arches "xpa-virt-err" [mips_arch_list_matching mips32r2] run_dump_test_arches "r5" "-32" [mips_arch_list_matching mips32r5] run_dump_test "pcrel-1" |