mirror of
https://github.com/RPCS3/llvm.git
synced 2026-01-31 01:25:19 +01:00
.zero is confusing when used with two arguments. Documentation: This directive emits SIZE 0-valued bytes. SIZE must be an absolute expression. This directive is actually an alias for the '.skip' directive so in can take an optional second argument of the value to store in the bytes instead of zero. Using '.zero' in this way would be confusing however. Ref: https://sourceware.org/bugzilla/show_bug.cgi?id=18353 Hexagon and Sparc do the same, and it's all the same to WebAssembly so let's pick the less confusing of the two. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257111 91177308-0d34-0410-b5e6-96231b3b80d8
52 lines
1.5 KiB
C++
52 lines
1.5 KiB
C++
//===-- WebAssemblyMCAsmInfo.cpp - WebAssembly asm properties -------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
///
|
|
/// \file
|
|
/// \brief This file contains the declarations of the WebAssemblyMCAsmInfo
|
|
/// properties.
|
|
///
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "WebAssemblyMCAsmInfo.h"
|
|
#include "llvm/ADT/Triple.h"
|
|
#include "llvm/Support/CommandLine.h"
|
|
using namespace llvm;
|
|
|
|
#define DEBUG_TYPE "wasm-mc-asm-info"
|
|
|
|
WebAssemblyMCAsmInfo::~WebAssemblyMCAsmInfo() {}
|
|
|
|
WebAssemblyMCAsmInfo::WebAssemblyMCAsmInfo(const Triple &T) {
|
|
PointerSize = CalleeSaveStackSlotSize = T.isArch64Bit() ? 8 : 4;
|
|
|
|
// TODO: What should MaxInstLength be?
|
|
|
|
UseDataRegionDirectives = true;
|
|
|
|
// Use .skip instead of .zero because .zero is confusing when used with two
|
|
// arguments (it doesn't actually zero things out).
|
|
ZeroDirective = "\t.skip\t";
|
|
|
|
Data8bitsDirective = "\t.int8\t";
|
|
Data16bitsDirective = "\t.int16\t";
|
|
Data32bitsDirective = "\t.int32\t";
|
|
Data64bitsDirective = "\t.int64\t";
|
|
|
|
AlignmentIsInBytes = false;
|
|
COMMDirectiveAlignmentIsInBytes = false;
|
|
LCOMMDirectiveAlignmentType = LCOMM::Log2Alignment;
|
|
|
|
SupportsDebugInformation = true;
|
|
|
|
// For now, WebAssembly does not support exceptions.
|
|
ExceptionsType = ExceptionHandling::None;
|
|
|
|
// TODO: UseIntegratedAssembler?
|
|
}
|