RISC-V: add F- and D-extension testcases
authorJan Beulich <jbeulich@suse.com>
Fri, 3 Nov 2023 09:02:27 +0000 (10:02 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 3 Nov 2023 09:02:27 +0000 (10:02 +0100)
Make sure future changes won't regress any of this. Also cover the FLH
and FSH macro insns of the Zfh extension.

gas/testsuite/gas/riscv/fp-d-insns-32.d [new file with mode: 0644]
gas/testsuite/gas/riscv/fp-d-insns-32.s [new file with mode: 0644]
gas/testsuite/gas/riscv/fp-d-insns-64.d [new file with mode: 0644]
gas/testsuite/gas/riscv/fp-d-insns-64.s [new file with mode: 0644]
gas/testsuite/gas/riscv/fp-f-insns-32.d [new file with mode: 0644]
gas/testsuite/gas/riscv/fp-f-insns-32.s [new file with mode: 0644]
gas/testsuite/gas/riscv/fp-f-insns-64.d [new file with mode: 0644]
gas/testsuite/gas/riscv/fp-f-insns-64.s [new file with mode: 0644]
gas/testsuite/gas/riscv/fp-zfh-insns.d
gas/testsuite/gas/riscv/fp-zfh-insns.s

diff --git a/gas/testsuite/gas/riscv/fp-d-insns-32.d b/gas/testsuite/gas/riscv/fp-d-insns-32.d
new file mode 100644 (file)
index 0000000..e361ac2
--- /dev/null
@@ -0,0 +1,128 @@
+#as: -march=rv32icd
+#name: D extension (32-bit)
+#objdump: -dwrMnumeric
+
+.*:[   ]+file format .*
+
+
+Disassembly of section .text:
+
+0+ <D>:
+[      ]+[0-9a-f]+:[   ]+22002fd3[     ]+fabs\.d[      ]+f31,f0
+[      ]+[0-9a-f]+:[   ]+23ffa053[     ]+fabs\.d[      ]+f0,f31
+[      ]+[0-9a-f]+:[   ]+02007fd3[     ]+fadd\.d[      ]+f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+020ff053[     ]+fadd\.d[      ]+f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+03f07053[     ]+fadd\.d[      ]+f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+02000053[     ]+fadd\.d[      ]+f0,f0,f0,rne
+[      ]+[0-9a-f]+:[   ]+02001053[     ]+fadd\.d[      ]+f0,f0,f0,rtz
+[      ]+[0-9a-f]+:[   ]+02002053[     ]+fadd\.d[      ]+f0,f0,f0,rdn
+[      ]+[0-9a-f]+:[   ]+02003053[     ]+fadd\.d[      ]+f0,f0,f0,rup
+[      ]+[0-9a-f]+:[   ]+02004053[     ]+fadd\.d[      ]+f0,f0,f0,rmm
+[      ]+[0-9a-f]+:[   ]+e2001fd3[     ]+fclass\.d[    ]+x31,f0
+[      ]+[0-9a-f]+:[   ]+e20f9053[     ]+fclass\.d[    ]+x0,f31
+[      ]+[0-9a-f]+:[   ]+42000fd3[     ]+fcvt\.d\.s[   ]+f31,f0
+[      ]+[0-9a-f]+:[   ]+420f8053[     ]+fcvt\.d\.s[   ]+f0,f31
+[      ]+[0-9a-f]+:[   ]+d2000053[     ]+fcvt\.d\.w[   ]+f0,x0
+[      ]+[0-9a-f]+:[   ]+d2100053[     ]+fcvt\.d\.wu[  ]+f0,x0
+[      ]+[0-9a-f]+:[   ]+40107fd3[     ]+fcvt\.s\.d[   ]+f31,f0
+[      ]+[0-9a-f]+:[   ]+401ff053[     ]+fcvt\.s\.d[   ]+f0,f31
+[      ]+[0-9a-f]+:[   ]+40100053[     ]+fcvt\.s\.d[   ]+f0,f0,rne
+[      ]+[0-9a-f]+:[   ]+c2007053[     ]+fcvt\.w\.d[   ]+x0,f0
+[      ]+[0-9a-f]+:[   ]+c2107053[     ]+fcvt\.wu\.d[  ]+x0,f0
+[      ]+[0-9a-f]+:[   ]+1a007fd3[     ]+fdiv\.d[      ]+f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+1a0ff053[     ]+fdiv\.d[      ]+f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+1bf07053[     ]+fdiv\.d[      ]+f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+1a000053[     ]+fdiv\.d[      ]+f0,f0,f0,rne
+[      ]+[0-9a-f]+:[   ]+a2002fd3[     ]+feq\.d[       ]+x31,f0,f0
+[      ]+[0-9a-f]+:[   ]+a20fa053[     ]+feq\.d[       ]+x0,f31,f0
+[      ]+[0-9a-f]+:[   ]+a3f02053[     ]+feq\.d[       ]+x0,f0,f31
+[      ]+[0-9a-f]+:[   ]+a2000fd3[     ]+fle\.d[       ]+x31,f0,f0
+[      ]+[0-9a-f]+:[   ]+a3f00053[     ]+fle\.d[       ]+x0,f0,f31
+[      ]+[0-9a-f]+:[   ]+a20f8053[     ]+fle\.d[       ]+x0,f31,f0
+[      ]+[0-9a-f]+:[   ]+a2001fd3[     ]+flt\.d[       ]+x31,f0,f0
+[      ]+[0-9a-f]+:[   ]+a3f01053[     ]+flt\.d[       ]+x0,f0,f31
+[      ]+[0-9a-f]+:[   ]+a20f9053[     ]+flt\.d[       ]+x0,f31,f0
+[      ]+[0-9a-f]+:[   ]+00003f87[     ]+fld[  ]+f31,0\(x0\) # 0( <.*>)?
+[      ]+[0-9a-f]+:[   ]+7ff03007[     ]+fld[  ]+f0,2047\(x0\) # 7ff( <.*>)?
+[      ]+[0-9a-f]+:[   ]+80003007[     ]+fld[  ]+f0,-2048\(x0\) # fffff800( <.*>)?
+[      ]+[0-9a-f]+:[   ]+000fb007[     ]+fld[  ]+f0,0\(x31\)
+[      ]+[0-9a-f]+:[   ]+00000f97[     ]+auipc[        ]+x31,0x0[      ]+[0-9a-f]+:[   ]+R_RISCV_PCREL_HI20[   ]+dval
+[      ]+[0-9a-f]+:[   ]+R_RISCV_RELAX.*
+[      ]+[0-9a-f]+:[   ]+000fb007[     ]+fld[  ]+f0,0\(x31\) # [0-9a-f]+( <.*>)?[      ]+[0-9a-f]+:[   ]+R_RISCV_PCREL_LO12_I[         ]+.*
+[      ]+[0-9a-f]+:[   ]+R_RISCV_RELAX.*
+[      ]+[0-9a-f]+:[   ]+201c[         ]+fld[  ]+f15,0\(x8\)
+[      ]+[0-9a-f]+:[   ]+3c00[         ]+fld[  ]+f8,56\(x8\)
+[      ]+[0-9a-f]+:[   ]+2060[         ]+fld[  ]+f8,192\(x8\)
+[      ]+[0-9a-f]+:[   ]+2380[         ]+fld[  ]+f8,0\(x15\)
+[      ]+[0-9a-f]+:[   ]+2f82[         ]+fld[  ]+f31,0\(x2\)
+[      ]+[0-9a-f]+:[   ]+2062[         ]+fld[  ]+f0,24\(x2\)
+[      ]+[0-9a-f]+:[   ]+3002[         ]+fld[  ]+f0,32\(x2\)
+[      ]+[0-9a-f]+:[   ]+201e[         ]+fld[  ]+f0,448\(x2\)
+[      ]+[0-9a-f]+:[   ]+a2000fd3[     ]+fle\.d[       ]+x31,f0,f0
+[      ]+[0-9a-f]+:[   ]+a20f8053[     ]+fle\.d[       ]+x0,f31,f0
+[      ]+[0-9a-f]+:[   ]+a3f00053[     ]+fle\.d[       ]+x0,f0,f31
+[      ]+[0-9a-f]+:[   ]+a2001fd3[     ]+flt\.d[       ]+x31,f0,f0
+[      ]+[0-9a-f]+:[   ]+a20f9053[     ]+flt\.d[       ]+x0,f31,f0
+[      ]+[0-9a-f]+:[   ]+a3f01053[     ]+flt\.d[       ]+x0,f0,f31
+[      ]+[0-9a-f]+:[   ]+02007fc3[     ]+fmadd\.d[     ]+f31,f0,f0,f0
+[      ]+[0-9a-f]+:[   ]+020ff043[     ]+fmadd\.d[     ]+f0,f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+03f07043[     ]+fmadd\.d[     ]+f0,f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+fa007043[     ]+fmadd\.d[     ]+f0,f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+02000043[     ]+fmadd\.d[     ]+f0,f0,f0,f0,rne
+[      ]+[0-9a-f]+:[   ]+2a001fd3[     ]+fmax\.d[      ]+f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+2a0f9053[     ]+fmax\.d[      ]+f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+2bf01053[     ]+fmax\.d[      ]+f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+2a000fd3[     ]+fmin\.d[      ]+f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+2a0f8053[     ]+fmin\.d[      ]+f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+2bf00053[     ]+fmin\.d[      ]+f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+02007fc7[     ]+fmsub\.d[     ]+f31,f0,f0,f0
+[      ]+[0-9a-f]+:[   ]+020ff047[     ]+fmsub\.d[     ]+f0,f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+03f07047[     ]+fmsub\.d[     ]+f0,f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+fa007047[     ]+fmsub\.d[     ]+f0,f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+02000047[     ]+fmsub\.d[     ]+f0,f0,f0,f0,rne
+[      ]+[0-9a-f]+:[   ]+12007fd3[     ]+fmul\.d[      ]+f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+120ff053[     ]+fmul\.d[      ]+f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+13f07053[     ]+fmul\.d[      ]+f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+12000053[     ]+fmul\.d[      ]+f0,f0,f0,rne
+[      ]+[0-9a-f]+:[   ]+22000fd3[     ]+fmv\.d[       ]+f31,f0
+[      ]+[0-9a-f]+:[   ]+23ff8053[     ]+fmv\.d[       ]+f0,f31
+[      ]+[0-9a-f]+:[   ]+22001fd3[     ]+fneg\.d[      ]+f31,f0
+[      ]+[0-9a-f]+:[   ]+23ff9053[     ]+fneg\.d[      ]+f0,f31
+[      ]+[0-9a-f]+:[   ]+02007fcf[     ]+fnmadd\.d[    ]+f31,f0,f0,f0
+[      ]+[0-9a-f]+:[   ]+020ff04f[     ]+fnmadd\.d[    ]+f0,f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+03f0704f[     ]+fnmadd\.d[    ]+f0,f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+fa00704f[     ]+fnmadd\.d[    ]+f0,f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+0200004f[     ]+fnmadd\.d[    ]+f0,f0,f0,f0,rne
+[      ]+[0-9a-f]+:[   ]+02007fcb[     ]+fnmsub\.d[    ]+f31,f0,f0,f0
+[      ]+[0-9a-f]+:[   ]+020ff04b[     ]+fnmsub\.d[    ]+f0,f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+03f0704b[     ]+fnmsub\.d[    ]+f0,f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+fa00704b[     ]+fnmsub\.d[    ]+f0,f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+0200004b[     ]+fnmsub\.d[    ]+f0,f0,f0,f0,rne
+[      ]+[0-9a-f]+:[   ]+01f03027[     ]+fsd[  ]+f31,0\(x0\) # 0( <.*>)?
+[      ]+[0-9a-f]+:[   ]+00003fa7[     ]+fsd[  ]+f0,31\(x0\) # 1f( <.*>)?
+[      ]+[0-9a-f]+:[   ]+fe003027[     ]+fsd[  ]+f0,-32\(x0\) # ffffffe0( <.*>)?
+[      ]+[0-9a-f]+:[   ]+000fb027[     ]+fsd[  ]+f0,0\(x31\)
+[      ]+[0-9a-f]+:[   ]+00000f97[     ]+auipc[        ]+x31,0x0[      ]+[0-9a-f]+:[   ]+R_RISCV_PCREL_HI20[   ]+dval
+[      ]+[0-9a-f]+:[   ]+R_RISCV_RELAX.*
+[      ]+[0-9a-f]+:[   ]+000fb027[     ]+fsd[  ]+f0,0\(x31\) # [0-9a-f]+( <.*>)?[      ]+[0-9a-f]+:[   ]+R_RISCV_PCREL_LO12_S[         ]+.*
+[      ]+[0-9a-f]+:[   ]+R_RISCV_RELAX.*
+[      ]+[0-9a-f]+:[   ]+a01c[         ]+fsd[  ]+f15,0\(x8\)
+[      ]+[0-9a-f]+:[   ]+bc00[         ]+fsd[  ]+f8,56\(x8\)
+[      ]+[0-9a-f]+:[   ]+a060[         ]+fsd[  ]+f8,192\(x8\)
+[      ]+[0-9a-f]+:[   ]+a380[         ]+fsd[  ]+f8,0\(x15\)
+[      ]+[0-9a-f]+:[   ]+a07e[         ]+fsd[  ]+f31,0\(x2\)
+[      ]+[0-9a-f]+:[   ]+ac02[         ]+fsd[  ]+f0,24\(x2\)
+[      ]+[0-9a-f]+:[   ]+b002[         ]+fsd[  ]+f0,32\(x2\)
+[      ]+[0-9a-f]+:[   ]+a382[         ]+fsd[  ]+f0,448\(x2\)
+[      ]+[0-9a-f]+:[   ]+22100fd3[     ]+fsgnj\.d[     ]+f31,f0,f1
+[      ]+[0-9a-f]+:[   ]+220f8053[     ]+fsgnj\.d[     ]+f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+23f00053[     ]+fsgnj\.d[     ]+f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+22009053[     ]+fsgnjn\.d[    ]+f0,f1,f0
+[      ]+[0-9a-f]+:[   ]+2200a053[     ]+fsgnjx\.d[    ]+f0,f1,f0
+[      ]+[0-9a-f]+:[   ]+5a007fd3[     ]+fsqrt\.d[     ]+f31,f0
+[      ]+[0-9a-f]+:[   ]+5a0ff053[     ]+fsqrt\.d[     ]+f0,f31
+[      ]+[0-9a-f]+:[   ]+5a000053[     ]+fsqrt\.d[     ]+f0,f0,rne
+[      ]+[0-9a-f]+:[   ]+0a007fd3[     ]+fsub\.d[      ]+f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+0a0ff053[     ]+fsub\.d[      ]+f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+0bf07053[     ]+fsub\.d[      ]+f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+0a000053[     ]+fsub\.d[      ]+f0,f0,f0,rne
diff --git a/gas/testsuite/gas/riscv/fp-d-insns-32.s b/gas/testsuite/gas/riscv/fp-d-insns-32.s
new file mode 100644 (file)
index 0000000..32b512e
--- /dev/null
@@ -0,0 +1,140 @@
+D:
+       fabs.d  f31, f0
+       fabs.d  f0, f31
+
+       fadd.d  f31, f0, f0
+       fadd.d  f0, f31, f0
+       fadd.d  f0, f0, f31
+       fadd.d  f0, f0, f0, rne
+       fadd.d  f0, f0, f0, rtz
+       fadd.d  f0, f0, f0, rdn
+       fadd.d  f0, f0, f0, rup
+       fadd.d  f0, f0, f0, rmm
+
+       fclass.d x31, f0
+       fclass.d x0, f31
+
+       fcvt.d.s f31, f0
+       fcvt.d.s f0, f31
+       fcvt.d.w f0, x0
+       fcvt.d.wu f0, x0
+       fcvt.s.d f31, f0
+       fcvt.s.d f0, f31
+       fcvt.s.d f0, f0, rne
+       fcvt.w.d x0, f0
+       fcvt.wu.d x0, f0
+
+       fdiv.d  f31, f0, f0
+       fdiv.d  f0, f31, f0
+       fdiv.d  f0, f0, f31
+       fdiv.d  f0, f0, f0, rne
+
+       feq.d   x31, f0, f0
+       feq.d   x0, f31, f0
+       feq.d   x0, f0, f31
+
+       fge.d   x31, f0, f0
+       fge.d   x0, f31, f0
+       fge.d   x0, f0, f31
+
+       fgt.d   x31, f0, f0
+       fgt.d   x0, f31, f0
+       fgt.d   x0, f0, f31
+
+       fld     f31, (x0)
+       fld     f0, 0x7ff(x0)
+       fld     f0, -0x800(x0)
+       fld     f0, (x31)
+       fld     f0, dval, x31
+
+       fld     f15, (x8)
+       fld     f8, 0x38(x8)
+       fld     f8, 0xc0(x8)
+       fld     f8, (x15)
+
+       fld     f31, (sp)
+       fld     f0, 0x18(sp)
+       fld     f0, 0x20(sp)
+       fld     f0, 0x1c0(sp)
+
+       fle.d   x31, f0, f0
+       fle.d   x0, f31, f0
+       fle.d   x0, f0, f31
+
+       flt.d   x31, f0, f0
+       flt.d   x0, f31, f0
+       flt.d   x0, f0, f31
+
+       fmadd.d f31, f0, f0, f0
+       fmadd.d f0, f31, f0, f0
+       fmadd.d f0, f0, f31, f0
+       fmadd.d f0, f0, f0, f31
+       fmadd.d f0, f0, f0, f0, rne
+
+       fmax.d  f31, f0, f0
+       fmax.d  f0, f31, f0
+       fmax.d  f0, f0, f31
+
+       fmin.d  f31, f0, f0
+       fmin.d  f0, f31, f0
+       fmin.d  f0, f0, f31
+
+       fmsub.d f31, f0, f0, f0
+       fmsub.d f0, f31, f0, f0
+       fmsub.d f0, f0, f31, f0
+       fmsub.d f0, f0, f0, f31
+       fmsub.d f0, f0, f0, f0, rne
+
+       fmul.d  f31, f0, f0
+       fmul.d  f0, f31, f0
+       fmul.d  f0, f0, f31
+       fmul.d  f0, f0, f0, rne
+
+       fmv.d   f31, f0
+       fmv.d   f0, f31
+
+       fneg.d  f31, f0
+       fneg.d  f0, f31
+
+       fnmadd.d f31, f0, f0, f0
+       fnmadd.d f0, f31, f0, f0
+       fnmadd.d f0, f0, f31, f0
+       fnmadd.d f0, f0, f0, f31
+       fnmadd.d f0, f0, f0, f0, rne
+
+       fnmsub.d f31, f0, f0, f0
+       fnmsub.d f0, f31, f0, f0
+       fnmsub.d f0, f0, f31, f0
+       fnmsub.d f0, f0, f0, f31
+       fnmsub.d f0, f0, f0, f0, rne
+
+       fsd     f31, (x0)
+       fsd     f0, 0x1f(x0)
+       fsd     f0, -0x20(x0)
+       fsd     f0, (x31)
+       fsd     f0, dval, x31
+
+       fsd     f15, (x8)
+       fsd     f8, 0x38(x8)
+       fsd     f8, 0xc0(x8)
+       fsd     f8, (x15)
+
+       fsd     f31, (sp)
+       fsd     f0, 0x18(sp)
+       fsd     f0, 0x20(sp)
+       fsd     f0, 0x1c0(sp)
+
+       fsgnj.d f31, f0, f1
+       fsgnj.d f0, f31, f0
+       fsgnj.d f0, f0, f31
+       fsgnjn.d f0, f1, f0
+       fsgnjx.d f0, f1, f0
+
+       fsqrt.d f31, f0
+       fsqrt.d f0, f31
+       fsqrt.d f0, f0, rne
+
+       fsub.d  f31, f0, f0
+       fsub.d  f0, f31, f0
+       fsub.d  f0, f0, f31
+       fsub.d  f0, f0, f0, rne
diff --git a/gas/testsuite/gas/riscv/fp-d-insns-64.d b/gas/testsuite/gas/riscv/fp-d-insns-64.d
new file mode 100644 (file)
index 0000000..1c744b4
--- /dev/null
@@ -0,0 +1,119 @@
+#as: -march=rv64id
+#name: D extension (64-bit)
+#objdump: -dwrMnumeric
+
+.*:[   ]+file format .*
+
+
+Disassembly of section .text:
+
+0+ <D>:
+[      ]+[0-9a-f]+:[   ]+22002fd3[     ]+fabs\.d[      ]+f31,f0
+[      ]+[0-9a-f]+:[   ]+23ffa053[     ]+fabs\.d[      ]+f0,f31
+[      ]+[0-9a-f]+:[   ]+02007fd3[     ]+fadd\.d[      ]+f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+020ff053[     ]+fadd\.d[      ]+f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+03f07053[     ]+fadd\.d[      ]+f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+02000053[     ]+fadd\.d[      ]+f0,f0,f0,rne
+[      ]+[0-9a-f]+:[   ]+02001053[     ]+fadd\.d[      ]+f0,f0,f0,rtz
+[      ]+[0-9a-f]+:[   ]+02002053[     ]+fadd\.d[      ]+f0,f0,f0,rdn
+[      ]+[0-9a-f]+:[   ]+02003053[     ]+fadd\.d[      ]+f0,f0,f0,rup
+[      ]+[0-9a-f]+:[   ]+02004053[     ]+fadd\.d[      ]+f0,f0,f0,rmm
+[      ]+[0-9a-f]+:[   ]+e2001fd3[     ]+fclass\.d[    ]+x31,f0
+[      ]+[0-9a-f]+:[   ]+e20f9053[     ]+fclass\.d[    ]+x0,f31
+[      ]+[0-9a-f]+:[   ]+d2207053[     ]+fcvt\.d\.l[   ]+f0,x0
+[      ]+[0-9a-f]+:[   ]+d2200053[     ]+fcvt\.d\.l[   ]+f0,x0,rne
+[      ]+[0-9a-f]+:[   ]+d2307053[     ]+fcvt\.d\.lu[  ]+f0,x0
+[      ]+[0-9a-f]+:[   ]+42000fd3[     ]+fcvt\.d\.s[   ]+f31,f0
+[      ]+[0-9a-f]+:[   ]+420f8053[     ]+fcvt\.d\.s[   ]+f0,f31
+[      ]+[0-9a-f]+:[   ]+d2000053[     ]+fcvt\.d\.w[   ]+f0,x0
+[      ]+[0-9a-f]+:[   ]+d2100053[     ]+fcvt\.d\.wu[  ]+f0,x0
+[      ]+[0-9a-f]+:[   ]+c2207053[     ]+fcvt\.l\.d[   ]+x0,f0
+[      ]+[0-9a-f]+:[   ]+c2307053[     ]+fcvt\.lu\.d[  ]+x0,f0
+[      ]+[0-9a-f]+:[   ]+40107fd3[     ]+fcvt\.s\.d[   ]+f31,f0
+[      ]+[0-9a-f]+:[   ]+401ff053[     ]+fcvt\.s\.d[   ]+f0,f31
+[      ]+[0-9a-f]+:[   ]+40100053[     ]+fcvt\.s\.d[   ]+f0,f0,rne
+[      ]+[0-9a-f]+:[   ]+c2007053[     ]+fcvt\.w\.d[   ]+x0,f0
+[      ]+[0-9a-f]+:[   ]+c2107053[     ]+fcvt\.wu\.d[  ]+x0,f0
+[      ]+[0-9a-f]+:[   ]+1a007fd3[     ]+fdiv\.d[      ]+f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+1a0ff053[     ]+fdiv\.d[      ]+f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+1bf07053[     ]+fdiv\.d[      ]+f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+1a000053[     ]+fdiv\.d[      ]+f0,f0,f0,rne
+[      ]+[0-9a-f]+:[   ]+a2002fd3[     ]+feq\.d[       ]+x31,f0,f0
+[      ]+[0-9a-f]+:[   ]+a20fa053[     ]+feq\.d[       ]+x0,f31,f0
+[      ]+[0-9a-f]+:[   ]+a3f02053[     ]+feq\.d[       ]+x0,f0,f31
+[      ]+[0-9a-f]+:[   ]+a2000fd3[     ]+fle\.d[       ]+x31,f0,f0
+[      ]+[0-9a-f]+:[   ]+a3f00053[     ]+fle\.d[       ]+x0,f0,f31
+[      ]+[0-9a-f]+:[   ]+a20f8053[     ]+fle\.d[       ]+x0,f31,f0
+[      ]+[0-9a-f]+:[   ]+a2001fd3[     ]+flt\.d[       ]+x31,f0,f0
+[      ]+[0-9a-f]+:[   ]+a3f01053[     ]+flt\.d[       ]+x0,f0,f31
+[      ]+[0-9a-f]+:[   ]+a20f9053[     ]+flt\.d[       ]+x0,f31,f0
+[      ]+[0-9a-f]+:[   ]+00003f87[     ]+fld[  ]+f31,0\(x0\) # 0( <.*>)?
+[      ]+[0-9a-f]+:[   ]+7ff03007[     ]+fld[  ]+f0,2047\(x0\) # 7ff( <.*>)?
+[      ]+[0-9a-f]+:[   ]+80003007[     ]+fld[  ]+f0,-2048\(x0\) # f+800( <.*>)?
+[      ]+[0-9a-f]+:[   ]+000fb007[     ]+fld[  ]+f0,0\(x31\)
+[      ]+[0-9a-f]+:[   ]+00000f97[     ]+auipc[        ]+x31,0x0[      ]+[0-9a-f]+:[   ]+R_RISCV_PCREL_HI20[   ]+dval
+[      ]+[0-9a-f]+:[   ]+R_RISCV_RELAX.*
+[      ]+[0-9a-f]+:[   ]+000fb007[     ]+fld[  ]+f0,0\(x31\) # [0-9a-f]+( <.*>)?[      ]+[0-9a-f]+:[   ]+R_RISCV_PCREL_LO12_I[         ]+.*
+[      ]+[0-9a-f]+:[   ]+R_RISCV_RELAX.*
+[      ]+[0-9a-f]+:[   ]+a2000fd3[     ]+fle\.d[       ]+x31,f0,f0
+[      ]+[0-9a-f]+:[   ]+a20f8053[     ]+fle\.d[       ]+x0,f31,f0
+[      ]+[0-9a-f]+:[   ]+a3f00053[     ]+fle\.d[       ]+x0,f0,f31
+[      ]+[0-9a-f]+:[   ]+a2001fd3[     ]+flt\.d[       ]+x31,f0,f0
+[      ]+[0-9a-f]+:[   ]+a20f9053[     ]+flt\.d[       ]+x0,f31,f0
+[      ]+[0-9a-f]+:[   ]+a3f01053[     ]+flt\.d[       ]+x0,f0,f31
+[      ]+[0-9a-f]+:[   ]+02007fc3[     ]+fmadd\.d[     ]+f31,f0,f0,f0
+[      ]+[0-9a-f]+:[   ]+020ff043[     ]+fmadd\.d[     ]+f0,f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+03f07043[     ]+fmadd\.d[     ]+f0,f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+fa007043[     ]+fmadd\.d[     ]+f0,f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+02000043[     ]+fmadd\.d[     ]+f0,f0,f0,f0,rne
+[      ]+[0-9a-f]+:[   ]+2a001fd3[     ]+fmax\.d[      ]+f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+2a0f9053[     ]+fmax\.d[      ]+f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+2bf01053[     ]+fmax\.d[      ]+f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+2a000fd3[     ]+fmin\.d[      ]+f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+2a0f8053[     ]+fmin\.d[      ]+f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+2bf00053[     ]+fmin\.d[      ]+f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+02007fc7[     ]+fmsub\.d[     ]+f31,f0,f0,f0
+[      ]+[0-9a-f]+:[   ]+020ff047[     ]+fmsub\.d[     ]+f0,f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+03f07047[     ]+fmsub\.d[     ]+f0,f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+fa007047[     ]+fmsub\.d[     ]+f0,f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+02000047[     ]+fmsub\.d[     ]+f0,f0,f0,f0,rne
+[      ]+[0-9a-f]+:[   ]+12007fd3[     ]+fmul\.d[      ]+f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+120ff053[     ]+fmul\.d[      ]+f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+13f07053[     ]+fmul\.d[      ]+f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+12000053[     ]+fmul\.d[      ]+f0,f0,f0,rne
+[      ]+[0-9a-f]+:[   ]+22000fd3[     ]+fmv\.d[       ]+f31,f0
+[      ]+[0-9a-f]+:[   ]+23ff8053[     ]+fmv\.d[       ]+f0,f31
+[      ]+[0-9a-f]+:[   ]+f2000053[     ]+fmv\.d\.x[    ]+f0,x0
+[      ]+[0-9a-f]+:[   ]+e2000053[     ]+fmv\.x\.d[    ]+x0,f0
+[      ]+[0-9a-f]+:[   ]+22001fd3[     ]+fneg\.d[      ]+f31,f0
+[      ]+[0-9a-f]+:[   ]+23ff9053[     ]+fneg\.d[      ]+f0,f31
+[      ]+[0-9a-f]+:[   ]+02007fcf[     ]+fnmadd\.d[    ]+f31,f0,f0,f0
+[      ]+[0-9a-f]+:[   ]+020ff04f[     ]+fnmadd\.d[    ]+f0,f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+03f0704f[     ]+fnmadd\.d[    ]+f0,f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+fa00704f[     ]+fnmadd\.d[    ]+f0,f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+0200004f[     ]+fnmadd\.d[    ]+f0,f0,f0,f0,rne
+[      ]+[0-9a-f]+:[   ]+02007fcb[     ]+fnmsub\.d[    ]+f31,f0,f0,f0
+[      ]+[0-9a-f]+:[   ]+020ff04b[     ]+fnmsub\.d[    ]+f0,f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+03f0704b[     ]+fnmsub\.d[    ]+f0,f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+fa00704b[     ]+fnmsub\.d[    ]+f0,f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+0200004b[     ]+fnmsub\.d[    ]+f0,f0,f0,f0,rne
+[      ]+[0-9a-f]+:[   ]+01f03027[     ]+fsd[  ]+f31,0\(x0\) # 0( <.*>)?
+[      ]+[0-9a-f]+:[   ]+00003fa7[     ]+fsd[  ]+f0,31\(x0\) # 1f( <.*>)?
+[      ]+[0-9a-f]+:[   ]+fe003027[     ]+fsd[  ]+f0,-32\(x0\) # f+e0( <.*>)?
+[      ]+[0-9a-f]+:[   ]+000fb027[     ]+fsd[  ]+f0,0\(x31\)
+[      ]+[0-9a-f]+:[   ]+00000f97[     ]+auipc[        ]+x31,0x0[      ]+[0-9a-f]+:[   ]+R_RISCV_PCREL_HI20[   ]+dval
+[      ]+[0-9a-f]+:[   ]+R_RISCV_RELAX.*
+[      ]+[0-9a-f]+:[   ]+000fb027[     ]+fsd[  ]+f0,0\(x31\) # [0-9a-f]+( <.*>)?[      ]+[0-9a-f]+:[   ]+R_RISCV_PCREL_LO12_S[         ]+.*
+[      ]+[0-9a-f]+:[   ]+R_RISCV_RELAX.*
+[      ]+[0-9a-f]+:[   ]+22100fd3[     ]+fsgnj\.d[     ]+f31,f0,f1
+[      ]+[0-9a-f]+:[   ]+220f8053[     ]+fsgnj\.d[     ]+f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+23f00053[     ]+fsgnj\.d[     ]+f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+22009053[     ]+fsgnjn\.d[    ]+f0,f1,f0
+[      ]+[0-9a-f]+:[   ]+2200a053[     ]+fsgnjx\.d[    ]+f0,f1,f0
+[      ]+[0-9a-f]+:[   ]+5a007fd3[     ]+fsqrt\.d[     ]+f31,f0
+[      ]+[0-9a-f]+:[   ]+5a0ff053[     ]+fsqrt\.d[     ]+f0,f31
+[      ]+[0-9a-f]+:[   ]+5a000053[     ]+fsqrt\.d[     ]+f0,f0,rne
+[      ]+[0-9a-f]+:[   ]+0a007fd3[     ]+fsub\.d[      ]+f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+0a0ff053[     ]+fsub\.d[      ]+f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+0bf07053[     ]+fsub\.d[      ]+f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+0a000053[     ]+fsub\.d[      ]+f0,f0,f0,rne
diff --git a/gas/testsuite/gas/riscv/fp-d-insns-64.s b/gas/testsuite/gas/riscv/fp-d-insns-64.s
new file mode 100644 (file)
index 0000000..3d7e39a
--- /dev/null
@@ -0,0 +1,128 @@
+D:
+       fabs.d  f31, f0
+       fabs.d  f0, f31
+
+       fadd.d  f31, f0, f0
+       fadd.d  f0, f31, f0
+       fadd.d  f0, f0, f31
+       fadd.d  f0, f0, f0, rne
+       fadd.d  f0, f0, f0, rtz
+       fadd.d  f0, f0, f0, rdn
+       fadd.d  f0, f0, f0, rup
+       fadd.d  f0, f0, f0, rmm
+
+       fclass.d x31, f0
+       fclass.d x0, f31
+
+       fcvt.d.l f0, x0
+       fcvt.d.l f0, x0, rne
+       fcvt.d.lu f0, x0
+       fcvt.d.s f31, f0
+       fcvt.d.s f0, f31
+       fcvt.d.w f0, x0
+       fcvt.d.wu f0, x0
+       fcvt.l.d x0, f0
+       fcvt.lu.d x0, f0
+       fcvt.s.d f31, f0
+       fcvt.s.d f0, f31
+       fcvt.s.d f0, f0, rne
+       fcvt.w.d x0, f0
+       fcvt.wu.d x0, f0
+
+       fdiv.d  f31, f0, f0
+       fdiv.d  f0, f31, f0
+       fdiv.d  f0, f0, f31
+       fdiv.d  f0, f0, f0, rne
+
+       feq.d   x31, f0, f0
+       feq.d   x0, f31, f0
+       feq.d   x0, f0, f31
+
+       fge.d   x31, f0, f0
+       fge.d   x0, f31, f0
+       fge.d   x0, f0, f31
+
+       fgt.d   x31, f0, f0
+       fgt.d   x0, f31, f0
+       fgt.d   x0, f0, f31
+
+       fld     f31, (x0)
+       fld     f0, 0x7ff(x0)
+       fld     f0, -0x800(x0)
+       fld     f0, (x31)
+       fld     f0, dval, x31
+
+       fle.d   x31, f0, f0
+       fle.d   x0, f31, f0
+       fle.d   x0, f0, f31
+
+       flt.d   x31, f0, f0
+       flt.d   x0, f31, f0
+       flt.d   x0, f0, f31
+
+       fmadd.d f31, f0, f0, f0
+       fmadd.d f0, f31, f0, f0
+       fmadd.d f0, f0, f31, f0
+       fmadd.d f0, f0, f0, f31
+       fmadd.d f0, f0, f0, f0, rne
+
+       fmax.d  f31, f0, f0
+       fmax.d  f0, f31, f0
+       fmax.d  f0, f0, f31
+
+       fmin.d  f31, f0, f0
+       fmin.d  f0, f31, f0
+       fmin.d  f0, f0, f31
+
+       fmsub.d f31, f0, f0, f0
+       fmsub.d f0, f31, f0, f0
+       fmsub.d f0, f0, f31, f0
+       fmsub.d f0, f0, f0, f31
+       fmsub.d f0, f0, f0, f0, rne
+
+       fmul.d  f31, f0, f0
+       fmul.d  f0, f31, f0
+       fmul.d  f0, f0, f31
+       fmul.d  f0, f0, f0, rne
+
+       fmv.d   f31, f0
+       fmv.d   f0, f31
+
+       fmv.d.x f0, x0
+       fmv.x.d x0, f0
+
+       fneg.d  f31, f0
+       fneg.d  f0, f31
+
+       fnmadd.d f31, f0, f0, f0
+       fnmadd.d f0, f31, f0, f0
+       fnmadd.d f0, f0, f31, f0
+       fnmadd.d f0, f0, f0, f31
+       fnmadd.d f0, f0, f0, f0, rne
+
+       fnmsub.d f31, f0, f0, f0
+       fnmsub.d f0, f31, f0, f0
+       fnmsub.d f0, f0, f31, f0
+       fnmsub.d f0, f0, f0, f31
+       fnmsub.d f0, f0, f0, f0, rne
+
+       fsd     f31, (x0)
+       fsd     f0, 0x1f(x0)
+       fsd     f0, -0x20(x0)
+       fsd     f0, (x31)
+       fsd     f0, dval, x31
+
+       fsgnj.d f31, f0, f1
+       fsgnj.d f0, f31, f0
+       fsgnj.d f0, f0, f31
+       fsgnjn.d f0, f1, f0
+       fsgnjx.d f0, f1, f0
+
+       fsqrt.d f31, f0
+       fsqrt.d f0, f31
+       fsqrt.d f0, f0, rne
+
+       fsub.d  f31, f0, f0
+       fsub.d  f0, f31, f0
+       fsub.d  f0, f0, f31
+       fsub.d  f0, f0, f0, rne
diff --git a/gas/testsuite/gas/riscv/fp-f-insns-32.d b/gas/testsuite/gas/riscv/fp-f-insns-32.d
new file mode 100644 (file)
index 0000000..406da37
--- /dev/null
@@ -0,0 +1,145 @@
+#as: -march=rv32icf
+#name: F extension (32-bit)
+#objdump: -dwrMnumeric
+
+.*:[   ]+file format .*
+
+
+Disassembly of section .text:
+
+0+ <F>:
+[      ]+[0-9a-f]+:[   ]+20002fd3[     ]+fabs\.s[      ]+f31,f0
+[      ]+[0-9a-f]+:[   ]+21ffa053[     ]+fabs\.s[      ]+f0,f31
+[      ]+[0-9a-f]+:[   ]+00007fd3[     ]+fadd\.s[      ]+f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+000ff053[     ]+fadd\.s[      ]+f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+01f07053[     ]+fadd\.s[      ]+f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+00000053[     ]+fadd\.s[      ]+f0,f0,f0,rne
+[      ]+[0-9a-f]+:[   ]+00001053[     ]+fadd\.s[      ]+f0,f0,f0,rtz
+[      ]+[0-9a-f]+:[   ]+00002053[     ]+fadd\.s[      ]+f0,f0,f0,rdn
+[      ]+[0-9a-f]+:[   ]+00003053[     ]+fadd\.s[      ]+f0,f0,f0,rup
+[      ]+[0-9a-f]+:[   ]+00004053[     ]+fadd\.s[      ]+f0,f0,f0,rmm
+[      ]+[0-9a-f]+:[   ]+e0001fd3[     ]+fclass\.s[    ]+x31,f0
+[      ]+[0-9a-f]+:[   ]+e00f9053[     ]+fclass\.s[    ]+x0,f31
+[      ]+[0-9a-f]+:[   ]+d0007fd3[     ]+fcvt\.s\.w[   ]+f31,x0
+[      ]+[0-9a-f]+:[   ]+d00ff053[     ]+fcvt\.s\.w[   ]+f0,x31
+[      ]+[0-9a-f]+:[   ]+d0000053[     ]+fcvt\.s\.w[   ]+f0,x0,rne
+[      ]+[0-9a-f]+:[   ]+d0107053[     ]+fcvt\.s\.wu[  ]+f0,x0
+[      ]+[0-9a-f]+:[   ]+c0007fd3[     ]+fcvt\.w\.s[   ]+x31,f0
+[      ]+[0-9a-f]+:[   ]+c00ff053[     ]+fcvt\.w\.s[   ]+x0,f31
+[      ]+[0-9a-f]+:[   ]+c0000053[     ]+fcvt\.w\.s[   ]+x0,f0,rne
+[      ]+[0-9a-f]+:[   ]+c0107053[     ]+fcvt\.wu\.s[  ]+x0,f0
+[      ]+[0-9a-f]+:[   ]+18007fd3[     ]+fdiv\.s[      ]+f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+180ff053[     ]+fdiv\.s[      ]+f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+19f07053[     ]+fdiv\.s[      ]+f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+18000053[     ]+fdiv\.s[      ]+f0,f0,f0,rne
+[      ]+[0-9a-f]+:[   ]+a0002fd3[     ]+feq\.s[       ]+x31,f0,f0
+[      ]+[0-9a-f]+:[   ]+a00fa053[     ]+feq\.s[       ]+x0,f31,f0
+[      ]+[0-9a-f]+:[   ]+a1f02053[     ]+feq\.s[       ]+x0,f0,f31
+[      ]+[0-9a-f]+:[   ]+a0000fd3[     ]+fle\.s[       ]+x31,f0,f0
+[      ]+[0-9a-f]+:[   ]+a1f00053[     ]+fle\.s[       ]+x0,f0,f31
+[      ]+[0-9a-f]+:[   ]+a00f8053[     ]+fle\.s[       ]+x0,f31,f0
+[      ]+[0-9a-f]+:[   ]+a0001fd3[     ]+flt\.s[       ]+x31,f0,f0
+[      ]+[0-9a-f]+:[   ]+a1f01053[     ]+flt\.s[       ]+x0,f0,f31
+[      ]+[0-9a-f]+:[   ]+a00f9053[     ]+flt\.s[       ]+x0,f31,f0
+[      ]+[0-9a-f]+:[   ]+a0000fd3[     ]+fle\.s[       ]+x31,f0,f0
+[      ]+[0-9a-f]+:[   ]+a00f8053[     ]+fle\.s[       ]+x0,f31,f0
+[      ]+[0-9a-f]+:[   ]+a1f00053[     ]+fle\.s[       ]+x0,f0,f31
+[      ]+[0-9a-f]+:[   ]+a0001fd3[     ]+flt\.s[       ]+x31,f0,f0
+[      ]+[0-9a-f]+:[   ]+a00f9053[     ]+flt\.s[       ]+x0,f31,f0
+[      ]+[0-9a-f]+:[   ]+a1f01053[     ]+flt\.s[       ]+x0,f0,f31
+[      ]+[0-9a-f]+:[   ]+00002f87[     ]+flw[  ]+f31,0\(x0\) # 0( <.*>)?
+[      ]+[0-9a-f]+:[   ]+7ff02007[     ]+flw[  ]+f0,2047\(x0\) # 7ff( <.*>)?
+[      ]+[0-9a-f]+:[   ]+80002007[     ]+flw[  ]+f0,-2048\(x0\) # fffff800( <.*>)?
+[      ]+[0-9a-f]+:[   ]+000fa007[     ]+flw[  ]+f0,0\(x31\)
+[      ]+[0-9a-f]+:[   ]+00000f97[     ]+auipc[        ]+x31,0x0[      ]+[0-9a-f]+:[   ]+R_RISCV_PCREL_HI20[   ]+sval
+[      ]+[0-9a-f]+:[   ]+R_RISCV_RELAX.*
+[      ]+[0-9a-f]+:[   ]+000fa007[     ]+flw[  ]+f0,0\(x31\) # [0-9a-f]+( <.*>)?[      ]+[0-9a-f]+:[   ]+R_RISCV_PCREL_LO12_I[         ]+.*
+[      ]+[0-9a-f]+:[   ]+R_RISCV_RELAX.*
+[      ]+[0-9a-f]+:[   ]+601c[         ]+flw[  ]+f15,0\(x8\)
+[      ]+[0-9a-f]+:[   ]+6040[         ]+flw[  ]+f8,4\(x8\)
+[      ]+[0-9a-f]+:[   ]+7c00[         ]+flw[  ]+f8,56\(x8\)
+[      ]+[0-9a-f]+:[   ]+6020[         ]+flw[  ]+f8,64\(x8\)
+[      ]+[0-9a-f]+:[   ]+6380[         ]+flw[  ]+f8,0\(x15\)
+[      ]+[0-9a-f]+:[   ]+6f82[         ]+flw[  ]+f31,0\(x2\)
+[      ]+[0-9a-f]+:[   ]+6072[         ]+flw[  ]+f0,28\(x2\)
+[      ]+[0-9a-f]+:[   ]+7002[         ]+flw[  ]+f0,32\(x2\)
+[      ]+[0-9a-f]+:[   ]+600e[         ]+flw[  ]+f0,192\(x2\)
+[      ]+[0-9a-f]+:[   ]+00007fc3[     ]+fmadd\.s[     ]+f31,f0,f0,f0
+[      ]+[0-9a-f]+:[   ]+000ff043[     ]+fmadd\.s[     ]+f0,f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+01f07043[     ]+fmadd\.s[     ]+f0,f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+f8007043[     ]+fmadd\.s[     ]+f0,f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+00000043[     ]+fmadd\.s[     ]+f0,f0,f0,f0,rne
+[      ]+[0-9a-f]+:[   ]+28001fd3[     ]+fmax\.s[      ]+f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+280f9053[     ]+fmax\.s[      ]+f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+29f01053[     ]+fmax\.s[      ]+f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+28000fd3[     ]+fmin\.s[      ]+f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+280f8053[     ]+fmin\.s[      ]+f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+29f00053[     ]+fmin\.s[      ]+f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+00007fc7[     ]+fmsub\.s[     ]+f31,f0,f0,f0
+[      ]+[0-9a-f]+:[   ]+000ff047[     ]+fmsub\.s[     ]+f0,f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+01f07047[     ]+fmsub\.s[     ]+f0,f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+f8007047[     ]+fmsub\.s[     ]+f0,f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+00000047[     ]+fmsub\.s[     ]+f0,f0,f0,f0,rne
+[      ]+[0-9a-f]+:[   ]+10007fd3[     ]+fmul\.s[      ]+f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+100ff053[     ]+fmul\.s[      ]+f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+11f07053[     ]+fmul\.s[      ]+f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+10000053[     ]+fmul\.s[      ]+f0,f0,f0,rne
+[      ]+[0-9a-f]+:[   ]+20000fd3[     ]+fmv\.s[       ]+f31,f0
+[      ]+[0-9a-f]+:[   ]+21ff8053[     ]+fmv\.s[       ]+f0,f31
+[      ]+[0-9a-f]+:[   ]+f0000fd3[     ]+fmv\.w\.x[    ]+f31,x0
+[      ]+[0-9a-f]+:[   ]+f00f8053[     ]+fmv\.w\.x[    ]+f0,x31
+[      ]+[0-9a-f]+:[   ]+e0000fd3[     ]+fmv\.x\.w[    ]+x31,f0
+[      ]+[0-9a-f]+:[   ]+e00f8053[     ]+fmv\.x\.w[    ]+x0,f31
+[      ]+[0-9a-f]+:[   ]+20001fd3[     ]+fneg\.s[      ]+f31,f0
+[      ]+[0-9a-f]+:[   ]+21ff9053[     ]+fneg\.s[      ]+f0,f31
+[      ]+[0-9a-f]+:[   ]+00007fcf[     ]+fnmadd\.s[    ]+f31,f0,f0,f0
+[      ]+[0-9a-f]+:[   ]+000ff04f[     ]+fnmadd\.s[    ]+f0,f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+01f0704f[     ]+fnmadd\.s[    ]+f0,f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+f800704f[     ]+fnmadd\.s[    ]+f0,f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+0000004f[     ]+fnmadd\.s[    ]+f0,f0,f0,f0,rne
+[      ]+[0-9a-f]+:[   ]+00007fcb[     ]+fnmsub\.s[    ]+f31,f0,f0,f0
+[      ]+[0-9a-f]+:[   ]+000ff04b[     ]+fnmsub\.s[    ]+f0,f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+01f0704b[     ]+fnmsub\.s[    ]+f0,f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+f800704b[     ]+fnmsub\.s[    ]+f0,f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+0000004b[     ]+fnmsub\.s[    ]+f0,f0,f0,f0,rne
+[      ]+[0-9a-f]+:[   ]+00302ff3[     ]+frcsr[        ]+x31
+[      ]+[0-9a-f]+:[   ]+00102ff3[     ]+frflags[      ]+x31
+[      ]+[0-9a-f]+:[   ]+00202ff3[     ]+frrm[         ]+x31
+[      ]+[0-9a-f]+:[   ]+003f9073[     ]+fscsr[        ]+x31
+[      ]+[0-9a-f]+:[   ]+00309ff3[     ]+fscsr[        ]+x31,x1
+[      ]+[0-9a-f]+:[   ]+003f90f3[     ]+fscsr[        ]+x1,x31
+[      ]+[0-9a-f]+:[   ]+001f9073[     ]+fsflags[      ]+x31
+[      ]+[0-9a-f]+:[   ]+00109ff3[     ]+fsflags[      ]+x31,x1
+[      ]+[0-9a-f]+:[   ]+001f90f3[     ]+fsflags[      ]+x1,x31
+[      ]+[0-9a-f]+:[   ]+20100fd3[     ]+fsgnj\.s[     ]+f31,f0,f1
+[      ]+[0-9a-f]+:[   ]+200f8053[     ]+fsgnj\.s[     ]+f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+21f00053[     ]+fsgnj\.s[     ]+f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+20009053[     ]+fsgnjn\.s[    ]+f0,f1,f0
+[      ]+[0-9a-f]+:[   ]+2000a053[     ]+fsgnjx\.s[    ]+f0,f1,f0
+[      ]+[0-9a-f]+:[   ]+58007fd3[     ]+fsqrt\.s[     ]+f31,f0
+[      ]+[0-9a-f]+:[   ]+580ff053[     ]+fsqrt\.s[     ]+f0,f31
+[      ]+[0-9a-f]+:[   ]+58000053[     ]+fsqrt\.s[     ]+f0,f0,rne
+[      ]+[0-9a-f]+:[   ]+002f9073[     ]+fsrm[         ]+x31
+[      ]+[0-9a-f]+:[   ]+00209ff3[     ]+fsrm[         ]+x31,x1
+[      ]+[0-9a-f]+:[   ]+002f90f3[     ]+fsrm[         ]+x1,x31
+[      ]+[0-9a-f]+:[   ]+08007fd3[     ]+fsub\.s[      ]+f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+080ff053[     ]+fsub\.s[      ]+f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+09f07053[     ]+fsub\.s[      ]+f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+08000053[     ]+fsub\.s[      ]+f0,f0,f0,rne
+[      ]+[0-9a-f]+:[   ]+01f02027[     ]+fsw[  ]+f31,0\(x0\) # 0( <.*>)?
+[      ]+[0-9a-f]+:[   ]+00002fa7[     ]+fsw[  ]+f0,31\(x0\) # 1f( <.*>)?
+[      ]+[0-9a-f]+:[   ]+fe002027[     ]+fsw[  ]+f0,-32\(x0\) # ffffffe0( <.*>)?
+[      ]+[0-9a-f]+:[   ]+000fa027[     ]+fsw[  ]+f0,0\(x31\)
+[      ]+[0-9a-f]+:[   ]+00000f97[     ]+auipc[        ]+x31,0x0[      ]+[0-9a-f]+:[   ]+R_RISCV_PCREL_HI20[   ]+sval
+[      ]+[0-9a-f]+:[   ]+R_RISCV_RELAX.*
+[      ]+[0-9a-f]+:[   ]+000fa027[     ]+fsw[  ]+f0,0\(x31\) # [0-9a-f]+( <.*>)?[      ]+[0-9a-f]+:[   ]+R_RISCV_PCREL_LO12_S[         ]+.*
+[      ]+[0-9a-f]+:[   ]+R_RISCV_RELAX.*
+[      ]+[0-9a-f]+:[   ]+e01c[         ]+fsw[  ]+f15,0\(x8\)
+[      ]+[0-9a-f]+:[   ]+e040[         ]+fsw[  ]+f8,4\(x8\)
+[      ]+[0-9a-f]+:[   ]+fc00[         ]+fsw[  ]+f8,56\(x8\)
+[      ]+[0-9a-f]+:[   ]+e020[         ]+fsw[  ]+f8,64\(x8\)
+[      ]+[0-9a-f]+:[   ]+e380[         ]+fsw[  ]+f8,0\(x15\)
+[      ]+[0-9a-f]+:[   ]+e07e[         ]+fsw[  ]+f31,0\(x2\)
+[      ]+[0-9a-f]+:[   ]+ee02[         ]+fsw[  ]+f0,28\(x2\)
+[      ]+[0-9a-f]+:[   ]+f002[         ]+fsw[  ]+f0,32\(x2\)
+[      ]+[0-9a-f]+:[   ]+e182[         ]+fsw[  ]+f0,192\(x2\)
diff --git a/gas/testsuite/gas/riscv/fp-f-insns-32.s b/gas/testsuite/gas/riscv/fp-f-insns-32.s
new file mode 100644 (file)
index 0000000..40483ba
--- /dev/null
@@ -0,0 +1,162 @@
+F:
+       fabs.s  f31, f0
+       fabs.s  f0, f31
+
+       fadd.s  f31, f0, f0
+       fadd.s  f0, f31, f0
+       fadd.s  f0, f0, f31
+       fadd.s  f0, f0, f0, rne
+       fadd.s  f0, f0, f0, rtz
+       fadd.s  f0, f0, f0, rdn
+       fadd.s  f0, f0, f0, rup
+       fadd.s  f0, f0, f0, rmm
+
+       fclass.s x31, f0
+       fclass.s x0, f31
+
+       fcvt.s.w f31, x0
+       fcvt.s.w f0, x31
+       fcvt.s.w f0, x0, rne
+       fcvt.s.wu f0, x0
+       fcvt.w.s x31, f0
+       fcvt.w.s x0, f31
+       fcvt.w.s x0, f0, rne
+       fcvt.wu.s x0, f0
+
+       fdiv.s  f31, f0, f0
+       fdiv.s  f0, f31, f0
+       fdiv.s  f0, f0, f31
+       fdiv.s  f0, f0, f0, rne
+
+       feq.s   x31, f0, f0
+       feq.s   x0, f31, f0
+       feq.s   x0, f0, f31
+
+       fge.s   x31, f0, f0
+       fge.s   x0, f31, f0
+       fge.s   x0, f0, f31
+
+       fgt.s   x31, f0, f0
+       fgt.s   x0, f31, f0
+       fgt.s   x0, f0, f31
+
+       fle.s   x31, f0, f0
+       fle.s   x0, f31, f0
+       fle.s   x0, f0, f31
+
+       flt.s   x31, f0, f0
+       flt.s   x0, f31, f0
+       flt.s   x0, f0, f31
+
+       flw     f31, (x0)
+       flw     f0, 0x7ff(x0)
+       flw     f0, -0x800(x0)
+       flw     f0, (x31)
+       flw     f0, sval, x31
+
+       flw     f15, (x8)
+       flw     f8, 4(x8)
+       flw     f8, 0x38(x8)
+       flw     f8, 0x40(x8)
+       flw     f8, (x15)
+
+       flw     f31, (sp)
+       flw     f0, 0x1c(sp)
+       flw     f0, 0x20(sp)
+       flw     f0, 0xc0(sp)
+
+       fmadd.s f31, f0, f0, f0
+       fmadd.s f0, f31, f0, f0
+       fmadd.s f0, f0, f31, f0
+       fmadd.s f0, f0, f0, f31
+       fmadd.s f0, f0, f0, f0, rne
+
+       fmax.s  f31, f0, f0
+       fmax.s  f0, f31, f0
+       fmax.s  f0, f0, f31
+
+       fmin.s  f31, f0, f0
+       fmin.s  f0, f31, f0
+       fmin.s  f0, f0, f31
+
+       fmsub.s f31, f0, f0, f0
+       fmsub.s f0, f31, f0, f0
+       fmsub.s f0, f0, f31, f0
+       fmsub.s f0, f0, f0, f31
+       fmsub.s f0, f0, f0, f0, rne
+
+       fmul.s  f31, f0, f0
+       fmul.s  f0, f31, f0
+       fmul.s  f0, f0, f31
+       fmul.s  f0, f0, f0, rne
+
+       fmv.s   f31, f0
+       fmv.s   f0, f31
+
+       fmv.s.x f31, x0
+       fmv.s.x f0, x31
+       fmv.x.s x31, f0
+       fmv.x.s x0, f31
+
+       fneg.s  f31, f0
+       fneg.s  f0, f31
+
+       fnmadd.s f31, f0, f0, f0
+       fnmadd.s f0, f31, f0, f0
+       fnmadd.s f0, f0, f31, f0
+       fnmadd.s f0, f0, f0, f31
+       fnmadd.s f0, f0, f0, f0, rne
+
+       fnmsub.s f31, f0, f0, f0
+       fnmsub.s f0, f31, f0, f0
+       fnmsub.s f0, f0, f31, f0
+       fnmsub.s f0, f0, f0, f31
+       fnmsub.s f0, f0, f0, f0, rne
+
+       frcsr   x31
+       frflags x31
+       frrm    x31
+
+       fscsr   x31
+       fscsr   x31, x1
+       fscsr   x1, x31
+
+       fsflags x31
+       fsflags x31, x1
+       fsflags x1, x31
+
+       fsgnj.s f31, f0, f1
+       fsgnj.s f0, f31, f0
+       fsgnj.s f0, f0, f31
+       fsgnjn.s f0, f1, f0
+       fsgnjx.s f0, f1, f0
+
+       fsqrt.s f31, f0
+       fsqrt.s f0, f31
+       fsqrt.s f0, f0, rne
+
+       fsrm    x31
+       fsrm    x31, x1
+       fsrm    x1, x31
+
+       fsub.s  f31, f0, f0
+       fsub.s  f0, f31, f0
+       fsub.s  f0, f0, f31
+       fsub.s  f0, f0, f0, rne
+
+       fsw     f31, (x0)
+       fsw     f0, 0x1f(x0)
+       fsw     f0, -0x20(x0)
+       fsw     f0, (x31)
+       fsw     f0, sval, x31
+
+       fsw     f15, (x8)
+       fsw     f8, 4(x8)
+       fsw     f8, 0x38(x8)
+       fsw     f8, 0x40(x8)
+       fsw     f8, (x15)
+
+       fsw     f31, (sp)
+       fsw     f0, 0x1c(sp)
+       fsw     f0, 0x20(sp)
+       fsw     f0, 0xc0(sp)
diff --git a/gas/testsuite/gas/riscv/fp-f-insns-64.d b/gas/testsuite/gas/riscv/fp-f-insns-64.d
new file mode 100644 (file)
index 0000000..02d338e
--- /dev/null
@@ -0,0 +1,131 @@
+#as: -march=rv64if
+#name: F extension (64-bit)
+#objdump: -dwrMnumeric
+
+.*:[   ]+file format .*
+
+
+Disassembly of section .text:
+
+0+ <F>:
+[      ]+[0-9a-f]+:[   ]+20002fd3[     ]+fabs\.s[      ]+f31,f0
+[      ]+[0-9a-f]+:[   ]+21ffa053[     ]+fabs\.s[      ]+f0,f31
+[      ]+[0-9a-f]+:[   ]+00007fd3[     ]+fadd\.s[      ]+f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+000ff053[     ]+fadd\.s[      ]+f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+01f07053[     ]+fadd\.s[      ]+f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+00000053[     ]+fadd\.s[      ]+f0,f0,f0,rne
+[      ]+[0-9a-f]+:[   ]+00001053[     ]+fadd\.s[      ]+f0,f0,f0,rtz
+[      ]+[0-9a-f]+:[   ]+00002053[     ]+fadd\.s[      ]+f0,f0,f0,rdn
+[      ]+[0-9a-f]+:[   ]+00003053[     ]+fadd\.s[      ]+f0,f0,f0,rup
+[      ]+[0-9a-f]+:[   ]+00004053[     ]+fadd\.s[      ]+f0,f0,f0,rmm
+[      ]+[0-9a-f]+:[   ]+e0001fd3[     ]+fclass\.s[    ]+x31,f0
+[      ]+[0-9a-f]+:[   ]+e00f9053[     ]+fclass\.s[    ]+x0,f31
+[      ]+[0-9a-f]+:[   ]+c0207053[     ]+fcvt\.l\.s[   ]+x0,f0
+[      ]+[0-9a-f]+:[   ]+c0307053[     ]+fcvt\.lu\.s[  ]+x0,f0
+[      ]+[0-9a-f]+:[   ]+d0207053[     ]+fcvt\.s\.l[   ]+f0,x0
+[      ]+[0-9a-f]+:[   ]+d0307053[     ]+fcvt\.s\.lu[  ]+f0,x0
+[      ]+[0-9a-f]+:[   ]+d0007fd3[     ]+fcvt\.s\.w[   ]+f31,x0
+[      ]+[0-9a-f]+:[   ]+d00ff053[     ]+fcvt\.s\.w[   ]+f0,x31
+[      ]+[0-9a-f]+:[   ]+d0000053[     ]+fcvt\.s\.w[   ]+f0,x0,rne
+[      ]+[0-9a-f]+:[   ]+d0107053[     ]+fcvt\.s\.wu[  ]+f0,x0
+[      ]+[0-9a-f]+:[   ]+c0007fd3[     ]+fcvt\.w\.s[   ]+x31,f0
+[      ]+[0-9a-f]+:[   ]+c00ff053[     ]+fcvt\.w\.s[   ]+x0,f31
+[      ]+[0-9a-f]+:[   ]+c0000053[     ]+fcvt\.w\.s[   ]+x0,f0,rne
+[      ]+[0-9a-f]+:[   ]+c0107053[     ]+fcvt\.wu\.s[  ]+x0,f0
+[      ]+[0-9a-f]+:[   ]+18007fd3[     ]+fdiv\.s[      ]+f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+180ff053[     ]+fdiv\.s[      ]+f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+19f07053[     ]+fdiv\.s[      ]+f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+18000053[     ]+fdiv\.s[      ]+f0,f0,f0,rne
+[      ]+[0-9a-f]+:[   ]+a0002fd3[     ]+feq\.s[       ]+x31,f0,f0
+[      ]+[0-9a-f]+:[   ]+a00fa053[     ]+feq\.s[       ]+x0,f31,f0
+[      ]+[0-9a-f]+:[   ]+a1f02053[     ]+feq\.s[       ]+x0,f0,f31
+[      ]+[0-9a-f]+:[   ]+a0000fd3[     ]+fle\.s[       ]+x31,f0,f0
+[      ]+[0-9a-f]+:[   ]+a1f00053[     ]+fle\.s[       ]+x0,f0,f31
+[      ]+[0-9a-f]+:[   ]+a00f8053[     ]+fle\.s[       ]+x0,f31,f0
+[      ]+[0-9a-f]+:[   ]+a0001fd3[     ]+flt\.s[       ]+x31,f0,f0
+[      ]+[0-9a-f]+:[   ]+a1f01053[     ]+flt\.s[       ]+x0,f0,f31
+[      ]+[0-9a-f]+:[   ]+a00f9053[     ]+flt\.s[       ]+x0,f31,f0
+[      ]+[0-9a-f]+:[   ]+a0000fd3[     ]+fle\.s[       ]+x31,f0,f0
+[      ]+[0-9a-f]+:[   ]+a00f8053[     ]+fle\.s[       ]+x0,f31,f0
+[      ]+[0-9a-f]+:[   ]+a1f00053[     ]+fle\.s[       ]+x0,f0,f31
+[      ]+[0-9a-f]+:[   ]+a0001fd3[     ]+flt\.s[       ]+x31,f0,f0
+[      ]+[0-9a-f]+:[   ]+a00f9053[     ]+flt\.s[       ]+x0,f31,f0
+[      ]+[0-9a-f]+:[   ]+a1f01053[     ]+flt\.s[       ]+x0,f0,f31
+[      ]+[0-9a-f]+:[   ]+00002f87[     ]+flw[  ]+f31,0\(x0\) # 0( <.*>)?
+[      ]+[0-9a-f]+:[   ]+7ff02007[     ]+flw[  ]+f0,2047\(x0\) # 7ff( <.*>)?
+[      ]+[0-9a-f]+:[   ]+80002007[     ]+flw[  ]+f0,-2048\(x0\) # f+800( <.*>)?
+[      ]+[0-9a-f]+:[   ]+000fa007[     ]+flw[  ]+f0,0\(x31\)
+[      ]+[0-9a-f]+:[   ]+00000f97[     ]+auipc[        ]+x31,0x0[      ]+[0-9a-f]+:[   ]+R_RISCV_PCREL_HI20[   ]+sval
+[      ]+[0-9a-f]+:[   ]+R_RISCV_RELAX.*
+[      ]+[0-9a-f]+:[   ]+000fa007[     ]+flw[  ]+f0,0\(x31\) # [0-9a-f]+( <.*>)?[      ]+[0-9a-f]+:[   ]+R_RISCV_PCREL_LO12_I[         ]+.*
+[      ]+[0-9a-f]+:[   ]+R_RISCV_RELAX.*
+[      ]+[0-9a-f]+:[   ]+00007fc3[     ]+fmadd\.s[     ]+f31,f0,f0,f0
+[      ]+[0-9a-f]+:[   ]+000ff043[     ]+fmadd\.s[     ]+f0,f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+01f07043[     ]+fmadd\.s[     ]+f0,f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+f8007043[     ]+fmadd\.s[     ]+f0,f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+00000043[     ]+fmadd\.s[     ]+f0,f0,f0,f0,rne
+[      ]+[0-9a-f]+:[   ]+28001fd3[     ]+fmax\.s[      ]+f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+280f9053[     ]+fmax\.s[      ]+f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+29f01053[     ]+fmax\.s[      ]+f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+28000fd3[     ]+fmin\.s[      ]+f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+280f8053[     ]+fmin\.s[      ]+f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+29f00053[     ]+fmin\.s[      ]+f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+00007fc7[     ]+fmsub\.s[     ]+f31,f0,f0,f0
+[      ]+[0-9a-f]+:[   ]+000ff047[     ]+fmsub\.s[     ]+f0,f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+01f07047[     ]+fmsub\.s[     ]+f0,f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+f8007047[     ]+fmsub\.s[     ]+f0,f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+00000047[     ]+fmsub\.s[     ]+f0,f0,f0,f0,rne
+[      ]+[0-9a-f]+:[   ]+10007fd3[     ]+fmul\.s[      ]+f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+100ff053[     ]+fmul\.s[      ]+f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+11f07053[     ]+fmul\.s[      ]+f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+10000053[     ]+fmul\.s[      ]+f0,f0,f0,rne
+[      ]+[0-9a-f]+:[   ]+20000fd3[     ]+fmv\.s[       ]+f31,f0
+[      ]+[0-9a-f]+:[   ]+21ff8053[     ]+fmv\.s[       ]+f0,f31
+[      ]+[0-9a-f]+:[   ]+f0000fd3[     ]+fmv\.w\.x[    ]+f31,x0
+[      ]+[0-9a-f]+:[   ]+f00f8053[     ]+fmv\.w\.x[    ]+f0,x31
+[      ]+[0-9a-f]+:[   ]+e0000fd3[     ]+fmv\.x\.w[    ]+x31,f0
+[      ]+[0-9a-f]+:[   ]+e00f8053[     ]+fmv\.x\.w[    ]+x0,f31
+[      ]+[0-9a-f]+:[   ]+20001fd3[     ]+fneg\.s[      ]+f31,f0
+[      ]+[0-9a-f]+:[   ]+21ff9053[     ]+fneg\.s[      ]+f0,f31
+[      ]+[0-9a-f]+:[   ]+00007fcf[     ]+fnmadd\.s[    ]+f31,f0,f0,f0
+[      ]+[0-9a-f]+:[   ]+000ff04f[     ]+fnmadd\.s[    ]+f0,f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+01f0704f[     ]+fnmadd\.s[    ]+f0,f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+f800704f[     ]+fnmadd\.s[    ]+f0,f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+0000004f[     ]+fnmadd\.s[    ]+f0,f0,f0,f0,rne
+[      ]+[0-9a-f]+:[   ]+00007fcb[     ]+fnmsub\.s[    ]+f31,f0,f0,f0
+[      ]+[0-9a-f]+:[   ]+000ff04b[     ]+fnmsub\.s[    ]+f0,f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+01f0704b[     ]+fnmsub\.s[    ]+f0,f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+f800704b[     ]+fnmsub\.s[    ]+f0,f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+0000004b[     ]+fnmsub\.s[    ]+f0,f0,f0,f0,rne
+[      ]+[0-9a-f]+:[   ]+00302ff3[     ]+frcsr[        ]+x31
+[      ]+[0-9a-f]+:[   ]+00102ff3[     ]+frflags[      ]+x31
+[      ]+[0-9a-f]+:[   ]+00202ff3[     ]+frrm[         ]+x31
+[      ]+[0-9a-f]+:[   ]+003f9073[     ]+fscsr[        ]+x31
+[      ]+[0-9a-f]+:[   ]+00309ff3[     ]+fscsr[        ]+x31,x1
+[      ]+[0-9a-f]+:[   ]+003f90f3[     ]+fscsr[        ]+x1,x31
+[      ]+[0-9a-f]+:[   ]+001f9073[     ]+fsflags[      ]+x31
+[      ]+[0-9a-f]+:[   ]+00109ff3[     ]+fsflags[      ]+x31,x1
+[      ]+[0-9a-f]+:[   ]+001f90f3[     ]+fsflags[      ]+x1,x31
+[      ]+[0-9a-f]+:[   ]+20100fd3[     ]+fsgnj\.s[     ]+f31,f0,f1
+[      ]+[0-9a-f]+:[   ]+200f8053[     ]+fsgnj\.s[     ]+f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+21f00053[     ]+fsgnj\.s[     ]+f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+20009053[     ]+fsgnjn\.s[    ]+f0,f1,f0
+[      ]+[0-9a-f]+:[   ]+2000a053[     ]+fsgnjx\.s[    ]+f0,f1,f0
+[      ]+[0-9a-f]+:[   ]+58007fd3[     ]+fsqrt\.s[     ]+f31,f0
+[      ]+[0-9a-f]+:[   ]+580ff053[     ]+fsqrt\.s[     ]+f0,f31
+[      ]+[0-9a-f]+:[   ]+58000053[     ]+fsqrt\.s[     ]+f0,f0,rne
+[      ]+[0-9a-f]+:[   ]+002f9073[     ]+fsrm[         ]+x31
+[      ]+[0-9a-f]+:[   ]+00209ff3[     ]+fsrm[         ]+x31,x1
+[      ]+[0-9a-f]+:[   ]+002f90f3[     ]+fsrm[         ]+x1,x31
+[      ]+[0-9a-f]+:[   ]+08007fd3[     ]+fsub\.s[      ]+f31,f0,f0
+[      ]+[0-9a-f]+:[   ]+080ff053[     ]+fsub\.s[      ]+f0,f31,f0
+[      ]+[0-9a-f]+:[   ]+09f07053[     ]+fsub\.s[      ]+f0,f0,f31
+[      ]+[0-9a-f]+:[   ]+08000053[     ]+fsub\.s[      ]+f0,f0,f0,rne
+[      ]+[0-9a-f]+:[   ]+01f02027[     ]+fsw[  ]+f31,0\(x0\) # 0( <.*>)?
+[      ]+[0-9a-f]+:[   ]+00002fa7[     ]+fsw[  ]+f0,31\(x0\) # 1f( <.*>)?
+[      ]+[0-9a-f]+:[   ]+fe002027[     ]+fsw[  ]+f0,-32\(x0\) # f+e0( <.*>)?
+[      ]+[0-9a-f]+:[   ]+000fa027[     ]+fsw[  ]+f0,0\(x31\)
+[      ]+[0-9a-f]+:[   ]+00000f97[     ]+auipc[        ]+x31,0x0[      ]+[0-9a-f]+:[   ]+R_RISCV_PCREL_HI20[   ]+sval
+[      ]+[0-9a-f]+:[   ]+R_RISCV_RELAX.*
+[      ]+[0-9a-f]+:[   ]+000fa027[     ]+fsw[  ]+f0,0\(x31\) # [0-9a-f]+( <.*>)?[      ]+[0-9a-f]+:[   ]+R_RISCV_PCREL_LO12_S[         ]+.*
+[      ]+[0-9a-f]+:[   ]+R_RISCV_RELAX.*
diff --git a/gas/testsuite/gas/riscv/fp-f-insns-64.s b/gas/testsuite/gas/riscv/fp-f-insns-64.s
new file mode 100644 (file)
index 0000000..9f23abf
--- /dev/null
@@ -0,0 +1,144 @@
+F:
+       fabs.s  f31, f0
+       fabs.s  f0, f31
+
+       fadd.s  f31, f0, f0
+       fadd.s  f0, f31, f0
+       fadd.s  f0, f0, f31
+       fadd.s  f0, f0, f0, rne
+       fadd.s  f0, f0, f0, rtz
+       fadd.s  f0, f0, f0, rdn
+       fadd.s  f0, f0, f0, rup
+       fadd.s  f0, f0, f0, rmm
+
+       fclass.s x31, f0
+       fclass.s x0, f31
+
+       fcvt.l.s x0, f0
+       fcvt.lu.s x0, f0
+       fcvt.s.l f0, x0
+       fcvt.s.lu f0, x0
+       fcvt.s.w f31, x0
+       fcvt.s.w f0, x31
+       fcvt.s.w f0, x0, rne
+       fcvt.s.wu f0, x0
+       fcvt.w.s x31, f0
+       fcvt.w.s x0, f31
+       fcvt.w.s x0, f0, rne
+       fcvt.wu.s x0, f0
+
+       fdiv.s  f31, f0, f0
+       fdiv.s  f0, f31, f0
+       fdiv.s  f0, f0, f31
+       fdiv.s  f0, f0, f0, rne
+
+       feq.s   x31, f0, f0
+       feq.s   x0, f31, f0
+       feq.s   x0, f0, f31
+
+       fge.s   x31, f0, f0
+       fge.s   x0, f31, f0
+       fge.s   x0, f0, f31
+
+       fgt.s   x31, f0, f0
+       fgt.s   x0, f31, f0
+       fgt.s   x0, f0, f31
+
+       fle.s   x31, f0, f0
+       fle.s   x0, f31, f0
+       fle.s   x0, f0, f31
+
+       flt.s   x31, f0, f0
+       flt.s   x0, f31, f0
+       flt.s   x0, f0, f31
+
+       flw     f31, (x0)
+       flw     f0, 0x7ff(x0)
+       flw     f0, -0x800(x0)
+       flw     f0, (x31)
+       flw     f0, sval, x31
+
+       fmadd.s f31, f0, f0, f0
+       fmadd.s f0, f31, f0, f0
+       fmadd.s f0, f0, f31, f0
+       fmadd.s f0, f0, f0, f31
+       fmadd.s f0, f0, f0, f0, rne
+
+       fmax.s  f31, f0, f0
+       fmax.s  f0, f31, f0
+       fmax.s  f0, f0, f31
+
+       fmin.s  f31, f0, f0
+       fmin.s  f0, f31, f0
+       fmin.s  f0, f0, f31
+
+       fmsub.s f31, f0, f0, f0
+       fmsub.s f0, f31, f0, f0
+       fmsub.s f0, f0, f31, f0
+       fmsub.s f0, f0, f0, f31
+       fmsub.s f0, f0, f0, f0, rne
+
+       fmul.s  f31, f0, f0
+       fmul.s  f0, f31, f0
+       fmul.s  f0, f0, f31
+       fmul.s  f0, f0, f0, rne
+
+       fmv.s   f31, f0
+       fmv.s   f0, f31
+
+       fmv.s.x f31, x0
+       fmv.s.x f0, x31
+       fmv.x.s x31, f0
+       fmv.x.s x0, f31
+
+       fneg.s  f31, f0
+       fneg.s  f0, f31
+
+       fnmadd.s f31, f0, f0, f0
+       fnmadd.s f0, f31, f0, f0
+       fnmadd.s f0, f0, f31, f0
+       fnmadd.s f0, f0, f0, f31
+       fnmadd.s f0, f0, f0, f0, rne
+
+       fnmsub.s f31, f0, f0, f0
+       fnmsub.s f0, f31, f0, f0
+       fnmsub.s f0, f0, f31, f0
+       fnmsub.s f0, f0, f0, f31
+       fnmsub.s f0, f0, f0, f0, rne
+
+       frcsr   x31
+       frflags x31
+       frrm    x31
+
+       fscsr   x31
+       fscsr   x31, x1
+       fscsr   x1, x31
+
+       fsflags x31
+       fsflags x31, x1
+       fsflags x1, x31
+
+       fsgnj.s f31, f0, f1
+       fsgnj.s f0, f31, f0
+       fsgnj.s f0, f0, f31
+       fsgnjn.s f0, f1, f0
+       fsgnjx.s f0, f1, f0
+
+       fsqrt.s f31, f0
+       fsqrt.s f0, f31
+       fsqrt.s f0, f0, rne
+
+       fsrm    x31
+       fsrm    x31, x1
+       fsrm    x1, x31
+
+       fsub.s  f31, f0, f0
+       fsub.s  f0, f31, f0
+       fsub.s  f0, f0, f31
+       fsub.s  f0, f0, f0, rne
+
+       fsw     f31, (x0)
+       fsw     f0, 0x1f(x0)
+       fsw     f0, -0x20(x0)
+       fsw     f0, (x31)
+       fsw     f0, sval, x31
index a0bb06912bc5f0d8fd2b671a8babc910aaaabc04..054e628ef667f331372451164f56e8a77dca0fa8 100644 (file)
@@ -9,7 +9,19 @@ Disassembly of section .text:
 
 0+000 <.text>:
 [      ]+[0-9a-f]+:[   ]+00059507[     ]+flh[  ]+fa0,0\(a1\)
+[      ]+[0-9a-f]+:[   ]+00000297[     ]+auipc[        ]+t0,0x0
+[      ]+[0-9a-f]+:[   ]+R_RISCV_PCREL_HI20[   ]+hval
+[      ]+[0-9a-f]+:[   ]+R_RISCV_RELAX.*
+[      ]+[0-9a-f]+:[   ]+00029507[     ]+flh[  ]+fa0,0\(t0\) # [0-9a-f]+( <.*>)?
+[      ]+[0-9a-f]+:[   ]+R_RISCV_PCREL_LO12_I[         ].*
+[      ]+[0-9a-f]+:[   ]+R_RISCV_RELAX.*
 [      ]+[0-9a-f]+:[   ]+00a59027[     ]+fsh[  ]+fa0,0\(a1\)
+[      ]+[0-9a-f]+:[   ]+00000297[     ]+auipc[        ]+t0,0x0
+[      ]+[0-9a-f]+:[   ]+R_RISCV_PCREL_HI20[   ]+hval
+[      ]+[0-9a-f]+:[   ]+R_RISCV_RELAX.*
+[      ]+[0-9a-f]+:[   ]+00a29027[     ]+fsh[  ]+fa0,0\(t0\) # [0-9a-f]+( <.*>)?
+[      ]+[0-9a-f]+:[   ]+R_RISCV_PCREL_LO12_S[         ].*
+[      ]+[0-9a-f]+:[   ]+R_RISCV_RELAX.*
 [      ]+[0-9a-f]+:[   ]+24b58553[     ]+fmv.h[        ]+fa0,fa1
 [      ]+[0-9a-f]+:[   ]+24b59553[     ]+fneg.h[       ]+fa0,fa1
 [      ]+[0-9a-f]+:[   ]+24b5a553[     ]+fabs.h[       ]+fa0,fa1
index 1a04cc64008655a1d74696ce8c17fb8f30004cb5..3619e72d252503a7de4a5dac987b04aab00b2950 100644 (file)
@@ -1,5 +1,7 @@
        flh             fa0, 0(a1)
+       flh             fa0, hval, t0
        fsh             fa0, 0(a1)
+       fsh             fa0, hval, t0
 
        fmv.h           fa0, fa1
        fneg.h          fa0, fa1