summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xparse-opcodes6
1 files changed, 3 insertions, 3 deletions
diff --git a/parse-opcodes b/parse-opcodes
index 79a1f0f..75351c5 100755
--- a/parse-opcodes
+++ b/parse-opcodes
@@ -780,7 +780,7 @@ def print_go_insn(name):
funct3 = yank(m, 12, 3)
csr = yank(m, 20, 12)
funct7 = yank(m, 25, 7)
- print '\t\treturn &inst{0x%x, 0x%x, %d, 0x%x}' % (opcode, funct3, signed(csr, 12), funct7)
+ print '\t\treturn &inst{0x%x, 0x%x, %d, 0x%x}, false' % (opcode, funct3, signed(csr, 12), funct7)
def make_go():
print '// Automatically generated by parse-opcodes'
@@ -800,13 +800,13 @@ def make_go():
print '\tfunct7 uint32'
print '}'
print
- print 'func encode(a obj.As) *inst {'
+ print 'func encode(a obj.As) (i *inst, err bool) {'
print '\tswitch a {'
for name in namelist:
print_go_insn(name)
print '\t}'
print '\tlog.Fatalf("opcode: missing %v (bug in parse-opcodes)", a)'
- print '\treturn nil'
+ print '\treturn nil, true'
print '}'
for line in sys.stdin: