diff options
| author | vvvv <[email protected]> | 2024-02-06 20:01:22 +0300 |
|---|---|---|
| committer | vvvv <[email protected]> | 2024-02-06 20:22:16 +0300 |
| commit | 0203b7a9a40828bb2bd4c32029b79ff0ea3d1f8f (patch) | |
| tree | e630d0d5bd0bd29fc8c2d2842ed2cfde781b993a /contrib/libs/llvm16/lib/Target/WebAssembly/TargetInfo/WebAssemblyTargetInfo.cpp | |
| parent | ba27db76d99d12a4f1c06960b5449423218614c4 (diff) | |
llvm16 targets
Diffstat (limited to 'contrib/libs/llvm16/lib/Target/WebAssembly/TargetInfo/WebAssemblyTargetInfo.cpp')
| -rw-r--r-- | contrib/libs/llvm16/lib/Target/WebAssembly/TargetInfo/WebAssemblyTargetInfo.cpp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/contrib/libs/llvm16/lib/Target/WebAssembly/TargetInfo/WebAssemblyTargetInfo.cpp b/contrib/libs/llvm16/lib/Target/WebAssembly/TargetInfo/WebAssemblyTargetInfo.cpp new file mode 100644 index 00000000000..ef2c77ade8c --- /dev/null +++ b/contrib/libs/llvm16/lib/Target/WebAssembly/TargetInfo/WebAssemblyTargetInfo.cpp @@ -0,0 +1,41 @@ +//===-- WebAssemblyTargetInfo.cpp - WebAssembly Target Implementation -----===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +/// +/// \file +/// This file registers the WebAssembly target. +/// +//===----------------------------------------------------------------------===// + +#include "TargetInfo/WebAssemblyTargetInfo.h" +#include "llvm/MC/TargetRegistry.h" +using namespace llvm; + +#define DEBUG_TYPE "wasm-target-info" + +Target &llvm::getTheWebAssemblyTarget32() { + static Target TheWebAssemblyTarget32; + return TheWebAssemblyTarget32; +} +Target &llvm::getTheWebAssemblyTarget64() { + static Target TheWebAssemblyTarget64; + return TheWebAssemblyTarget64; +} + +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeWebAssemblyTargetInfo() { + RegisterTarget<Triple::wasm32> X(getTheWebAssemblyTarget32(), "wasm32", + "WebAssembly 32-bit", "WebAssembly"); + RegisterTarget<Triple::wasm64> Y(getTheWebAssemblyTarget64(), "wasm64", + "WebAssembly 64-bit", "WebAssembly"); +} + +// Defines llvm::WebAssembly::getWasm64Opcode llvm::WebAssembly::getStackOpcode +// which have to be in a shared location between CodeGen and MC. +#define GET_INSTRMAP_INFO 1 +#define GET_INSTRINFO_ENUM 1 +#define GET_INSTRINFO_MC_HELPER_DECLS +#include "WebAssemblyGenInstrInfo.inc" |
