summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xparse-opcodes4
1 files changed, 3 insertions, 1 deletions
diff --git a/parse-opcodes b/parse-opcodes
index 0e37952..e575c1e 100755
--- a/parse-opcodes
+++ b/parse-opcodes
@@ -778,9 +778,10 @@ def print_go_insn(name):
m = match[name]
opcode = yank(m, 0, 7)
funct3 = yank(m, 12, 3)
+ rs2 = yank(m, 20, 5)
csr = yank(m, 20, 12)
funct7 = yank(m, 25, 7)
- print '\t\treturn &inst{0x%x, 0x%x, %d, 0x%x}, true' % (opcode, funct3, signed(csr, 12), funct7)
+ print '\t\treturn &inst{0x%x, 0x%x, 0x%x, %d, 0x%x}, true' % (opcode, funct3, rs2, signed(csr, 12), funct7)
def make_go():
print '// Automatically generated by parse-opcodes'
@@ -792,6 +793,7 @@ def make_go():
print 'type inst struct {'
print '\topcode uint32'
print '\tfunct3 uint32'
+ print '\trs2 uint32'
print '\tcsr int64'
print '\tfunct7 uint32'
print '}'