LLVM  4.0.0
WebAssemblyMCAsmInfo.cpp
Go to the documentation of this file.
1 //===-- 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 using namespace llvm;
19 
20 #define DEBUG_TYPE "wasm-mc-asm-info"
21 
23 
26 
27  // TODO: What should MaxInstLength be?
28 
30 
31  // Use .skip instead of .zero because .zero is confusing when used with two
32  // arguments (it doesn't actually zero things out).
33  ZeroDirective = "\t.skip\t";
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;
43 
45 
46  // For now, WebAssembly does not support exceptions.
48 
49  // TODO: UseIntegratedAssembler?
50 
51  // WebAssembly's stack is never executable.
53 }
LCOMM::LCOMMType LCOMMDirectiveAlignmentType
Describes if the .lcomm directive for the target supports an alignment argument and how it is interpr...
Definition: MCAsmInfo.h:262
const char * Data64bitsDirective
Definition: MCAsmInfo.h:184
const char * ZeroDirective
This should be set to the directive used to get some number of zero bytes emitted to the current sect...
Definition: MCAsmInfo.h:166
unsigned CalleeSaveStackSlotSize
Size of the stack slot reserved for callee-saved registers, in bytes.
Definition: MCAsmInfo.h:68
bool AlignmentIsInBytes
If this is true (the default) then the asmprinter emits ".align N" directives, where N is the number ...
Definition: MCAsmInfo.h:222
bool UsesNonexecutableStackSection
Targets which have non-executable stacks by default can set this to false to disable the special sect...
Definition: MCAsmInfoELF.h:23
const char * Data8bitsDirective
These directives are used to output some unit of integer data to the current section.
Definition: MCAsmInfo.h:181
bool isArch64Bit() const
Test whether the architecture is 64-bit.
Definition: Triple.cpp:1202
bool COMMDirectiveAlignmentIsInBytes
True is .comm's and .lcomms optional alignment is to be specified in bytes instead of log2(n)...
Definition: MCAsmInfo.h:258
unsigned PointerSize
Pointer size in bytes. Default is 4.
Definition: MCAsmInfo.h:64
bool SupportsDebugInformation
True if target supports emission of debugging information.
Definition: MCAsmInfo.h:323
const char * Data16bitsDirective
Definition: MCAsmInfo.h:182
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
const char * Data32bitsDirective
Definition: MCAsmInfo.h:183
This file contains the declaration of the WebAssemblyMCAsmInfo class.
ExceptionHandling ExceptionsType
Exception handling format for the target. Defaults to None.
Definition: MCAsmInfo.h:326
bool UseDataRegionDirectives
This is true if data region markers should be printed as ".data_region/.end_data_region" directives...
Definition: MCAsmInfo.h:158