[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: toolchain/45673: gcc on i386 current generates bad code for assembler code in lock.h
The following reply was made to PR toolchain/45673; it has been noted by GNATS.
From: Joerg Sonnenberger <joerg%homeworld.netbsd.org@localhost>
Subject: Re: toolchain/45673: gcc on i386 current generates bad code for
assembler code in lock.h
Date: Sun, 11 Mar 2012 23:35:01 +0000
On Wed, Nov 30, 2011 at 08:55:00PM +0000, kuehro%gmx.de@localhost wrote:
> The reason seems to be gcc bug 10153. The error with pkgsrc can be fixed
> by changing r to q in line 108 of /usr/include/x86/lock.h:
> _asm volatile ("xchgb %0,(%2)" :
> "=r" (val)
> :"0" (val), "r" (lockp));
> This restricts allowable registers to a,b,c or d. Of course it would be
> much better to fix gcc somehow.
That restricts it more than necessary, doesn't it? I think the correct
constraint here "=qQ", since both l and h registers are allowed.
Main Index |
Thread Index |