* An ia32 asm bug?
@ 2000-06-07 21:01 H . J . Lu
2000-06-07 21:06 ` H . J . Lu
0 siblings, 1 reply; 2+ messages in thread
From: H . J . Lu @ 2000-06-07 21:01 UTC (permalink / raw)
To: egcs-bugs, egcs
# 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;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: An ia32 asm bug?
2000-06-07 21:01 An ia32 asm bug? H . J . Lu
@ 2000-06-07 21:06 ` H . J . Lu
0 siblings, 0 replies; 2+ messages in thread
From: H . J . Lu @ 2000-06-07 21:06 UTC (permalink / raw)
To: egcs-bugs, egcs
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-06-07 21:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-07 21:01 An ia32 asm bug? H . J . Lu
2000-06-07 21:06 ` H . J . Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).