PATCH: Intel Xeon E5440 identified as p3

Torbjorn Granlund tg at swox.com
Sat Apr 19 08:29:44 CEST 2008


Tristan Gingold <gingold at adacore.com> writes:

  Hi,

  I don't know if this bug was already fixed (not found in ml archives)
  but here is the issue:

  cat /proc/cpuinfo
  ...
  vendor_id       : GenuineIntel
  cpu family      : 6
  model           : 23
  model name      : Intel(R) Xeon(R) CPU           E5440  @ 2.83GHz
  stepping        : 6
  cpu MHz         : 2826.289
  ...

  but ./configu.guess
  pentium3


  As a result, gmp can't be compiled for x86_64 on this machine.
  Here is a fix for config.guess:
  *** config.guess~       2007-09-01 19:15:34.000000000 +0200
  --- config.guess        2008-04-18 12:09:34.000000000 +0200
  ***************
  *** 704,711 ****

       fms = cpuid (dummy_string, 1);

  !   family = (fms >> 8) & 15;
  !   model = (fms >> 4) & 15;
       stepping = fms & 15;

       modelstr = "i486";
  --- 704,711 ----

       fms = cpuid (dummy_string, 1);

  !   family = ((fms >> 8) & 15) | ((fms >> 16) & 0xf0);
  !   model = ((fms >> 4) & 15) | ((fms >> 12) & 0xf0);
       stepping = fms & 15;

I don't think that is correct, the "extended family" field is 8 bits
wide and should be added,to contatenated to the family field:

      family = ((fms >> 8) & 15) | ((fms >> 20) & 0xff);
      model = ((fms >> 4) & 15) | ((fms >> 12) & 0xf0);

Yes, this is silly, but it is how cpuid is defined.

-- 
Torbjörn


More information about the gmp-devel mailing list