lightning
[Top][All Lists]
Advanced

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

Re: [Lightning] JIT_R11 trashed by jit_callr on MIPS32


From: Paul Cercueil
Subject: Re: [Lightning] JIT_R11 trashed by jit_callr on MIPS32
Date: Mon, 03 Nov 2014 00:12:24 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.0

Hi,

I'm working on porting my code to the latest git of Lightning. With success so far, I could replace all my arch-dependent hacks without too much trouble.

Well I certainly didn't expect Lightning to use a JIT_R(n) register
internally. I know that those can be trashed when calling C functions, but I
assumed that they would never be trashed within the generated code.

I think that it would be better to avoid this problem, yes. JIT_R11 should
be removed from the list of available registers. It's not a big deal on MIPS
anyway, there are plenty of registers that can be used there.

   Ok. For consistency with other ports, I will change it to no longer export
it. Just note that is possible to have a setup where an argument register
is also the return register. The most common case is to have JIT_R0 as
the return register, but if the jit code does not return anything, it will not
be clobbered.

Then is it safe to assume that JIT_R0 will be the only register that might be clobbered during function calls, across all the supported archs?

Regards,
Paul



reply via email to

[Prev in Thread] Current Thread [Next in Thread]