mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 12:06:08 +00:00

The PR implements a subset of features of function __builtin_cpu_support() for AIX OS based on the information which AIX kernel runtime variable `_system_configuration` and function call `getsystemcfg()` of /usr/include/sys/systemcfg.h in AIX OS can provide. Following subset of features are supported in the PR "arch_3_00", "arch_3_1","booke","cellbe","darn","dfp","dscr" ,"ebb","efpsingle","efpdouble","fpu","htm","isel", "mma","mmu","pa6t","power4","power5","power5+","power6x","ppc32","ppc601","ppc64","ppcle","smt", "spe","tar","true_le","ucache","vsx"
10 lines
383 B
C
10 lines
383 B
C
// RUN: %clang_cc1 -fsyntax-only -triple powerpc-ibm-aix7.1.0.0 -verify %s
|
|
|
|
int main(void) {
|
|
if (__builtin_cpu_is("power8")) // expected-error {{this builtin is available only on AIX 7.2 and later operating systems}}
|
|
return 1;
|
|
|
|
if (__builtin_cpu_supports("power8")) // expected-error {{this builtin is available only on AIX 7.2 and later operating systems}}
|
|
return 1;
|
|
}
|