From owner-freebsd-arch Fri Jan 18 19:50:39 2002 Delivered-To: freebsd-arch@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id B7DDC37B41C for ; Fri, 18 Jan 2002 19:50:31 -0800 (PST) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.11.4/8.11.4) id g0J3oNN08944; Fri, 18 Jan 2002 22:50:23 -0500 (EST) (envelope-from wollman) Date: Fri, 18 Jan 2002 22:50:23 -0500 (EST) From: Garrett Wollman Message-Id: <200201190350.g0J3oNN08944@khavrinen.lcs.mit.edu> To: mime@traveller.cz Subject: Re: 64 bit counters again X-Newsgroups: mit.lcs.mail.freebsd-arch In-Reply-To: References: Organization: MIT Laboratory for Computer Science Cc: arch@FreeBSD.org Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In article you write: >> Yes. IA64. SPARC 9b (SPARC64) and Alpha, which are 64 >> bits, require locks, since they don't have the ability to >> do an atomic "lock; cmpxchg8b". > >Can they do "lock; add const,(mem)" in 32 or 64 bit? Terry is talking out of his ear again. Alpha most definitely does have 64-bit load-linked/store-conditional, which is entirely equivalent to i386's 64-bit compare-exchange. (For some reason in the Alpha ARM it's called ``load locked'' instead.) If we cared about running on MIPS architectures, they have LL/SC as well. SPARC v9 has 64-bit compare-and-swap (although unlike in IA32 a memory barrier is also required); see the SPARC v9 Architecture Reference Manual. IA64 has 64-bit compare-exchange as well; see the Itanium Architecture Software Developer's Manual, volume 2 (Intel document number 245318-003), where there's a whole section on implementing synchronization primitives on IA84; it also has an atomic FETCHADD instruction which I didn't bother to look more closely at. -GAWollman -- Garrett A. Wollman | O Siem / We are all family / O Siem / We're all the same wollman@lcs.mit.edu | O Siem / The fires of freedom Opinions not those of| Dance in the burning flame MIT, LCS, CRS, or NSA| - Susan Aglukark and Chad Irschick To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message