-
Notifications
You must be signed in to change notification settings - Fork 62
-
Notifications
You must be signed in to change notification settings - Fork 62
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
internal narrowing conversion error in ppu/include/vectormath/cpp/quat_aos.h #70
Comments
You can add -Wno-narrowing to the cpp flags in that makefile. It should work fine, but we should also explicitly static_cast that line or update the include. |
Is the value supposed to be 2147483648? In that case I guess the code should simply say |
I'm unsure, but from the surrounding code, it seems 0x7FFFFFFF would be
sufficient. I'm not the greatest at C, however, so take someone else's word
for it, not mine.
…On Thu, May 7, 2020 at 3:11 PM Marcus Comstedt ***@***.***> wrote:
Is the value supposed to be 2147483648? In that case I guess the code
should simply say
(vec_uint4){0x80000000U,0x80000000U,0x80000000U,0}
instead?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#70 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHE6CQNZNZZ5MVRPXS34X5DRQMIWRANCNFSM4M3ELFNQ>
.
|
Since the value is an operand to XOR, using 0x7FFFFFFF would give a very different result I think. The intention seems to be to invert the sign bit, not every bit except the sign bit. 😸 |
Come to think of it, maybe the whole thing can be rewritten to |
I didn't catch that that was the intent, like I said, i'm not great at C...
hence the disclaimer.
…On Thursday, May 7, 2020, Marcus Comstedt ***@***.***> wrote:
Come to think of it, maybe the whole thing can be rewritten to
return Quat( vec_xor( quat.get128(), ((vec_float4){-0.0, -0.0, -0.0,
0.0})));
without involving any integers at all?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#70 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHE6CQJUWX4T2DMSQINLKI3RQMKRPANCNFSM4M3ELFNQ>
.
|
Pretty sure just changing the cast to vec_uint4 is enough: return Quat( vec_xor( quat.get128(), ((vec_float4)(vec_uint4){0x80000000,0x80000000,0x80000000,0}) ) ); I don't have the toolchain/libraries set up to test that out though |
I've got a similar problem trying to build the by running Following @miigotu comment, I tried casting to Tried to compile again, and to my surprise, I've got a very weird error (at least for my limited knowledge):
did I truly broke gcc, or I did something wrong on my side? thanks for the help |
@bucanero the first error is easily worked around, by passing |
oh yes, the unused variable is not a big deal, what I have no clue about is the
it's the first time I see gcc telling me to submit a bug report . I just wanted to check if it was a problem on my side , or someone else also got this issue when trying to build |
Ideally someone should just update vectormath in PSL1GHT Maybe we should replace vectormath from here: https://github.com/erwincoumans/sce_vectormath/tree/master/include/vectormath |
@bucanero can you try checking out the |
@miigotu sure, I'll check out and try to compile. 👍 I'll report back with my results. |
Sorry for the delay, using the fix from I'll try #77 next. Edit: at least from my tests, after applying patch from |
Potential issue with PSL1GHT:
Reproduction code:
make -f Makefile.ps3
from https://github.com/emukidid/wii64-ps3 current master (commit 85b23eeaf0c3ef224cdde6074bcda99339b6274f for future reference)Error:
The text was updated successfully, but these errors were encountered: