Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 May 2002 12:07:11 -0400 (EDT)
From:      Andrew Gallatin <gallatin@cs.duke.edu>
To:        John Baldwin <jhb@FreeBSD.ORG>
Cc:        alpha@FreeBSD.ORG
Subject:   Re: gcc3 & alpha kernels
Message-ID:  <15589.10927.852559.251962@grasshopper.cs.duke.edu>
In-Reply-To: <XFMail.20020517114408.jhb@FreeBSD.org>
References:  <15589.8136.958487.689590@grasshopper.cs.duke.edu> <XFMail.20020517114408.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

<cc trimmed considerably>

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15589.10927.852559.251962>