Re: [PATCH] incorrect asm constraints for ll/sc constructs

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

 



>  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"...

> 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;
> }




[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux