-
Notifications
You must be signed in to change notification settings - Fork 620
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
GCC #80
GCC #80
Conversation
Can confirm using gcc also fixes the final linking error |
Weird but it no longer compiles on clang(clang 12) |
It will work fine in clang14(libstdc++12) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this! I've left a few comments below.
Fixed WIndows Builds and some Linux Fixes
What kind of UB did you encounter?
…--
OpenPGP key: 66DE F152 8299 0C21 99EF A801 A8A1 28A8 AB1C EE49
|
Can't recollect. But I think it will be fine. (As long as it receives uint64_t as a param) |
Maybe the issue was that the parameter type was uint64 instead of uint64_t, and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The addition of the |
Other instructions used in Cemu:
So it may actually be a good idea to add additional flags. |
What about adding Edit: nevermind, AVX2 is part of v3 |
Both clang and gcc have a way to selectively enable CPU extensions for individual functions. Here is an example. It's better to do it this way than to set |
I agree, I can make a pr changing this if you wish but I don't think it would help insofar as compiling Cemu for pre-haswell CPUs on GCC.
|
It would be appreciated.
Why not? As it says in your quote from the spec, you have to manually make sure the CPU extensions are supported at runtime before running the function with the intrinsics. This is something we already do. Optionally running the hand-optimized functions if the CPU extensions are supported and otherwise falling back to a generic implementation that can run on any CPU. The code for handling GPU drawcall indices is a good example. On Windows this is all pretty well tested and people run Cemu with the most ancient of CPUs. |
Alright, I didn't realise you already checked this, thanks. |
Here you go #152 |
I must have missed these clang specific pragmas when I made #80. Sorry about that. Cemu/src/Cafe/HW/Latte/Core/LatteIndices.cpp Line 288 in 68fa5b3
|
Now compiles on GCC and Clang.