[Mplayer-users] mp3lib: 3dnow! detection fails

Kjetil Torgrim Homme kjetilho at linpro.no
Fri Sep 14 17:12:31 CEST 2001


mp3lib would try to use 3dnow on a Celeron 600 MHz Coppermine:

  mp3lib: Using AMD 3dnow-dsp(k7)! optimized decore.

I patched it to get some more output:
  mp3lib: Processor ID: 0x683  i586 3  3dnow 50462977  sse 0

Hmm, bogus value of _3dnow.  This simple patch seems to fix it:

--- d_cpu.s.orig        Fri Sep 14 16:52:52 2001
+++ d_cpu.s     Fri Sep 14 16:57:39 2001
@@ -103,18 +103,21 @@
         movl   $0x80000000,%eax
         cpuid
         cmpl   $0x80000000,%eax
-        jbe    exit2
+        jbe    no3dnow
         movl   $0x80000001,%eax
         cpuid
         xorl   %eax,%eax
         testl  $0x80000000,%edx
-        jz     exit2
+        jz     no3dnow
 /// eax=1 - K6 3DNow!
         inc    %eax
         testl  $0x40000000,%edx
         jz     exit2
 /// eax=2 - K7 3DNowEx!
         orl    $2, %eax
+       jmp    exit2
+no3dnow:
+        xorl   %eax,%eax
 exit2:
 
         popl   %ecx
===== ends ===

I have verified that 3dnow! is detected properly on a 1 GHz Athlon
after applying this patch.  It also works on the Celeron 600 :)


Kjetil T.

PS. Full info on the CPU for the interested
$ cat /proc/cpuinfo 
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 8
model name      : Celeron (Coppermine)
stepping        : 3
cpu MHz         : 601.380
cache size      : 128 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 mmx fxsr sse
bogomips        : 1199.30

_______________________________________________
Mplayer-users mailing list
Mplayer-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mplayer-users



More information about the MPlayer-users mailing list