This is an archive of the discontinued LLVM Phabricator instance.

[M68k] Tidy up some bit shifting during code emission
ClosedPublic

Authored by ricky26 on Mar 12 2021, 9:43 AM.

Details

Summary

This fixes some issues with bit masking when emitting instructions
(including one TODO).

Diff Detail

Event Timeline

ricky26 created this revision.Mar 12 2021, 9:43 AM
ricky26 requested review of this revision.Mar 12 2021, 9:43 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 12 2021, 9:43 AM
RKSimon added a subscriber: RKSimon.
RKSimon added inline comments.
llvm/lib/Target/M68k/MCTargetDesc/M68kMCCodeEmitter.cpp
183–184

1ULL << Size ?

315

Should this be 1ULL << Size? Otherwise some compilers will warn that that you're extending a 32-bit result to 64-bits.

ricky26 updated this revision to Diff 330355.Mar 12 2021, 1:25 PM

Fixed implicit 32-bit shifts (they are now explicitly 64-bits)

ricky26 marked 2 inline comments as done.Mar 12 2021, 1:26 PM
RKSimon accepted this revision.Mar 13 2021, 4:36 AM

LGTM

This revision is now accepted and ready to land.Mar 13 2021, 4:36 AM
This revision was landed with ongoing or failed builds.Mar 14 2021, 11:54 AM
This revision was automatically updated to reflect the committed changes.