mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-23 03:45:39 +00:00
[haskell-bindings] Fixed ARM THUMB sample as per issue #638
This commit is contained in:
parent
fb4dc10fe9
commit
65f1e4d550
|
@ -4,6 +4,7 @@ import Unicorn
|
||||||
import Unicorn.Hook
|
import Unicorn.Hook
|
||||||
import qualified Unicorn.CPU.Arm as Arm
|
import qualified Unicorn.CPU.Arm as Arm
|
||||||
|
|
||||||
|
import Data.Bits
|
||||||
import qualified Data.ByteString as BS
|
import qualified Data.ByteString as BS
|
||||||
import Data.Word
|
import Data.Word
|
||||||
import qualified Numeric as N (showHex)
|
import qualified Numeric as N (showHex)
|
||||||
|
@ -112,7 +113,7 @@ testThumb = do
|
||||||
-- Emulate machine code in infinite time (last param = Nothing), or
|
-- Emulate machine code in infinite time (last param = Nothing), or
|
||||||
-- when finishing all the code
|
-- when finishing all the code
|
||||||
let codeLen = codeLength thumbCode
|
let codeLen = codeLength thumbCode
|
||||||
start uc address (address + codeLen) Nothing Nothing
|
start uc (address .|. 1) (address + codeLen) Nothing Nothing
|
||||||
|
|
||||||
-- Return the results
|
-- Return the results
|
||||||
sp <- regRead uc Arm.Sp
|
sp <- regRead uc Arm.Sp
|
||||||
|
|
Loading…
Reference in a new issue