- struct machine_slot *ms = &machine_slot[cpu_number()];
-
- switch (ms->cpu_subtype) {
- case CPU_SUBTYPE_386:
- if (cpu_subtype == CPU_SUBTYPE_386)
- return (TRUE);
- break;
-
- case CPU_SUBTYPE_486:
- case CPU_SUBTYPE_486SX:
- if ( cpu_subtype == CPU_SUBTYPE_486 ||
- cpu_subtype == CPU_SUBTYPE_486SX ||
- cpu_subtype == CPU_SUBTYPE_386 )
- return (TRUE);
- break;
-
- case CPU_SUBTYPE_586:
- if ( cpu_subtype == CPU_SUBTYPE_586 ||
- cpu_subtype == CPU_SUBTYPE_486 ||
- cpu_subtype == CPU_SUBTYPE_486SX ||
- cpu_subtype == CPU_SUBTYPE_386 )
- return (TRUE);
- break;
-
- default:
- if ( CPU_SUBTYPE_INTEL_MODEL(cpu_subtype) ==
- CPU_SUBTYPE_INTEL_MODEL_ALL) {
- if ( CPU_SUBTYPE_INTEL_FAMILY(ms->cpu_subtype) >=
- CPU_SUBTYPE_INTEL_FAMILY(cpu_subtype))
- return (TRUE);
- }
- else {
- if ( ms->cpu_subtype == cpu_subtype)
- return (TRUE);
+ cpu_subtype_t hostsubtype = cpu_subtype();
+
+ switch(exectype) {
+ case CPU_TYPE_X86_64: /* native 64-bit */
+ switch(hostsubtype) {
+ case CPU_SUBTYPE_X86_64_H: /* x86_64h can execute anything */
+ switch (execsubtype) {
+ case CPU_SUBTYPE_X86_64_H:
+ return 3;
+ case CPU_SUBTYPE_X86_64_ALL:
+ return 2;
+ }
+ break;
+ case CPU_SUBTYPE_X86_ARCH1: /* generic systems can only execute ALL subtype */
+ switch (execsubtype) {
+ case CPU_SUBTYPE_X86_64_ALL:
+ return 2;
+ }
+ break;