mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 13:11:39 +01:00
[WebAssembly] Define an initial set of relocation types for Wasm.
This set will likely evolve, along with the Wasm linking ABI. llvm-svn: 296177
This commit is contained in:
parent
e8e7f2c369
commit
f54d23aa0f
@ -81,6 +81,12 @@ enum : unsigned {
|
||||
WASM_OPCODE_F64_CONST = 0x44,
|
||||
};
|
||||
|
||||
#define WASM_RELOC(name, value) name = value,
|
||||
|
||||
enum : unsigned {
|
||||
#include "WasmRelocs/WebAssembly.def"
|
||||
};
|
||||
|
||||
} // end namespace wasm
|
||||
} // end namespace llvm
|
||||
|
||||
|
11
include/llvm/Support/WasmRelocs/WebAssembly.def
Normal file
11
include/llvm/Support/WasmRelocs/WebAssembly.def
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
#ifndef WASM_RELOC
|
||||
#error "WASM_RELOC must be defined"
|
||||
#endif
|
||||
|
||||
WASM_RELOC(R_WEBASSEMBLY_FUNCTION_INDEX_LEB, 0)
|
||||
WASM_RELOC(R_WEBASSEMBLY_TABLE_INDEX_SLEB, 1)
|
||||
WASM_RELOC(R_WEBASSEMBLY_TABLE_INDEX_I32, 2)
|
||||
WASM_RELOC(R_WEBASSEMBLY_GLOBAL_ADDR_LEB, 3)
|
||||
WASM_RELOC(R_WEBASSEMBLY_GLOBAL_ADDR_SLEB, 4)
|
||||
WASM_RELOC(R_WEBASSEMBLY_GLOBAL_ADDR_I32, 5)
|
Loading…
x
Reference in New Issue
Block a user