diff options
author | Owen Anderson <resistor@mac.com> | 2011-01-13 21:46:02 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2011-01-13 21:46:02 +0000 |
commit | c3c7f5dd567d1f76d2217f7b7a533706e9bd73e8 (patch) | |
tree | 6fe0ce03aa1d483800da88e37676c8240843e9e8 /llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp | |
parent | 0447d30939b6c1b04e9a057f9fd771ec1aa24556 (diff) | |
download | bcm5719-llvm-c3c7f5dd567d1f76d2217f7b7a533706e9bd73e8.tar.gz bcm5719-llvm-c3c7f5dd567d1f76d2217f7b7a533706e9bd73e8.zip |
Add support to the ARM MC infrastructure to support mcr and friends. This requires supporting
the symbolic immediate names used for these instructions, fixing their pretty-printers, and
adding proper encoding information for them.
With this, we can properly pretty-print and encode assembly like:
mrc p15, #0, r3, c13, c0, #3
Fixes <rdar://problem/8857858>.
llvm-svn: 123404
Diffstat (limited to 'llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp b/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp index 00160da4465..820c2e6ca6f 100644 --- a/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp +++ b/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp @@ -453,6 +453,16 @@ void ARMInstPrinter::printNoHashImmediate(const MCInst *MI, unsigned OpNum, O << MI->getOperand(OpNum).getImm(); } +void ARMInstPrinter::printPImmediate(const MCInst *MI, unsigned OpNum, + raw_ostream &O) { + O << "p" << MI->getOperand(OpNum).getImm(); +} + +void ARMInstPrinter::printCImmediate(const MCInst *MI, unsigned OpNum, + raw_ostream &O) { + O << "c" << MI->getOperand(OpNum).getImm(); +} + void ARMInstPrinter::printPCLabel(const MCInst *MI, unsigned OpNum, raw_ostream &O) { llvm_unreachable("Unhandled PC-relative pseudo-instruction!"); |