34 Commits
Author SHA1 Message Date
LibretroAdmin 9140befd81 dynarec: room for the largest block, and a block that is already gone
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.
2026-10-10 14:38:17 +02:00
twinaphex cb3bd71cc5 Backport https://github.com/flyinghead/flycast/commit/e99aac357567302e1d1daf4b59ec8e4139c879da#diff-7194c04007dd96b8c496118886760725f8eb7b8bda6916d63bf6e3ea967e44a7 2021-04-12 02:32:26 +02:00
twinaphex 352536f977 Get rid of core/rec.cpp to make it more in line with upstream 2021-03-01 12:08:12 +01:00
twinaphex 5e821261e2 (Dynarec) Get rid of function pointers 2021-02-28 22:35:44 +01:00
Flyinghead 05da8c9c2f rec-cpp: Add missing opcode call classes and allow for immediate args 2019-12-12 19:37:22 +01:00
Flyinghead 32c2bae64f dynarecs,reios: use new logging 2019-08-30 12:58:52 +02:00
Flyinghead 8f41faa035 rec-arm64: use SSA, generate main loop
Fix xtrct canonical implementation
2019-06-14 13:45:11 +02:00
Flyinghead fc14e9f2f8 rec-cpp: crash when running rom 2019-05-31 12:50:55 +02:00
twinaphex cb25abd9e8 Update rec_cpp 2018-08-11 13:46:09 +02:00
twinaphex 9e9a09fa42 Rebase code 2018-06-15 05:03:54 +02:00
twinaphex f740bca1e9 Move audiostream file to core/hw/aica and get rid of oslib/ in
general
2015-12-28 16:17:03 +01:00
twinaphex 2b5ee8a0b5 (rec_cpp) Take out emitter/x86_emitter.h 2015-12-24 16:08:36 +01:00
twinaphex 206fc20f61 Uniquely name BlockCompiler 2015-12-24 14:48:05 +01:00
twinaphex 2f5bcba70d Create interface so we can easily switch between dynarecs
in the future
2015-12-24 14:28:21 +01:00
twinaphex d6ba6f90e9 (rec_cpp.cpp) Get rid of some of the auto type deduction 2015-12-24 12:27:09 +01:00
twinaphex 291263d3ad Make a centralized rec.cpp from which all other dynarecs originate
from
2015-12-24 09:38:10 +01:00
twinaphex 8fa5df554d Take out profiler 2015-12-18 07:47:52 +01:00
twinaphex 96335ca884 Cleanups 2015-10-18 06:54:55 +02:00
twinaphex 4e9b9238b1 Make the mainloops somewhat semi-comprehensible 2015-10-18 04:15:26 +02:00
Stefanos Kornilios Mitsis Poiitidis 2beb23978b rec-cpp: Fix non-emscripten build 2015-08-03 11:12:24 +02:00
Stefanos Kornilios Mitsis Poiitidis d8ccc9d2e7 emscripten: More rec-cpp progress
It almost builds now, except emscripten randomly gives up and crashes. No one likes my code these days...
2015-07-29 06:45:02 +02:00
~skmp f1a6f04dce rec-cpp: verify() that we have an executer w/ shop_count 2015-07-29 02:29:07 +02:00
Stefanos Kornilios Mitsis Poiitidis ec5bb09917 rec-cpp: Add sig aCaCcCdC for mul_u64, mul_s64 2015-07-29 02:28:52 +02:00
Stefanos Kornilios Mitsis Poiitidis 1e0224dd1b rec-cpp: Add sig aCaCcCdC for rocl, rocr 2015-07-29 02:28:29 +02:00
Stefanos Kornilios Mitsis Poiitidis 4b97f468b5 rec-cpp: Implement block ends and a few more decoders
- Full IL mode now works!
- Dispatch up to 270 mips on 2.2ghz i7, on a complex 3d scene
- Will run many games fullspeed on modern pc, thanks to idleskip
2015-07-25 20:38:48 +02:00
Stefanos Kornilios Mitsis Poiitidis b1f7015a98 rec/cpp: Mostly fully direct specialized dispatchers
- Nest shil implementations to shilop_##name::form::impl for easier template matching
- Add more direct handlers
- Add prints if a direct handler isn't found
- Remove multiple indirect handlers, leave them for fallback
2015-07-25 14:36:04 +02:00
Stefanos Kornilios Mitsis Poiitidis 51a6ed2146 rec/all: optional mips counter on recs
Also de-unroll rec-cpp for debug builds
2015-07-25 14:31:46 +02:00
Stefanos Kornilios Mitsis Poiitidis 00dbd6222f rec-cpp: Massage for gcc compatibility 2015-07-25 14:25:51 +02:00
Stefanos Kornilios Mitsis Poiitidis 1710f76ab1 unroll the execution loop 2015-07-25 14:24:11 +02:00
Stefanos Kornilios Mitsis Poiitidis 7303a046be rec-cpp: Direct calls to shil_opcl_* handlers for many opcodes 2015-07-25 14:23:59 +02:00
Stefanos Kornilios Mitsis Poiitidis e4138f9a60 rec-cpp: Wastefully generate more dispatchers for better BTB cache locality
The real solution is to have inlining between the (now static) dispatchers and the impls.
It's gonna be hard to convince the compiler on that.
2015-07-25 14:23:07 +02:00
Stefanos Kornilios Mitsis Poiitidis fc01428c30 rec-cpp: Force resets when running out of blocks 2015-07-25 14:22:28 +02:00
Stefanos Kornilios Mitsis Poiitidis bfef969626 rec-cpp: Implement stuff up to the corejit layer 2015-07-25 14:21:53 +02:00
Stefanos Kornilios Mitsis Poiitidis cd80850acb First idea for a fully portable "jit" 2015-07-25 14:20:54 +02:00