[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)
Nemanja Ivanovic via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 5 22:41:15 PST 2024
================
@@ -141,23 +149,30 @@ PPC_LNX_CPU("power10",47)
#define AIX_BUILTIN_PPC_TRUE 1
#define AIX_BUILTIN_PPC_FALSE 0
#define USE_SYS_CONF 2
+ #define SYS_CALL 3
// Supported COMPARE_OP values.
#define COMP_EQ 0
+ #define COMP_GT 1
+ #define COMP_GE 2
+ #define COMP_NE 3
#endif
// The value of SUPPORT_METHOD can be AIX_BUILTIN_PPC_TRUE,
-// AIX_BUILTIN_PPC_FALSE, or USE_SYS_CONF.
-// When the value of SUPPORT_METHOD is USE_SYS_CONF, the return value
-// depends on the result of comparing the data member of
-// _system_configuration specified by INDEX with a certain value.
+// AIX_BUILTIN_PPC_FALSE, USE_SYS_CONF, SYS_CALL.
+// When the value of SUPPORT_METHOD is set to USE_SYS_CONF, the return value
+// depends on comparing VALUE with the specified data member of
+// _system_configuration at INDEX, where the data member is masked by Mask.
+// When the SUPPORT_METHOD value is set to SYS_CALL, the return value depends
+// on comparing a VALUE with the return value of calling `getsystemcfg`
+// with the parameter INDEX, which is then masked by Mask.
----------------
nemanjai wrote:
And presumably:
```
// AIX_BUILTIN_PPC_TRUE and AIX_BUILTIN_PPC_FALSE are for features
// that are supported or unsupported on all systems respectively.
```
?
https://github.com/llvm/llvm-project/pull/82809
More information about the cfe-commits
mailing list