| 1 | //===-- WebAssemblyMCAsmInfo.h - WebAssembly asm properties -----*- C++ -*-===// |
| 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 declaration of the WebAssemblyMCAsmInfo class. |
| 11 | /// |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #ifndef LLVM_LIB_TARGET_WEBASSEMBLY_MCTARGETDESC_WEBASSEMBLYMCASMINFO_H |
| 15 | #define LLVM_LIB_TARGET_WEBASSEMBLY_MCTARGETDESC_WEBASSEMBLYMCASMINFO_H |
| 16 | |
| 17 | #include "llvm/MC/MCAsmInfoWasm.h" |
| 18 | |
| 19 | namespace llvm { |
| 20 | |
| 21 | class Triple; |
| 22 | |
| 23 | class WebAssemblyMCAsmInfo final : public MCAsmInfoWasm { |
| 24 | public: |
| 25 | explicit WebAssemblyMCAsmInfo(const Triple &T, |
| 26 | const MCTargetOptions &Options); |
| 27 | ~WebAssemblyMCAsmInfo() override; |
| 28 | }; |
| 29 | |
| 30 | namespace WebAssembly { |
| 31 | enum Specifier { |
| 32 | S_None, |
| 33 | S_FUNCINDEX, // Wasm function index |
| 34 | S_GOT, |
| 35 | S_GOT_TLS, // Wasm global index of TLS symbol |
| 36 | S_MBREL, // Memory address relative to __memory_base |
| 37 | S_TBREL, // Table index relative to __table_base |
| 38 | S_TLSREL, // Memory address relative to __tls_base |
| 39 | S_TYPEINDEX, // Reference to a symbol's type (signature) |
| 40 | }; |
| 41 | } |
| 42 | } // end namespace llvm |
| 43 | |
| 44 | #endif |
| 45 | |