Mail Archives: djgpp-workers/2003/05/03/11:38:11
"Richard Dawe" <rich AT phekda DOT freeserve DOT co DOT uk> said:
> + /* What we need is instruction family info in 8-11 bits */
> + family = (cpuid_info & 0x780) >> 8;
> + switch (family)
I dont' get this. Isn't this extracting bits 7-10 (assuming we call the
LSB bit 0).
> + {
> + case 0x7: strcpy(u->machine, "i786"); break;
> + case 0x6: strcpy(u->machine, "i686"); break;
> + case 0x5: strcpy(u->machine, "i586"); break;
> + default:
> + case 0x4: strcpy(u->machine, "i486"); break;
> + }
> + if ((family == 0x6) && (strcmp(vendor, "AuthenticAMD") == 0))
> + strcpy(u->machine, "athlon");
Wouldn't this set "athlon" for a "duron" AMD K7 processor too?
Check bit 7..4 to be sure.
--gv
- Raw text -