lightrec: Enable code buffer support
authorPaul Cercueil <paul@crapouillou.net>
Sat, 4 Jun 2022 20:12:14 +0000 (21:12 +0100)
committerPaul Cercueil <paul@crapouillou.net>
Sat, 4 Jun 2022 20:50:22 +0000 (21:50 +0100)
Map a 8 MiB code buffer at (base + 0x80.0000), right after the emulated
RAM. In this code buffer, Lightrec will write the recompiled code for
the host machine.

In general, the code buffer support is very useful when the host
platform has only a small RW+X memory area available for JIT purposes,
like it's the case on the WiiU.

On Linux, this isn't a concern, but having a code buffer does still
bring a benefit: if both the start address and the end address of the
code buffer's address fit in 32 bits, then Lightrec's code LUT can be
shrunk in half (2.5 MiB instead of 5 MiB), as it only needs to store
32-bit pointers.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>

No differences found