[MPlayer-dev-eng] [PATCH] Mask misaligned exception on K10
Zuxy Meng
zuxy.meng at gmail.com
Sun Mar 9 14:40:21 CET 2008
2008/3/9, Rich Felker <dalias at aerifal.cx>:
> On Sun, Mar 09, 2008 at 07:22:00PM +0800, Zuxy Meng wrote:
> > > > +/* Mask the SSE misaligned exception so as to avoid some mysterious
> > > > + * crashes; currently only available on AMD K10.
> > > > + */
> > > > +static void mask_misalign_sse()
> > > > +{
> > > > + unsigned mxcsr;
> > > > + asm volatile (
> > > > + "stmxcsr %0\n\t"
> > > > + "orl $(1 << 17), %0\n\t"
> > > > + "ldmxcsr %0\n\t"
> > > > + :"=m"(mxcsr)
> > > > + );
> > > > +}
> > >
> > > I do not like the indentation, but more importantly I've never seen <<
> > > used in asm before, are you sure that works with ICC, Apples binutils
> > > etc.?
> >
> > The indentation is consistent with the context. Don't have ICC or Apple though.
>
> It's not. Indention should be by 1 indention level, not some arbitrary
> large number of spaces that line the asm up with irrelevant
> parentheses. These parentheses should be treated like {} in C code.
Is this one better?
--
Zuxy
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cpudetect.c.diff
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20080309/2fb7e39d/attachment.txt>
More information about the MPlayer-dev-eng
mailing list