summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Andrew Waterman <waterman@s141.Millennium.Berkeley.EDU>2010-09-12 18:23:36 -0700
committerGravatar Andrew Waterman <waterman@s141.Millennium.Berkeley.EDU>2010-09-12 18:23:36 -0700
commitc12b39030265006a1b5af2261d459b55feb33b72 (patch)
tree913a1a238fdc747ade6e8f05ec3968c95cd777b8
parent5103021dc40f42a18669c11bab8feea3a56f4ed5 (diff)
[xcc, sim] moved shamt field and renamed shifts
-rw-r--r--inst.v34
-rw-r--r--instr-table.tex196
-rw-r--r--opcodes36
-rwxr-xr-xparse-opcodes4
4 files changed, 135 insertions, 135 deletions
diff --git a/inst.v b/inst.v
index 5615b34..aaa9854 100644
--- a/inst.v
+++ b/inst.v
@@ -9,11 +9,14 @@
`define BLE 32'b1110011_?????_?????_100_????????????
`define BLEU 32'b1110011_?????_?????_101_????????????
`define ADDI 32'b1110100_?????_?????_000_????????????
-`define SLTI 32'b1110100_?????_?????_001_????????????
-`define SLTIU 32'b1110100_?????_?????_010_????????????
-`define ANDI 32'b1110100_?????_?????_011_????????????
-`define ORI 32'b1110100_?????_?????_100_????????????
-`define XORI 32'b1110100_?????_?????_101_????????????
+`define SLTI 32'b1110100_?????_?????_010_????????????
+`define SLTIU 32'b1110100_?????_?????_011_????????????
+`define ANDI 32'b1110100_?????_?????_100_????????????
+`define ORI 32'b1110100_?????_?????_101_????????????
+`define XORI 32'b1110100_?????_?????_110_????????????
+`define SLLI 32'b1110100_00000_?????_1110_??????_00000
+`define SRLI 32'b1110100_00000_?????_1110_??????_00000
+`define SRAI 32'b1110100_00000_?????_1110_??????_00000
`define ADD 32'b1110101_?????_?????_0000000000_?????
`define SUB 32'b1110101_?????_?????_0000000001_?????
`define SLT 32'b1110101_?????_?????_0000000010_?????
@@ -22,6 +25,9 @@
`define OR 32'b1110101_?????_?????_0000000101_?????
`define XOR 32'b1110101_?????_?????_0000000110_?????
`define NOR 32'b1110101_?????_?????_0000000111_?????
+`define SLLV 32'b1110101_?????_?????_1110000010_?????
+`define SRLV 32'b1110101_?????_?????_1110000100_?????
+`define SRAV 32'b1110101_?????_?????_1110000110_?????
`define MUL 32'b1110101_?????_?????_0010000000_?????
`define MULH 32'b1110101_?????_?????_0010000010_?????
`define MULHU 32'b1110101_?????_?????_0010000011_?????
@@ -29,15 +35,15 @@
`define DIVU 32'b1110101_?????_?????_0010000101_?????
`define REM 32'b1110101_?????_?????_0010000110_?????
`define REMU 32'b1110101_?????_?????_0010000111_?????
-`define SLLV 32'b1110101_?????_?????_1000000001_?????
-`define SRLV 32'b1110101_?????_?????_1000000010_?????
-`define SRAV 32'b1110101_?????_?????_1000000011_?????
-`define SLL 32'b1110101_00000_?????_1010_??????_?????
-`define SRL 32'b1110101_00000_?????_1100_??????_?????
-`define SRA 32'b1110101_00000_?????_1110_??????_?????
`define ADDIW 32'b1110110_?????_?????_000_????????????
+`define SLLIW 32'b1110110_00000_?????_1110_0_?????_00000
+`define SRLIW 32'b1110110_00000_?????_1110_0_?????_00000
+`define SRAIW 32'b1110110_00000_?????_1110_0_?????_00000
`define ADDW 32'b1110111_?????_?????_0000000000_?????
`define SUBW 32'b1110111_?????_?????_0000000001_?????
+`define SLLVW 32'b1110111_?????_?????_1110000010_?????
+`define SRLVW 32'b1110111_?????_?????_1110000100_?????
+`define SRAVW 32'b1110111_?????_?????_1110000110_?????
`define MULW 32'b1110111_?????_?????_0010000000_?????
`define MULHW 32'b1110111_?????_?????_0010000010_?????
`define MULHUW 32'b1110111_?????_?????_0010000011_?????
@@ -45,12 +51,6 @@
`define DIVUW 32'b1110111_?????_?????_0010000101_?????
`define REMW 32'b1110111_?????_?????_0010000110_?????
`define REMUW 32'b1110111_?????_?????_0010000111_?????
-`define SLLVW 32'b1110111_?????_?????_1000000001_?????
-`define SRLVW 32'b1110111_?????_?????_1000000010_?????
-`define SRAVW 32'b1110111_?????_?????_1000000011_?????
-`define SLLW 32'b1110111_00000_?????_1010_0_?????_?????
-`define SRLW 32'b1110111_00000_?????_1100_0_?????_?????
-`define SRAW 32'b1110111_00000_?????_1110_0_?????_?????
`define LB 32'b1111000_?????_?????_000_????????????
`define LH 32'b1111000_?????_?????_001_????????????
`define LW 32'b1111000_?????_?????_010_????????????
diff --git a/instr-table.tex b/instr-table.tex
index 7496e76..065007a 100644
--- a/instr-table.tex
+++ b/instr-table.tex
@@ -548,7 +548,7 @@
\multicolumn{2}{|c|}{1110100} &
\multicolumn{1}{c|}{xa} &
\multicolumn{1}{c|}{xb} &
-\multicolumn{1}{c|}{001} &
+\multicolumn{1}{c|}{010} &
\multicolumn{4}{c|}{imm} & SLTI xa,xb,imm \\
\cline{2-10}
@@ -557,7 +557,7 @@
\multicolumn{2}{|c|}{1110100} &
\multicolumn{1}{c|}{xa} &
\multicolumn{1}{c|}{xb} &
-\multicolumn{1}{c|}{010} &
+\multicolumn{1}{c|}{011} &
\multicolumn{4}{c|}{imm} & SLTIU xa,xb,imm \\
\cline{2-10}
@@ -566,7 +566,7 @@
\multicolumn{2}{|c|}{1110100} &
\multicolumn{1}{c|}{xa} &
\multicolumn{1}{c|}{xb} &
-\multicolumn{1}{c|}{011} &
+\multicolumn{1}{c|}{100} &
\multicolumn{4}{c|}{imm} & ANDI xa,xb,imm \\
\cline{2-10}
@@ -575,7 +575,7 @@
\multicolumn{2}{|c|}{1110100} &
\multicolumn{1}{c|}{xa} &
\multicolumn{1}{c|}{xb} &
-\multicolumn{1}{c|}{100} &
+\multicolumn{1}{c|}{101} &
\multicolumn{4}{c|}{imm} & ORI xa,xb,imm \\
\cline{2-10}
@@ -584,12 +584,42 @@
\multicolumn{2}{|c|}{1110100} &
\multicolumn{1}{c|}{xa} &
\multicolumn{1}{c|}{xb} &
-\multicolumn{1}{c|}{101} &
+\multicolumn{1}{c|}{110} &
\multicolumn{4}{c|}{imm} & XORI xa,xb,imm \\
\cline{2-10}
&
+\multicolumn{2}{|c|}{1110100} &
+\multicolumn{1}{c|}{00000} &
+\multicolumn{1}{c|}{xb} &
+\multicolumn{2}{c|}{1110} &
+\multicolumn{2}{c|}{shamt} &
+\multicolumn{1}{c|}{00000} & SLLI xa,xb,shamt \\
+\cline{2-10}
+
+
+&
+\multicolumn{2}{|c|}{1110100} &
+\multicolumn{1}{c|}{00000} &
+\multicolumn{1}{c|}{xb} &
+\multicolumn{2}{c|}{1110} &
+\multicolumn{2}{c|}{shamt} &
+\multicolumn{1}{c|}{00000} & SRLI xa,xb,shamt \\
+\cline{2-10}
+
+
+&
+\multicolumn{2}{|c|}{1110100} &
+\multicolumn{1}{c|}{00000} &
+\multicolumn{1}{c|}{xb} &
+\multicolumn{2}{c|}{1110} &
+\multicolumn{2}{c|}{shamt} &
+\multicolumn{1}{c|}{00000} & SRAI xa,xb,shamt \\
+\cline{2-10}
+
+
+&
\multicolumn{2}{|c|}{1110101} &
\multicolumn{1}{c|}{xa} &
\multicolumn{1}{c|}{xb} &
@@ -665,8 +695,8 @@
\multicolumn{2}{|c|}{1110101} &
\multicolumn{1}{c|}{xa} &
\multicolumn{1}{c|}{xb} &
-\multicolumn{4}{c|}{0010000000} &
-\multicolumn{1}{c|}{xc} & MUL xc,xb,xa \\
+\multicolumn{4}{c|}{1110000010} &
+\multicolumn{1}{c|}{xc} & SLLV xc,xb,xa \\
\cline{2-10}
@@ -674,8 +704,8 @@
\multicolumn{2}{|c|}{1110101} &
\multicolumn{1}{c|}{xa} &
\multicolumn{1}{c|}{xb} &
-\multicolumn{4}{c|}{0010000010} &
-\multicolumn{1}{c|}{xc} & MULH xc,xb,xa \\
+\multicolumn{4}{c|}{1110000100} &
+\multicolumn{1}{c|}{xc} & SRLV xc,xb,xa \\
\cline{2-10}
@@ -683,8 +713,8 @@
\multicolumn{2}{|c|}{1110101} &
\multicolumn{1}{c|}{xa} &
\multicolumn{1}{c|}{xb} &
-\multicolumn{4}{c|}{0010000011} &
-\multicolumn{1}{c|}{xc} & MULHU xc,xb,xa \\
+\multicolumn{4}{c|}{1110000110} &
+\multicolumn{1}{c|}{xc} & SRAV xc,xb,xa \\
\cline{2-10}
@@ -692,8 +722,8 @@
\multicolumn{2}{|c|}{1110101} &
\multicolumn{1}{c|}{xa} &
\multicolumn{1}{c|}{xb} &
-\multicolumn{4}{c|}{0010000100} &
-\multicolumn{1}{c|}{xc} & DIV xc,xb,xa \\
+\multicolumn{4}{c|}{0010000000} &
+\multicolumn{1}{c|}{xc} & MUL xc,xb,xa \\
\cline{2-10}
@@ -701,8 +731,8 @@
\multicolumn{2}{|c|}{1110101} &
\multicolumn{1}{c|}{xa} &
\multicolumn{1}{c|}{xb} &
-\multicolumn{4}{c|}{0010000101} &
-\multicolumn{1}{c|}{xc} & DIVU xc,xb,xa \\
+\multicolumn{4}{c|}{0010000010} &
+\multicolumn{1}{c|}{xc} & MULH xc,xb,xa \\
\cline{2-10}
@@ -710,8 +740,8 @@
\multicolumn{2}{|c|}{1110101} &
\multicolumn{1}{c|}{xa} &
\multicolumn{1}{c|}{xb} &
-\multicolumn{4}{c|}{0010000110} &
-\multicolumn{1}{c|}{xc} & REM xc,xb,xa \\
+\multicolumn{4}{c|}{0010000011} &
+\multicolumn{1}{c|}{xc} & MULHU xc,xb,xa \\
\cline{2-10}
@@ -719,8 +749,8 @@
\multicolumn{2}{|c|}{1110101} &
\multicolumn{1}{c|}{xa} &
\multicolumn{1}{c|}{xb} &
-\multicolumn{4}{c|}{0010000111} &
-\multicolumn{1}{c|}{xc} & REMU xc,xb,xa \\
+\multicolumn{4}{c|}{0010000100} &
+\multicolumn{1}{c|}{xc} & DIV xc,xb,xa \\
\cline{2-10}
@@ -728,8 +758,8 @@
\multicolumn{2}{|c|}{1110101} &
\multicolumn{1}{c|}{xa} &
\multicolumn{1}{c|}{xb} &
-\multicolumn{4}{c|}{1000000001} &
-\multicolumn{1}{c|}{xc} & SLLV xc,xb,xa \\
+\multicolumn{4}{c|}{0010000101} &
+\multicolumn{1}{c|}{xc} & DIVU xc,xb,xa \\
\cline{2-10}
@@ -737,8 +767,8 @@
\multicolumn{2}{|c|}{1110101} &
\multicolumn{1}{c|}{xa} &
\multicolumn{1}{c|}{xb} &
-\multicolumn{4}{c|}{1000000010} &
-\multicolumn{1}{c|}{xc} & SRLV xc,xb,xa \\
+\multicolumn{4}{c|}{0010000110} &
+\multicolumn{1}{c|}{xc} & REM xc,xb,xa \\
\cline{2-10}
@@ -746,54 +776,57 @@
\multicolumn{2}{|c|}{1110101} &
\multicolumn{1}{c|}{xa} &
\multicolumn{1}{c|}{xb} &
-\multicolumn{4}{c|}{1000000011} &
-\multicolumn{1}{c|}{xc} & SRAV xc,xb,xa \\
+\multicolumn{4}{c|}{0010000111} &
+\multicolumn{1}{c|}{xc} & REMU xc,xb,xa \\
\cline{2-10}
&
-\multicolumn{2}{|c|}{1110101} &
-\multicolumn{1}{c|}{00000} &
-\multicolumn{1}{c|}{xb} &
-\multicolumn{2}{c|}{1010} &
-\multicolumn{2}{c|}{shamt} &
-\multicolumn{1}{c|}{xc} & SLL xc,xb,shamt \\
+\multicolumn{9}{c}{} & \\
+&
+\multicolumn{9}{c}{\bf 32-bit Integer Compute Instructions} & \\
\cline{2-10}
&
-\multicolumn{2}{|c|}{1110101} &
-\multicolumn{1}{c|}{00000} &
+\multicolumn{2}{|c|}{1110110} &
+\multicolumn{1}{c|}{xa} &
\multicolumn{1}{c|}{xb} &
-\multicolumn{2}{c|}{1100} &
-\multicolumn{2}{c|}{shamt} &
-\multicolumn{1}{c|}{xc} & SRL xc,xb,shamt \\
+\multicolumn{1}{c|}{000} &
+\multicolumn{4}{c|}{imm} & ADDIW xa,xb,imm \\
\cline{2-10}
&
-\multicolumn{2}{|c|}{1110101} &
+\multicolumn{2}{|c|}{1110110} &
\multicolumn{1}{c|}{00000} &
\multicolumn{1}{c|}{xb} &
\multicolumn{2}{c|}{1110} &
-\multicolumn{2}{c|}{shamt} &
-\multicolumn{1}{c|}{xc} & SRA xc,xb,shamt \\
+\multicolumn{1}{c|}{0} &
+\multicolumn{1}{c|}{shamtw} &
+\multicolumn{1}{c|}{00000} & SLLIW xa,xb,shamtw \\
\cline{2-10}
&
-\multicolumn{9}{c}{} & \\
-&
-\multicolumn{9}{c}{\bf 32-bit Integer Compute Instructions} & \\
+\multicolumn{2}{|c|}{1110110} &
+\multicolumn{1}{c|}{00000} &
+\multicolumn{1}{c|}{xb} &
+\multicolumn{2}{c|}{1110} &
+\multicolumn{1}{c|}{0} &
+\multicolumn{1}{c|}{shamtw} &
+\multicolumn{1}{c|}{00000} & SRLIW xa,xb,shamtw \\
\cline{2-10}
&
\multicolumn{2}{|c|}{1110110} &
-\multicolumn{1}{c|}{xa} &
+\multicolumn{1}{c|}{00000} &
\multicolumn{1}{c|}{xb} &
-\multicolumn{1}{c|}{000} &
-\multicolumn{4}{c|}{imm} & ADDIW xa,xb,imm \\
+\multicolumn{2}{c|}{1110} &
+\multicolumn{1}{c|}{0} &
+\multicolumn{1}{c|}{shamtw} &
+\multicolumn{1}{c|}{00000} & SRAIW xa,xb,shamtw \\
\cline{2-10}
@@ -819,8 +852,8 @@
\multicolumn{2}{|c|}{1110111} &
\multicolumn{1}{c|}{xa} &
\multicolumn{1}{c|}{xb} &
-\multicolumn{4}{c|}{0010000000} &
-\multicolumn{1}{c|}{xc} & MULW xc,xb,xa \\
+\multicolumn{4}{c|}{1110000010} &
+\multicolumn{1}{c|}{xc} & SLLVW xc,xb,xa \\
\cline{2-10}
@@ -828,8 +861,8 @@
\multicolumn{2}{|c|}{1110111} &
\multicolumn{1}{c|}{xa} &
\multicolumn{1}{c|}{xb} &
-\multicolumn{4}{c|}{0010000010} &
-\multicolumn{1}{c|}{xc} & MULHW xc,xb,xa \\
+\multicolumn{4}{c|}{1110000100} &
+\multicolumn{1}{c|}{xc} & SRLVW xc,xb,xa \\
\cline{2-10}
@@ -837,8 +870,8 @@
\multicolumn{2}{|c|}{1110111} &
\multicolumn{1}{c|}{xa} &
\multicolumn{1}{c|}{xb} &
-\multicolumn{4}{c|}{0010000011} &
-\multicolumn{1}{c|}{xc} & MULHUW xc,xb,xa \\
+\multicolumn{4}{c|}{1110000110} &
+\multicolumn{1}{c|}{xc} & SRAVW xc,xb,xa \\
\cline{2-10}
@@ -846,8 +879,8 @@
\multicolumn{2}{|c|}{1110111} &
\multicolumn{1}{c|}{xa} &
\multicolumn{1}{c|}{xb} &
-\multicolumn{4}{c|}{0010000100} &
-\multicolumn{1}{c|}{xc} & DIVW xc,xb,xa \\
+\multicolumn{4}{c|}{0010000000} &
+\multicolumn{1}{c|}{xc} & MULW xc,xb,xa \\
\cline{2-10}
@@ -855,8 +888,8 @@
\multicolumn{2}{|c|}{1110111} &
\multicolumn{1}{c|}{xa} &
\multicolumn{1}{c|}{xb} &
-\multicolumn{4}{c|}{0010000101} &
-\multicolumn{1}{c|}{xc} & DIVUW xc,xb,xa \\
+\multicolumn{4}{c|}{0010000010} &
+\multicolumn{1}{c|}{xc} & MULHW xc,xb,xa \\
\cline{2-10}
@@ -864,8 +897,8 @@
\multicolumn{2}{|c|}{1110111} &
\multicolumn{1}{c|}{xa} &
\multicolumn{1}{c|}{xb} &
-\multicolumn{4}{c|}{0010000110} &
-\multicolumn{1}{c|}{xc} & REMW xc,xb,xa \\
+\multicolumn{4}{c|}{0010000011} &
+\multicolumn{1}{c|}{xc} & MULHUW xc,xb,xa \\
\cline{2-10}
@@ -873,8 +906,8 @@
\multicolumn{2}{|c|}{1110111} &
\multicolumn{1}{c|}{xa} &
\multicolumn{1}{c|}{xb} &
-\multicolumn{4}{c|}{0010000111} &
-\multicolumn{1}{c|}{xc} & REMUW xc,xb,xa \\
+\multicolumn{4}{c|}{0010000100} &
+\multicolumn{1}{c|}{xc} & DIVW xc,xb,xa \\
\cline{2-10}
@@ -882,8 +915,8 @@
\multicolumn{2}{|c|}{1110111} &
\multicolumn{1}{c|}{xa} &
\multicolumn{1}{c|}{xb} &
-\multicolumn{4}{c|}{1000000001} &
-\multicolumn{1}{c|}{xc} & SLLVW xc,xb,xa \\
+\multicolumn{4}{c|}{0010000101} &
+\multicolumn{1}{c|}{xc} & DIVUW xc,xb,xa \\
\cline{2-10}
@@ -891,8 +924,8 @@
\multicolumn{2}{|c|}{1110111} &
\multicolumn{1}{c|}{xa} &
\multicolumn{1}{c|}{xb} &
-\multicolumn{4}{c|}{1000000010} &
-\multicolumn{1}{c|}{xc} & SRLVW xc,xb,xa \\
+\multicolumn{4}{c|}{0010000110} &
+\multicolumn{1}{c|}{xc} & REMW xc,xb,xa \\
\cline{2-10}
@@ -900,41 +933,8 @@
\multicolumn{2}{|c|}{1110111} &
\multicolumn{1}{c|}{xa} &
\multicolumn{1}{c|}{xb} &
-\multicolumn{4}{c|}{1000000011} &
-\multicolumn{1}{c|}{xc} & SRAVW xc,xb,xa \\
-\cline{2-10}
-
-
-&
-\multicolumn{2}{|c|}{1110111} &
-\multicolumn{1}{c|}{00000} &
-\multicolumn{1}{c|}{xb} &
-\multicolumn{2}{c|}{1010} &
-\multicolumn{1}{c|}{0} &
-\multicolumn{1}{c|}{shamtw} &
-\multicolumn{1}{c|}{xc} & SLLW xc,xb,shamtw \\
-\cline{2-10}
-
-
-&
-\multicolumn{2}{|c|}{1110111} &
-\multicolumn{1}{c|}{00000} &
-\multicolumn{1}{c|}{xb} &
-\multicolumn{2}{c|}{1100} &
-\multicolumn{1}{c|}{0} &
-\multicolumn{1}{c|}{shamtw} &
-\multicolumn{1}{c|}{xc} & SRLW xc,xb,shamtw \\
-\cline{2-10}
-
-
-&
-\multicolumn{2}{|c|}{1110111} &
-\multicolumn{1}{c|}{00000} &
-\multicolumn{1}{c|}{xb} &
-\multicolumn{2}{c|}{1110} &
-\multicolumn{1}{c|}{0} &
-\multicolumn{1}{c|}{shamtw} &
-\multicolumn{1}{c|}{xc} & SRAW xc,xb,shamtw \\
+\multicolumn{4}{c|}{0010000111} &
+\multicolumn{1}{c|}{xc} & REMUW xc,xb,xa \\
\cline{2-10}
diff --git a/opcodes b/opcodes
index 7da2f48..44cab0c 100644
--- a/opcodes
+++ b/opcodes
@@ -21,11 +21,14 @@ ble 31..25=0x73 14..12=4 xa xb imm
bleu 31..25=0x73 14..12=5 xa xb imm
addi 31..25=0x74 14..12=0 xa xb imm
-slti 31..25=0x74 14..12=1 xa xb imm
-sltiu 31..25=0x74 14..12=2 xa xb imm
-andi 31..25=0x74 14..12=3 xa xb imm
-ori 31..25=0x74 14..12=4 xa xb imm
-xori 31..25=0x74 14..12=5 xa xb imm
+slti 31..25=0x74 14..12=2 xa xb imm
+sltiu 31..25=0x74 14..12=3 xa xb imm
+andi 31..25=0x74 14..12=4 xa xb imm
+ori 31..25=0x74 14..12=5 xa xb imm
+xori 31..25=0x74 14..12=6 xa xb imm
+slli 31..25=0x74 14..12=7 11..6=1 xa xb shamt
+srli 31..25=0x74 14..12=7 11..6=2 xa xb shamt
+srai 31..25=0x74 14..12=7 11..6=3 xa xb shamt
add 31..25=0x75 14..12=0 11..5=0 xc xb xa
sub 31..25=0x75 14..12=0 11..5=1 xc xb xa
@@ -35,6 +38,9 @@ and 31..25=0x75 14..12=0 11..5=4 xc xb xa
or 31..25=0x75 14..12=0 11..5=5 xc xb xa
xor 31..25=0x75 14..12=0 11..5=6 xc xb xa
nor 31..25=0x75 14..12=0 11..5=7 xc xb xa
+sllv 31..25=0x75 14..12=7 11..6=1 5=0 xc xb xa
+srlv 31..25=0x75 14..12=7 11..6=2 5=0 xc xb xa
+srav 31..25=0x75 14..12=7 11..6=3 5=0 xc xb xa
mul 31..25=0x75 14..12=1 11..5=0 xc xb xa
mulh 31..25=0x75 14..12=1 11..5=2 xc xb xa
@@ -44,17 +50,18 @@ divu 31..25=0x75 14..12=1 11..5=5 xc xb xa
rem 31..25=0x75 14..12=1 11..5=6 xc xb xa
remu 31..25=0x75 14..12=1 11..5=7 xc xb xa
-sllv 31..25=0x75 14..12=4 11..5=1 xc xb xa
-srlv 31..25=0x75 14..12=4 11..5=2 xc xb xa
-srav 31..25=0x75 14..12=4 11..5=3 xc xb xa
-sll 31..25=0x75 14..12=5 11=0 24..20=0 xc xb shamt
-srl 31..25=0x75 14..12=6 11=0 24..20=0 xc xb shamt
-sra 31..25=0x75 14..12=7 11=0 24..20=0 xc xb shamt
+
addiw 31..25=0x76 14..12=0 xa xb imm
+slliw 31..25=0x76 14..12=7 11..6=1 5=0 xa xb shamtw
+srliw 31..25=0x76 14..12=7 11..6=2 5=0 xa xb shamtw
+sraiw 31..25=0x76 14..12=7 11..6=3 5=0 xa xb shamtw
addw 31..25=0x77 14..12=0 11..5=0 xc xb xa
subw 31..25=0x77 14..12=0 11..5=1 xc xb xa
+sllvw 31..25=0x77 14..12=7 11..6=1 5=0 xc xb xa
+srlvw 31..25=0x77 14..12=7 11..6=2 5=0 xc xb xa
+sravw 31..25=0x77 14..12=7 11..6=3 5=0 xc xb xa
mulw 31..25=0x77 14..12=1 11..5=0 xc xb xa
mulhw 31..25=0x77 14..12=1 11..5=2 xc xb xa
@@ -64,13 +71,6 @@ divuw 31..25=0x77 14..12=1 11..5=5 xc xb xa
remw 31..25=0x77 14..12=1 11..5=6 xc xb xa
remuw 31..25=0x77 14..12=1 11..5=7 xc xb xa
-sllvw 31..25=0x77 14..12=4 11..5=1 xc xb xa
-srlvw 31..25=0x77 14..12=4 11..5=2 xc xb xa
-sravw 31..25=0x77 14..12=4 11..5=3 xc xb xa
-sllw 31..25=0x77 14..12=5 11..10=0 24..20=0 xc xb shamtw
-srlw 31..25=0x77 14..12=6 11..10=0 24..20=0 xc xb shamtw
-sraw 31..25=0x77 14..12=7 11..10=0 24..20=0 xc xb shamtw
-
lb 31..25=0x78 14..12=0 xa xb imm
lh 31..25=0x78 14..12=1 xa xb imm
lw 31..25=0x78 14..12=2 xa xb imm
diff --git a/parse-opcodes b/parse-opcodes
index ccf49b5..4e56615 100755
--- a/parse-opcodes
+++ b/parse-opcodes
@@ -21,8 +21,8 @@ arglut['fd'] = (9,5)
arglut['imm27'] = (26,0)
arglut['imm20'] = (19,0)
arglut['imm'] = (11,0)
-arglut['shamt'] = (10,5)
-arglut['shamtw'] = (9,5)
+arglut['shamt'] = (5,0)
+arglut['shamtw'] = (4,0)
typelut = {} # 0=unimp,1=j,2=lui,3=imm,4=r,5=r4,6=rsh,7=rshw
typelut[0x00] = 0