This set will likely evolve, along with the Wasm linking ABI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296177
91177308-0d34-0410-b5e6-
96231b3b80d8
WASM_OPCODE_F64_CONST = 0x44,
};
+#define WASM_RELOC(name, value) name = value,
+
+enum : unsigned {
+#include "WasmRelocs/WebAssembly.def"
+};
+
} // end namespace wasm
} // end namespace llvm
--- /dev/null
+
+#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)