This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: iconv make check failures under ppc
On Sat, 09 Sep 2000, Geoff Keating wrote:
> > Date: Sat, 09 Sep 2000 14:08:26 -0400
> > From: "Kevin B. Hendricks" <kevin.hendricks@sympatico.ca>
> > Reply-To: khendricks@ivey.uwo.ca
> >
> > -#define PPC_DCBST(where) asm volatile ("dcbst 0,%0" : : "r"(where) :
> > "memory") -#define PPC_SYNC asm volatile ("sync" : : : "memory")
> > +#define PPC_DCBST(where) asm ("dcbst 0,%0" : : "r"(where) : "memory")
> > +#define PPC_SYNC asm ("sync" : : : "memory")
> > #define PPC_ISYNC asm volatile ("sync; isync" : : : "memory")
> > -#define PPC_ICBI(where) asm volatile ("icbi 0,%0" : : "r"(where) :
> > "memory") +#define PPC_ICBI(where) asm ("icbi 0,%0" : : "r"(where) :
> > "memory") #define PPC_DIE asm volatile ("tweq 0,0")
>
> These changes have no effect. All 'asm' statements with no outputs
> are automatically considered 'volatile'. Any problems you are seeing
> are most likely compiler bugs.
This isn't excactly clear from the documentation, at least if I take the
smallest common denominator (worst possible interpretation :-) ):
An `asm' instruction without any operands or clobbers (and "old
style" `asm') will not be deleted or moved significantly, regardless,
unless it is unreachable, the same wasy as if you had written a
`volatile' keyword.
Since we have "memory" clobbers on all this instructions, does this mean it
counts as an output? Or do we have 3 levels of volatile behaviour? Like
- no volatile with outputs
- no volatile with no outputs (and no clobbers?)
- volatile written or oldstyle asm
?
Anyway, the documentation clearly states that the explicit use of volatile is
the recommended practice, so I think we better change it.
Franz.