From owner-freebsd-alpha Fri May 17 8:44:33 2002 Delivered-To: freebsd-alpha@freebsd.org Received: from mail.speakeasy.net (mail14.speakeasy.net [216.254.0.214]) by hub.freebsd.org (Postfix) with ESMTP id 3FDDB37B409 for ; Fri, 17 May 2002 08:44:29 -0700 (PDT) Received: (qmail 12720 invoked from network); 17 May 2002 15:44:26 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail14.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 17 May 2002 15:44:26 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.11.6/8.11.6) with ESMTP id g4HFiNF76119; Fri, 17 May 2002 11:44:24 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <15589.8136.958487.689590@grasshopper.cs.duke.edu> Date: Fri, 17 May 2002 11:44:08 -0400 (EDT) From: John Baldwin To: Andrew Gallatin Subject: Re: gcc3 & alpha kernels Cc: Alan Cox , Doug Rabson , Jeff Roberson , alpha@FreeBSD.org, obrien@FreeBSD.org Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On 17-May-2002 Andrew Gallatin wrote: > > John Baldwin writes: > > > > Does it work fine if you back out my hack to alpha/include/atomic.h where > > I commented out the zapnot in atomic_cmpset_32()? > > Nope. It still hangs on boot with the zapnot in place. > > Am I confused, or is it just plain wrong to blindly zap the high bits? > Won't that always make the comparison fail for large unsigned values > that GCC didn't mess up on? (eg, *p = 0xffffffff). No. ldl_l sign extends the 32-bit we load into a 64-bit register. The zapnot was clearing the upper 32-bits of the register to get back to a zero-extended unsigned 32-bit value. However, according to one of the GCC developer (see my latest commit) the Alpha ABI requires integer arguments to be sign-extended when passed regardless of signed/unsigned for the destination type b/c it maeks it easier sinec all the 'l' instructions (addl, ldl, etc.) do sign-extension. Thus, with 3.1 the zapnot isn't needed now. The fact that 2.95 needed it was possibly a bug. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message