This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: An ia32 asm bug?
- To: egcs-bugs at egcs dot cygnus dot com, egcs at egcs dot cygnus dot com
- Subject: Re: An ia32 asm bug?
- From: "H . J . Lu" <hjl at lucon dot org>
- Date: Wed, 7 Jun 2000 21:06:00 -0700
- References: <20000607210153.A23402@valinux.com>
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.