Commit fed882d2 authored by George Hotz's avatar George Hotz

update to unicorn2

parent e4e07849
...@@ -2,4 +2,5 @@ node_modules ...@@ -2,4 +2,5 @@ node_modules
artifacts artifacts
cache cache
unicorn unicorn
unicorn2
.*.swp .*.swp
#!/bin/bash #!/bin/bash
git clone https://github.com/geohot/unicorn.git git clone https://github.com/geohot/unicorn.git -b dev unicorn2
cd unicorn cd unicorn2
UNICORN_ARCHS=mips make -j8 cmake . -DUNICORN_ARCH=mips -DCMAKE_BUILD_TYPE=Debug
UNICORN_ARCHS=mips make -j8 make -j8
...@@ -23,3 +23,5 @@ Instruction set used by minigeth, 55 instructions: ...@@ -23,3 +23,5 @@ Instruction set used by minigeth, 55 instructions:
'negu', 'nop', 'not', 'or', 'ori', 'negu', 'nop', 'not', 'or', 'ori',
'sb', 'sll', 'sllv', 'slt', 'slti', 'sltiu', 'sltu', 'sra', 'srl', 'srlv', 'subu', 'sw', 'swr', 'sync', 'syscall', 'sb', 'sll', 'sllv', 'slt', 'slti', 'sltiu', 'sltu', 'sra', 'srl', 'srlv', 'subu', 'sw', 'swr', 'sync', 'syscall',
'xor', 'xori'] 'xor', 'xori']
STEPS=100000000 ./evm.sh unicorn ../mipigo/minigeth.bin
...@@ -12,8 +12,8 @@ import ( ...@@ -12,8 +12,8 @@ import (
func LoadRam() map[uint32](uint32) { func LoadRam() map[uint32](uint32) {
ram := make(map[uint32](uint32)) ram := make(map[uint32](uint32))
fn := "../mipigo/test/test.bin" //fn := "../mipigo/test/test.bin"
//LoadMappedFile("test/bin/add.bin", ram, 0) fn := "test/bin/add.bin"
LoadMappedFile(fn, ram, 0) LoadMappedFile(fn, ram, 0)
ZeroRegisters(ram) ZeroRegisters(ram)
ram[0xC000007C] = 0x5EAD0000 ram[0xC000007C] = 0x5EAD0000
......
...@@ -3,7 +3,7 @@ module mipsevm ...@@ -3,7 +3,7 @@ module mipsevm
go 1.17 go 1.17
replace github.com/ethereum/go-ethereum => ../minigeth replace github.com/ethereum/go-ethereum => ../minigeth
replace github.com/unicorn-engine/unicorn => ../unicorn replace github.com/unicorn-engine/unicorn => ../unicorn2
require ( require (
github.com/btcsuite/btcd v0.22.0-beta // indirect github.com/btcsuite/btcd v0.22.0-beta // indirect
......
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