bug-hurd
[Top][All Lists]
Advanced

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

Re: gnumach FTBFS


From: Samuel Thibault
Subject: Re: gnumach FTBFS
Date: Wed, 18 May 2011 17:08:37 +0200
User-agent: Mutt/1.5.12-2006-07-14

Svante Signell, le Wed 18 May 2011 16:54:24 +0200, a écrit :
> A question: I can avoid the warnings below by doing the following asm
> change. I saw it somewhere on the web that people recommended this type
> of change to enable the inline code go into a register. Does it make
> sense (I don't remember much of asm)
>   asm("xorl %0,%0\n0:\tbsfw %1,%w0\n\tbtr %0,%1\n\tjnc 0b"
> -      : "=&r" (rv), "=m" (*field) : "1" (*field));
> +      : "=&r" (rv), "=m" (*field) : "m" (*field));

It does, but it's not the same, you have no guarantee that the register
name will be the same.  I have pushed a correct simplification, and
actually reported a bug to the Linux kernel, where they actually dropped
the read part entirely...

> -> The error below goes away with -O1 or higher!
> -> ../linux/src/drivers/scsi/ultrastor.c:308:3: error: inconsistent
> operand constraints in an ‘asm’
> 
> Is this OK? There is also a similar case in the glibc code.

Where?

Samuel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]