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

SI: Migrate bitfields to Common::BitField #10076

Merged
merged 3 commits into from Sep 14, 2021
Merged

Conversation

lioncash
Copy link
Member

Migrates the SI register union bitfields over to Common::BitField for consistency with the rest of the codebase.

While we're in the same area, we can simplify a trivial conditional

Copy link
Member

@leoetlino leoetlino left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r1, 1 of 1 files at r2, 1 of 1 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @lioncash)


Source/Core/Core/HW/SI/SI.cpp, line 492 at r2 (raw file):

  // In and out for the 4 SI channels.
  for (u32 i = 0; i < MAX_SI_CHANNELS; ++i)

Won't this cause a sign comparison warning (because of MAX_SI_CHANNELS possibly being signed, since the underlying type isn't specified explicitly)?

Previously differently signed types were being used to create addresses
and bit offsets.
We can simplify this by storing the result of the test into a variable
instead.
@lioncash
Copy link
Member Author

@leoetlino Ah, true, good catch. Amended the commit.

Copy link
Member

@leoetlino leoetlino left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r4, 1 of 1 files at r5, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @lioncash)

@leoetlino leoetlino merged commit 819a0a6 into dolphin-emu:master Sep 14, 2021
11 checks passed
@lioncash lioncash deleted the sibf branch September 15, 2021 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants