Commit d04bfcc2 authored by George Hotz's avatar George Hotz

55 instructions

parent 8c7e6222
......@@ -12,3 +12,6 @@ cartesi also has a second version of the emulator in Rust. we use the EVM one in
Tests from https://github.com/grantae/OpenMIPS/tree/master/software/test/macro/tests
Licensed GPLv3
Instruction set used by minigeth, 55 instructions:
['addi', 'addiu', 'addu', 'and', 'andi', 'b', 'beq', 'beqz', 'bgez', 'bgtz', 'blez', 'bltz', 'bne', 'bnez', 'clz', 'divu', 'j', 'jal', 'jalr', 'jr', 'lb', 'lbu', 'lui', 'lw', 'lwr', 'mfhi', 'mflo', 'move', 'movn', 'movz', 'mtlo', 'mul', 'multu', 'negu', 'nop', 'not', 'or', 'ori', 'sb', 'sll', 'sllv', 'slt', 'slti', 'sltiu', 'sltu', 'sra', 'srl', 'srlv', 'subu', 'sw', 'swr', 'sync', 'syscall', 'xor', 'xori']
......@@ -39,6 +39,7 @@ bcount = 0
instrumenting = False
instrumenting_all = False
instructions_seen = set()
def hook_code_simple(uc, address, size, user_data):
global icount, bcount
#assert size == 4
......@@ -49,6 +50,8 @@ def hook_code_simple(uc, address, size, user_data):
dat = next(md.disasm(uc.mem_read(address, size), address))
else:
dat = "EMPTY BASIC BLOCK?!?"
#instructions_seen.add(dat.mnemonic)
#print(sorted(list(instructions_seen)))
print("%10d(%2d): %8x %-80s %s" % (icount, newicount, address, r[address], dat))
icount += newicount
bcount += 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment