This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: An ia32 asm bug?


On Wed, Jun 07, 2000 at 09:01:53PM -0700, H . J . Lu wrote:
> # gcc -S -O2 fs.c
> fs.c: In function `foo':
> fs.c:5: invalid lvalue in asm statement
> 
> 
> -- 
> H.J. Lu (hjl@gnu.org)
> ---
> int
> foo ()
> {
> int x;
> __asm__("mov %%fs,%0":"=r" ((unsigned short) x));
> return x;
> }

It is for gcc 2.96. It seems that

__asm__("mov %%fs,%0":"=r" (x));

works.


H.J.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]