Added initial ARM architecture-specific evaluation function.

This commit is contained in:
Kevin Quick 2018-01-05 06:44:29 -08:00
parent b533f4a92a
commit 704c778acd
No known key found for this signature in database
GPG Key ID: E6D7733599CC0A21
2 changed files with 12 additions and 1 deletions

View File

@ -34,7 +34,7 @@ arm_linux_info =
, MI.jumpTableEntrySize = 0 -- undefined -- jumpTableEntrySize proxy
, MI.disassembleFn = disassembleFn proxy ARMSem.execInstruction
, MI.mkInitialAbsState = mkInitialAbsState proxy
, MI.absEvalArchFn = undefined -- absEvalArchFn proxy
, MI.absEvalArchFn = absEvalArchFn proxy
, MI.absEvalArchStmt = undefined -- absEvalArchStmt proxy
, MI.postCallAbsState = undefined -- postCallAbsState proxy
, MI.identifyCall = undefined -- identifyCall proxy

View File

@ -8,6 +8,7 @@
module Data.Macaw.ARM.Eval
( mkInitialAbsState
, absEvalArchFn
)
where
@ -31,3 +32,13 @@ mkInitialAbsState :: (ARMArchConstraints arm, ArchStmt arm ~ ARMStmt)
-> MA.AbsBlockState (ArchReg arm)
mkInitialAbsState _ _mem startAddr =
MA.top & MA.setAbsIP startAddr
absEvalArchFn :: (ARMArchConstraints arm)
=> proxy arm
-> AbsProcessorState (ArchReg arm) ids
-> ArchFn arm (Value arm ids) tp
-> AbsValue (RegAddrWidth (ArchReg arm)) tp
absEvalArchFn _ _r f =
case f of
NoPrimKnown _rhs -> MA.TopV