blob: 44fcc129c39e853ae0c7aa8e1d38629405bf0e3d [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
Adrian Prantl5f8f34e42018-05-01 15:54:18 +000011/// This file contains the declarations of the WebAssemblyMCAsmInfo
Dan Gohman10e730a2015-06-29 23:51:55 +000012/// properties.
13///
14//===----------------------------------------------------------------------===//
15
16#include "WebAssemblyMCAsmInfo.h"
17#include "llvm/ADT/Triple.h"
Sam Cleggcf2a9e22018-07-16 23:09:29 +000018
Dan Gohman10e730a2015-06-29 23:51:55 +000019using namespace llvm;
20
21#define DEBUG_TYPE "wasm-mc-asm-info"
22
Dan Gohman18eafb62017-02-22 01:23:18 +000023WebAssemblyMCAsmInfo::~WebAssemblyMCAsmInfo() {}
24
25WebAssemblyMCAsmInfo::WebAssemblyMCAsmInfo(const Triple &T) {
Benjamin Kramer54c781a2017-04-17 19:08:41 +000026 CodePointerSize = CalleeSaveStackSlotSize = T.isArch64Bit() ? 8 : 4;
Dan Gohman18eafb62017-02-22 01:23:18 +000027
28 // TODO: What should MaxInstLength be?
29
30 UseDataRegionDirectives = true;
31
32 // Use .skip instead of .zero because .zero is confusing when used with two
33 // arguments (it doesn't actually zero things out).
34 ZeroDirective = "\t.skip\t";
35
36 Data8bitsDirective = "\t.int8\t";
37 Data16bitsDirective = "\t.int16\t";
38 Data32bitsDirective = "\t.int32\t";
39 Data64bitsDirective = "\t.int64\t";
40
41 AlignmentIsInBytes = false;
42 COMMDirectiveAlignmentIsInBytes = false;
43 LCOMMDirectiveAlignmentType = LCOMM::Log2Alignment;
44
45 SupportsDebugInformation = true;
46
Dan Gohman18eafb62017-02-22 01:23:18 +000047 // TODO: UseIntegratedAssembler?
48}