mirror of
https://github.com/libretro/parallel-dc.git
synced 2026-11-07 23:01:54 -10:00
A block is compiled if there are 16 KB left in the code cache. A block is up to 511 operations, and with the MMU on a load or store can be over a hundred bytes: upstream went to 32 KB after Tomb Raider: The Last Revelation ran past 16 (f11a5981f). The largest block seen here is 10 KB, in Sega Rally 2, on x86-64 and on ARM64 alike. 64 KB now, of 16 MB: CODE_MARGIN, for the cache, the one for rewritten code and the checks the recompilers make. A build with NO_MMU had no cache for rewritten code at all (TEMP_CODE_SIZE 0), and since such code is kept there with the MMU off too would have been given a block to compile into it. No Makefile defines NO_MMU; it has the megabyte the others have. rdv_BlockCheckFail(), with the MMU on, used a block it had looked up without asking whether there was one - there is none if what failed was run once more after it was discarded. Upstream has the same check.