summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/R600/InstPrinter
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2015-04-08 01:09:26 +0000
committerTom Stellard <thomas.stellard@amd.com>2015-04-08 01:09:26 +0000
commitd7e6f13671e4f36c038b1a671697196b7b72db27 (patch)
treece98987f91ccc8f725970f2ba6e3d3b696b28708 /llvm/lib/Target/R600/InstPrinter
parent8980dc323bfeabb8a2179611e3a8d57f457c556f (diff)
downloadbcm5719-llvm-d7e6f13671e4f36c038b1a671697196b7b72db27.tar.gz
bcm5719-llvm-d7e6f13671e4f36c038b1a671697196b7b72db27.zip
R600/SI: Initial support for assembler and inline assembly
This is currently considered experimental, but most of the more commonly used instructions should work. So far only SI has been extensively tested, CI and VI probably work too, but may be buggy. The current set of tests cases do not give complete coverage, but I think it is sufficient for an experimental assembler. See the documentation in R600Usage for more information. llvm-svn: 234381
Diffstat (limited to 'llvm/lib/Target/R600/InstPrinter')
-rw-r--r--llvm/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp5
-rw-r--r--llvm/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.h2
2 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp b/llvm/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp
index b73a9b268e8..279c3eb1912 100644
--- a/llvm/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp
+++ b/llvm/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp
@@ -127,7 +127,8 @@ void AMDGPUInstPrinter::printTFE(const MCInst *MI, unsigned OpNo,
O << " tfe";
}
-void AMDGPUInstPrinter::printRegOperand(unsigned reg, raw_ostream &O) {
+void AMDGPUInstPrinter::printRegOperand(unsigned reg, raw_ostream &O,
+ const MCRegisterInfo &MRI) {
switch (reg) {
case AMDGPU::VCC:
O << "vcc";
@@ -297,7 +298,7 @@ void AMDGPUInstPrinter::printOperand(const MCInst *MI, unsigned OpNo,
break;
default:
- printRegOperand(Op.getReg(), O);
+ printRegOperand(Op.getReg(), O, MRI);
break;
}
} else if (Op.isImm()) {
diff --git a/llvm/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.h b/llvm/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.h
index 9633e4c0332..14fb511e923 100644
--- a/llvm/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.h
+++ b/llvm/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.h
@@ -31,6 +31,8 @@ public:
void printInst(const MCInst *MI, raw_ostream &O, StringRef Annot,
const MCSubtargetInfo &STI) override;
+ static void printRegOperand(unsigned RegNo, raw_ostream &O,
+ const MCRegisterInfo &MRI);
private:
void printU8ImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
OpenPOWER on IntegriCloud