Skip to content
This repository has been archived by the owner on Feb 2, 2024. It is now read-only.

System preprocessor definitions for architecture & ABI #5

Open
ilg-ul opened this issue May 25, 2019 · 1 comment
Open

System preprocessor definitions for architecture & ABI #5

ilg-ul opened this issue May 25, 2019 · 1 comment

Comments

@ilg-ul
Copy link

ilg-ul commented May 25, 2019

(this should be passed to the team that will implement the compiler, but for reference I enter it here)

The current ABI selection must be available via a compiler system preprocessor definition, so the software will know how to handle exception frames (and possible other low level use cases).

The only document where I saw some preprocessor definitions is:

https://github.com/riscv/riscv-toolchain-conventions

but it does not include a macro for the ABI.

Neither the dumps that I did some time ago do not list the ABI:

https://gnu-mcu-eclipse.github.io/arch/riscv/programmer/#preprocessor-macros

@aswaterman
Copy link

The UABI defines __riscv_float_abi_soft, __riscv_float_abi_single, or __riscv_float_abi_double to indicate which of the three UABI calling conventions is in use for a given XLEN. I think the EABI should follow the same convention for simplicity, but additionally define __riscv_eabi to distinguish the EABI from the UABI.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants