Match Hitbox::update#2
Open
skijer wants to merge 1 commit intodoldecomp:mainfrom
Open
Conversation
Extract `bsp->radius` to a local and reorder scaledPos.y operations as in-place mutations to influence float register allocation, so the function produces identical bytes to the target. Promotes KartHitbox.cpp from NonMatching to Equivalent.
Collaborator
|
Looks good! Thank you for the contribution. Can you also delete the Also now since the whole file is matching now, you should be able to change it to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
bsp->radiusto a local before the multiply inHitbox::update.scaledPos.yarithmetic as in-place mutations(
+= hitboxElevation,*= scale.y,+= postScaleHitboxElevation)instead of
sum/summulttemporaries.kart/KartHitbox.cppfromNonMatchingtoEquivalent.What this fixes
Hitbox::updatenow produces byte-identical instructions to the target.Previously it diffed in ~12 instructions due to a float register
allocation cascade where
postScaleHitboxElevationlanded inf4instead of
f5. Extractingbsp->radiusto a named local beforethe multiply moves the load earlier in the schedule and shifts the
allocation.