This is an archive of the discontinued LLVM Phabricator instance.

Fix left shifts of negative integers in AArch64 InstPrinter/Disassembler
ClosedPublic

Authored by samsonov on Aug 29 2014, 3:25 PM.

Details

Summary

Left shift of negative integer is an undefined behavior, and
is reported by UBSan. It's ok for imm values to be negative, so we can
just replace left shifts with multiplications.

Diff Detail

Event Timeline

samsonov updated this revision to Diff 13117.Aug 29 2014, 3:25 PM
samsonov retitled this revision from to Fix left shifts of negative integers in AArch64 InstPrinter/Disassembler.
samsonov updated this object.
samsonov edited the test plan for this revision. (Show Details)
samsonov added a reviewer: t.p.northover.
samsonov added a subscriber: Unknown Object (MLST).
t.p.northover accepted this revision.Sep 1 2014, 2:21 AM
t.p.northover edited edge metadata.

Hi Alexey,

Looks reasonable to me. Thanks for doing this!

Tim.

This revision is now accepted and ready to land.Sep 1 2014, 2:21 AM
samsonov closed this revision.Sep 2 2014, 9:29 AM