12 #if (( __i386__ || __amd64__ ) && ( __GNUC__ || __INTEL_COMPILER ))
15 static ngx_inline void ngx_cpuid(uint32_t
i, uint32_t *buf);
21 ngx_cpuid(uint32_t
i, uint32_t *buf)
38 " mov %%ecx, 12(%1); "
42 : :
"a" (i),
"D" (buf) :
"ecx",
"edx",
"esi",
"memory" );
50 ngx_cpuid(uint32_t i, uint32_t *buf)
52 uint32_t eax, ebx, ecx, edx;
58 :
"=a" (eax),
"=b" (ebx),
"=c" (ecx),
"=d" (edx) :
"a" (i) );
76 uint32_t vbuf[5], cpu[4], model;
86 vendor = (u_char *) &vbuf[1];
96 switch ((cpu[0] & 0xf00) >> 8) {
107 model = ((cpu[0] & 0xf0000) >> 8) | (cpu[0] & 0xf0);
125 }
else if (
ngx_strcmp(vendor,
"AuthenticAMD") == 0) {