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

improve intel instruction & operand formatting #1463

Merged
merged 2 commits into from
Jul 25, 2023

Commits on Jul 25, 2023

  1. improve intel instruction & operand formatting

    This fixes three issues when formatting an x86_64 instruction or its
    operands:
    
    1) Fix the order of operands when formatting the instruction to be the
       AT&T syntax order.  If the instruction had three or more operands.
       Conversion from the internal (Intel) order rotated right by 1 instead
       of reversing the operands.
    
    2) Eliminate special treatment of register %kN as the first operand as
       mask registers in Instruction::format as Operand::format already
       formats these as masks (enclosed in braces) and not all uses of mask
       registers are as a mask.
    
    3) Fix Operand::format to produce the correct disassembly operand
       string.  The formatting of the internal Expression needs to be done
       for some indirect values.  This was done in the Instruction::format
       instead of directly in Operand::format
    
    * x86Formatter::getInstructionString - fixes 1, 2, 3
    
    * Operand::format - fixes 3
    
    * x86Formatter::formatRegister - cleanup, remove malloc that could leak
    kupsch committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    5c87a5a View commit details
    Browse the repository at this point in the history
  2. add comment

    kupsch committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    98b0c08 View commit details
    Browse the repository at this point in the history