Skip to content

Commit

Permalink
Add (unratified) Zfa extension
Browse files Browse the repository at this point in the history
Zfa adds 'missing' floating-point functionality:
 - fli.[hsdq]: floating-point load-immediate
 - fminm/fmaxm.[hsdq]: IEEE 754-2019 minimum and maximum
 - fround(nx)?.[hsdq]: IEEE 754-2019 roundToIntegral(Exact)?
 - fcvtmod.w.d: ECMAScript modular float->integer conversion
 - move instructions for XLEN < FLEN
 - comparisons that support quiet NaN inputs

This adds a surprisingly large number of files, as the instructions
added with Zfa depend on context (e.g., .h-variants become available
only if Zfh is present).
  • Loading branch information
ptomsich committed Mar 17, 2023
1 parent 3245356 commit e77307f
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 0 deletions.
2 changes: 2 additions & 0 deletions unratified/rv32_d_zfa
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fmvh.x.d rd rs1 24..20=1 31..27=0x1C 14..12=0 26..25=1 6..2=0x14 1..0=3
fmvp.d.x rd rs1 24..20=1 31..27=0x16 14..12=0 26..25=1 6..2=0x14 1..0=3
2 changes: 2 additions & 0 deletions unratified/rv64_q_zfa
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fmvh.x.q rd rs1 24..20=1 31..27=0x1C 14..12=0 26..25=3 6..2=0x14 1..0=3
fmvp.q.x rd rs1 24..20=1 31..27=0x16 14..12=0 26..25=3 6..2=0x14 1..0=3
8 changes: 8 additions & 0 deletions unratified/rv_d_zfa
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
fli.d rd rs1 24..20=1 31..27=0x1E 14..12=0 26..25=1 6..2=0x14 1..0=3
fminm.d rd rs1 rs2 31..27=0x05 14..12=2 26..25=1 6..2=0x14 1..0=3
fmaxm.d rd rs1 rs2 31..27=0x05 14..12=3 26..25=1 6..2=0x14 1..0=3
fround.d rd rs1 24..20=4 31..27=0x08 rm 26..25=1 6..2=0x14 1..0=3
froundnx.d rd rs1 24..20=5 31..27=0x08 rm 26..25=1 6..2=0x14 1..0=3
fcvtmod.w.d rd rs1 24..20=8 31..27=0x18 14..12=1 26..25=1 6..2=0x14 1..0=3
fleq.d rd rs1 rs2 31..27=0x14 14..12=4 26..25=1 6..2=0x14 1..0=3
fltq.d rd rs1 rs2 31..27=0x14 14..12=5 26..25=1 6..2=0x14 1..0=3
7 changes: 7 additions & 0 deletions unratified/rv_f_zfa
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
fli.s rd rs1 24..20=1 31..27=0x1E 14..12=0 26..25=0 6..2=0x14 1..0=3
fminm.s rd rs1 rs2 31..27=0x05 14..12=2 26..25=0 6..2=0x14 1..0=3
fmaxm.s rd rs1 rs2 31..27=0x05 14..12=3 26..25=0 6..2=0x14 1..0=3
fround.s rd rs1 24..20=4 31..27=0x08 rm 26..25=0 6..2=0x14 1..0=3
froundnx.s rd rs1 24..20=5 31..27=0x08 rm 26..25=0 6..2=0x14 1..0=3
fleq.s rd rs1 rs2 31..27=0x14 14..12=4 26..25=0 6..2=0x14 1..0=3
fltq.s rd rs1 rs2 31..27=0x14 14..12=5 26..25=0 6..2=0x14 1..0=3
7 changes: 7 additions & 0 deletions unratified/rv_q_zfa
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
fli.q rd rs1 24..20=1 31..27=0x1E 14..12=0 26..25=3 6..2=0x14 1..0=3
fminm.q rd rs1 rs2 31..27=0x05 14..12=2 26..25=3 6..2=0x14 1..0=3
fmaxm.q rd rs1 rs2 31..27=0x05 14..12=3 26..25=3 6..2=0x14 1..0=3
fround.q rd rs1 24..20=4 31..27=0x08 rm 26..25=3 6..2=0x14 1..0=3
froundnx.q rd rs1 24..20=5 31..27=0x08 rm 26..25=3 6..2=0x14 1..0=3
fleq.q rd rs1 rs2 31..27=0x14 14..12=4 26..25=3 6..2=0x14 1..0=3
fltq.q rd rs1 rs2 31..27=0x14 14..12=5 26..25=3 6..2=0x14 1..0=3
7 changes: 7 additions & 0 deletions unratified/rv_zfh_zfa
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
fli.h rd rs1 24..20=1 31..27=0x1E 14..12=0 26..25=2 6..2=0x14 1..0=3
fminm.h rd rs1 rs2 31..27=0x05 14..12=2 26..25=2 6..2=0x14 1..0=3
fmaxm.h rd rs1 rs2 31..27=0x05 14..12=3 26..25=2 6..2=0x14 1..0=3
fround.h rd rs1 24..20=4 31..27=0x08 rm 26..25=2 6..2=0x14 1..0=3
froundnx.h rd rs1 24..20=5 31..27=0x08 rm 26..25=2 6..2=0x14 1..0=3
fleq.h rd rs1 rs2 31..27=0x14 14..12=4 26..25=2 6..2=0x14 1..0=3
fltq.h rd rs1 rs2 31..27=0x14 14..12=5 26..25=2 6..2=0x14 1..0=3

0 comments on commit e77307f

Please sign in to comment.