Page MenuHomePhabricator

[ARM] prologue instructions emitted for naked function with >64 byte argument
ClosedPublic

Authored by simonwallis2 on May 28 2020, 5:42 AM.

Details

Summary

The naked function attribute is meant to suppress all function
prologue/epilogue instructions.

On ARM, some are still emitted if an argument greater than 64 bytes in size
(the threshold for using the byval attribute in IR) is passed partially
in registers.

Perform the check for Attribute::Naked and early exit in
SelectionDAGISel::LowerArguments().

Checking in ARMFrameLowering::determineCalleeSaves() is too late.

A test case is included.

Diff Detail

Event Timeline

simonwallis2 created this revision.May 28 2020, 5:42 AM
This revision is now accepted and ready to land.Jun 4 2020, 12:31 PM
This revision was automatically updated to reflect the committed changes.