Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
acd35444
Commit
acd35444
authored
Oct 12, 2021
by
George Hotz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add test run of test.bin
parent
d34531cd
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
8 deletions
+9
-8
test_evm.yml
.github/workflows/test_evm.yml
+4
-3
build_unicorn.sh
build_unicorn.sh
+1
-1
.gitignore
mipigo/.gitignore
+1
-2
test.bin
mipigo/test/test.bin
+0
-0
compare_test.go
mipsevm/compare_test.go
+3
-2
No files found.
.github/workflows/test_evm.yml
View file @
acd35444
...
@@ -15,9 +15,8 @@ jobs:
...
@@ -15,9 +15,8 @@ jobs:
sudo apt-get -y --no-install-recommends install golang-1.16 nodejs npm
sudo apt-get -y --no-install-recommends install golang-1.16 nodejs npm
-
name
:
Install unicorn
-
name
:
Install unicorn
run
:
|
run
:
|
curl -LO https://github.com/unicorn-engine/unicorn/archive/1.0.3.tar.gz
git clone https://github.com/geohot/unicorn.git
tar xf 1.0.3.tar.gz
cd unicorn
cd unicorn-1.0.3
UNICORN_ARCHS=mips make -j8
UNICORN_ARCHS=mips make -j8
sudo UNICORN_ARCHS=mips make install
sudo UNICORN_ARCHS=mips make install
-
name
:
Install yarn
-
name
:
Install yarn
...
@@ -26,3 +25,5 @@ jobs:
...
@@ -26,3 +25,5 @@ jobs:
yarn install
yarn install
-
name
:
Test MIPS on EVM
-
name
:
Test MIPS on EVM
run
:
cd mipsevm && ./evm.sh
run
:
cd mipsevm && ./evm.sh
-
name
:
Compare test.bin run on EVM/unicorn
run
:
cd mipsevm && go test
build_unicorn.sh
View file @
acd35444
#!/bin/bash
#!/bin/bash
git clone https://github.com/geohot/unicorn.git
-b
dev
git clone https://github.com/geohot/unicorn.git
cd
unicorn
cd
unicorn
UNICORN_ARCHS
=
mips make
-j8
UNICORN_ARCHS
=
mips make
-j8
UNICORN_ARCHS
=
mips make
-j8
UNICORN_ARCHS
=
mips make
-j8
...
...
mipigo/.gitignore
View file @
acd35444
__pycache__
__pycache__
go-ethereum
go-ethereum
sysroot
sysroot
test
test/test
test.bin
minigeth
minigeth
minigeth.bin
minigeth.bin
mipigo/test/test.bin
0 → 100644
View file @
acd35444
File added
mipsevm/compare_test.go
View file @
acd35444
...
@@ -10,8 +10,9 @@ import (
...
@@ -10,8 +10,9 @@ import (
)
)
func
RegSerialize
(
ram
map
[
uint32
](
uint32
))
[]
uint32
{
func
RegSerialize
(
ram
map
[
uint32
](
uint32
))
[]
uint32
{
ret
:=
[]
uint32
{
ram
[
0xc0000080
],
ram
[
0xc00000A0
],
uint32
(
len
(
ram
))}
ret
:=
[]
uint32
{
ram
[
0xc0000080
],
uint32
(
len
(
ram
))}
for
i
:=
uint32
(
0xc0000000
);
i
<
0xc0000000
+
37
*
4
;
i
+=
4
{
// 36 registers, 32 basic + pc + hi/lo + heap
for
i
:=
uint32
(
0xc0000000
);
i
<
0xc0000000
+
36
*
4
;
i
+=
4
{
ret
=
append
(
ret
,
ram
[
i
])
ret
=
append
(
ret
,
ram
[
i
])
}
}
return
ret
return
ret
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment