blob: d2617796ca9915c95213262ba70d7b07fd1158b6 [file] [log] [blame]
Dan Gohman10e730a2015-06-29 23:51:55 +00001//===-- WebAssemblyMCAsmInfo.cpp - WebAssembly asm properties -------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9///
10/// \file
11/// \brief This file contains the declarations of the WebAssemblyMCAsmInfo
12/// properties.
13///
14//===----------------------------------------------------------------------===//
15
16#include "WebAssemblyMCAsmInfo.h"
17#include "llvm/ADT/Triple.h"
18#include "llvm/Support/CommandLine.h"
19using namespace llvm;
20
21#define DEBUG_TYPE "wasm-mc-asm-info"
22
23WebAssemblyMCAsmInfo::~WebAssemblyMCAsmInfo() {}
24
25WebAssemblyMCAsmInfo::WebAssemblyMCAsmInfo(const Triple &T) {
JF Bastien1a12bf12015-07-27 20:46:51 +000026 PointerSize = CalleeSaveStackSlotSize = T.isArch64Bit() ? 8 : 4;
Dan Gohman10e730a2015-06-29 23:51:55 +000027
28 // TODO: What should MaxInstLength be?
29
30 PrivateGlobalPrefix = "";
31 PrivateLabelPrefix = "";
32
Dan Gohman10e730a2015-06-29 23:51:55 +000033 UseDataRegionDirectives = true;
34
35 Data8bitsDirective = "\t.int8\t";
36 Data16bitsDirective = "\t.int16\t";
37 Data32bitsDirective = "\t.int32\t";
38 Data64bitsDirective = "\t.int64\t";
39
40 AlignmentIsInBytes = false;
41 COMMDirectiveAlignmentIsInBytes = false;
42 LCOMMDirectiveAlignmentType = LCOMM::Log2Alignment;
43
Dan Gohman10e730a2015-06-29 23:51:55 +000044 SupportsDebugInformation = true;
45
46 // For now, WebAssembly does not support exceptions.
47 ExceptionsType = ExceptionHandling::None;
48
Dan Gohman10e730a2015-06-29 23:51:55 +000049 // TODO: UseIntegratedAssembler?
50}