mirror of
https://github.com/GaloisInc/macaw.git
synced 2024-12-28 08:34:23 +03:00
Update macaw-arm and macaw-ppc to emit extra metadata
There is a new metadata statement that tracks the start address of each instruction. This is used in the translation to Crucible to provide better error messages. The x86 backend was already updated, this commit adds the metadata to the ARM and PowerPC backends.
This commit is contained in:
parent
95091a5fb3
commit
30b5d2e091
@ -201,6 +201,8 @@ disassembleBlock lookupSemantics gs curPCAddr maxOffset = do
|
||||
let lineStr = printf "%s: %s" (show curPCAddr) (show (case i of
|
||||
A32I i' -> ARMD.ppInstruction i'
|
||||
T32I i' -> ThumbD.ppInstruction i'))
|
||||
let Just addrWord = MM.segoffAsAbsoluteAddr curPCAddr
|
||||
addStmt (InstructionStart addrWord (T.pack lineStr))
|
||||
addStmt (Comment (T.pack lineStr))
|
||||
asAtomicStateUpdate (MM.relativeSegmentAddr curPCAddr) transformer
|
||||
|
||||
|
@ -136,6 +136,8 @@ disassembleBlock lookupSemantics gs curIPAddr maxOffset = do
|
||||
-- a result from the state of the 'Generator'.
|
||||
egs1 <- liftST $ ET.runExceptT (runGenerator genResult gs $ do
|
||||
let lineStr = printf "%s: %s" (show curIPAddr) (show (D.ppInstruction i))
|
||||
let Just addrWord = MM.segoffAsAbsoluteAddr curIPAddr
|
||||
addStmt (InstructionStart addrWord (T.pack lineStr))
|
||||
addStmt (Comment (T.pack lineStr))
|
||||
asAtomicStateUpdate (MM.segoffAddr curIPAddr) transformer
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user