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
75 stars 41 forks source link

Document constraint "s" #66

Closed MaskRay closed 9 months ago

MaskRay commented 9 months ago

"s" can be used to create an artificial reference for linker garbage collection, or define sections to hold symbol addresses. "S" does not work for a preemptible symbol in GCC while "s" does.

cmuellner commented 9 months ago

Is there a reference to GCC and/or LLVM patches?

kito-cheng commented 9 months ago

For GCC: https://github.com/gcc-mirror/gcc/blob/master/gcc/common.md#L97

cmuellner commented 9 months ago

I just want to mention that in GCC s is an arch-independent constraint: https://gcc.gnu.org/onlinedocs/gcc/Simple-Constraints.html#index-s-in-constraint

But since this won't ever change, it does not matter much.

kito-cheng commented 9 months ago

clang support has been merged to trunk :)