Commit 06d0151c authored by protolambda's avatar protolambda

mipsevm: RunUnicorn helper func

parent 07a7b4d3
...@@ -136,6 +136,13 @@ func HookUnicorn(st *State, mu uc.Unicorn, stdOut, stdErr io.Writer) error { ...@@ -136,6 +136,13 @@ func HookUnicorn(st *State, mu uc.Unicorn, stdOut, stdErr io.Writer) error {
return nil return nil
} }
func RunUnicorn(mu uc.Unicorn, entrypoint uint32, steps uint64) error {
return mu.StartWithOptions(uint64(entrypoint), ^uint64(0), &uc.UcOptions{
Timeout: 0, // 0 to disable, value is in ms.
Count: steps,
})
}
func regBatchKeys() []int { func regBatchKeys() []int {
var batch []int var batch []int
for i := 0; i < 32; i++ { for i := 0; i < 32; i++ {
......
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