LLVM  5.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 }
54 
56 
59 
60  // TODO: What should MaxInstLength be?
61 
63 
64  // Use .skip instead of .zero because .zero is confusing when used with two
65  // arguments (it doesn't actually zero things out).
66  ZeroDirective = "\t.skip\t";
67 
68  Data8bitsDirective = "\t.int8\t";
69  Data16bitsDirective = "\t.int16\t";
70  Data32bitsDirective = "\t.int32\t";
71  Data64bitsDirective = "\t.int64\t";
72 
73  AlignmentIsInBytes = false;
76 
78 
79  // For now, WebAssembly does not support exceptions.
81 
82  // TODO: UseIntegratedAssembler?
83 }
LCOMM::LCOMMType LCOMMDirectiveAlignmentType
Describes if the .lcomm directive for the target supports an alignment argument and how it is interpr...
Definition: MCAsmInfo.h:261
const char * Data64bitsDirective
Definition: MCAsmInfo.h:183
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:165
unsigned CalleeSaveStackSlotSize
Size of the stack slot reserved for callee-saved registers, in bytes.
Definition: MCAsmInfo.h:67
bool AlignmentIsInBytes
If this is true (the default) then the asmprinter emits ".align N" directives, where N is the number ...
Definition: MCAsmInfo.h:221
bool UsesNonexecutableStackSection
Targets which have non-executable stacks by default can set this to false to disable the special sect...
Definition: MCAsmInfoELF.h:24
const char * Data8bitsDirective
These directives are used to output some unit of integer data to the current section.
Definition: MCAsmInfo.h:180
bool isArch64Bit() const
Test whether the architecture is 64-bit.
Definition: Triple.cpp:1223
bool COMMDirectiveAlignmentIsInBytes
True is .comm's and .lcomms optional alignment is to be specified in bytes instead of log2(n)...
Definition: MCAsmInfo.h:257
bool SupportsDebugInformation
True if target supports emission of debugging information.
Definition: MCAsmInfo.h:322
const char * Data16bitsDirective
Definition: MCAsmInfo.h:181
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
const char * Data32bitsDirective
Definition: MCAsmInfo.h:182
unsigned CodePointerSize
Code pointer size in bytes. Default is 4.
Definition: MCAsmInfo.h:63
This file contains the declaration of the WebAssemblyMCAsmInfo class.
ExceptionHandling ExceptionsType
Exception handling format for the target. Defaults to None.
Definition: MCAsmInfo.h:325
bool UseDataRegionDirectives
This is true if data region markers should be printed as ".data_region/.end_data_region" directives...
Definition: MCAsmInfo.h:157