future-proof alignment detection

This commit is contained in:
Daniel Wagner 2018-06-12 14:18:19 -04:00
parent 082e024b55
commit 04e867bf4b

View File

@ -182,6 +182,12 @@ instance MC.IPAlignment PPC64.PPC where
, MC.BVValue _ 2 <- two'
= Just dirtyAddr
| Just (MC.BVAnd _ dirtyAddr (MC.BVValue _ 0xfffffffffffffffc)) <- MC.valueAsApp cleanAddr
= Just dirtyAddr
| Just (MC.BVAnd _ (MC.BVValue _ 0xfffffffffffffffc) dirtyAddr) <- MC.valueAsApp cleanAddr
= Just dirtyAddr
| otherwise = Nothing
where
valueAsExtTwo :: MC.BVValue PPC64.PPC ids 64 -> Maybe (MC.BVValue PPC64.PPC ids 62)