summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Andrew Waterman <waterman@eecs.berkeley.edu>2014-01-13 16:25:55 -0800
committerGravatar Andrew Waterman <waterman@eecs.berkeley.edu>2014-01-13 16:25:55 -0800
commitd372a0e5a897f499178c38851e17c3bd82e672c1 (patch)
tree0ba953391d6426a853bc65593491a16840c21f21
parenta80067441555d749160d2bcc5362604c4ee91395 (diff)
swap JAL/JALR again
-rw-r--r--inst.chisel4
-rw-r--r--instr-table.tex4
-rw-r--r--opcodes10
3 files changed, 9 insertions, 9 deletions
diff --git a/inst.chisel b/inst.chisel
index 0b68a65..a805101 100644
--- a/inst.chisel
+++ b/inst.chisel
@@ -1,13 +1,13 @@
/* Automatically generated by parse-opcodes */
object Instructions {
- def JAL = Bits("b?????????????????????????1100111")
- def JALR = Bits("b?????????????????000?????1101111")
def BEQ = Bits("b?????????????????000?????1100011")
def BNE = Bits("b?????????????????001?????1100011")
def BLT = Bits("b?????????????????100?????1100011")
def BGE = Bits("b?????????????????101?????1100011")
def BLTU = Bits("b?????????????????110?????1100011")
def BGEU = Bits("b?????????????????111?????1100011")
+ def JALR = Bits("b?????????????????000?????1100111")
+ def JAL = Bits("b?????????????????????????1101111")
def LUI = Bits("b?????????????????????????0110111")
def AUIPC = Bits("b?????????????????????????0010111")
def ADDI = Bits("b?????????????????000?????0010011")
diff --git a/instr-table.tex b/instr-table.tex
index 8439617..64e379e 100644
--- a/instr-table.tex
+++ b/instr-table.tex
@@ -97,7 +97,7 @@
&
\multicolumn{8}{|c|}{imm[20$\vert$10:1$\vert$11$\vert$19:12]} &
\multicolumn{1}{c|}{rd} &
-\multicolumn{1}{c|}{1100111} & JAL rd,imm \\
+\multicolumn{1}{c|}{1101111} & JAL rd,imm \\
\cline{2-11}
@@ -106,7 +106,7 @@
\multicolumn{1}{c|}{rs1} &
\multicolumn{1}{c|}{000} &
\multicolumn{1}{c|}{rd} &
-\multicolumn{1}{c|}{1101111} & JALR rd,rs1,imm \\
+\multicolumn{1}{c|}{1100111} & JALR rd,rs1,imm \\
\cline{2-11}
diff --git a/opcodes b/opcodes
index 53b1ce8..f6b7f8f 100644
--- a/opcodes
+++ b/opcodes
@@ -4,13 +4,9 @@
# <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,
+# <args> is one of rd, rs1, rs2, rs3, imm20, imm12, imm12lo, imm12hi,
# shamtw, shamt, rm
-jal rd jimm20 6..2=0x19 1..0=3
-
-jalr rd rs1 imm12 14..12=0 6..2=0x1b 1..0=3
-
beq bimm12hi rs1 rs2 bimm12lo 14..12=0 6..2=0x18 1..0=3
bne bimm12hi rs1 rs2 bimm12lo 14..12=1 6..2=0x18 1..0=3
blt bimm12hi rs1 rs2 bimm12lo 14..12=4 6..2=0x18 1..0=3
@@ -18,6 +14,10 @@ bge bimm12hi rs1 rs2 bimm12lo 14..12=5 6..2=0x18 1..0=3
bltu bimm12hi rs1 rs2 bimm12lo 14..12=6 6..2=0x18 1..0=3
bgeu bimm12hi rs1 rs2 bimm12lo 14..12=7 6..2=0x18 1..0=3
+jalr rd rs1 imm12 14..12=0 6..2=0x19 1..0=3
+
+jal rd jimm20 6..2=0x1b 1..0=3
+
lui rd imm20 6..2=0x0D 1..0=3
auipc rd imm20 6..2=0x05 1..0=3