[PR #675] [MERGED] JIT optimizations and refactoring #83

Open
opened 2026-01-29 19:06:19 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/stenzek/duckstation/pull/675
Author: @stenzek
Created: 7/30/2020
Status: Merged
Merged: 7/31/2020
Merged by: @stenzek

Base: masterHead: jit-optimizations


📝 Commits (10+)

  • 9f93786 CPU/Recompiler: Use rel32 call where possible for no-args
  • 21e7659 JitCodeBuffer: Support using preallocated buffer
  • 9731be3 CPU/Recompiler/AArch64: Use bl instead of blr for short branches
  • 660e187 CPU/CodeCache: Allocate recompiler buffer in program space
  • 724cb10 GTE: Don't store as u16 and load as u32
  • 6192375 CPU/Recompiler: Add methods to emit global load/stores
  • 95f4355 GTE: Convert class to namespace
  • 3245654 CPU/Recompiler: Call GTE functions directly
  • e76500b Settings: Turn into a global variable
  • 1427993 GPU: Replace local pointers with global

📊 Changes

88 files changed (+4453 additions, -4505 deletions)

View changed files

📝 android/app/src/cpp/android_host_interface.cpp (+33 -43)
📝 src/common/jit_code_buffer.cpp (+113 -14)
📝 src/common/jit_code_buffer.h (+20 -12)
📝 src/core/CMakeLists.txt (+0 -4)
📝 src/core/analog_controller.cpp (+13 -12)
📝 src/core/analog_controller.h (+3 -4)
📝 src/core/bus.cpp (+920 -316)
📝 src/core/bus.h (+117 -265)
src/core/bus.inl (+0 -288)
📝 src/core/cdrom.cpp (+26 -18)
📝 src/core/cdrom.h (+6 -12)
📝 src/core/controller.cpp (+5 -5)
📝 src/core/controller.h (+2 -3)
📝 src/core/core.vcxproj (+0 -6)
📝 src/core/core.vcxproj.filters (+1 -7)
📝 src/core/cpu_code_cache.cpp (+169 -205)
📝 src/core/cpu_code_cache.h (+16 -68)
📝 src/core/cpu_core.cpp (+397 -393)
📝 src/core/cpu_core.h (+74 -155)
src/core/cpu_core.inl (+0 -146)

...and 68 more files

📄 Description

Opening as a PR so the CI will build it, needs some testing to make sure nothing is broken.

Should not have any differences with master (save states are even compatible), except 10-15% faster. Still plenty to come.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/stenzek/duckstation/pull/675 **Author:** [@stenzek](https://github.com/stenzek) **Created:** 7/30/2020 **Status:** ✅ Merged **Merged:** 7/31/2020 **Merged by:** [@stenzek](https://github.com/stenzek) **Base:** `master` ← **Head:** `jit-optimizations` --- ### 📝 Commits (10+) - [`9f93786`](https://github.com/stenzek/duckstation/commit/9f9378683bfa33a1a61e5c27bdc0287411fe6a5c) CPU/Recompiler: Use rel32 call where possible for no-args - [`21e7659`](https://github.com/stenzek/duckstation/commit/21e7659335ee0696bfebef2a8fe60f5c2f2b67ac) JitCodeBuffer: Support using preallocated buffer - [`9731be3`](https://github.com/stenzek/duckstation/commit/9731be3e44dfad6e5804a94945462714a12456eb) CPU/Recompiler/AArch64: Use bl instead of blr for short branches - [`660e187`](https://github.com/stenzek/duckstation/commit/660e187eb50eca897b73e003d262d79bf2726cb4) CPU/CodeCache: Allocate recompiler buffer in program space - [`724cb10`](https://github.com/stenzek/duckstation/commit/724cb108360270ed6e5ef126673235ed11e115e0) GTE: Don't store as u16 and load as u32 - [`6192375`](https://github.com/stenzek/duckstation/commit/6192375116ec2b263b2beb3ea832c687511fa2f4) CPU/Recompiler: Add methods to emit global load/stores - [`95f4355`](https://github.com/stenzek/duckstation/commit/95f43555e5fb140b842043e2c3812eb683280c85) GTE: Convert class to namespace - [`3245654`](https://github.com/stenzek/duckstation/commit/324565493c9110b44ae85ad29a065652acfe075b) CPU/Recompiler: Call GTE functions directly - [`e76500b`](https://github.com/stenzek/duckstation/commit/e76500b467e0cb318784f2f4b7821f11c99e1bd1) Settings: Turn into a global variable - [`1427993`](https://github.com/stenzek/duckstation/commit/1427993b5241444510ac0823103cb0a82b6482c0) GPU: Replace local pointers with global ### 📊 Changes **88 files changed** (+4453 additions, -4505 deletions) <details> <summary>View changed files</summary> 📝 `android/app/src/cpp/android_host_interface.cpp` (+33 -43) 📝 `src/common/jit_code_buffer.cpp` (+113 -14) 📝 `src/common/jit_code_buffer.h` (+20 -12) 📝 `src/core/CMakeLists.txt` (+0 -4) 📝 `src/core/analog_controller.cpp` (+13 -12) 📝 `src/core/analog_controller.h` (+3 -4) 📝 `src/core/bus.cpp` (+920 -316) 📝 `src/core/bus.h` (+117 -265) ➖ `src/core/bus.inl` (+0 -288) 📝 `src/core/cdrom.cpp` (+26 -18) 📝 `src/core/cdrom.h` (+6 -12) 📝 `src/core/controller.cpp` (+5 -5) 📝 `src/core/controller.h` (+2 -3) 📝 `src/core/core.vcxproj` (+0 -6) 📝 `src/core/core.vcxproj.filters` (+1 -7) 📝 `src/core/cpu_code_cache.cpp` (+169 -205) 📝 `src/core/cpu_code_cache.h` (+16 -68) 📝 `src/core/cpu_core.cpp` (+397 -393) 📝 `src/core/cpu_core.h` (+74 -155) ➖ `src/core/cpu_core.inl` (+0 -146) _...and 68 more files_ </details> ### 📄 Description Opening as a PR so the CI will build it, needs some testing to make sure nothing is broken. Should not have any differences with master (save states are even compatible), except 10-15% faster. Still plenty to come. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 19:06:19 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/duckstation#83