- 
                Notifications
    
You must be signed in to change notification settings  - Fork 15.1k
 
[MC] Teach checkAsmTiedOperandConstraints about optional operands #81381
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
[MC] Teach checkAsmTiedOperandConstraints about optional operands #81381
Conversation
| 
          
 ✅ With the latest revision this PR passed the C/C++ code formatter.  | 
    
| 
           Attached is a readable diff (updated).  | 
    
| 
           I'll try to pull the duplicate logic to some common place. (I'll need to modify it in the next PR.)  | 
    
At some point in the past, optional operands have become allowed in the middle of an instruction. However, `checkAsmTiedOperandConstrains` hasn't been modified to support this. This patch adds the support by copying the necessary logic from `convertToMCInst`.
0bd96c2    to
    a38f0a0      
    Compare
  
    | 
           ping  | 
    
    
      
        1 similar comment
      
    
  
    | 
           ping  | 
    
| 
           Ah very nice, presumably this fixes some of the issues I ran into, but looks like better solution than my hack.  | 
    
| 
           If possible some extra comments about the logic behind the operand indices would be appreciated as the logic in this file is already pretty inexplicable. Other than that LGTM  | 
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
          
 Sure, I'll see what I can come up with.  | 
    
| 
           @AlfieRichardsArm  | 
    
| 
           Looks great thank you  | 
    
At some point in the past, optional operands have become allowed in the middle of an instruction. However,
checkAsmTiedOperandConstrainshasn't been modified to support this. This patch adds the support by pulling operand offsets counting out ofconvertToMCInstand reusing it incheckAsmTiedOperandConstrains.