From owner-freebsd-alpha Fri May 17 9: 7:49 2002 Delivered-To: freebsd-alpha@freebsd.org Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by hub.freebsd.org (Postfix) with ESMTP id AEBCB37B411; Fri, 17 May 2002 09:07:42 -0700 (PDT) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.9.3/8.9.3) with ESMTP id MAA17488; Fri, 17 May 2002 12:07:41 -0400 (EDT) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.11.6/8.9.1) id g4HG7Ba47335; Fri, 17 May 2002 12:07:11 -0400 (EDT) (envelope-from gallatin@cs.duke.edu) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15589.10927.852559.251962@grasshopper.cs.duke.edu> Date: Fri, 17 May 2002 12:07:11 -0400 (EDT) To: John Baldwin Cc: alpha@FreeBSD.ORG Subject: Re: gcc3 & alpha kernels In-Reply-To: References: <15589.8136.958487.689590@grasshopper.cs.duke.edu> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid 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 John Baldwin writes: > > 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. Ah, thanks. I think I unserstand now. Drew To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message