riscv-non-isa / riscv-c-api-doc

Documentation of the RISC-V C API
https://jira.riscv.org/browse/RVG-4
Creative Commons Attribution 4.0 International
68 stars 38 forks source link

Introduce new constraint for register pair #39

Open kito-cheng opened 1 year ago

kito-cheng commented 1 year ago

Must start with an even-numbered register.

NOTE: This is NOT implemented on either on LLVM or GCC yet, this PR will hold until at least one compiler has implemented.

Fix #37

cmuellner commented 1 year ago

There is a decision between two options:

The difference is, that the second implies the amount of registers in the constraint, while the other one does not (or implies 1 if not stated otherwise).

37 requests the first option. This PR introduces the second. Is there a reason to go for the second option besides personal preference (I admit that I prefer the second option for this reason)?

And would clobbering a register with the constraint "G" imply that a register pair is clobbered (is this easy to implement in GCC/LLVM)?