You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
so LLVM's cttz and ctlz intrinsics have a flag to indicate whether the behavior should be undefined when the main argument is zero.
my understanding is that arm64's clz is defined in the case of zero argument, meaning that clz should be lifted to ctlz x, false
however, anvill/remill lift clz to ctlz x, true
* New x86 instructions
* Add some isels
* Fixes Issue #376
* Fixes Issue #433. Thanks @adahsuzixin for the semantics and tests
* Fixes Issue #374
* Minor fix to the semantics for VINSERTF128, it should only look at the low bit of imm8
* Minor fixes for sparc isel naming
so LLVM's cttz and ctlz intrinsics have a flag to indicate whether the behavior should be undefined when the main argument is zero.
my understanding is that arm64's clz is defined in the case of zero argument, meaning that clz should be lifted to ctlz x, false
however, anvill/remill lift clz to ctlz x, true
in other words, this function:
expressed like this:
decompiles to this:
the ARM code is defined for argument zero whereas the LLVM code evaluates to poison in this case.
the fix is trivial: when lifting this ARM instruction, set the UB flag to false
The text was updated successfully, but these errors were encountered: