[MPlayer-dev-eng] [PATCH] Mask misaligned exception on K10

Rich Felker dalias at aerifal.cx
Sun Mar 9 14:37:54 CET 2008


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.

Rich



More information about the MPlayer-dev-eng mailing list