Page MenuHomePhabricator

Add TargetLoweringInfo hook for explicitly setting the ABI calling convention endianess

Authored by dylanmckay on May 16 2019, 5:06 AM.



The endianess used in the calling convention does not always match the
endianess of the target on all architectures, namely AVR.

When an argument is too large to be legalised by the architecture and is
split for the ABI, a new hook TargetLoweringInfo::shouldSplitFunctionArgumentsAsLittleEndian
is queried to find the endianess that function arguments must be laid
out in.

This approach was recommended by Eli Friedman.

Originally reported in

Patch by Carl Peto.

Diff Detail


Event Timeline

dylanmckay created this revision.May 16 2019, 5:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 16 2019, 5:06 AM
efriedma accepted this revision.May 20 2019, 12:58 PM


3541 ↗(On Diff #199792)

Maybe "for some calls"; this applies to basically all targets.

This revision is now accepted and ready to land.May 20 2019, 12:58 PM
dylanmckay marked an inline comment as done.May 20 2019, 10:44 PM

Thanks heaps for the quick turnaround @efriedma, I will amend the comment as I commit this patch.

3541 ↗(On Diff #199792)

Good point, I will amend this as I commit it.

This revision was automatically updated to reflect the committed changes.