LLVM 22.0.0git
WebAssemblyMCAsmInfo.cpp
Go to the documentation of this file.
1//===-- WebAssemblyMCAsmInfo.cpp - WebAssembly asm properties -------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8///
9/// \file
10/// This file contains the declarations of the WebAssemblyMCAsmInfo
11/// properties.
12///
13//===----------------------------------------------------------------------===//
14
17#include "llvm/MC/MCExpr.h"
19
20using namespace llvm;
21
22#define DEBUG_TYPE "wasm-mc-asm-info"
23
25 {WebAssembly::S_TYPEINDEX, "TYPEINDEX"},
26 {WebAssembly::S_TBREL, "TBREL"},
27 {WebAssembly::S_MBREL, "MBREL"},
28 {WebAssembly::S_TLSREL, "TLSREL"},
29 {WebAssembly::S_GOT, "GOT"},
30 {WebAssembly::S_GOT_TLS, "GOT@TLS"},
31 {WebAssembly::S_FUNCINDEX, "FUNCINDEX"},
32};
33
35
37 const MCTargetOptions &Options) {
38 CodePointerSize = CalleeSaveStackSlotSize = T.isArch64Bit() ? 8 : 4;
39
40 // TODO: What should MaxInstLength be?
41
43
44 // Use .skip instead of .zero because .zero is confusing when used with two
45 // arguments (it doesn't actually zero things out).
46 ZeroDirective = "\t.skip\t";
47
48 Data8bitsDirective = "\t.int8\t";
49 Data16bitsDirective = "\t.int16\t";
50 Data32bitsDirective = "\t.int32\t";
51 Data64bitsDirective = "\t.int64\t";
52
53 AlignmentIsInBytes = false;
56
59
61}
const MCAsmInfo::AtSpecifier atSpecifiers[]
static LVOptions Options
Definition: LVOptions.cpp:25
const MCAsmInfo::AtSpecifier atSpecifiers[]
This file contains the declaration of the WebAssemblyMCAsmInfo class.
This file provides WebAssembly-specific target descriptions.
const char * Data16bitsDirective
Definition: MCAsmInfo.h:248
void initializeAtSpecifiers(ArrayRef< AtSpecifier >)
Definition: MCAsmInfo.cpp:127
const char * Data8bitsDirective
These directives are used to output some unit of integer data to the current section.
Definition: MCAsmInfo.h:247
const char * Data64bitsDirective
Definition: MCAsmInfo.h:250
ExceptionHandling ExceptionsType
Exception handling format for the target. Defaults to None.
Definition: MCAsmInfo.h:359
const char * Data32bitsDirective
Definition: MCAsmInfo.h:249
LCOMM::LCOMMType LCOMMDirectiveAlignmentType
Describes if the .lcomm directive for the target supports an alignment argument and how it is interpr...
Definition: MCAsmInfo.h:298
bool SupportsDebugInformation
True if target supports emission of debugging information.
Definition: MCAsmInfo.h:356
bool COMMDirectiveAlignmentIsInBytes
True is .comm's and .lcomms optional alignment is to be specified in bytes instead of log2(n).
Definition: MCAsmInfo.h:294
bool AlignmentIsInBytes
If this is true (the default) then the asmprinter emits ".align N" directives, where N is the number ...
Definition: MCAsmInfo.h:273
const char * ZeroDirective
This should be set to the directive used to get some number of zero (and non-zero if supported by the...
Definition: MCAsmInfo.h:226
bool UseDataRegionDirectives
This is true if data region markers should be printed as ".data_region/.end_data_region" directives.
Definition: MCAsmInfo.h:212
unsigned CodePointerSize
Code pointer size in bytes. Default is 4.
Definition: MCAsmInfo.h:87
unsigned CalleeSaveStackSlotSize
Size of the stack slot reserved for callee-saved registers, in bytes.
Definition: MCAsmInfo.h:91
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:47
WebAssemblyMCAsmInfo(const Triple &T, const MCTargetOptions &Options)
@ Log2Alignment
Definition: MCAsmInfo.h:58
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
@ None
No exception support.