Coverity reported an undefined behavior issue and UBSan showed another issue with UB.
In v3: - testing with UBSan didn't show issues at v2 but I was using gcc. clang exposes another UB bug, this one in decode_set_slot_number(). Added a patch "avoid negative slot shift" to fix that bug. Pointed out by Peter. In v2: - updated shift assertion to use `shift >= 41` instead of 3. v2: https://lore.kernel.org/qemu-devel/[email protected]/ v1: https://lore.kernel.org/qemu-devel/[email protected]/ Brian Cain (3): target/hexagon: assert qfloat shift target/hexagon: reset implicit USR write state target/hexagon: avoid negative slot shift target/hexagon/decode.c | 5 ++++- target/hexagon/mmvec/hvx_qfloat.c | 5 +++++ target/hexagon/translate.c | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) -- 2.34.1
