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
d04bfcc2
Commit
d04bfcc2
authored
Sep 27, 2021
by
George Hotz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
55 instructions
parent
8c7e6222
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
README
mipsevm/README
+3
-0
run.py
risc/run.py
+3
-0
No files found.
mipsevm/README
View file @
d04bfcc2
...
...
@@ -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']
risc/run.py
View file @
d04bfcc2
...
...
@@ -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
(
"
%10
d(
%2
d):
%8
x
%-80
s
%
s"
%
(
icount
,
newicount
,
address
,
r
[
address
],
dat
))
icount
+=
newicount
bcount
+=
1
...
...
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