[AD] 64bit CPU detection patch

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


im a patch newbie, sorry..  can someone add these 2 lines to
/allegro/src/i386/icpu.c
and also add the defines to the list in /include/allegro/system.h (approx line 110)


line123:   /* SSE has MMX+ included */
line124:	cpu_capabilities |= (reg[3] & 0x2000000 ? CPU_SSE | CPU_MMXPLUS : 0);
line125:	cpu_capabilities |= (reg[3] & 0x4000000 ? CPU_SSE2 : 0);
line126:	cpu_capabilities |= (reg[3] & 0x8000 ? CPU_CMOV : 0);


// AJ addition, add this line here!!!
cpu_capabilities |= (reg[3] & 0x40000000 ? CPU_IA64 : 0);



      }

      _i_get_cpuid_info(0x80000000, reg);
      if ((unsigned long)reg[0] > 0x80000000) {
	 _i_get_cpuid_info(0x80000001, reg);

	 cpu_capabilities |= (reg[3] & 0x80000000 ? CPU_3DNOW : 0);


// AJ addition,  add this line also.
cpu_capabilities |= (reg[3] & 0x20000000 ? CPU_AMDx86_64 : 0); // bit29, AMD specific: x86-64



	 /* Enhanced 3DNow! has MMX+ included */	
	 cpu_capabilities |= (reg[3] & 0x40000000 ? CPU_ENH3DNOW | CPU_MMXPLUS : 0);





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/