WebAssembly: minor MCAsmInfo fixes
authorJF Bastien <jfb@google.com>
Mon, 27 Jul 2015 20:46:51 +0000 (20:46 +0000)
committerJF Bastien <jfb@google.com>
Mon, 27 Jul 2015 20:46:51 +0000 (20:46 +0000)
Summary:
Fix pointer / callee-save stack sto size.
Update comment character to be LISP-ish.

Subscribers: llvm-commits, sunfish, jfb

Differential Revision: http://reviews.llvm.org/D11537

llvm-svn: 243326

llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.cpp

index 55346f7..5a54b3a 100644 (file)
@@ -23,13 +23,20 @@ using namespace llvm;
 WebAssemblyMCAsmInfo::~WebAssemblyMCAsmInfo() {}
 
 WebAssemblyMCAsmInfo::WebAssemblyMCAsmInfo(const Triple &T) {
-  PointerSize = CalleeSaveStackSlotSize = T.isArch64Bit();
+  PointerSize = CalleeSaveStackSlotSize = T.isArch64Bit() ? 8 : 4;
 
   // TODO: What should MaxInstLength be?
 
+  // WebAssembly's text format uses s-expressions to represent its AST,
+  // LISP-style comments are therefore suitable.
+  CommentString = ";";
+
   PrivateGlobalPrefix = "";
   PrivateLabelPrefix = "";
 
+  InlineAsmStart = ";APP\n";
+  InlineAsmEnd = ";NO_APP\n";
+
   UseDataRegionDirectives = true;
 
   Data8bitsDirective = "\t.int8\t";