lightning
[Top][All Lists]
Advanced

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

Re: [PATCH] ppc: Fix 'calli' when floating-point arguments are passed


From: Paul Cercueil
Subject: Re: [PATCH] ppc: Fix 'calli' when floating-point arguments are passed
Date: Mon, 05 Sep 2022 21:15:26 +0100

Hi Paulo,

  This is a not a very common pattern and found a bug in the
computation of live registers static setup.
Please rebuild with the last git push, main difference is the change:

-                       jit_regset_ior(&reglive, &reglive, &regmask);
+ jit_regset_ior(&block->reglive, &reglive, &regmask);

The 2 extra return added in the patch is just to avoid extra computation that is not required, and avoids possible issues setting as live registers
that are known dead.

The problem the git commit corrects is that it is setting only the local
variable and exiting the function, without updating the initial state
of the split block after the conditional branch.

I think it did something since now it doesn't crash at the same spot ;)

I get the same thing but with register r10 now. But since r10 is a caller-saved register I believe this is expected, and I need a jit_live() there.

If I add a jit_live(_R10) before the jit_jmpi() then everything works. Thanks!

Note that I use _R10 in my code because I do need a caller-saved register and none of the JIT_R/JIT_V are. I use it as a counter, and I need to update it in Lightning-generated functions. If I use a callee-saved register, Lightning will generate code to spill/reload the register and I can't update it within functions.

Cheers,
-Paul





reply via email to

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