[Mplayer-dev-eng] VP3 Codec
Arpi
arpi at thot.banki.hu
Sat Sep 22 02:15:48 CEST 2001
Hi,
> > >
> > > > 0x10004bd6: mov %cr0,%edx
> > >
> > > Oops. So a Win32 DLL can mess with %cr0? Amazing.
> >
> > yes. you know their slogen: win98 - everything possible
> >
> > btw that routine just checks some flags in cr0, and depending on their
> > value returns eax=0 or eax=1. i think thet can be replaced by a mov eax,0/1
> > and many nops.
> the codec seems to use much asm code, maybe it's some sort of cpu feature
> detection.
yes:
; check to see if OS supports SIMD instructions
mov edx,cr0
bt edx,2 ; ensure no emulation
jnae NoXMMSupport
mov edx,cr4
bt edx,9 ; OS support SIMD
jnc NoXMMSupport
; we support XMM instructions
mov eax,1
jmp Exit
NoXMMSupport:
; mov eax,0 ; OS does not support XMM instructi
so it uses cr0 to check OS support of SSE. this is why it works for Gabucino
(his k6 has no sse at all) and crashes for you.
A'rpi / Astral & ESP-team
--
mailto:arpi at thot.banki.hu
http://esp-team.scene.hu
More information about the MPlayer-dev-eng
mailing list