mirror of
https://github.com/GaloisInc/macaw.git
synced 2024-11-27 12:52:52 +03:00
[ppc] Add preliminary support for popcount
It isn't supported in SimpleBuilder, so we use an uninterpreted function in the formula language for now.
This commit is contained in:
parent
bbd00f7ef2
commit
2002afa246
@ -468,6 +468,20 @@ evalNonceAppTH bvi nonceApp =
|
||||
addExpr (AppExpr (M.Bsr (NR.knownNat @64) locExp))
|
||||
|]
|
||||
_ -> fail ("Unsupported argument list for clz: " ++ showF args)
|
||||
"popcnt_32" ->
|
||||
case FC.toListFC Some args of
|
||||
[Some loc] -> do
|
||||
[| do locExp <- $(addEltTH bvi loc)
|
||||
addExpr (AppExpr (M.PopCount (NR.knownNat @32) locExp))
|
||||
|]
|
||||
_ -> fail ("Unsupported argument list for popcnt: " ++ showF args)
|
||||
"popcnt_64" ->
|
||||
case FC.toListFC Some args of
|
||||
[Some loc] -> do
|
||||
[| do locExp <- $(addEltTH bvi loc)
|
||||
addExpr (AppExpr (M.PopCount (NR.knownNat @64) locExp))
|
||||
|]
|
||||
_ -> fail ("Unsupported argument list for popcnt: " ++ showF args)
|
||||
_ | Just nBytes <- readMemBytes fnName -> do
|
||||
case FC.toListFC Some args of
|
||||
[_, Some addrElt] -> do
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 2e5ce7f6797466c09cd9e5799a351aaa16016a12
|
||||
Subproject commit cef6197ed5a53b22f41a9c7961689543b9dd8f1c
|
Loading…
Reference in New Issue
Block a user