[MIPS] Add load-link, store-conditional paired instructions
authorAndrew Bennett <andrew.bennett@imgtec.com>
Mon, 22 Apr 2019 22:12:09 +0000 (15:12 -0700)
committerFaraz Shahbazker <fshahbazker@wavecomp.com>
Sat, 27 Apr 2019 01:28:05 +0000 (18:28 -0700)
commita45328b93bdd5399da8a9e56817e445cc2068edd
treed611c35292391d313d6d99f80aa1495fdbdef046
parent45f0ab12d463cb3999a4286e679bdef05884b3a3
[MIPS] Add load-link, store-conditional paired instructions

Add several baseline MIPS32R6[1] and MIPS64R6[2] instructions
that were omitted from the initial spec.  These instructions
are optional in implementations but not associated with any
ASE or pseudo-ASE.  Their presence is indicated by the XNP bit
in the Config5 register.

[1] "MIPS Architecture for Programmers Volume II-A: The MIPS32
     Instruction Set Manual", Imagination Technologies Ltd., Document
     Number: MD00086, Revision 6.06, December 15, 2016, Section 3.2
     "Alphabetical List of Instructions", pp. 228-229, pp. 354-357.

[2] "MIPS Architecture for Programmers Volume II-A: The MIPS64
     Instruction Set Manual", Imagination Technologies Ltd., Document
     Number: MD00087, Revision 6.06, December 15, 2016, Section 3.2
     "Alphabetical List of Instructions", pp. 289-290 and pp. 458-460.

gas/
* config/tc-mips.c (macro) <M_LLWP_AB, M_LLDP_AB, M_SCWP_AB,
M_SCDP_AB>: New cases and expansions for paired instructions.
* testsuite/gas/mips/llpscp-32.s: New test source.
* testsuite/gas/mips/llpscp-64.s: Likewise.
* testsuite/gas/mips/llpscp-32.d: New test.
* testsuite/gas/mips/llpscp-64.d: Likewise.
* testsuite/gas/mips/mips.exp: Run the new tests.
* testsuite/gas/mips/r6.s: Add new instructions to test source.
* testsuite/gas/mips/r6-64.s: Likewise.
* testsuite/gas/mips/r6-64-n32.d: Check new instructions.
* testsuite/gas/mips/r6-64-n64.d: Likewise.
* testsuite/gas/mips/r6-n32.d: Likewise.
* testsuite/gas/mips/r6-n64.d: Likwwise.
* testsuite/gas/mips/r6.d: Likewise.

include/
* opcode/mips.h (M_LLWP_AB, M_LLDP_AB): New enum values.
(M_SCWP_AB, M_SCDP_AB): Likewise.

opcodes/
* mips-opc.c (mips_builtin_opcodes): Add llwp, lldp, scwp, scdp.
18 files changed:
gas/ChangeLog
gas/config/tc-mips.c
gas/testsuite/gas/mips/llpscp-32.d [new file with mode: 0644]
gas/testsuite/gas/mips/llpscp-32.s [new file with mode: 0644]
gas/testsuite/gas/mips/llpscp-64.d [new file with mode: 0644]
gas/testsuite/gas/mips/llpscp-64.s [new file with mode: 0644]
gas/testsuite/gas/mips/mips.exp
gas/testsuite/gas/mips/r6-64-n32.d
gas/testsuite/gas/mips/r6-64-n64.d
gas/testsuite/gas/mips/r6-64.s
gas/testsuite/gas/mips/r6-n32.d
gas/testsuite/gas/mips/r6-n64.d
gas/testsuite/gas/mips/r6.d
gas/testsuite/gas/mips/r6.s
include/ChangeLog
include/opcode/mips.h
opcodes/ChangeLog
opcodes/mips-opc.c