================
@@ -192,8 +192,11 @@ void RISCVTargetInfo::getTargetDefines(const LangOptions
&Opts,
Builder.defineMacro("__riscv_muldiv");
}
- if (ISAInfo->hasExtension("a")) {
+ // The "a" extension is composed of "zalrsc" and "zaamo"
+ if (ISAInfo->hasExtension("a"))
Builder.defineMacro("__riscv_atomic");
+
+ if (ISAInfo->hasExtension("zalrsc")) {
----------------
fpetrogalli wrote:
`__riscv_atomic` is tested under `test/Preprocessor/riscv-target-features.c`,
but none of the `__GCC*` ones seem to be tested for RISCV. Please add a
frontend test for those too, when enabling zalrsc
https://github.com/llvm/llvm-project/pull/163672
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits