summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--opcodes1
-rw-r--r--opcodes-hwacha-ut55
3 files changed, 59 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index c2b134f..95f7d76 100644
--- a/Makefile
+++ b/Makefile
@@ -7,16 +7,18 @@ install: $(ISASIM_H) $(PK_H) $(GAS_H) $(XCC_H) inst.chisel instr-table.tex
$(ISASIM_H): opcodes parse-opcodes
./parse-opcodes -isasim < $< > $@
+ ./parse-opcodes -isasim < opcodes-hwacha-ut > ../riscv-isa-sim/hwacha/opcodes_hwacha_ut_half.h
$(PK_H): opcodes parse-opcodes
./parse-opcodes -disasm < $< > $@
-$(GAS_H): opcodes opcodes-hwacha opcodes-rvc opcodes-custom parse-opcodes
+$(GAS_H): opcodes opcodes-hwacha opcodes-hwacha-ut opcodes-rvc opcodes-custom opcodes-hwacha-pseudo parse-opcodes
./parse-opcodes -disasm < $< > $@
./parse-opcodes -disasm < opcodes-rvc >> $@
./parse-opcodes -disasm < opcodes-custom >> $@
./parse-opcodes -disasm < opcodes-hwacha >> $@
./parse-opcodes -disasm < opcodes-hwacha-pseudo >> $@
+ ./parse-opcodes -disasm < opcodes-hwacha-ut >> $@
$(XCC_H): opcodes parse-opcodes
./parse-opcodes -disasm < $< > $@
diff --git a/opcodes b/opcodes
index 62efae9..c0405b7 100644
--- a/opcodes
+++ b/opcodes
@@ -200,3 +200,4 @@ fmadd.d rd rs1 rs2 rs3 rm 26..25=1 6..2=0x10 1..0=3
fmsub.d rd rs1 rs2 rs3 rm 26..25=1 6..2=0x11 1..0=3
fnmsub.d rd rs1 rs2 rs3 rm 26..25=1 6..2=0x12 1..0=3
fnmadd.d rd rs1 rs2 rs3 rm 26..25=1 6..2=0x13 1..0=3
+
diff --git a/opcodes-hwacha-ut b/opcodes-hwacha-ut
new file mode 100644
index 0000000..ad88fed
--- /dev/null
+++ b/opcodes-hwacha-ut
@@ -0,0 +1,55 @@
+# format of a line in this file:
+# <instruction name> <args> <opcode>
+#
+# <opcode> is given by specifying one or more range/value pairs:
+# hi..lo=value or bit=value or arg=value (e.g. 6..2=0x45 10=1 rd=0)
+#
+# <args> is one of rd, rs1, rs2, rs3, imm25, imm20, imm12, imm12lo, imm12hi,
+# shamtw, shamt, rm
+
+# half-precision floating-point operations for hwacha microthreads
+
+fadd.h rd rs1 rs2 31..27=0x0 rm 26..25=2 6..2=0x14 1..0=3
+fsub.h rd rs1 rs2 31..27=0x1 rm 26..25=2 6..2=0x14 1..0=3
+fmul.h rd rs1 rs2 31..27=0x2 rm 26..25=2 6..2=0x14 1..0=3
+fdiv.h rd rs1 rs2 31..27=0x3 rm 26..25=2 6..2=0x14 1..0=3
+fsqrt.h rd rs1 24..20=0 31..27=0x4 rm 26..25=2 6..2=0x14 1..0=3
+fsgnj.h rd rs1 rs2 31..27=0x5 14..12=0 26..25=2 6..2=0x14 1..0=3
+fsgnjn.h rd rs1 rs2 31..27=0x6 14..12=0 26..25=2 6..2=0x14 1..0=3
+fsgnjx.h rd rs1 rs2 31..27=0x7 14..12=0 26..25=2 6..2=0x14 1..0=3
+
+fcvt.h.l rd rs1 24..20=0 31..27=0xC rm 26..25=2 6..2=0x14 1..0=3
+fcvt.h.lu rd rs1 24..20=0 31..27=0xD rm 26..25=2 6..2=0x14 1..0=3
+fcvt.h.w rd rs1 24..20=0 31..27=0xE rm 26..25=2 6..2=0x14 1..0=3
+fcvt.h.wu rd rs1 24..20=0 31..27=0xF rm 26..25=2 6..2=0x14 1..0=3
+
+fcvt.l.h rd rs1 24..20=0 31..27=0x8 rm 26..25=2 6..2=0x14 1..0=3
+fcvt.lu.h rd rs1 24..20=0 31..27=0x9 rm 26..25=2 6..2=0x14 1..0=3
+fcvt.w.h rd rs1 24..20=0 31..27=0xA rm 26..25=2 6..2=0x14 1..0=3
+fcvt.wu.h rd rs1 24..20=0 31..27=0xB rm 26..25=2 6..2=0x14 1..0=3
+
+fcvt.s.h rd rs1 24..20=0 31..29=0x4 28..27=0 rm 26..25=2 6..2=0x14 1..0=3
+fcvt.h.s rd rs1 24..20=0 31..29=0x4 28..27=2 rm 26..25=0 6..2=0x14 1..0=3
+
+fcvt.d.h rd rs1 24..20=0 31..29=0x4 28..27=1 rm 26..25=2 6..2=0x14 1..0=3
+fcvt.h.d rd rs1 24..20=0 31..29=0x4 28..27=2 rm 26..25=1 6..2=0x14 1..0=3
+
+feq.h rd rs1 rs2 31..27=0x15 14..12=0 26..25=2 6..2=0x14 1..0=3
+flt.h rd rs1 rs2 31..27=0x16 14..12=0 26..25=2 6..2=0x14 1..0=3
+fle.h rd rs1 rs2 31..27=0x17 14..12=0 26..25=2 6..2=0x14 1..0=3
+
+fmin.h rd rs1 rs2 31..27=0x18 14..12=0 26..25=2 6..2=0x14 1..0=3
+fmax.h rd rs1 rs2 31..27=0x19 14..12=0 26..25=2 6..2=0x14 1..0=3
+
+fmv.x.h rd rs1 24..20=0 31..27=0x1C 14..12=0 26..25=2 6..2=0x14 1..0=3
+fmv.h.x rd rs1 24..20=0 31..27=0x1E 14..12=0 26..25=2 6..2=0x14 1..0=3
+
+flh rd rs1 imm12 14..12=1 6..2=0x01 1..0=3
+
+fsh imm12hi rs1 rs2 imm12lo 14..12=1 6..2=0x09 1..0=3
+
+fmadd.h rd rs1 rs2 rs3 rm 26..25=2 6..2=0x10 1..0=3
+fmsub.h rd rs1 rs2 rs3 rm 26..25=2 6..2=0x11 1..0=3
+fnmsub.h rd rs1 rs2 rs3 rm 26..25=2 6..2=0x12 1..0=3
+fnmadd.h rd rs1 rs2 rs3 rm 26..25=2 6..2=0x13 1..0=3
+