* [PATCH, RISC-V] Add missing fsrmi and fsflagsi instructions.
@ 2017-12-13 23:04 Jim Wilson
0 siblings, 0 replies; only message in thread
From: Jim Wilson @ 2017-12-13 23:04 UTC (permalink / raw)
To: binutils; +Cc: Jim Wilson
This adds two missing instructions, as reported in PR 22599, with a testcase
for the new instructions. This was tested with binutils/gas/ld make checks
for riscv32 and riscv64. There were no regressions. Committed.
PR 22599
gas/
* testsuite/gas/riscv/fsxxi.d, testsuite/gas/riscv/fsxxi.s: New.
opcodes/
* riscv-opc.c (riscv_opcodes) <fsrmi, fsflagsi>: New.
---
gas/testsuite/gas/riscv/fsxxi.d | 13 +++++++++++++
gas/testsuite/gas/riscv/fsxxi.s | 4 ++++
opcodes/riscv-opc.c | 4 ++++
3 files changed, 21 insertions(+)
create mode 100644 gas/testsuite/gas/riscv/fsxxi.d
create mode 100644 gas/testsuite/gas/riscv/fsxxi.s
diff --git a/gas/testsuite/gas/riscv/fsxxi.d b/gas/testsuite/gas/riscv/fsxxi.d
new file mode 100644
index 0000000000..2e03a20f82
--- /dev/null
+++ b/gas/testsuite/gas/riscv/fsxxi.d
@@ -0,0 +1,13 @@
+#as:
+#objdump: -dr
+
+.*:[ ]+file format .*
+
+
+Disassembly of section .text:
+
+0+000 <.text>:
+[ ]+0:[ ]+002fd573[ ]+fsrmi[ ]+a0,31
+[ ]+4:[ ]+002f5073[ ]+fsrmi[ ]+zero,30
+[ ]+8:[ ]+001ed773[ ]+fsflagsi[ ]+a4,29
+[ ]+c:[ ]+001e5073[ ]+fsflagsi[ ]+zero,28
diff --git a/gas/testsuite/gas/riscv/fsxxi.s b/gas/testsuite/gas/riscv/fsxxi.s
new file mode 100644
index 0000000000..e42d7863d9
--- /dev/null
+++ b/gas/testsuite/gas/riscv/fsxxi.s
@@ -0,0 +1,4 @@
+ fsrmi x10, 0x1f
+ fsrmi 0x1e
+ fsflagsi x14, 0x1d
+ fsflagsi 0x1c
diff --git a/opcodes/riscv-opc.c b/opcodes/riscv-opc.c
index 84cdea8fca..10448dac96 100644
--- a/opcodes/riscv-opc.c
+++ b/opcodes/riscv-opc.c
@@ -440,9 +440,13 @@ const struct riscv_opcode riscv_opcodes[] =
{"frrm", "F", "d", MATCH_FRRM, MASK_FRRM, match_opcode, 0 },
{"fsrm", "F", "s", MATCH_FSRM, MASK_FSRM | MASK_RD, match_opcode, 0 },
{"fsrm", "F", "d,s", MATCH_FSRM, MASK_FSRM, match_opcode, 0 },
+{"fsrmi", "F", "d,Z", MATCH_FSRMI, MASK_FSRMI, match_opcode, 0 },
+{"fsrmi", "F", "Z", MATCH_FSRMI, MASK_FSRMI | MASK_RD, match_opcode, 0 },
{"frflags", "F", "d", MATCH_FRFLAGS, MASK_FRFLAGS, match_opcode, 0 },
{"fsflags", "F", "s", MATCH_FSFLAGS, MASK_FSFLAGS | MASK_RD, match_opcode, 0 },
{"fsflags", "F", "d,s", MATCH_FSFLAGS, MASK_FSFLAGS, match_opcode, 0 },
+{"fsflagsi", "F", "d,Z", MATCH_FSFLAGSI, MASK_FSFLAGSI, match_opcode, 0 },
+{"fsflagsi", "F", "Z", MATCH_FSFLAGSI, MASK_FSFLAGSI | MASK_RD, match_opcode, 0 },
{"flw", "32C", "D,Cm(Cc)", MATCH_C_FLWSP, MASK_C_FLWSP, match_opcode, INSN_ALIAS },
{"flw", "32C", "CD,Ck(Cs)", MATCH_C_FLW, MASK_C_FLW, match_opcode, INSN_ALIAS },
{"flw", "F", "D,o(s)", MATCH_FLW, MASK_FLW, match_opcode, 0 },
--
2.14.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-12-13 23:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-13 23:04 [PATCH, RISC-V] Add missing fsrmi and fsflagsi instructions Jim Wilson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).