__pgi_ctrl_init __pgi_is_gh_b __pgi_is_gh __pgi_is_amd __pgi_align_faultand if the user program's is OpenMP enabled, the __pgi_unified_version_select7 routine will be called.
Misaligned Exception bit is an AMD-only feature, so __pgi_is_gh_b will call __pgi_is_gh, which will call __pgi_is_amd to check if the CPU vendor ID string is AMD. If so, it then executes cpuid instruction with EAX=0x80000001 and examines bit 7 of ECX. If this bit is set, then Misaligned Exception bit is supported.
if (vendor ID string is "GenuineIntel") { Call cpuid with EAX=0x80000000. If (EAX > 0x80000000) { Call cpuid with EAX=0x80000001 else Set EAX=EBX=ECX=EDX=0 If (bit 29 of EDX is true) { /* this means the CPU is running in 64-bit mode */ Check for SSE3, SSSE3, SSE4.1 capabilities in sequence Save the result in __pgi_uni_ver7 return; } else Call __pgi_abort } else if (vendor ID string is "AuthenticAMD") { Call cpuid with EAX=0x80000000. If (EAX > 0x80000000) Call cpuid with EAX=0x80000001 else Set EAX=EBX=ECX=EDX=0 If (bit 29 of EDX is true) { /* this means the CPU is running in 64-bit mode */ Check for SSE3 and SSE4a capabilities in sequence Save the result in __pgi_uni_ver7 return; } else Call __pgi_abort } Call __pgi_abort
The global variable __pgi_uni_ver7 is referred in AMD Core Math Library (ACML) routines, such as libacml*, and CUDA accelerator libraries such as libacc*