[PATCH] D11537: WebAssembly: minor MCAsmInfo fixes

JF Bastien jfb at chromium.org
Mon Jul 27 13:47:07 PDT 2015


jfb created this revision.
jfb added subscribers: sunfish, llvm-commits.
Herald added a subscriber: jfb.

Fix pointer / callee-save stack sto size.
Update comment character to be LISP-ish.

http://reviews.llvm.org/D11537

Files:
  lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.cpp

Index: lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.cpp
===================================================================
--- lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.cpp
+++ lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.cpp
@@ -23,13 +23,20 @@
 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";


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11537.30730.patch
Type: text/x-patch
Size: 920 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150727/8129fe5d/attachment.bin>


More information about the llvm-commits mailing list