Age | Commit message (Collapse) | Author |
|
|
|
After the dynarec writes new instructions, it has to flush the
instruction and data caches. Some of these flush operations are
privileged on the 3DS, so the clear cache functions have to run
through svcBackdoor. The Nintendo implementation (and CFW
reimplementation) of svcBackdoor has a problem where interrupts and
context switches will cause crashes.
Even though we can disable interrupts in the flush function, there's
still a window of time between svcBackdoor being called and the
function being run where an interrupt will corrupt the stack.
Luma3DS implemements a svcCustomBackdoor call we can use that also
runs a function in supervisor mode, but uses an implementation that
avoids this problem.
|
|
svcCreateThread doesn't fully set up thread vars, which causes
svcBreaks / crashes when calling certain functions -- reentrant ones,
for example. threadCreate, etc. are higher-level functions that do all
the correct setup and cleanup.
Since we're treating the thread structure as opaque, calling it an
int_32t seems OK.
|
|
the frontend instead.
- dynamically allocate the recompiler cache, this will allow using the
recompiler even when the .bss section is relocated far from the .text
section (for example when using the hombrew loader).
|
|
|
|
|
|
|