diff options
-rwxr-xr-x | parse_opcodes | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/parse_opcodes b/parse_opcodes index 6002b01..1118e18 100755 --- a/parse_opcodes +++ b/parse_opcodes @@ -994,10 +994,10 @@ def print_go_insn(name): rs2 = yank(m, 20, 5) csr = yank(m, 20, 12) funct7 = yank(m, 25, 7) - print('\t\treturn &inst{0x%x, 0x%x, 0x%x, %d, 0x%x}, true' % (opcode, funct3, rs2, signed(csr, 12), funct7)) + print('\t\treturn &inst{0x%x, 0x%x, 0x%x, %d, 0x%x}' % (opcode, funct3, rs2, signed(csr, 12), funct7)) def make_go(): - print('// Code generated by parse_opcodes; DO NOT EDIT.') + print('// Code generated by parse_opcodes -go; DO NOT EDIT.') print() print('package riscv') print() @@ -1011,12 +1011,12 @@ def make_go(): print('\tfunct7 uint32') print('}') print() - print('func encode(a obj.As) (i *inst, ok bool) {') + print('func encode(a obj.As) *inst {') print('\tswitch a {') for name in namelist: print_go_insn(name) print('\t}') - print('\treturn nil, false') + print('\treturn nil') print('}') def make_rust(): |