[llvm-commits] [llvm] r37932 - /llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp
Evan Cheng
evan.cheng at apple.com
Thu Jul 5 18:01:34 PDT 2007
Author: evancheng
Date: Thu Jul 5 20:01:34 2007
New Revision: 37932
URL: http://llvm.org/viewvc/llvm-project?rev=37932&view=rev
Log:
Print the s bit if the instruction is toggled to its CPSR setting form.
Modified:
llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp?rev=37932&r1=37931&r2=37932&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp Thu Jul 5 20:01:34 2007
@@ -102,6 +102,7 @@
void printThumbAddrModeS4Operand(const MachineInstr *MI, int OpNo);
void printThumbAddrModeSPOperand(const MachineInstr *MI, int OpNo);
void printPredicateOperand(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);
void printCPInstOperand(const MachineInstr *MI, int opNum,
@@ -621,6 +622,14 @@
O << ARMCondCodeToString(CC);
}
+void ARMAsmPrinter::printSBitModifierOperand(const MachineInstr *MI, int opNum){
+ unsigned Reg = MI->getOperand(opNum).getReg();
+ if (Reg) {
+ assert(Reg == ARM::CPSR && "Expect ARM CPSR register!");
+ O << 's';
+ }
+}
+
void ARMAsmPrinter::printPCLabel(const MachineInstr *MI, int opNum) {
int Id = (int)MI->getOperand(opNum).getImmedValue();
O << TAI->getPrivateGlobalPrefix() << "PC" << Id;
More information about the llvm-commits
mailing list