Commit Graph
104 Commits
Author SHA1 Message Date
Herman Semenov b871e76d05 [Core/Debugger/FileLoaders/FileSystems/MIPS] Using reserve if possible 2023-12-15 13:59:19 +03:00
Henrik Rydgård 4c0077fd84 Protect against weirdness in UnlinkBlocks (hopefully not needed after prev fix) 2023-09-27 12:31:17 +02:00
Henrik Rydgård c0ee711cb9 In the FinalizeBlock assert, extract some more info 2023-09-26 13:37:40 +02:00
Henrik Rydgård e7c0b41867 Improve an assert 2023-09-22 10:58:43 +02:00
Henrik Rydgård 3acbeb3073 Add an assert in JitBlockCache 2023-09-11 13:59:04 +02:00
Henrik Rydgård 9db9fec898 VFPU: Some micro-optimizations. Don't fall back to interpreter path for vexp/vlog/vrexp. 2023-06-04 11:28:33 +02:00
Henrik RydgårdandGitHub 67a35d3476 Merge pull request #17356 from unknownbrackets/minor-cleanup
Cleanup some more string formats, mostly in debugger
2023-05-23 08:29:23 +02:00
Henrik Rydgård 1a2d599942 JIT: Consider the block cache full a few block before it is, to allow space for proxy blocks.
Should fix the following crash:

Core/MIPS/JitCommon/JitBlockCache.cpp:190

JitBlock &b = blocks_[num_blocks_];
2023-05-02 21:53:01 +02:00
Unknown W. Brackets 46101581c0 Core: Cleanup disasm buffer usage. 2023-04-29 09:07:25 -07:00
Henrik Rydgård 6945deec01 Replace a LOT of sprintf with snprintf, and a few strcpy with truncate_cpy 2023-04-28 21:04:05 +02:00
Unknown W. Brackets 89c18d8077 riscv: Cleanup missing Poison, Crash. 2023-02-12 12:10:29 -08:00
Henrik Rydgård e1a48d74c4 A bit more GetPointer cleanup.
Probably not worth it for performance reasons, but some semantic cleanup
is good, especially the accidental GetPointer -> writable casts without
using GetPointerWrite.

Using Unchecked on already checked pointers, or when we'd crash anyway
if it returned nullptr, is good for clarity.
2023-01-10 12:13:47 +01:00
Unknown W. Brackets dea9cac16c Core: Add range checks to some helpers and similar. 2023-01-09 16:56:18 -08:00
Unknown W. Brackets cee8bfd5cf riscv: Avoid a jit warning.
We'll end up doing the same as arm64, most likely.
2023-01-01 10:28:54 -08:00
Unknown W. Brackets 77849d3eed riscv: Add disassembler.
From https://github.com/anthony-coulter/riscv-disassembler.
Modified slightly to pull in less headers in the h, prefix funcs.
2023-01-01 10:28:53 -08:00
Unknown W. Brackets b9fe48f42d Crash: Lookup block numbers more efficiently.
We only care about the first one in these places anyway.  Also make sure
we don't try to match an invalid block number.
2022-12-20 21:02:52 -08:00
Unknown W. Brackets a7b7bf7826 Global: Set many read-only params as const.
This makes what they do and which args to use clearer, if nothing else.
2022-12-10 21:13:36 -08:00
lainon 3cdf72b68b Better readability and optimization insertion into container by replacing 'insert' -> 'emplace', 'push_back' -> 'emplace_back' 2022-09-30 12:35:28 +03:00
Unknown W. Brackets 2479d52202 Global: Reduce includes of common headers.
In many places, string, map, or Common.h were included but not needed.
2022-01-30 16:35:33 -08:00
Unknown W. Brackets 3df6cb704f Global: Fix some type conversion warnings.
Hidden by some warning disables.
2022-01-30 16:09:33 -08:00
Unknown W. Brackets 00f9707399 jit: Use a hash for invalidate/clear all.
This should make sceKernelICacheClearAll() more useful.
2021-12-19 10:40:33 -08:00
Unknown W. Brackets 13ec384dbe Build: Explicitly include ppsspp_config.h.
This adds it to all files that use it.  Not all our builds include the
file.
2021-03-02 21:04:03 -08:00
Unknown W. Brackets cae0815095 jit: Avoid using mips identifier directly.
Apparently this gets defined on mips systems.
2021-02-26 07:24:58 -08:00
Unknown W. Brackets 6b8f7294b3 Global: Remove ARM64 define.
Was barely used anymore, and some users are specifying it when it's not
the case, so better to detect consistently.
2020-08-29 08:45:50 -07:00
Henrik Rydgård 0829543987 Third part of getting rid of PanicAlert 2020-07-19 20:34:02 +02:00
Unknown W. Brackets 7910b4029a arm64jit: Track writable and non-writable pointers.
Switch uses different memory regions.  We can handle this, might as well
cleanup some const abuse.
2020-05-17 00:15:12 -07:00
Henrik Rydgård 468b830bec Show IR disassembly in JIT Compare screen 2018-01-04 12:23:23 +01:00
Unknown W. Brackets 8c3b0aa89c jit: Skip unlinking blocks on clear.
Speeds up clear especially when on a WX exclusive platform.
2017-12-28 11:12:06 -08:00
Henrik Rydgård 635b2ada43 Remove a function that didn't make a lot of sense. 2017-01-26 09:50:16 +01:00
Henrik Rydgård 6e49341b91 Workaround a shutdown crash by adding a sanity check .. which actually catches stuff. A bit worrying. 2017-01-26 08:43:26 +01:00
Henrik Rydgard ffe4c266ef Add CodeBlockCommon base class to remove further arch-specificity in JitBlockCache
Remove unused ArmThunk.
2016-05-01 11:40:00 +02:00
Henrik Rydgard 8b450c8034 Merge NativeJit.cpp/h with JitCommon.cpp/h 2016-05-01 11:39:59 +02:00
Henrik Rydgard 5aadce59a2 Move architecture-specific code out of JitBlockCache 2016-05-01 11:39:58 +02:00
Henrik Rydgard a5be0976bd Remove preprocessor hacks to choose JIT implementation.
Opens up for having multiple JIT implementations available at runtime,
which could be use for experimenting with new JIT compiler types or for
unit testing one JIT on another architecture.

