This is an archive of the discontinued LLVM Phabricator instance.

[M68k] Update pointer data layout
ClosedPublic

Authored by ricky26 on Aug 26 2021, 3:16 PM.

Details

Summary

Fixes PR51626.

The M68k requires that all instruction, word and long word reads are
aligned to word boundaries. From the 68020 onwards, there is a
performance benefit from aligning long words to long word boundaries.

The M68k uses the same data layout for pointers and integers.

In line with this, this commit updates the pointer data layout to
match the layout already set for 32-bit integers: 32:16:32.

Diff Detail

Event Timeline

ricky26 created this revision.Aug 26 2021, 3:16 PM
ricky26 requested review of this revision.Aug 26 2021, 3:16 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptAug 26 2021, 3:16 PM
jrtc27 accepted this revision.Aug 26 2021, 3:23 PM

Comments could perhaps be clearer about highlighting that 32-bit integers/pointers are only 16-bit aligned in the ABI as that's the weird bit, not the 32-bit preferred alignment

This revision is now accepted and ready to land.Aug 26 2021, 3:23 PM

@ricky26 Could you also get this fix backported in the LLVM fork of Rust?

This revision was landed with ongoing or failed builds.Aug 27 2021, 3:48 AM
This revision was automatically updated to reflect the committed changes.