Commit acd35444 authored by George Hotz's avatar George Hotz

add test run of test.bin

parent d34531cd
......@@ -15,9 +15,8 @@ jobs:
sudo apt-get -y --no-install-recommends install golang-1.16 nodejs npm
- name: Install unicorn
run: |
curl -LO https://github.com/unicorn-engine/unicorn/archive/1.0.3.tar.gz
tar xf 1.0.3.tar.gz
cd unicorn-1.0.3
git clone https://github.com/geohot/unicorn.git
cd unicorn
UNICORN_ARCHS=mips make -j8
sudo UNICORN_ARCHS=mips make install
- name: Install yarn
......@@ -26,3 +25,5 @@ jobs:
yarn install
- name: Test MIPS on EVM
run: cd mipsevm && ./evm.sh
- name: Compare test.bin run on EVM/unicorn
run: cd mipsevm && go test
#!/bin/bash
git clone https://github.com/geohot/unicorn.git -b dev
git clone https://github.com/geohot/unicorn.git
cd unicorn
UNICORN_ARCHS=mips make -j8
UNICORN_ARCHS=mips make -j8
......
__pycache__
go-ethereum
sysroot
test
test.bin
test/test
minigeth
minigeth.bin
......@@ -10,8 +10,9 @@ import (
)
func RegSerialize(ram map[uint32](uint32)) []uint32 {
ret := []uint32{ram[0xc0000080], ram[0xc00000A0], uint32(len(ram))}
for i := uint32(0xc0000000); i < 0xc0000000+37*4; i += 4 {
ret := []uint32{ram[0xc0000080], uint32(len(ram))}
// 36 registers, 32 basic + pc + hi/lo + heap
for i := uint32(0xc0000000); i < 0xc0000000+36*4; i += 4 {
ret = append(ret, ram[i])
}
return ret
......
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