Re: ldcw inline assembler patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 16, 2008 at 05:54:24PM -0400, Carlos O'Donell wrote:
> On Mon, Jun 16, 2008 at 5:06 PM, Helge Deller <deller@xxxxxx> wrote:
> > So, your proposal is (copy-and-pasted in here) the following ?
> >
> > diff --git a/include/asm-parisc/system.h b/include/asm-parisc/system.h
> > index ee80c92..daeae39 100644
> > --- a/include/asm-parisc/system.h
> > +++ b/include/asm-parisc/system.h
> > @@ -169,7 +169,7 @@ static inline void set_eiem(unsigned long val)
> >  #define __ldcw(a) ({                                           \
> >        unsigned __ret;                                         \
> >        __asm__ __volatile__(__LDCW " 0(%1),%0"                 \
> > -               : "=r" (__ret) : "r" (a));                      \
> > +               : "=r" (__ret) : "r" (a) : "memory" );          \
> >        __ret;                                                  \
> >  })
> 
> Yes. The asm should clobber memory thus forcing the compiler to avoid
> memory temporaries.
> 

It shouldn't need to, since we're only ever accessing one word (the one
specified in the operand.)

Otherwise basically every inline asm everywhere ever is going to need a
memory clobber, and that's just BROKEN.

r, Kyle
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux