[XviD-devel] overflow being reported incorrectly

Christoph Lampert xvid-devel@xvid.org
Sat, 4 Jan 2003 13:17:48 +0100 (CET)


On Sat, 4 Jan 2003, Jim Hauxwell wrote:

> Hi,
> 
> I came across the femms problem this morning also.  seems like intel and
> microsoft compilers cant build for it.  Even the intrinsics version
> _m_femms() dosn't work so I've just commented it out.
> 
> As a matter of interest, why has someone added this?  According to AMD doc I
> read this morning, the instructions femms and emms have zero latency and
> dont do anything.

On Athlon it has zero latency, on K6-2 it doesn't. 
And it surely does do something: It switches registers back from MMX/3Dnow
to floating point mode. If you don't switch before using floats, you end
up with garbled float results. 

I think FEMMS is AMDs "faster" version of EMMS, maybe we should switch
back to EMMS, and if it's slower on Pete's AMD K6, we can make a
special macro for him to avoid problems. 

:-)

gruel



> 
> http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/2262
> 1.pdf
> 
> Maybe someone can shed some light on it.
> 
> Jim
> 
> > -----Original Message-----
> > From: xvid-devel-admin@xvid.org [mailto:xvid-devel-admin@xvid.org]On
> > Behalf Of Dirk Knop
> > Sent: 04 January 2003 11:21
> > To: xvid-devel@xvid.org
> > Subject: Re: [XviD-devel] overflow being reported incorrectly
> >
> >
> > Hi,
> >
> > suxen_drol wrote:
> >
> > >fix commited (stable & dev).
> > >
> > >a potential problem: our dequant functions are only good for coeff
> > >levels in the [-256,255] range.
> > >
> >
> > Uhm, we should definatly fix that ;)
> >
> > Another problem with the latest commit:
> > D:\data\PROGTEMP\XviD-dev-api-3\xvidcore\src\utils\emms.c(79): error:
> > __asm unknown opcode 'FEMMS'
> >
> > .... is there a way to explicit call nasm for instructions in c-files?
> > masm doesn't seem to understand that instruction (processor pack is
> > installed). (Or does intel install an assembler as well? I wonder why it
> > doesn't understand that then).
> >
> > Best regards
> > Dirk
> >
> >
> > _______________________________________________
> > XviD-devel mailing list
> > XviD-devel@xvid.org
> > http://list.xvid.org/mailman/listinfo/xvid-devel
> 
> _______________________________________________
> XviD-devel mailing list
> XviD-devel@xvid.org
> http://list.xvid.org/mailman/listinfo/xvid-devel
>