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 Wed, 19 Nov 2025, Jason Thorpe wrote:
> > Conversely the compiler is happy to inline LL/SC sequences as they map
> > directly to RTL and at worst you need to maintain emulation. It seems
> > like a good compromise.
>
> I’m not disagreeing that inline ll/sc is more efficient on systems that
> support it. But if the compiler is targeted at a MIPS-I target, this is
> generally considered an acceptable compromise. Sure, if you build with
> -mmips3 or whatever the flag is, inline it. But if -mmips1, a libcall
> doesn’t seem unreasonable.
Nothing wrong with it in principle, especially if you do want to optimise
for MIPS I. Traps are cheap on MIPS however, and even more so with MIPS I
and its simple four-stage execution pipeline, so it might be the case of
perfect being the enemy of good enough. There is a balance to be found
here.
Maciej
Home |
Main Index |
Thread Index |
Old Index