summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp
diff options
context:
space:
mode:
authorDan Gohman <dan433584@gmail.com>2016-01-26 03:39:31 +0000
committerDan Gohman <dan433584@gmail.com>2016-01-26 03:39:31 +0000
commitbb3722430f8bf7ceaa22e4f13df2a1730d93cfd7 (patch)
tree219adb250190e13c6003449f67bec940d71f5079 /llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp
parent3a5c958182021abe2c2293409720ce9262711ef3 (diff)
downloadbcm5719-llvm-bb3722430f8bf7ceaa22e4f13df2a1730d93cfd7.tar.gz
bcm5719-llvm-bb3722430f8bf7ceaa22e4f13df2a1730d93cfd7.zip
[WebAssembly] Implement unaligned loads and stores.
Differential Revision: http://reviews.llvm.org/D16534 llvm-svn: 258779
Diffstat (limited to 'llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp')
-rw-r--r--llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp b/llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp
index 9a95150cb55..2ecf9be2398 100644
--- a/llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp
+++ b/llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp
@@ -172,6 +172,16 @@ void WebAssemblyInstPrinter::printOperand(const MCInst *MI, unsigned OpNo,
}
}
+void
+WebAssemblyInstPrinter::printWebAssemblyP2AlignOperand(const MCInst *MI,
+ unsigned OpNo,
+ raw_ostream &O) {
+ int64_t Imm = MI->getOperand(OpNo).getImm();
+ if (Imm == WebAssembly::GetDefaultP2Align(MI->getOpcode()))
+ return;
+ O << ":p2align=" << Imm;
+}
+
const char *llvm::WebAssembly::TypeToString(MVT Ty) {
switch (Ty.SimpleTy) {
case MVT::i32:
OpenPOWER on IntegriCloud