On Tuesday 21 April 2009 13:01:09 Jason Moxham wrote:
> On Tuesday 21 April 2009 12:35:35 Jeff Gilchrist wrote:
> > On Tue, Apr 21, 2009 at 7:10 AM, Jason Moxham <ja...@njkfrudils.plus.com>
>
> wrote:
> > > We've got to narrow this down
> > >
> > > we know it not the asm file
> > > try swapping gmp's c file for mpir c file and visa versa and see if we
> > > can determine if it's the c file or the script config.guess
> >
> > It is the C file.  If I edit the config.guess in mpir to force it to
> > use the dummy.c file from GMP but let it do everything else
> > automatically it works fine and selects core2.  So it is the C code
> > that config.guess outputs that pathcc doesn't like.
> >
> > Jeff.
>
> Ok , I'll send a a few c files  , and if you can try each one , and let us
> know when they start working , or a different error pops up.
> heres the first one
>
>
>
>
>
>
> 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To post to this group, send email to mpir-devel@googlegroups.com
To unsubscribe from this group, send email to 
mpir-devel+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/mpir-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

/* version 3 */
main ()
{

#define __gmpn_cpuid	cpuid

  char vendor_string[13];
  char features[12];
  long fms;
  int family, model, stepping;
  char *modelstr;

  __gmpn_cpuid (vendor_string, 0);
  vendor_string[12] = 0;

  fms = __gmpn_cpuid (features, 1);

  family = ((fms >> 8) & 15) + ((fms >> 20) & 0xff);
  model = ((fms >> 4) & 15) + ((fms >> 12) & 0xf0);
  stepping = fms & 15;
  modelstr = "i486";
  if (strcmp (vendor_string, "GenuineIntel") == 0)
    {
      switch (family)
	{
	case 5:
	  if (model <= 2) modelstr="pentium";
	  if (model >= 4) modelstr="pentiummmx";
	  break;
	  case 6:
	  if (model == 1) { modelstr="pentiumpro";break;}
	  if (model <= 6) { modelstr="pentium2";break;}
	  if (model <= 13){ modelstr="pentium3";break;}
	  if (model == 14){ modelstr="core";break;}
	  if (model == 15){ modelstr="core2";break;}
	  if (model == 22){ modelstr="core2";break;}
	  if (model == 23){ modelstr="penryn";break;}
	  if (model == 26){ modelstr="nehalem";break;}
	  if (model == 28){ modelstr="atom";break;}
	  if (model == 29){ modelstr="penryn";break;}
	  break;
        case 15:
	  if (model <= 6) { modelstr="pentium4";break;}
	  int feat = ((int *)features)[2];
          if (feat & 1) { modelstr="prescott";break;}
          break;
	}
    }
  else if (strcmp (vendor_string, "AuthenticAMD") == 0)
    {
      switch (family)
	{
	case 5:
	  if (model <= 3) { modelstr="k5";break;}
	  if (model <= 7) { modelstr="k6";break;}
	  if (model <= 8) { modelstr="k62";break;}
	  if (model <= 9) { modelstr="k63";break;}
	  break;
	case 6:
	  modelstr="k7";
	  break;
        case 15:
	  modelstr="k8";
	  break;
	case 16:
	  if (model == 2) { modelstr="k10";break;}
	  if (model == 4) { modelstr="k10";break;}
	  break;
        }
    }
  else if (strcmp (vendor_string, "CyrixInstead") == 0)
    {
      /* Should recognize Cyrix' processors too.  */
    }
  else if (strcmp (vendor_string, "CentaurHauls") == 0)
    {
      switch (family)
	{
	case 6:
	  if (model < 9) { modelstr="viac3";break;}
	  modelstr="viac32";break;
	}
    }
  printf ("%s\n", modelstr);
  return 0;}

Reply via email to