We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4dc435b + 2d0b233 commit 1c4ec47Copy full SHA for 1c4ec47
1 file changed
driver/others/dynamic_power.c
@@ -233,8 +233,27 @@ static int __builtin_cpu_supports(char* arg)
233
}
234
return 0;
235
236
+
237
+static int __builtin_cpu_is(char *arg)
238
+{
239
+ static int ipinfo = -1;
240
+ if (ipinfo < 0) {
241
+ ipinfo = cpuid();
242
+ }
243
+ if (ipinfo == CPU_POWER10) {
244
+ if (!strcmp(arg, "power10")) return 1;
245
+ } else if (ipinfo == CPU_POWER9) {
246
+ if (!strcmp(arg, "power9")) return 1;
247
+ } else if (ipinfo == CPU_POWER8) {
248
+ if (!strcmp(arg, "power8")) return 1;
249
+ } else if (ipinfo == CPU_POWER6) {
250
+ if (!strcmp(arg, "power6")) return 1;
251
+ } else {
252
+ return 0;
253
254
+}
255
#endif
-#endif
256
+#endif /* _AIX */
257
258
static gotoblas_t *get_coretype(void) {
259
0 commit comments