AL is an optional mnemonic extension for always, except in IT instructions.
Add printMandatoryPredicateOperand() PrintMethod for IT predicate printing. Ref: A8.3 Conditional execution llvm-svn: 97571
This commit is contained in:
		
							parent
							
								
									dc70c3abc0
								
							
						
					
					
						commit
						0dae1cbf1c
					
				| 
						 | 
				
			
			@ -13,7 +13,7 @@
 | 
			
		|||
 | 
			
		||||
// IT block predicate field
 | 
			
		||||
def it_pred : Operand<i32> {
 | 
			
		||||
  let PrintMethod = "printPredicateOperand";
 | 
			
		||||
  let PrintMethod = "printMandatoryPredicateOperand";
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// IT block condition mask
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -122,6 +122,7 @@ namespace {
 | 
			
		|||
    void printT2AddrModeSoRegOperand(const MachineInstr *MI, int OpNum);
 | 
			
		||||
 | 
			
		||||
    void printPredicateOperand(const MachineInstr *MI, int OpNum);
 | 
			
		||||
    void printMandatoryPredicateOperand(const MachineInstr *MI, int OpNum);
 | 
			
		||||
    void printSBitModifierOperand(const MachineInstr *MI, int OpNum);
 | 
			
		||||
    void printPCLabel(const MachineInstr *MI, int OpNum);
 | 
			
		||||
    void printRegisterList(const MachineInstr *MI, int OpNum);
 | 
			
		||||
| 
						 | 
				
			
			@ -786,6 +787,12 @@ void ARMAsmPrinter::printPredicateOperand(const MachineInstr *MI, int OpNum) {
 | 
			
		|||
    O << ARMCondCodeToString(CC);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void ARMAsmPrinter::printMandatoryPredicateOperand(const MachineInstr *MI,
 | 
			
		||||
                                                   int OpNum) {
 | 
			
		||||
  ARMCC::CondCodes CC = (ARMCC::CondCodes)MI->getOperand(OpNum).getImm();
 | 
			
		||||
  O << ARMCondCodeToString(CC);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void ARMAsmPrinter::printSBitModifierOperand(const MachineInstr *MI, int OpNum){
 | 
			
		||||
  unsigned Reg = MI->getOperand(OpNum).getReg();
 | 
			
		||||
  if (Reg) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -325,6 +325,12 @@ void ARMInstPrinter::printPredicateOperand(const MCInst *MI, unsigned OpNum) {
 | 
			
		|||
    O << ARMCondCodeToString(CC);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void ARMInstPrinter::printMandatoryPredicateOperand(const MCInst *MI, 
 | 
			
		||||
                                                    unsigned OpNum) {
 | 
			
		||||
  ARMCC::CondCodes CC = (ARMCC::CondCodes)MI->getOperand(OpNum).getImm();
 | 
			
		||||
  O << ARMCondCodeToString(CC);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void ARMInstPrinter::printSBitModifierOperand(const MCInst *MI, unsigned OpNum){
 | 
			
		||||
  if (MI->getOperand(OpNum).getReg()) {
 | 
			
		||||
    assert(MI->getOperand(OpNum).getReg() == ARM::CPSR &&
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -71,6 +71,7 @@ public:
 | 
			
		|||
  void printT2AddrModeSoRegOperand(const MCInst *MI, unsigned OpNum) {}
 | 
			
		||||
  
 | 
			
		||||
  void printPredicateOperand(const MCInst *MI, unsigned OpNum);
 | 
			
		||||
  void printMandatoryPredicateOperand(const MCInst *MI, unsigned OpNum);
 | 
			
		||||
  void printSBitModifierOperand(const MCInst *MI, unsigned OpNum);
 | 
			
		||||
  void printRegisterList(const MCInst *MI, unsigned OpNum);
 | 
			
		||||
  void printCPInstOperand(const MCInst *MI, unsigned OpNum,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue