Re: __atomic_test_and_set() and mips o32 - help wanted
Jason Thorpe <[email protected]> Tue, 18 Nov 2025 22:26:58 +0100
| Newsgroups | gmane.os.netbsd.ports.alpha,gmane.os.netbsd.ports.mips.devel,gmane.os.netbsd.devel.toolchain |
|---|---|
| Message-ID | <[email protected]> |
+ port-alpha > On Nov 18, 2025, at 10:00 PM, Maciej W. Rozycki <[email protected]> wrote: > > 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. There are actually other ways to do this. This is a situation where an ifunc would be beneficial, or some other run-time fix-up to the correct implementation. A restartable atomic sequence is incredibly cheap. > 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. No everyone knows about the impending dooms, alas. It’s a real shame that non-BWX support is on the chopping block (aside: how on earth can that have such a huge impact on the register allocator???) … there are quite a few non-BWX machines still out there (at least at chez moi, there are 3 + a parts machine), and for someone wanting to dabble in Alpha hardware, the BWX-supporting systems fetch top dollar on the used market (compared to merely more-than-I-should-spend for an EV4-class system) - people still gaga to run VMS I guess - making the non-BWX systems a lot more accessible. Emulation of BWX would be ***incredibly*** slow. Like, slow enough that pre-BWX systems would be unusable, I’m afraid. I’m not in a position to directly contribute to the typing-of-code effort to help save the pre-BWX Alpha back-end, but what else can I (and others) do to help? -- thorpej