This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Add default ABI for archs with only F extension
Changes PlannedPublic

Authored by wangpc on May 18 2022, 11:18 PM.

Details

Summary

It seems that we use ilp32/lp64 ABI for these archs with
only single-precision floating-point extension. I believe
that users would like to pass arguments by floating-point
registers if they provide F extension in -march. So here
we use ilp32f and lp64f for these cases.

For some existed tests, we set -target-abi explicitly
to keep consistent.

@benshi001 has proposed this before and I think it is
necessary.

Links:

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptMay 18 2022, 11:18 PM
pcwang-thead requested review of this revision.May 18 2022, 11:18 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMay 18 2022, 11:18 PM

It's currently this way in order to be compatible with GCC. Changing this requires consensus from both toolchains to ensure compatibility is preserved. See https://github.com/riscv-non-isa/riscv-toolchain-conventions/issues/13 for some discussion on this.

Also, the tests where you have codegen changes rather than preserving a soft-float ABI should probably be put up for review separately by adding an explicit hard single-float ABI, as those seem worthwhile for reducing noise

It's currently this way in order to be compatible with GCC. Changing this requires consensus from both toolchains to ensure compatibility is preserved. See https://github.com/riscv-non-isa/riscv-toolchain-conventions/issues/13 for some discussion on this.

Thanks! I may send a GCC patch later.

Also, the tests where you have codegen changes rather than preserving a soft-float ABI should probably be put up for review separately by adding an explicit hard single-float ABI, as those seem worthwhile for reducing noise

Will do.

evandro removed a subscriber: evandro.Jun 12 2023, 2:25 PM
wangpc commandeered this revision.Jul 13 2023, 7:47 PM
wangpc planned changes to this revision.
wangpc added a reviewer: pcwang-thead.
wangpc removed a reviewer: pcwang-thead.