Define CPUID as indicated in Intel Intrinsics Guide

The Intel Intrinsics Guide provides latency and bandwidth information at the bottom of several Intrinsics features that list performance metrics for multiple CPUIDs.

For example, the table in the Intrinsics manual looks like this for Intrinsic _mm_hadd_pd:

CPUID(s)               Parameters   Latency   Throughput
0F_03                                    13            4
06_2A                  xmm1, xmm2         5            2
06_25/2C/1A/1E/1F/2E   xmm1, xmm2         5            2
06_17/1D               xmm1, xmm2         6            1
06_0F                  xmm1, xmm2         5            2

Now: How to determine which identifier my processor has?

I use Kubuntu 12.04 and try to use sudo dmidecode -t 4, as well as a small program cpuidfrom Ubuntu packages, but their output is not very useful.

I cannot find any of the lines listed in the Intrinsics Guide, wherever you are on the output commands above.

+5
source
1

CPUID,

, 20 - 27 , 8 11, , Intel386, Intel486, Pentium, Pentium Pro Pentium 4. P6 Pentium Pro , 00h , 06h. Pentium 4 Intel NetBurstยฎ , 00h, , 0Fh.

, positi 16 19, , 4, 7 .

. . 22 Intel CPUID .

CPUID - "family_model". :

#include "stdio.h"

int main () {

  int ebx = 0, ecx = 0, edx = 0, eax = 1;
  __asm__ ("cpuid": "=b" (ebx), "=c" (ecx), "=d" (edx), "=a" (eax):"a" (eax));

  int model = (eax & 0x0FF) >> 4;
  int extended_model = (eax & 0xF0000) >> 12;
  int family_code = (eax & 0xF00) >> 8;
  int extended_family_code = (eax & 0xFF00000) >> 16;

  printf ("%x %x %x %x \n", eax, ebx, ecx, edx);
  printf ("CPUID: %02x %x\n", extended_family_code | family_code, extended_model | model);
  return 0;
}

:

CPUID: 06_25

, .

+1

All Articles