| To: | "Kevin D. Kissell" <kevink@mips.com> |
|---|---|
| Subject: | Re: [PATCH] incorrect asm constraints for ll/sc constructs |
| From: | Daniel Jacobowitz <dan@debian.org> |
| Date: | Fri, 25 May 2001 14:49:37 -0700 |
| Cc: | linux-mips@oss.sgi.com |
| In-reply-to: | <011801c0e55f$e4d39820$0deca8c0@Ulysses>; from kevink@mips.com on Fri, May 25, 2001 at 11:15:48PM +0200 |
| References: | <Pine.GSO.3.96.1010525130531.17652A-100000@delta.ds2.pg.gda.pl> <011801c0e55f$e4d39820$0deca8c0@Ulysses> |
| Sender: | owner-linux-mips@oss.sgi.com |
| User-agent: | Mutt/1.3.16i |
On Fri, May 25, 2001 at 11:15:48PM +0200, Kevin D. Kissell wrote:
> > The following program cannot be compiled with gcc 2.95.3, because the
> > offset is out of range (I consider it a bug in gcc -- it should allocate
> > and load a temporary register itself and pass it appropriately as %0,
>
> I think gcc can be forgiven for not allocating a temporary,
> given the ".set noat"...
Except, of course, gcc doesn't even know the set noat is there. It
doesn't parse the interior of asm() statements.
>
> > matching the "R" constraint; still it's better than generating bad code):
> >
> > int main(void)
> > {
> > int *p;
> >
> > asm volatile(".set push\n\t"
> > ".set noat\n\t"
> > "lw $0,%0\n\t"
> > ".set pop"
> > :
> > : "R" (p[0x10000]));
> >
> > return 0;
> > }
>
>
>
--
Daniel Jacobowitz Debian GNU/Linux Developer
Monta Vista Software Debian Security Team
|
| Previous by Date: | Re: [PATCH] incorrect asm constraints for ll/sc constructs, Kevin D. Kissell |
|---|---|
| Next by Date: | Surprise! (Re: MIPS_ATOMIC_SET again (Re: newest kernel, Jun Sun |
| Previous by Thread: | Re: [PATCH] incorrect asm constraints for ll/sc constructs, Kevin D. Kissell |
| Next by Thread: | Re: [PATCH] incorrect asm constraints for ll/sc constructs, Kevin D. Kissell |
| Indexes: | [Date] [Thread] [Top] [All Lists] |