This is an archive of the discontinued LLVM Phabricator instance.

[AVR] Fix wrong ABI on AVRTiny.
ClosedPublic

Authored by benshi001 on Nov 17 2022, 4:40 AM.

Details

Summary

A scalar exceeds 4 bytes should be returned via stack
other than registers, on an AVRTiny device.

Diff Detail

Event Timeline

benshi001 created this revision.Nov 17 2022, 4:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 17 2022, 4:40 AM
Herald added subscribers: Jim, hiraditya. · View Herald Transcript
benshi001 requested review of this revision.Nov 17 2022, 4:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 17 2022, 4:40 AM
benshi001 added inline comments.Nov 17 2022, 4:42 AM
llvm/test/CodeGen/AVR/return.ll
96

This case clearly shows that an i32 value is returned via registers on both AVR and AVRTiny.

150

This case clearly shows that an i64 is returned via registers on AVR, while via stack on AVRTiny.

aykevl accepted this revision.Nov 22 2022, 4:27 PM

Looks good to me.

For a future patch, it would be easier to review if you update test files to use update_llc_test_checks.py in a separate patch. That makes it much easier to see what actually changed.

This revision is now accepted and ready to land.Nov 22 2022, 4:27 PM
This revision was landed with ongoing or failed builds.Nov 22 2022, 5:33 PM
This revision was automatically updated to reflect the committed changes.

Looks good to me.

For a future patch, it would be easier to review if you update test files to use update_llc_test_checks.py in a separate patch. That makes it much easier to see what actually changed.

Sure. Thanks.