Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thunks: Move to the frontend #4075

Merged
merged 9 commits into from
Sep 28, 2024
Merged

Conversation

Sonicadvance1
Copy link
Member

FEX's thunks are fundamentally a Linux specific feature, but also with some interaction with the FEXCore in order to handle callback trampolines and passing the thunk information to the backend.

This takes the time to decouple these two halves and move it to the frontend FEXLoader. A little bit of restructuring necessary to be done in order to do this, but nothing too scary.

Walking the commits from earliest to latest will show some of the work necessary for decoupling.

@Sonicadvance1 Sonicadvance1 force-pushed the move_thunkhandler branch 3 times, most recently from 02c93ae to 9619587 Compare September 20, 2024 08:16
This was a legacy feature that is no longer necessary every since we
removed the frontend IRLoader.
…n to ContextImpl

No functional change, just moving code here.
Prep commit to give Thunks the data it needs before moving.
With as little changes as possible, because this is fairly tricky.
Moves from FEXCore to FEX::HLE. Also moves the ThunkFunctions that get
exposed to a namespace to make it more obvious that these are
thunkhandlers rather than just static functions.
Backend doesn't need access to this at all
Because it was moved from the backend to the frontend, re-wire up the
TLS handling which requires going through our syscall handler.
From prep commit 511103e.
Now that the frontend is setup, we can remove the temporary TLS
variables and use the ThreadObject directly.
@Sonicadvance1
Copy link
Member Author

Rebased and merge conflict resolved.

@lioncash lioncash merged commit f640dcc into FEX-Emu:main Sep 28, 2024
12 checks passed
@Sonicadvance1 Sonicadvance1 deleted the move_thunkhandler branch September 28, 2024 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants