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

Interpreter: Remove an unnecessary cast in Trace() #7229

Merged
merged 1 commit into from Aug 27, 2018

Conversation

lioncash
Copy link
Member

@lioncash lioncash commented Jul 7, 2018

PowerPCState's cr_val member is an array of u64s, so we can just use the correct printf macro specifier within <cinttypes>. This also avoids truncation on operating systems that use an LLP64 data model (like
Windows), where long is actually 32 bits in size, not 64-bit, which could result in wonky values being printed, should Trace ever be used on it.

Alternatively, if Trace() is a vestigial part of the interpreter, we can just remove it entirely.

PowerPCState's cr_val member is an array of u64s, so we can just use the
correct printf macro specifier within cinttypes. This also avoids
truncation on operating systems that use an LLP64 data model (like
Windows), where long is actually 32 bits in size, not 64-bit, which
could result in wonky values being printed, should Trace ever be used on
it.
Copy link
Member

@BhaaLseN BhaaLseN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure Trace had been a lot more useful in the past, but is mostly left "just in case" these days. Not much harm in keeping it around a little longer though I suppose...

@delroth delroth merged commit 0c39590 into dolphin-emu:master Aug 27, 2018
@lioncash lioncash deleted the truncate branch August 27, 2018 04:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants