Port-mips archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: __atomic_test_and_set() and mips o32 - help wanted



On Tue, 18 Nov 2025, Mouse wrote:

> > Just trap and emulate LL/SC in the kernel for user software;
> 
> I'm not sure the smartest option is to place the emulation load most on
> the machines with the least computational resources to spare.

 Well, you need to trap into the kernel anyway to emulate the operation 
required, so you might as well make it benefit hardware such as MIPS III, 
which (as David has also observed) is very much legacy now too, having 
reached 30+ years of age.  And with the alternative syscall approach all 
the parties lose, as even hardware that has atomics support available has 
to trap.

> > newer hardware (which is the vast majority nowadays).
> 
> NetBSD used to be about actually _supporting_ old hardware, not tyranny
> of the recent majority.

 You're barking up the wrong tree I'm afraid.  If it wasn't for me, MIPS I 
support would have been dropped from GCC/binutils 20 years ago already and 
it was only LL/SC emulation that saved it back then.  And there were more 
attempts later on to drop support, e.g. in the context of the FPXX MIPS 
psABI extension, that I have also consistently and successfully objected.

 I have also saved the VAX GCC backend from being dropped and now non-BWX 
(pre-EV56) Alpha support is at risk as the old register allocator is being 
removed right away, along with all the backends that still rely on it, and 
sadly I've been running out of resources to get that sorted, so you are 
welcome (as is anyone) to step in and assist.  The community has waited 
over a decade for someone to volunteer and do the work already, so no one 
can say the change is being rushed in.

  Maciej


Home | Main Index | Thread Index | Old Index