From: Jari Ruusu <jari.ruusu@pp.inet.fi>
To: linux-kernel@vger.kernel.org
Cc: Thomas Sailer <sailer@ife.ee.ethz.ch>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
Jari Anttonen <jari.anttonen@nic.fi>
Subject: [PATCH] 2.2.19pre hfmodem/refclock.c asm statement error
Date: Fri, 09 Mar 2001 19:54:23 +0200 [thread overview]
Message-ID: <3AA918CF.DBCF3D6@pp.inet.fi> (raw)
drivers/char/hfmodem/refclock.c fails to compile with "gcc version 2.95.2
20000220 (Debian GNU/Linux)", but compiles normally with "gcc version
2.7.2.3". GNU assembler 2.9.5 was used in both cases. Here is the error
message:
refclock.c: In function `hfmodem_refclock_current':
refclock.c:136: Invalid `asm' statement:
refclock.c:136: fixed or forbidden register 0 (ax) was spilled for class AREG.
Here is the offending line:
__asm__("mull %2" : "=d" (tmp2), "=a" (tmp4) : "m" (scale_rdtsc), "1" (tmp0) : "ax");
It appears that above code declares register eax as output and globbered
register simultaneously. My gcc docs say: "You may not write a clobber
description in a way that overlaps with an input or output operand." Below
is a patch against 2.2.19pre16 to fix this. Please consider applying.
Regards,
Jari Ruusu <jari.ruusu@pp.inet.fi>
--- linux-2.2.19pre16/drivers/char/hfmodem/refclock.c Tue Jan 4 20:12:14 2000
+++ linux/drivers/char/hfmodem/refclock.c Fri Mar 9 17:59:31 2001
@@ -133,7 +133,7 @@
"subl %2,%%eax\n\t"
"sbbl %3,%%edx\n\t" : "=&a" (tmp0), "=&d" (tmp1)
: "m" (dev->clk.starttime_lo), "m" (dev->clk.starttime_hi));
- __asm__("mull %2" : "=d" (tmp2), "=a" (tmp4) : "m" (scale_rdtsc), "1" (tmp0) : "ax");
+ __asm__("mull %2" : "=d" (tmp2), "=a" (tmp4) : "m" (scale_rdtsc), "1" (tmp0));
__asm__("mull %1" : "=a" (tmp3) : "m" (scale_rdtsc), "a" (tmp1) : "dx");
curtime = tmp2 + tmp3;
goto time_known;
reply other threads:[~2001-03-09 17:58 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=3AA918CF.DBCF3D6@pp.inet.fi \
--to=jari.ruusu@pp.inet.fi \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=jari.anttonen@nic.fi \
--cc=linux-kernel@vger.kernel.org \
--cc=sailer@ife.ee.ethz.ch \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.