[theora-dev] [PATCH] cpu support for VIA and Transmeta processors

David Kuehling dvdkhlng at gmx.de
Sun May 4 05:59:58 PDT 2008


>>>>> "Timothy" == Timothy B Terriberry <tterribe at email.unc.edu> writes:

> I have done lots of clean-up to that file in r14814. The only
> interesting functional modification is that I made the Intel vs. AMD
> CPU flags tests exclusive for VIA processors. 
[..]
> Please test the results and make sure I didn't screw anything up.

Works for C7.  

But Cheking the cpuid output of C3 it looks like C3's 3D-Now
functionality won't be detected.  In your code you only check for 3D-Now
if the Intel-style test for MMX fails ( !(edx&0x00800000) ).  But the
Intel-style MMX test will be successfull on C3.  According to cpuid:

 eax in    eax      ebx      ecx      edx
00000000 00000001 746e6543 736c7561 48727561
00000001 00000673 00000000 00000000 00803135
80000000 80000006 00000000 00000000 00000000
80000001 00000673 00000000 00000000 80803135
80000002 20414956 756d6153 32206c65 00000000
80000003 00000000 00000000 00000000 00000000
80000004 00000000 00000000 00000000 00000000
80000005 00000000 08800880 40040120 40040120
80000006 00000000 00000000 40040120 00000000

That's why my code always checked for AMD-Style vector support and later
added results from the Intel-Style check.  This strategy also works for
C7 (and hopefully for C3-2), see cpuid output of C7:

 eax in    eax      ebx      ecx      edx
00000000 00000001 746e6543 736c7561 48727561
00000001 000006a9 00010800 00000181 a7c9baff
80000000 80000006 00000000 00000000 00000000
80000001 00000000 00000000 00000000 00100000
80000002 20202020 20202020 20202020 20202020
80000003 56202020 45204149 65687473 72702072
80000004 7365636f 20726f73 30303032 007a484d
80000005 00000000 08800880 40040140 40040140
80000006 00000000 00000000 0080a140 00000000

David
-- 
GnuPG public key: http://user.cs.tu-berlin.de/~dvdkhlng/dk.gpg
Fingerprint: B17A DC95 D293 657B 4205  D016 7DEF 5323 C174 7D40



More information about the theora-dev mailing list