aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2018-10-05 11:41:41 +0900
committerStafford Horne <shorne@gmail.com>2018-10-05 11:41:42 +0900
commit07f5f4c683879e844d20d0d4963bbaf1b7cd47b9 (patch)
tree872d6d64ac1dd790d76b214c2f7ae0150d51bdbb /gas
parentc8e98e3692cec125b92c995d8f881d9bdf1fac00 (diff)
downloadgdb-07f5f4c683879e844d20d0d4963bbaf1b7cd47b9.zip
gdb-07f5f4c683879e844d20d0d4963bbaf1b7cd47b9.tar.gz
gdb-07f5f4c683879e844d20d0d4963bbaf1b7cd47b9.tar.bz2
or1k: Add the l.muld, l.muldu, l.macu, l.msbu insns
Also fix the incorrect definitions of multiply and divide carry and overflow float. Changes to the instructions are made in the .cpu file, then we regenerate the binutils and sim files. The changes also required a few fixups for tests and additional sim helpers. cpu/ChangeLog: yyyy-mm-dd Richard Henderson <rth@twiddle.net> Stafford Horne <shorne@gmail.com> * or1korbis.cpu (insn-opcode-mac): Add opcodes for MACU and MSBU. (insn-opcode-alu-regreg): Add opcodes for MULD and MULDU. (l-mul): Fix overflow support and indentation. (l-mulu): Fix overflow support and indentation. (l-muld, l-muldu, l-msbu, l-macu): New instructions. (l-div); Remove incorrect carry behavior. (l-divu): Fix carry and overflow behavior. (l-mac): Add overflow support. (l-msb, l-msbu): Add carry and overflow support. opcodes/ChangeLog: yyyy-mm-dd Richard Henderson <rth@twiddle.net> Stafford Horne <shorne@gmail.com> * or1k-desc.c: Regenerate. * or1k-desc.h: Regenerate. * or1k-opc.c: Regenerate. * or1k-opc.h: Regenerate. * or1k-opinst.c: Regenerate. sim/common/ChangeLog: yyyy-mm-dd Stafford Horne <shorne@gmail.com> * cgen-ops.h (ADDCFDI): New function, add carry flag DI variant. (ADDOFDI): New function, add overflow flag DI variant. (SUBCFDI): New function, subtract carry flag DI variant. (SUBOFDI): New function, subtract overflow flag DI variant. sim/ChangeLog: yyyy-mm-dd Stafford Horne <shorne@gmail.com> * or1k/cpu.h: Regenerate. * or1k/decode.c: Regenerate. * or1k/decode.h: Regenerate. * or1k/model.c: Regenerate. * or1k/sem-switch.c: Regenerate. * or1k/sem.c: Regenerate: sim/testsuite/sim/or1k/ChangeLog: yyyy-mm-dd Stafford Horne <shorne@gmail.com> * div.S: Fix tests to match correct overflow/carry semantics. * mul.S: Likewise. gas/ChangeLog: yyyy-mm-dd Stafford Horne <shorne@gmail.com> * testsuite/gas/or1k/allinsn.s: Add instruction tests for l.muld, l.muldu, l.macu, l.msb, l.msbu. * testsuite/gas/or1k/allinsn.d: Add test results for new instructions.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/testsuite/gas/or1k/allinsn.d25
-rw-r--r--gas/testsuite/gas/or1k/allinsn.s20
3 files changed, 52 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 1aff61e..c42d9a0 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,10 @@
+2018-10-05 Stafford Horne <shorne@gmail.com>
+
+ * testsuite/gas/or1k/allinsn.s: Add instruction tests for
+ l.muld, l.muldu, l.macu, l.msb, l.msbu.
+ * testsuite/gas/or1k/allinsn.d: Add test results for new
+ instructions.
+
2018-10-05 Richard Henderson <rth@twiddle.net>
* config/tc-or1k.c (or1k_apply_fix): Add BFD_RELOC_OR1K_TLS_GD_PG21,
diff --git a/gas/testsuite/gas/or1k/allinsn.d b/gas/testsuite/gas/or1k/allinsn.d
index a4ffe43..4260498 100644
--- a/gas/testsuite/gas/or1k/allinsn.d
+++ b/gas/testsuite/gas/or1k/allinsn.d
@@ -696,3 +696,28 @@ Disassembly of section \.text:
840: R_OR1K_PCREL_PG21 globaldata
844: 08 60 00 00 l\.adrp r3,0 <localtext>
844: R_OR1K_PCREL_PG21 \.data
+
+00000848 <l_muld>:
+ 848: e0 00 03 07 l\.muld r0,r0
+ 84c: e0 1f fb 07 l\.muld r31,r31
+ 850: e0 03 23 07 l\.muld r3,r4
+
+00000854 <l_muldu>:
+ 854: e0 00 03 0d l\.muldu r0,r0
+ 858: e0 1f fb 0d l\.muldu r31,r31
+ 85c: e0 03 23 0d l\.muldu r3,r4
+
+00000860 <l_macu>:
+ 860: c4 00 00 03 l\.macu r0,r0
+ 864: c4 1f f8 03 l\.macu r31,r31
+ 868: c4 03 20 03 l\.macu r3,r4
+
+0000086c <l_msb>:
+ 86c: c4 00 00 02 l\.msb r0,r0
+ 870: c4 1f f8 02 l\.msb r31,r31
+ 874: c4 03 20 02 l\.msb r3,r4
+
+00000878 <l_msbu>:
+ 878: c4 00 00 04 l\.msbu r0,r0
+ 87c: c4 1f f8 04 l\.msbu r31,r31
+ 880: c4 03 20 04 l\.msbu r3,r4
diff --git a/gas/testsuite/gas/or1k/allinsn.s b/gas/testsuite/gas/or1k/allinsn.s
index 55d7037..e5a7906 100644
--- a/gas/testsuite/gas/or1k/allinsn.s
+++ b/gas/testsuite/gas/or1k/allinsn.s
@@ -680,3 +680,23 @@ l_maci:
l_adrp:
l.adrp r3,globaldata
l.adrp r3,localdata
+l_muld:
+ l.muld r0,r0
+ l.muld r31,r31
+ l.muld r3,r4
+l_muldu:
+ l.muldu r0,r0
+ l.muldu r31,r31
+ l.muldu r3,r4
+l_macu:
+ l.macu r0,r0
+ l.macu r31,r31
+ l.macu r3,r4
+l_msb:
+ l.msb r0,r0
+ l.msb r31,r31
+ l.msb r3,r4
+l_msbu:
+ l.msbu r0,r0
+ l.msbu r31,r31
+ l.msbu r3,r4