-
Notifications
You must be signed in to change notification settings - Fork 393
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove the concept of flipped CCRs from the Power codegen
In order to avoid FXU rejects on POWER6 chips, the Power codegen contains logic to flip the order of operands when performing a comparison when determined to be necessary. Unfortunately, the implementation of this optimization left much to be desired. The generateTrg1Src2Instruction helper would set a special flag on the target register and silently flip the compare operand order if it was deemed to be necessary. The generateConditionalBranch helper (and related helpers) would then check this flag to determine whether they needed to flip the branch. This is obviously very surprising and also doesn't correctly handle CR logical instructions. Since the evaluation of comparisons to a condition register has now been centralized in evaluateIntCompareToConditionRegister, the logic can now be moved there, with the condition returned being flipped rather than using hacky flags. This should prevent any unfortunate mistakes in the future. Signed-off-by: Ben Thomas <ben@benthomas.ca>
- Loading branch information
1 parent
5ed32ed
commit 8ed69bc
Showing
3 changed files
with
88 additions
and
112 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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