[Pkg-db-devel] Re: (MIPS|amd64)/gcc-assembly mutexes [#11575]

Kurt Roeckx Q@ping.be
Wed, 8 Dec 2004 22:33:03 +0100


On Wed, Dec 08, 2004 at 03:33:50PM -0500, Clint Adams wrote:
> 
> What does using RAX instead of EAX gain us?  I'm just curious.

Afaik, nothing.  It's just a 64 bit register instead of a 32 bit
register.  It's not faster or anything.  Why is it using eax on
i386 and not ax or al?  After all we're just putting an unsigned
char in it.  Why is __r and int and not an tsl_t?

> Should the x86 code get the "volatile"'s too?

I'm assuming you're talking about the one in MUTEX_UNSET?  I have
no idea where that volatile comes from, but it seems to be used on
other arches too.

I don't think it's needed, but it shouldn't be bad either.


Kurt