-
Notifications
You must be signed in to change notification settings - Fork 123
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
ThunkLibs: Fix hostcall packer generation #1805
Conversation
8327a45
to
9d16716
Compare
I'm not convinced it's beneficial to rid of PackedArguments at the expense of moving more logic to the generator. The template is very lightweight, and my measurements indicated it doesn't contribute significantly to the compile time of large thunklibs like libGL. IMO we should move towards minimizing logic in the generator. The struct-repacking branch gave me a bad feeling about how robust a code generator with lots of manual branching is, and the PackedArguments template is a good way to avoid that pitfall. I'd prefer shelving this PR for now until I've done more tinkering with the idea. |
The code was already there, the logic it wasn't moved. I just fixed the generation so it can be used. Before it was generated, broken, and we also had the PackedArguments.
I don't necessarily agree there. The Also, we can't use templates when doing cross bitness thunking, and evne for x86-64 / arm64 not all the packing rules are the same. We'll have to generate custom structs for everything for correctness, anyway. Personally, I prefer codegeneration over templates for these things. Templates can be used where they are a good fit, like handling the conversions and stuff. |
9d16716
to
9cb78dd
Compare
This has been updated to add |
9cb78dd
to
cb8fb94
Compare
cb8fb94
to
b338f87
Compare
"This fixes the generation of the hostcall packers" I don't understand what is being fixed here or why it is broken. |
"so we don't need to wrap thunks with C++ templates." |
As mentioned in a previous comment, the hostpackers were broken, and unused. I don't understand what is there to not understand here. |
FWIW #1868 adds a feature that makes the |
Nothing changed on this so far. |
I've been blocked by lack of review/alternative proposals apart from "i don't like this / I don't think it is needed". Now, more time has to be wasted on rebases as well. |
(Closing this as there is an ongoing powergrab by @Sonicadvance1, I will migrate my work to https://github.com/skmp/fex-emu-ng.git) |
Overview
This fixes the generation of the hostcall packers, so we don't need to wrap thunks with C++ templates.
Depends
#1818