Commit 54646cb4 authored by George Hotz's avatar George Hotz

first 1,000,000 steps match

parent b5ad9990
......@@ -3,6 +3,7 @@ echo "compiling"
./build.sh
COMPILE=1 ./run.py
echo "running in go"
export STEPS=1000000
$(cd ../mipsevm && DEBUG=1 ./evm.sh /tmp/minigeth.bin > /tmp/gethtrace)
echo "compare"
./simple.py
......@@ -102,10 +102,6 @@ def hook_code_simple(uc, address, size, user_data):
assert address == pc
assert size == 4
# check for BDS
# UGH! there should be a better way to do this
dat = next(md.disasm(uc.mem_read(address, size), address))
inst = struct.unpack(">I", uc.mem_read(pc, 4))[0]
regs = []
# starting at AT
......@@ -116,12 +112,14 @@ def hook_code_simple(uc, address, size, user_data):
ss = "%7d %8X %08X : " % (step, pc, inst) + rr
sgt = gtf.readline().strip("\n")
if ss != sgt:
dat = next(md.disasm(uc.mem_read(address, size), address))
print(dat)
print(colored(ss, 'green'))
print(colored(sgt, 'red'))
os._exit(0)
else:
if step % 1000 == 0:
print(ss)
print(dat)
step += 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