Very few of the newly virtual calls are on any sort of critical path so
hopefully there will not be a performance loss.
2016-05-01 11:39:53 +02:00
Henrik Rydgard d60f5ba285 Fix minor memory leak in JIT block cache 2016-02-10 15:43:36 +01:00
Unknown W. Brackets eebe3e7bce armjit: Fix block exit safety writes.
This ensures we don't link to invalid blocks, fixes BKPTs on relinking,
and fixes BKPTs when relinking a prelinked block.

Should help #8524.
2016-01-30 20:44:57 -08:00
sum2012 8debe785b8 Revert "Fix Yu-Gi-Oh 6 crash with edit card in Android version"
This reverts commit f659e60c8d.

The crash is correctly fixed
2015-12-29 04:10:18 +08:00
Henrik Rydgard 7fee5abf9f x86/x64: Don't use a separate code block for pregenerated functions, just like on ARM 2015-10-08 22:15:28 +02:00
Henrik Rydgard b7725c4f40 Remove empty header files 2015-10-08 18:54:33 +02:00
Unknown W. Brackets cd842ac21f Validate blocklinking in icache invalidate all.
Normally blocks are invalidated on entry.  But when blocklinking is on,
we don't validate on all entries.

This fixes Tales of Rebirth crashes (#7868.)
2015-07-19 13:08:32 -07:00
Unknown W. Brackets 96b01e4999 Make sure we don't clean up proxy blocks. 2015-07-19 13:04:06 -07:00
Henrik RydgårdandUnknown W. Brackets 59d0baca93 Add way to print some block bloat stats. 2015-04-11 00:12:56 -07:00
Henrik Rydgard 57e759a605 ARM64: Fix and turn on basic block linking 2015-04-06 18:13:17 +02:00
Henrik Rydgard cc722f09f6 Improve ARM64 disassembly by merging MOVZ+MOVK. Minor stuff. 2015-04-06 18:13:07 +02:00
Henrik Rydgard 34ab532971 ARM64 jit: Fix some pointer truncations and other fun stuff.. 2015-04-06 18:13:05 +02:00
Unknown W. Brackets 6c03fc4f01 Correct savestate interaction with proxy blocks.
At least, I think that's what's going wrong here.  Either way, this is
safer and apparently fixes #7612.
2015-03-17 23:50:20 -07:00
Unknown W. Brackets 6cc84ffdbb jit: fix invalidation of blocks with only jr.
We need to expand the range not to the latest exit, but to the size of the
block.
2015-02-28 15:09:41 -08:00
Henrik Rydgard 2f6216d787 Fix bug in CwCheat icache invalidation. Fixes #7430 2015-02-04 10:56:38 +01:00
sum2012 f659e60c8d Fix Yu-Gi-Oh 6 crash with edit card in Android version
This revert part of
https://github.com/hrydgard/ppsspp/commit/74d8a9bdba9b8348e60e8a6b40b01da26b5eb020
2015-01-13 22:01:02 +08:00
Henrik Rydgård 53ab7ab4b2 Fix FakeJit, start preparing a little for ARM64 2014-12-23 09:36:28 +01:00