Date: Fri, 17 May 2002 11:44:08 -0400 (EDT) From: John Baldwin <jhb@FreeBSD.org> To: Andrew Gallatin <gallatin@cs.duke.edu> Cc: Alan Cox <alc@cs.rice.edu>, Doug Rabson <dfr@nlsystems.com>, Jeff Roberson <jroberson@chesapeake.net>, alpha@FreeBSD.org, obrien@FreeBSD.org Subject: Re: gcc3 & alpha kernels Message-ID: <XFMail.20020517114408.jhb@FreeBSD.org> In-Reply-To: <15589.8136.958487.689590@grasshopper.cs.duke.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <jhb@FreeBSD.org> <>< 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20020517114408.jhb>