mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-25 15:56:00 +03:00
[PR #1836] [MERGED] core/libraries: HLE fiber reimplementation #2336
Labels
No labels
Bloodborne
bug
contributor wanted
documentation
enhancement
frontend
good first issue
help wanted
linux
pull-request
question
release
verification progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shadPS4#2336
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/shadps4-emu/shadPS4/pull/1836
Author: @polybiusproxy
Created: 12/21/2024
Status: ✅ Merged
Merged: 12/24/2024
Merged by: @polybiusproxy
Base:
main← Head:core/you-need-fibers📝 Commits (1)
de8aba9core/libraries: HLE fiber reimplementation📊 Changes
6 files changed (+539 additions, -168 deletions)
View changed files
📝
CMakeLists.txt(+3 -2)📝
src/core/libraries/fiber/fiber.cpp(+332 -129)📝
src/core/libraries/fiber/fiber.h(+77 -37)➕
src/core/libraries/fiber/fiber_context.s(+121 -0)📝
src/core/libraries/kernel/threads/tcb.cpp(+1 -0)📝
src/core/tls.h(+5 -0)📄 Description
This PR reimplements the fiber library according to the original library. The goal is for the reimplementation to be overall more accurate, multiplatform (the previous implementation was only for Windows), while fixing bugs the previous implementation had.
A big problem is our implementation won't work on fibers with small stack areas due to HLE consuming most of the stack and overflowing it. The previous implementation did not have this issue as the game-provided stack was completely ignored. A possible solution to avoid this (suggested by red_prig) would be to make a wrapper for all HLE functions that switches the stack, but not many games (only found on The Playroom) have this issue so that's out of scope for this PR.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.