Skip to content

Conversation

@psifertex
Copy link
Member

needs review from someone who knows the architecture better but fixes the reported bug in #7897

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a critical bug in PowerPC floating-point fused multiply-add/subtract instruction lifting. The operands for the multiply and add/subtract operations were swapped, causing incorrect decompilation results. The fix swaps operands 2 and 3 to match the PowerPC ISA specification where these instructions compute frD = frA * frC + frB (not frA * frB + frC).

Changes:

  • Corrected operand order for all 8 fused multiply-add/subtract instruction variants (double and single precision)
  • Changed multiply operation from using oper1 * oper3 to oper1 * oper2
  • Changed add/subtract operation from using oper2 to oper3

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@plafosse plafosse assigned plafosse and psifertex and unassigned plafosse Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants