Merge pull request #169 from juliantaylor/sanity-check-cpu
add a sanity check on the detected cpu type
This commit is contained in:
commit
97f68f7f3a
|
@ -273,6 +273,15 @@ void gotoblas_dynamic_init(void) {
|
||||||
if (gotoblas == NULL) gotoblas = &gotoblas_KATMAI;
|
if (gotoblas == NULL) gotoblas = &gotoblas_KATMAI;
|
||||||
#else
|
#else
|
||||||
if (gotoblas == NULL) gotoblas = &gotoblas_PRESCOTT;
|
if (gotoblas == NULL) gotoblas = &gotoblas_PRESCOTT;
|
||||||
|
/* sanity check, if 64bit pointer we can't have a 32 bit cpu */
|
||||||
|
if (sizeof(void*) == 8) {
|
||||||
|
if (gotoblas == &gotoblas_KATMAI ||
|
||||||
|
gotoblas == &gotoblas_COPPERMINE ||
|
||||||
|
gotoblas == &gotoblas_NORTHWOOD ||
|
||||||
|
gotoblas == &gotoblas_BANIAS ||
|
||||||
|
gotoblas == &gotoblas_ATHLON)
|
||||||
|
gotoblas = &gotoblas_PRESCOTT;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (gotoblas && gotoblas -> init) {
|
if (gotoblas && gotoblas -> init) {
|
||||||
|
|
Loading…
Reference in New Issue