LLVM  14.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 
15 #include "WebAssemblyMCAsmInfo.h"
16 #include "llvm/ADT/Triple.h"
17 
18 using namespace llvm;
19 
20 #define DEBUG_TYPE "wasm-mc-asm-info"
21 
22 WebAssemblyMCAsmInfo::~WebAssemblyMCAsmInfo() = default; // anchor.
23 
25  const MCTargetOptions &Options) {
26  CodePointerSize = CalleeSaveStackSlotSize = T.isArch64Bit() ? 8 : 4;
27 
28  // TODO: What should MaxInstLength be?
29 
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;
44 
46 
47  // TODO: UseIntegratedAssembler?
48 }
llvm
---------------------— PointerInfo ------------------------------------—
Definition: AllocatorList.h:23
llvm::MCAsmInfo::SupportsDebugInformation
bool SupportsDebugInformation
True if target supports emission of debugging information.
Definition: MCAsmInfo.h:445
llvm::MCAsmInfo::AlignmentIsInBytes
bool AlignmentIsInBytes
If this is true (the default) then the asmprinter emits ".align N" directives, where N is the number ...
Definition: MCAsmInfo.h:329
llvm::Triple
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:45
llvm::LCOMM::Log2Alignment
@ Log2Alignment
Definition: MCAsmInfo.h:50
llvm::WebAssemblyMCAsmInfo::~WebAssemblyMCAsmInfo
~WebAssemblyMCAsmInfo() override
llvm::MCAsmInfo::Data64bitsDirective
const char * Data64bitsDirective
Definition: MCAsmInfo.h:288
T
#define T
Definition: Mips16ISelLowering.cpp:341
llvm::MCAsmInfo::UseDataRegionDirectives
bool UseDataRegionDirectives
This is true if data region markers should be printed as ".data_region/.end_data_region" directives.
Definition: MCAsmInfo.h:234
llvm::MCAsmInfo::Data32bitsDirective
const char * Data32bitsDirective
Definition: MCAsmInfo.h:287
Options
const char LLVMTargetMachineRef LLVMPassBuilderOptionsRef Options
Definition: PassBuilderBindings.cpp:48
llvm::WebAssemblyMCAsmInfo::WebAssemblyMCAsmInfo
WebAssemblyMCAsmInfo(const Triple &T, const MCTargetOptions &Options)
Definition: WebAssemblyMCAsmInfo.cpp:24
llvm::MCAsmInfo::COMMDirectiveAlignmentIsInBytes
bool COMMDirectiveAlignmentIsInBytes
True is .comm's and .lcomms optional alignment is to be specified in bytes instead of log2(n).
Definition: MCAsmInfo.h:365
llvm::MCAsmInfo::CodePointerSize
unsigned CodePointerSize
Code pointer size in bytes. Default is 4.
Definition: MCAsmInfo.h:72
llvm::MCAsmInfo::ZeroDirective
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:249
llvm::MCAsmInfo::Data16bitsDirective
const char * Data16bitsDirective
Definition: MCAsmInfo.h:286
llvm::MCTargetOptions
Definition: MCTargetOptions.h:36
Triple.h
llvm::MCAsmInfo::Data8bitsDirective
const char * Data8bitsDirective
These directives are used to output some unit of integer data to the current section.
Definition: MCAsmInfo.h:285
llvm::MCAsmInfo::CalleeSaveStackSlotSize
unsigned CalleeSaveStackSlotSize
Size of the stack slot reserved for callee-saved registers, in bytes.
Definition: MCAsmInfo.h:76
WebAssemblyMCAsmInfo.h
llvm::MCAsmInfo::LCOMMDirectiveAlignmentType
LCOMM::LCOMMType LCOMMDirectiveAlignmentType
Describes if the .lcomm directive for the target supports an alignment argument and how it is interpr...
Definition: MCAsmInfo.h:369