lightning
[Top][All Lists]
Advanced

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

SH-4 port


From: Paul Cercueil
Subject: SH-4 port
Date: Thu, 20 Oct 2022 13:45:42 +0100

Hi Paulo,

I have a SH-4 port which is about half-done. So far it passes 30/61 checks.

One of the problem I'm facing is that while SH-4 has 32 floating-point registers, 16 of them are behind a bank switch, and the registers f4->f11 are argument registers, which only leaves registers f0->f3 and f12-f15 as general-purpose. Since these can be paired for 64-bit processing, that means I only have four (64-bit) general-purpose floating-point registers available, while Lightning needs at least six.

I think a good part of the failing checks is because they try to access JIT_F4 or above.

One solution could be to switch to bank1 on prolog and back to bank0 on epilog and function calls, and use the bank1 registers as general-purpose and bank0 registers as floating-point arguments. It's easy to copy between the two banks and would give us eight general-purpose floating-point registers, but would add some overhead.

The other solution would be to reduce the minimum number of floating-point registers in Lightning to 4.

Thoughts?

Also, I wonder if you are okay with an early patchset or should I get all the checks to work first?

Cheers,
-Paul





reply via email to

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