Re: mips64 cpu-probe.c compile failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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        +



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux