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

Document constraint "s" #66

Closed MaskRay closed 7 months ago

MaskRay commented 7 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 7 months ago

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

kito-cheng commented 7 months ago

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

cmuellner commented 7 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 7 months ago

clang support has been merged to trunk :)