This is an archive of the discontinued LLVM Phabricator instance.

[LoongArch] Move lp64s out of the unimplemented calling conv list
ClosedPublic

Authored by SixWeining on May 11 2023, 7:16 PM.

Details

Summary

lp64s is same as lp64d execpt that floating point arguments and return
values are always passed via GPRs or stack which means UseGPRForFloat
is always true in CC_LoongArch for lp64s.

One motivation of this change is to build linux which uses
-msoft-float and -mabi=lp64s [1].

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/loongarch/Makefile?h=v6.4-rc1#n49

Diff Detail

Event Timeline

SixWeining created this revision.May 11 2023, 7:16 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 11 2023, 7:16 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
SixWeining requested review of this revision.May 11 2023, 7:16 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 11 2023, 7:16 PM

Thanks for the patch! Never thought it was this trivial to wire up LP64S. ;-)

llvm/test/CodeGen/LoongArch/calling-conv-lp64s-lp64d-common.ll
5–6 ↗(On Diff #521534)

It sounds like we can avoid having to rename the file and change this comment one more time when we wire up LP64F, by rewording the sentence a little bit and renaming the file? Like "calling-conv-common.ll" (leaving room for e.g. "calling-conv-fp-common" or "calling-conv-vector-common") and "... identical output for all ABIs, i.e. ...".

Address @xen0n's comments.

Thanks for the patch! Never thought it was this trivial to wire up LP64S. ;-)

Thanks. I just updated the patch.

hev accepted this revision.May 13 2023, 8:31 AM

Thank you. I tested it on Rust bare-metal target and works. :-)

This revision is now accepted and ready to land.May 13 2023, 8:31 AM
xen0n accepted this revision.May 16 2023, 12:07 AM

Thanks!

Add release note for this change.

This revision was landed with ongoing or failed builds.May 16 2023, 6:11 AM
This revision was automatically updated to reflect the committed changes.