linux-mips
[Top] [All Lists]

Re: mips64 cpu-probe.c compile failure

To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Subject: Re: mips64 cpu-probe.c compile failure
From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Date: Thu, 18 Sep 2003 12:17:54 +0200 (MET DST)
Cc: linux-mips@linux-mips.org
In-reply-to: <20030918.180536.08320519.nemoto@toshiba-tops.co.jp>
Organization: Technical University of Gdansk
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
On Thu, 18 Sep 2003, Atsushi Nemoto wrote:

> macro> Log message:
> macro>        Fix indeterminism in the multiply/shift erratum detection 
> leading
> macro>        to false negatives.  Plus a few minor comment updates for 
> clarity.
> 
> gcc 3.3.1 can not compile current (2.4) arch/mips64/kernel/cpu-probe.c.
> 
> cpu-probe.c:118: warning: asm operand 0 probably doesn't match constraints
> cpu-probe.c:118: warning: asm operand 1 probably doesn't match constraints
> ...
> cpu-probe.c: In function `check_mult_sh':
> cpu-probe.c:118: error: impossible constraint in `asm'

 Hmm, perhaps 3.3.1 fails to inline the functions...  It works just fine
with 2.95.4.

> The code is:
> 
> static inline void align_mod(int align, int mod)
> {
>       asm volatile(
>               ".set   push\n\t"
>               ".set   noreorder\n\t"
>               ".balign %0\n\t"
>               ".rept  %1\n\t"
>               "nop\n\t"
>               ".endr\n\t"
>               ".set   pop"
>               :
>               : "i" (align), "i" (mod));
> }
> 
> The align_mod() and mult_sh_align_mod() should be written as macro?

 I wanted to avoid that as the resulting code would be ugly.  I guess
there is no other choice, although I think that's a bug in gcc.

 Can you quote the exact command line used for building the file?

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +


<Prev in Thread] Current Thread [Next in Thread>