]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - opcodes/mips-opc.c
Add macro expansions for ADD, SUB, DADD and DSUB for MIPS r6
authorFaraz Shahbazker <fshahbazker@wavecomp.com>
Mon, 6 May 2019 16:29:20 +0000 (09:29 -0700)
committerFaraz Shahbazker <fshahbazker@wavecomp.com>
Sat, 11 May 2019 04:36:32 +0000 (21:36 -0700)
commit387e762476ff224ee40760910e73a3905a2c380a
tree8cbc344599f40ab24af2cc94dbc05858f51949f2
parent0067be51e9436c5bbd961a4f54c10dbd50c491ea
Add macro expansions for ADD, SUB, DADD and DSUB for MIPS r6

Release 6 of the MIPS architecture does not have an ADDI instruction.
ADD/SUB instructions with immediate operands can be expanded to load
and immediate value and then perform the operation.

gas/
* config/tc-mips.c (macro) <M_ADD_I, M_SUB_I, M_DADD_I, M_DSUB_I>:
Add expansions for MIPS r6.
* testsuite/gas/mips/add.s: Enable tests for R6.
* testsuite/gas/mips/daddi.s: Annotate to test DADD for R6.
* testsuite/gas/mips/mipsr6@add.d: Likewise.
* gas/testsuite/gas/mips/mipsr6@dadd.d: New test.
* gas/testsuite/gas/mips/mips.exp: Run the new test.

opcodes/
        * mips-opc.c (mips_opcodes): Enable ADD, SUB, DADD and DSUB
macros for R6.
gas/ChangeLog
gas/config/tc-mips.c
gas/testsuite/gas/mips/add.s
gas/testsuite/gas/mips/daddi.s
gas/testsuite/gas/mips/mips.exp
gas/testsuite/gas/mips/mipsr6@add.d
gas/testsuite/gas/mips/mipsr6@dadd.d [new file with mode: 0644]
opcodes/ChangeLog
opcodes/mips-opc.c