aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inst.chisel2
-rw-r--r--instr-table.tex92
-rw-r--r--opcodes10
-rwxr-xr-xparse-opcodes6
4 files changed, 68 insertions, 42 deletions
diff --git a/inst.chisel b/inst.chisel
index 137b047..d200281 100644
--- a/inst.chisel
+++ b/inst.chisel
@@ -141,6 +141,8 @@ object Instructions {
def FMAX_D = Bits("b1100101??????????000?????1010011")
def FMV_X_S = Bits("b111000000000?????000?????1010011")
def FMV_X_D = Bits("b111000100000?????000?????1010011")
+ def FCLASS_S = Bits("b111010000000?????000?????1010011")
+ def FCLASS_D = Bits("b111010100000?????000?????1010011")
def FMV_S_X = Bits("b111100000000?????000?????1010011")
def FMV_D_X = Bits("b111100100000?????000?????1010011")
def FLW = Bits("b?????????????????010?????0000111")
diff --git a/instr-table.tex b/instr-table.tex
index 64e379e..4163144 100644
--- a/instr-table.tex
+++ b/instr-table.tex
@@ -1206,7 +1206,7 @@
\multicolumn{1}{c|}{rs1} &
\multicolumn{1}{c|}{rm} &
\multicolumn{1}{c|}{rd} &
-\multicolumn{1}{c|}{1010011} & FADD.S rd,rs1,rs2,rm \\
+\multicolumn{1}{c|}{1010011} & FADD.S rd,rs1,rs2 \\
\cline{2-11}
@@ -1216,7 +1216,7 @@
\multicolumn{1}{c|}{rs1} &
\multicolumn{1}{c|}{rm} &
\multicolumn{1}{c|}{rd} &
-\multicolumn{1}{c|}{1010011} & FSUB.S rd,rs1,rs2,rm \\
+\multicolumn{1}{c|}{1010011} & FSUB.S rd,rs1,rs2 \\
\cline{2-11}
@@ -1226,7 +1226,7 @@
\multicolumn{1}{c|}{rs1} &
\multicolumn{1}{c|}{rm} &
\multicolumn{1}{c|}{rd} &
-\multicolumn{1}{c|}{1010011} & FMUL.S rd,rs1,rs2,rm \\
+\multicolumn{1}{c|}{1010011} & FMUL.S rd,rs1,rs2 \\
\cline{2-11}
@@ -1236,7 +1236,7 @@
\multicolumn{1}{c|}{rs1} &
\multicolumn{1}{c|}{rm} &
\multicolumn{1}{c|}{rd} &
-\multicolumn{1}{c|}{1010011} & FDIV.S rd,rs1,rs2,rm \\
+\multicolumn{1}{c|}{1010011} & FDIV.S rd,rs1,rs2 \\
\cline{2-11}
@@ -1246,7 +1246,7 @@
\multicolumn{1}{c|}{rs1} &
\multicolumn{1}{c|}{rm} &
\multicolumn{1}{c|}{rd} &
-\multicolumn{1}{c|}{1010011} & FSQRT.S rd,rs1,rm \\
+\multicolumn{1}{c|}{1010011} & FSQRT.S rd,rs1 \\
\cline{2-11}
@@ -1277,7 +1277,7 @@
\multicolumn{1}{c|}{rs1} &
\multicolumn{1}{c|}{rm} &
\multicolumn{1}{c|}{rd} &
-\multicolumn{1}{c|}{1000011} & FMADD.S rd,rs1,rs2,rs3,rm \\
+\multicolumn{1}{c|}{1000011} & FMADD.S rd,rs1,rs2,rs3 \\
\cline{2-11}
@@ -1288,7 +1288,7 @@
\multicolumn{1}{c|}{rs1} &
\multicolumn{1}{c|}{rm} &
\multicolumn{1}{c|}{rd} &
-\multicolumn{1}{c|}{1000111} & FMSUB.S rd,rs1,rs2,rs3,rm \\
+\multicolumn{1}{c|}{1000111} & FMSUB.S rd,rs1,rs2,rs3 \\
\cline{2-11}
@@ -1299,7 +1299,7 @@
\multicolumn{1}{c|}{rs1} &
\multicolumn{1}{c|}{rm} &
\multicolumn{1}{c|}{rd} &
-\multicolumn{1}{c|}{1001011} & FNMSUB.S rd,rs1,rs2,rs3,rm \\
+\multicolumn{1}{c|}{1001011} & FNMSUB.S rd,rs1,rs2,rs3 \\
\cline{2-11}
@@ -1310,7 +1310,7 @@
\multicolumn{1}{c|}{rs1} &
\multicolumn{1}{c|}{rm} &
\multicolumn{1}{c|}{rd} &
-\multicolumn{1}{c|}{1001111} & FNMADD.S rd,rs1,rs2,rs3,rm \\
+\multicolumn{1}{c|}{1001111} & FNMADD.S rd,rs1,rs2,rs3 \\
\cline{2-11}
@@ -1350,7 +1350,7 @@
\multicolumn{1}{c|}{rs1} &
\multicolumn{1}{c|}{rm} &
\multicolumn{1}{c|}{rd} &
-\multicolumn{1}{c|}{1010011} & FCVT.S.W rd,rs1,rm \\
+\multicolumn{1}{c|}{1010011} & FCVT.S.W rd,rs1 \\
\cline{2-11}
@@ -1360,7 +1360,7 @@
\multicolumn{1}{c|}{rs1} &
\multicolumn{1}{c|}{rm} &
\multicolumn{1}{c|}{rd} &
-\multicolumn{1}{c|}{1010011} & FCVT.S.WU rd,rs1,rm \\
+\multicolumn{1}{c|}{1010011} & FCVT.S.WU rd,rs1 \\
\cline{2-11}
@@ -1380,7 +1380,7 @@
\multicolumn{1}{c|}{rs1} &
\multicolumn{1}{c|}{rm} &
\multicolumn{1}{c|}{rd} &
-\multicolumn{1}{c|}{1010011} & FCVT.W.S rd,rs1,rm \\
+\multicolumn{1}{c|}{1010011} & FCVT.W.S rd,rs1 \\
\cline{2-11}
@@ -1390,7 +1390,7 @@
\multicolumn{1}{c|}{rs1} &
\multicolumn{1}{c|}{rm} &
\multicolumn{1}{c|}{rd} &
-\multicolumn{1}{c|}{1010011} & FCVT.WU.S rd,rs1,rm \\
+\multicolumn{1}{c|}{1010011} & FCVT.WU.S rd,rs1 \\
\cline{2-11}
@@ -1405,6 +1405,16 @@
&
+\multicolumn{4}{|c|}{1110100} &
+\multicolumn{2}{c|}{00000} &
+\multicolumn{1}{c|}{rs1} &
+\multicolumn{1}{c|}{000} &
+\multicolumn{1}{c|}{rd} &
+\multicolumn{1}{c|}{1010011} & FCLASS.S rd,rs1 \\
+\cline{2-11}
+
+
+&
\multicolumn{4}{|c|}{1010100} &
\multicolumn{2}{c|}{rs2} &
\multicolumn{1}{c|}{rs1} &
@@ -1576,7 +1586,7 @@
\multicolumn{1}{c|}{rs1} &
\multicolumn{1}{c|}{rm} &
\multicolumn{1}{c|}{rd} &
-\multicolumn{1}{c|}{1010011} & FCVT.S.L rd,rs1,rm \\
+\multicolumn{1}{c|}{1010011} & FCVT.S.L rd,rs1 \\
\cline{2-11}
@@ -1586,7 +1596,7 @@
\multicolumn{1}{c|}{rs1} &
\multicolumn{1}{c|}{rm} &
\multicolumn{1}{c|}{rd} &
-\multicolumn{1}{c|}{1010011} & FCVT.S.LU rd,rs1,rm \\
+\multicolumn{1}{c|}{1010011} & FCVT.S.LU rd,rs1 \\
\cline{2-11}
@@ -1596,7 +1606,7 @@
\multicolumn{1}{c|}{rs1} &
\multicolumn{1}{c|}{rm} &
\multicolumn{1}{c|}{rd} &
-\multicolumn{1}{c|}{1010011} & FCVT.L.S rd,rs1,rm \\
+\multicolumn{1}{c|}{1010011} & FCVT.L.S rd,rs1 \\
\cline{2-11}
@@ -1606,7 +1616,7 @@
\multicolumn{1}{c|}{rs1} &
\multicolumn{1}{c|}{rm} &
\multicolumn{1}{c|}{rd} &
-\multicolumn{1}{c|}{1010011} & FCVT.LU.S rd,rs1,rm \\
+\multicolumn{1}{c|}{1010011} & FCVT.LU.S rd,rs1 \\
\cline{2-11}
@@ -1642,7 +1652,7 @@
\multicolumn{1}{c|}{rs1} &
\multicolumn{1}{c|}{rm} &
\multicolumn{1}{c|}{rd} &
-\multicolumn{1}{c|}{1010011} & FADD.D rd,rs1,rs2,rm \\
+\multicolumn{1}{c|}{1010011} & FADD.D rd,rs1,rs2 \\
\cline{2-11}
@@ -1652,7 +1662,7 @@
\multicolumn{1}{c|}{rs1} &
\multicolumn{1}{c|}{rm} &
\multicolumn{1}{c|}{rd} &
-\multicolumn{1}{c|}{1010011} & FSUB.D rd,rs1,rs2,rm \\
+\multicolumn{1}{c|}{1010011} & FSUB.D rd,rs1,rs2 \\
\cline{2-11}
@@ -1662,7 +1672,7 @@
\multicolumn{1}{c|}{rs1} &
\multicolumn{1}{c|}{rm} &
\multicolumn{1}{c|}{rd} &
-\multicolumn{1}{c|}{1010011} & FMUL.D rd,rs1,rs2,rm \\
+\multicolumn{1}{c|}{1010011} & FMUL.D rd,rs1,rs2 \\
\cline{2-11}
@@ -1672,7 +1682,7 @@
\multicolumn{1}{c|}{rs1} &
\multicolumn{1}{c|}{rm} &
\multicolumn{1}{c|}{rd} &
-\multicolumn{1}{c|}{1010011} & FDIV.D rd,rs1,rs2,rm \\
+\multicolumn{1}{c|}{1010011} & FDIV.D rd,rs1,rs2 \\
\cline{2-11}
@@ -1682,7 +1692,7 @@
\multicolumn{1}{c|}{rs1} &
\multicolumn{1}{c|}{rm} &
\multicolumn{1}{c|}{rd} &
-\multicolumn{1}{c|}{1010011} & FSQRT.D rd,rs1,rm \\
+\multicolumn{1}{c|}{1010011} & FSQRT.D rd,rs1 \\
\cline{2-11}
@@ -1713,7 +1723,7 @@
\multicolumn{1}{c|}{rs1} &
\multicolumn{1}{c|}{rm} &
\multicolumn{1}{c|}{rd} &
-\multicolumn{1}{c|}{1000011} & FMADD.D rd,rs1,rs2,rs3,rm \\
+\multicolumn{1}{c|}{1000011} & FMADD.D rd,rs1,rs2,rs3 \\
\cline{2-11}
@@ -1724,7 +1734,7 @@
\multicolumn{1}{c|}{rs1} &
\multicolumn{1}{c|}{rm} &
\multicolumn{1}{c|}{rd} &
-\multicolumn{1}{c|}{1000111} & FMSUB.D rd,rs1,rs2,rs3,rm \\
+\multicolumn{1}{c|}{1000111} & FMSUB.D rd,rs1,rs2,rs3 \\
\cline{2-11}
@@ -1735,7 +1745,7 @@
\multicolumn{1}{c|}{rs1} &
\multicolumn{1}{c|}{rm} &
\multicolumn{1}{c|}{rd} &
-\multicolumn{1}{c|}{1001011} & FNMSUB.D rd,rs1,rs2,rs3,rm \\
+\multicolumn{1}{c|}{1001011} & FNMSUB.D rd,rs1,rs2,rs3 \\
\cline{2-11}
@@ -1746,7 +1756,7 @@
\multicolumn{1}{c|}{rs1} &
\multicolumn{1}{c|}{rm} &
\multicolumn{1}{c|}{rd} &
-\multicolumn{1}{c|}{1001111} & FNMADD.D rd,rs1,rs2,rs3,rm \\
+\multicolumn{1}{c|}{1001111} & FNMADD.D rd,rs1,rs2,rs3 \\
\cline{2-11}
@@ -1786,7 +1796,7 @@
\multicolumn{1}{c|}{rs1} &
\multicolumn{1}{c|}{rm} &
\multicolumn{1}{c|}{rd} &
-\multicolumn{1}{c|}{1010011} & FCVT.D.W rd,rs1,rm \\
+\multicolumn{1}{c|}{1010011} & FCVT.D.W rd,rs1 \\
\cline{2-11}
@@ -1796,7 +1806,7 @@
\multicolumn{1}{c|}{rs1} &
\multicolumn{1}{c|}{rm} &
\multicolumn{1}{c|}{rd} &
-\multicolumn{1}{c|}{1010011} & FCVT.D.WU rd,rs1,rm \\
+\multicolumn{1}{c|}{1010011} & FCVT.D.WU rd,rs1 \\
\cline{2-11}
@@ -1806,7 +1816,7 @@
\multicolumn{1}{c|}{rs1} &
\multicolumn{1}{c|}{rm} &
\multicolumn{1}{c|}{rd} &
-\multicolumn{1}{c|}{1010011} & FCVT.W.D rd,rs1,rm \\
+\multicolumn{1}{c|}{1010011} & FCVT.W.D rd,rs1 \\
\cline{2-11}
@@ -1816,7 +1826,17 @@
\multicolumn{1}{c|}{rs1} &
\multicolumn{1}{c|}{rm} &
\multicolumn{1}{c|}{rd} &
-\multicolumn{1}{c|}{1010011} & FCVT.WU.D rd,rs1,rm \\
+\multicolumn{1}{c|}{1010011} & FCVT.WU.D rd,rs1 \\
+\cline{2-11}
+
+
+&
+\multicolumn{4}{|c|}{1110101} &
+\multicolumn{2}{c|}{00000} &
+\multicolumn{1}{c|}{rs1} &
+\multicolumn{1}{c|}{000} &
+\multicolumn{1}{c|}{rd} &
+\multicolumn{1}{c|}{1010011} & FCLASS.D rd,rs1 \\
\cline{2-11}
@@ -1863,7 +1883,7 @@
\multicolumn{1}{c|}{rs1} &
\multicolumn{1}{c|}{rm} &
\multicolumn{1}{c|}{rd} &
-\multicolumn{1}{c|}{1010011} & FCVT.D.L rd,rs1,rm \\
+\multicolumn{1}{c|}{1010011} & FCVT.D.L rd,rs1 \\
\cline{2-11}
@@ -1873,7 +1893,7 @@
\multicolumn{1}{c|}{rs1} &
\multicolumn{1}{c|}{rm} &
\multicolumn{1}{c|}{rd} &
-\multicolumn{1}{c|}{1010011} & FCVT.D.LU rd,rs1,rm \\
+\multicolumn{1}{c|}{1010011} & FCVT.D.LU rd,rs1 \\
\cline{2-11}
@@ -1893,7 +1913,7 @@
\multicolumn{1}{c|}{rs1} &
\multicolumn{1}{c|}{rm} &
\multicolumn{1}{c|}{rd} &
-\multicolumn{1}{c|}{1010011} & FCVT.L.D rd,rs1,rm \\
+\multicolumn{1}{c|}{1010011} & FCVT.L.D rd,rs1 \\
\cline{2-11}
@@ -1903,7 +1923,7 @@
\multicolumn{1}{c|}{rs1} &
\multicolumn{1}{c|}{rm} &
\multicolumn{1}{c|}{rd} &
-\multicolumn{1}{c|}{1010011} & FCVT.LU.D rd,rs1,rm \\
+\multicolumn{1}{c|}{1010011} & FCVT.LU.D rd,rs1 \\
\cline{2-11}
@@ -1923,7 +1943,7 @@
\multicolumn{1}{c|}{rs1} &
\multicolumn{1}{c|}{rm} &
\multicolumn{1}{c|}{rd} &
-\multicolumn{1}{c|}{1010011} & FCVT.S.D rd,rs1,rm \\
+\multicolumn{1}{c|}{1010011} & FCVT.S.D rd,rs1 \\
\cline{2-11}
@@ -1933,7 +1953,7 @@
\multicolumn{1}{c|}{rs1} &
\multicolumn{1}{c|}{rm} &
\multicolumn{1}{c|}{rd} &
-\multicolumn{1}{c|}{1010011} & FCVT.D.S rd,rs1,rm \\
+\multicolumn{1}{c|}{1010011} & FCVT.D.S rd,rs1 \\
\cline{2-11}
diff --git a/opcodes b/opcodes
index f6b7f8f..02e9eff 100644
--- a/opcodes
+++ b/opcodes
@@ -179,10 +179,12 @@ fmax.s rd rs1 rs2 31..27=0x19 14..12=0 26..25=0 6..2=0x14 1..0=3
fmin.d rd rs1 rs2 31..27=0x18 14..12=0 26..25=1 6..2=0x14 1..0=3
fmax.d rd rs1 rs2 31..27=0x19 14..12=0 26..25=1 6..2=0x14 1..0=3
-fmv.x.s rd rs1 24..20=0 31..27=0x1C 14..12=0 26..25=0 6..2=0x14 1..0=3
-fmv.x.d rd rs1 24..20=0 31..27=0x1C 14..12=0 26..25=1 6..2=0x14 1..0=3
-fmv.s.x rd rs1 24..20=0 31..27=0x1E 14..12=0 26..25=0 6..2=0x14 1..0=3
-fmv.d.x rd rs1 24..20=0 31..27=0x1E 14..12=0 26..25=1 6..2=0x14 1..0=3
+fmv.x.s rd rs1 24..20=0 31..27=0x1C 14..12=0 26..25=0 6..2=0x14 1..0=3
+fmv.x.d rd rs1 24..20=0 31..27=0x1C 14..12=0 26..25=1 6..2=0x14 1..0=3
+fclass.s rd rs1 24..20=0 31..27=0x1D 14..12=0 26..25=0 6..2=0x14 1..0=3
+fclass.d rd rs1 24..20=0 31..27=0x1D 14..12=0 26..25=1 6..2=0x14 1..0=3
+fmv.s.x rd rs1 24..20=0 31..27=0x1E 14..12=0 26..25=0 6..2=0x14 1..0=3
+fmv.d.x rd rs1 24..20=0 31..27=0x1E 14..12=0 26..25=1 6..2=0x14 1..0=3
flw rd rs1 imm12 14..12=2 6..2=0x01 1..0=3
fld rd rs1 imm12 14..12=3 6..2=0x01 1..0=3
diff --git a/parse-opcodes b/parse-opcodes
index 37219cf..8523a0a 100755
--- a/parse-opcodes
+++ b/parse-opcodes
@@ -174,6 +174,8 @@ def str_inst(name,arguments):
arguments.append('shamt')
if 'aqrl' in arguments:
arguments.remove('aqrl')
+ if 'rm' in arguments:
+ arguments.remove('rm')
if 'pred' in arguments:
arguments.remove('pred')
if 'succ' in arguments:
@@ -601,7 +603,7 @@ def make_latex_table():
print_insts('fsgnj.s', 'fsgnjn.s', 'fsgnjx.s')
print_insts('fcvt.s.w', 'fcvt.s.wu', 'fmv.s.x')
print_insts('fcvt.w.s', 'fcvt.wu.s', 'fmv.x.s')
- print_insts('feq.s', 'flt.s', 'fle.s')
+ print_insts('fclass.s', 'feq.s', 'flt.s', 'fle.s')
print_insts('frcsr', 'frrm', 'frflags')
print_insts('fscsr', 'fsrm', 'fsflags')
print_footer(0)
@@ -617,7 +619,7 @@ def make_latex_table():
print_insts('fsgnj.d', 'fsgnjn.d', 'fsgnjx.d')
print_insts('fcvt.d.w', 'fcvt.d.wu')
print_insts('fcvt.w.d', 'fcvt.wu.d')
- print_insts('feq.d', 'flt.d', 'fle.d')
+ print_insts('fclass.d', 'feq.d', 'flt.d', 'fle.d')
print_subtitle('RV64D Standard Extension (in addition to RV32D)')
print_insts('fcvt.d.l', 'fcvt.d.lu', 'fmv.d.x')
print_insts('fcvt.l.d', 'fcvt.lu.d', 'fmv.x.d')