Here is the proposal https://github.com/riscv-non-isa/riscv-c-api-doc/pull/47.
The version that omit the domain argument imply domain=__RISCV_NTLH_ALL.
type __riscv_ntl_load (type *ptr); void __riscv_ntl_store (type *ptr, type val);
Paths
| Differential D156221
[RISCV] Support overloaded version ntlh intrinsic function ClosedPublic Authored by BeMg on Jul 25 2023, 2:49 AM.
Details Summary Here is the proposal https://github.com/riscv-non-isa/riscv-c-api-doc/pull/47. The version that omit the domain argument imply domain=__RISCV_NTLH_ALL. type __riscv_ntl_load (type *ptr); void __riscv_ntl_store (type *ptr, type val);
Diff Detail
Event TimelineComment Actions This seems functionally correct to me, but I'd welcome opinions from others who work more with the C intrinsics on if this is the best way to implement the overloading. Comment Actions I think another option could be to do this in SemaChecking.cpp where we implement builtin_riscv_ntl_load and builtin_riscv_ntl_store. We already do custom type checking there. We could detect the missing argument and give it a default. This revision is now accepted and ready to land.Aug 3 2023, 12:42 AM
This revision was landed with ongoing or failed builds.Aug 4 2023, 12:39 AM Closed by commit rG2df05cd01c17: [RISCV] Support overloaded version ntlh intrinsic function (authored by BeMg). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 547125 clang/lib/CodeGen/CGBuiltin.cpp
clang/lib/Headers/riscv_ntlh.h
clang/lib/Sema/SemaChecking.cpp
clang/test/CodeGen/RISCV/ntlh-intrinsics/riscv32-zihintntl.c
|
__SELECT_NTL_LOAD