Andrea Arcangeli wrote:
> >int *p;
> >int func()
> >{
> > int x;
> > x = *p;
> > __asm__ __volatile__ ("" : : : "memory");
> > x = *p;
> > return x;
> >}
>
> Defintely none difference here (-fstrict-aliasing doesn't change anything
> either).
>
> andrea@inspiron:~ > gcc -v
> Reading specs from /usr/lib/gcc-lib/i486-suse-linux/2.95.2/specs
> gcc version 2.95.2 19991024 (release)
I tried it with two compilers, one older than yours and one newer:
.ident "GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)"
.ident "GCC: (GNU) 2.96 20000724 (experimental)"
The command lines were:
gcc -S -O2 test4.c
kgcc -S -O2 test4.c
In both cases, the memory read occurs before "zzz".
-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/
- Re: spin_lock forgets to clobber memory ... Jamie Lokier
- Re: spin_lock forgets to clobber memory and ... Andrea Arcangeli
- Re: spin_lock forgets to clobber memory ... Jamie Lokier
- Re: spin_lock forgets to clobber memory ... Andrea Arcangeli
- Re: spin_lock forgets to clobber memory and other sm... Linus Torvalds
- Re: spin_lock forgets to clobber memory and othe... Jamie Lokier
- Re: spin_lock forgets to clobber memory and other smp fix... Linus Torvalds
- Re: spin_lock forgets to clobber memory and other sm... Jamie Lokier
- Re: spin_lock forgets to clobber memory and othe... Linus Torvalds
- Re: spin_lock forgets to clobber memory and othe... Andrea Arcangeli
- Re: spin_lock forgets to clobber memory and ... Jamie Lokier
- Re: spin_lock forgets to clobber memory ... Andrea Arcangeli
- Re: spin_lock forgets to clobber memory and ... David Woodhouse
- Re: spin_lock forgets to clobber memory ... Andrea Arcangeli
- Re: spin_lock forgets to clobber memory and other smp fix... kuznet
- Re: spin_lock forgets to clobber memory and other sm... Andrea Arcangeli
- GCC proposal for "@" asm constraint Jamie Lokier
- Re: GCC proposal for "@" asm const... Andrea Arcangeli
- Re: GCC proposal for "@" asm c... Linus Torvalds
- Re: GCC proposal for "@" asm c... Andrea Arcangeli
- Re: spin_lock forgets to clobber memory and other sm... Jamie Lokier

