-
Notifications
You must be signed in to change notification settings - Fork 15k
Labels
backend:RISC-VcrashPrefer [crash-on-valid] or [crash-on-invalid]Prefer [crash-on-valid] or [crash-on-invalid]
Description
The RISC-V backend currently does not support the PreserveMost
calling convention. Attempting to compile code that uses it results in a fatal error:
fatal error: error in backend: Unsupported calling convention
A minimal example can be seen on Compiler Explorer:
https://godbolt.org/z/h7e5WT7eM
This issue raises a few questions:
- Should the RISC-V backend implement support for
PreserveMost
, similar to x86, ARM, and AArch64? - Alternatively, should the frontend (or mid-end) automatically lower unsupported calling conventions like
PreserveMost
to a more compatible one such asC
?
It would be helpful to clarify whether support is planned or if users should explicitly avoid using this calling convention on RISC-V targets.
Thanks!
Metadata
Metadata
Assignees
Labels
backend:RISC-VcrashPrefer [crash-on-valid] or [crash-on-invalid]Prefer [crash-on-valid] or [crash-on-invalid]