diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-07-06 01:01:34 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-07-06 01:01:34 +0000 |
commit | dfb2ebac29f92a533218bd576734913a89d1299d (patch) | |
tree | 08b6b46e14db7abc3191d31d06a527d3039776f9 | |
parent | 04c813d00ced172d9fbd26aa610e0992846a40bd (diff) |
Print the s bit if the instruction is toggled to its CPSR setting form.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37932 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/ARM/ARMAsmPrinter.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMAsmPrinter.cpp b/lib/Target/ARM/ARMAsmPrinter.cpp index 6d7c93f3e6..5e65226914 100644 --- a/lib/Target/ARM/ARMAsmPrinter.cpp +++ b/lib/Target/ARM/ARMAsmPrinter.cpp @@ -102,6 +102,7 @@ namespace { 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 @@ void ARMAsmPrinter::printPredicateOperand(const MachineInstr *MI, int opNum) { 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; |