summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2019-04-04 17:43:50 +0000
committerSam Clegg <sbc@chromium.org>2019-04-04 17:43:50 +0000
commit2a7cac932bbca5492e5a42d9dac33e0cb76d0f83 (patch)
tree64e21da525922e0a2d7fc39421ecd1d879f963d6 /llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h
parent98e3954fe9d6ab74888c8757284136134330e475 (diff)
downloadbcm5719-llvm-2a7cac932bbca5492e5a42d9dac33e0cb76d0f83.tar.gz
bcm5719-llvm-2a7cac932bbca5492e5a42d9dac33e0cb76d0f83.zip
[WebAssembly] Add new explicit relocation types for PIC relocations
See https://github.com/WebAssembly/tool-conventions/pull/106 Differential Revision: https://reviews.llvm.org/D59907 llvm-svn: 357710
Diffstat (limited to 'llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h')
-rw-r--r--llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h b/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h
index 69c477bbbb5..4c7114eea11 100644
--- a/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h
+++ b/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h
@@ -90,9 +90,21 @@ namespace WebAssemblyII {
enum TOF {
MO_NO_FLAG = 0,
- // Address of data symbol via a wasm global. This adds a level of indirection
- // similar to the GOT on native platforms.
+ // On a symbol operand this indicates that the immediate is a wasm global
+ // index. The value of the wasm global will be set to the symbol address at
+ // runtime. This adds a level of indirection similar to the GOT on native
+ // platforms.
MO_GOT,
+
+ // On a symbol operand this indicates that the immediate is the symbol
+ // address relative the __memory_base wasm global.
+ // Only applicable to data symbols.
+ MO_MEMORY_BASE_REL,
+
+ // On a symbol operand this indicates that the immediate is the symbol
+ // address relative the __table_base wasm global.
+ // Only applicable to function symbols.
+ MO_TABLE_BASE_REL,
};
} // end namespace WebAssemblyII
OpenPOWER on IntegriCloud