diff --git a/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.cpp b/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.cpp index 55346f71c6f..5a54b3a24c8 100644 --- a/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.cpp +++ b/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.cpp @@ -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";