Mercurial > libavcodec.hg
changeset 889:6a9c3ecf2dec libavcodec
via c3 detection patch by (Francisco Javier Cabello Torres <fjcabello at visual-tools dot com>)
author | michaelni |
---|---|
date | Mon, 25 Nov 2002 16:58:41 +0000 |
parents | 4513713d664a |
children | 653d9419ea01 |
files | i386/cputest.c |
diffstat | 1 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/i386/cputest.c Mon Nov 25 09:57:58 2002 +0000 +++ b/i386/cputest.c Mon Nov 25 16:58:41 2002 +0000 @@ -77,6 +77,21 @@ if (edx & 0x00400000) rval |= MM_MMXEXT; return rval; + } else if (ebx == 0x746e6543 && + edx == 0x48727561 && + ecx == 0x736c7561) { /* "CentaurHauls" */ + /* VIA C3 */ + cpuid(0x80000000, eax, ebx, ecx, edx); + if ((unsigned)eax < 0x80000001) + goto inteltest; + cpuid(0x80000001, eax, ebx, ecx, edx); + rval = 0; + if( edx & ( 1 << 31) ) + rval |= MM_3DNOW; + if( edx & ( 1 << 23) ) + rval |= MM_MMX; + if( edx & ( 1 << 24) ) + rval |= MM_MMXEXT; } else if (ebx == 0x69727943 && edx == 0x736e4978 && ecx == 0x64616574) {