Hi,
On Sat, 5 Mar 2005 [EMAIL PROTECTED] wrote:
> > Well, I assumed the same thing when I started poking at that code, but
> > then someone pointed out that it didn't actually work that way, and as
> > I recall the code does in fact assume a register. I certainly would
> > not object to making '
Quoting Jason Merrill <[EMAIL PROTECTED]>:
> Well, I assumed the same thing when I started poking at that code, but then
> someone pointed out that it didn't actually work that way, and as I recall
> the code does in fact assume a register. I certainly would not object to
> making '+' work proper
On Sat, 5 Mar 2005 00:24:10 -0500, [EMAIL PROTECTED] wrote:
>> static __inline__ void atomic_add(atomic_t *v, int i)
>> {
>> __asm__ __volatile__("addl %1,%0" : "+m" (*v) : "d" (i));
>> }
>>
>> Then the compiler complains with:
>>
>> /asm/atomic.h:33: warning: read-write constraint does not
On Mar 5, 2005, at 12:24 AM, [EMAIL PROTECTED] wrote:
static __inline__ void atomic_add(atomic_t *v, int i)
{
__asm__ __volatile__("addl %1,%0" : "+m" (*v) : "d" (i));
}
Then the compiler complains with:
/asm/atomic.h:33: warning: read-write constraint does not allow a
register
So is the
> static __inline__ void atomic_add(atomic_t *v, int i)
> {
> __asm__ __volatile__("addl %1,%0" : "+m" (*v) : "d" (i));
> }
>
> Then the compiler complains with:
>
> /asm/atomic.h:33: warning: read-write constraint does not allow a register
>
> So is the warning wrong?
Yes, the warning is wr
>> Ugh, in the hopes of simplifying the example, I made it somewhat trivial...
>>
>> static __inline__ void atomic_add(atomic_t *v, int i)
>> {
>> __asm__ __volatile__("addl %2,%0" : "=m" (*v) : "m" (*v), "d" (i));
>> }
>>
>> Is that correct? And if so, then isn't the documentation wrong?
On Tue, Mar 01, 2005 at 11:50:04PM -0500, Peter Barada wrote:
>
> >> which seems to work, but I'm really concerned about the manuals
> >> warning of the input and output operads being in seperate places.
> >>
> >> Which form is correct?
> >
> >static __inline__ void atomic_inc(atomic_t *v)
> >{
>
Andrew Pinski dixit:
>> which seems to work, but I'm really concerned about the manuals
>> warning of the input and output operads being in seperate places.
> static __inline__ void atomic_inc(atomic_t *v)
> {
> __asm__ __volatile__("addql #1,%0" : "+m" (*v));
> }
Hi, I have got the same p
>> which seems to work, but I'm really concerned about the manuals
>> warning of the input and output operads being in seperate places.
>>
>> Which form is correct?
>
>static __inline__ void atomic_inc(atomic_t *v)
>{
> __asm__ __volatile__("addql #1,%0" : "+m" (*v));
>}
>
>Works just fine,
On Tue, 1 Mar 2005, Peter Barada wrote:
>
> I'm trying to improve atomic operations for ColdFir ein a 2.4 kernel, and
> I tried the following following the current online manual at:
> http://gcc.gnu.org/onlinedocs/gcc-3.4.3/gcc/Extended-Asm.html#Extended-Asm
>
> static __inline__ void atomic_inc(at
On Mar 1, 2005, at 7:54 PM, Peter Barada wrote:
which seems to work, but I'm really concerned about the manuals
warning of the input and output operads being in seperate places.
Which form is correct?
static __inline__ void atomic_inc(atomic_t *v)
{
__asm__ __volatile__("addql #1,%0" : "+m"
I'm trying to improve atomic operations for ColdFir ein a 2.4 kernel, and
I tried the following following the current online manual at:
http://gcc.gnu.org/onlinedocs/gcc-3.4.3/gcc/Extended-Asm.html#Extended-Asm
static __inline__ void atomic_inc(atomic_t *v)
{
__asm__ __volatile__("addql #
12 matches
Mail list logo