This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt][builtins] Use explicitly-sized integer types for LibCalls
ClosedPublic

Authored by atrosinenko on Aug 25 2020, 9:09 AM.

Details

Summary

Use s[iu]_int instead of (unsigned) int and d[ui]_int instead of
(unsigned) long long for LibCall arguments.

Note: the *vfp LibCall versions were NOT touched.

Diff Detail

Event Timeline

atrosinenko created this revision.Aug 25 2020, 9:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 25 2020, 9:09 AM
Herald added subscribers: Restricted Project, dberris. · View Herald Transcript
atrosinenko requested review of this revision.Aug 25 2020, 9:09 AM

This looks good to me, although I would like someone else to take a look as well. I can confirm that these changes fix an issue on AVR: this patch (together with D86547) make __floatsisf correct on AVR while it would previously do something incorrect.

What I am somewhat worried about is that some of these functions (__floatsisf, __floatunsisf) do not have tests. I think the test for the *vfp variants could be shared between the *vfp and non-*vfp variants. But I think this is best done separately.

aykevl accepted this revision.Jan 17 2022, 4:43 AM

I've looked through the code again. It looks correct and (in past testing) it fixed a bug I had, so I'm going to accept this.

@atrosinenko do you have commit access? If not, I can commit it for you.

This revision is now accepted and ready to land.Jan 17 2022, 4:43 AM
This revision was landed with ongoing or failed builds.Jan 30 2022, 10:15 AM
This revision was automatically updated to reflect the committed changes.