This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt][AVR] Use correct return value for __ledf2, __lesf2, etc
ClosedPublic

Authored by aykevl on May 4 2022, 10:00 AM.

Details

Summary

Previously the default was long, which is 32-bit on AVR. But avr-gcc expects a smaller value: it reads the return value from r24.

This is actually a regression from https://reviews.llvm.org/D98205. Before D98205, the return value was an enum (which was 2 bytes in size) which was compatible with the 1-byte return value that avr-gcc was expecting. But long is 4 bytes and thus places the significant return value in a different register.

Diff Detail

Event Timeline

aykevl created this revision.May 4 2022, 10:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 4 2022, 10:00 AM
aykevl requested review of this revision.May 4 2022, 10:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 4 2022, 10:00 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
compnerd accepted this revision.May 4 2022, 10:22 AM

Thanks!

This revision is now accepted and ready to land.May 4 2022, 10:22 AM
This revision was automatically updated to reflect the committed changes.