Groups | Search | Server Info | Login | Register


Groups > muc.lists.netbsd.tech.toolchain > #3562

Re: __atomic_test_and_set() and mips o32 - help wanted

From David Holland <dholland-tech@netbsd.org>
Newsgroups muc.lists.netbsd.tech.toolchain
Subject Re: __atomic_test_and_set() and mips o32 - help wanted
Date 2025-11-19 04:09 +0000
Organization Newsgate at muc.de e.V.
Message-ID <aR1C8HDttgEwf63z@netbsd.org> (permalink)
References <20251117035156.B9ADA18CD@thoreau.thistledown.com.au> <>

Show all headers | View raw


On Mon, Nov 17, 2025 at 02:51:56PM +1100, Simon Burge wrote:
 > > i'm not sure what the right thing to do here is.  it's not clear
 > > to me that the actual old 32-bit hardware can do this at all, but
 > > there are now explicit calls to this builtin.  GCC configury tries
 > > to find and notice it's missing, but libstdc++ still has a couple
 > > of calls to it directly in it's "test_and_set()".
 > >
 > >
 > > anyone have a good idea?
 > 
 > MIPS1 has no ll/sc or any other atomic primatives.  SMP R3000
 > boxes (eg DECsystem 54x0) used external hardware for this.
 > 
 > Seems like RAS (see rasctl(2)) might be the only (simple?)
 > option for MIPS1/o32 ?

mips1 and o32 aren't the same thing. All 32-bit MIPS hardware, which
includes 32-bit builds on otherwise 64-bit macines, will necessarily
be using o32.

Anyway, despite what the rest of the thread seems to think, surely
it's not necessary to hack the compiler, just to provide a mips1
implementation of the missing symbol on mips1 ports? Which can then be
an ll/sc sequence to be emulated, or a RAS, or whatever else...

-- 
David A. Holland
dholland@netbsd.org

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de

Back to muc.lists.netbsd.tech.toolchain | Previous | NextNext in thread | Find similar


Thread

Re: __atomic_test_and_set() and mips o32 - help wanted David Holland <dholland-tech@netbsd.org> - 2025-11-19 04:09 +0000
  Re: __atomic_test_and_set() and mips o32 - help wanted "Maciej W. Rozycki" <macro@orcam.me.uk> - 2025-11-19 22:45 +0000
    Re: __atomic_test_and_set() and mips o32 - help wanted Jason Thorpe <thorpej@me.com> - 2025-11-20 07:19 +0100
      Re: __atomic_test_and_set() and mips o32 - help wanted "Maciej W. Rozycki" <macro@orcam.me.uk> - 2025-11-21 10:26 +0000

csiph-web