From: Andre Majorel <amajorel@teaser.fr>
To: linux-gcc@vger.kernel.org
Subject: "fixed or forbidden register 0 (ax) was spilled for class AREG"
Date: Sat, 21 Dec 2002 00:14:32 +0100 [thread overview]
Message-ID: <20021220231432.GA1013@teaser.fr> (raw)
Greetings gentlemen. Trying to compile Linux-hexen 0.6.0 with
GCC 2.95.4, I got "Invalid `asm' statement" errors. The errors
occur in a routine that seems to multiply a 16.16 fixed point
number by a integer. Here's a fragment that triggers the error :
1 typedef int fixed_t;
2
3 int foo (void)
4 {
5 int f_w;
6 fixed_t m_w;
7 fixed_t scale_ftom;
8
9 m_w =
10 (
11 {
12 int __value, __fb = (scale_ftom);
13 __asm__("imul %%ebx; shrd $16,%%edx,%%eax"
14 : "=a" (__value)
15 : "a" (f_w<<16), "b" (__fb)
16 : "eax", "edx");
17 __value;
18 }
19 );
20 }
$ gcc badasm.c
badasm.c: In function `foo':
badasm.c:16: Invalid `asm' statement:
badasm.c:16: fixed or forbidden register 0 (ax) was spilled for class AREG.
This code used to compile before GCC was upgraded. I'd
appreciate any hints on how to fix it.
--
André Majorel <amajorel@teaser.fr>
http://www.teaser.fr/~amajorel/
reply other threads:[~2002-12-20 23:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20021220231432.GA1013@teaser.fr \
--to=amajorel@teaser.fr \
--cc=linux-gcc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).