Introduce globalsym_addr.

This is an instruction used in legalization of GlobalVarData::Sym global
variables.
This commit is contained in:
Dan Gohman
2017-10-30 10:02:29 -07:00
parent cb805f704d
commit 9c54c3fff0
11 changed files with 96 additions and 9 deletions

View File

@@ -29,6 +29,19 @@ ebb1(v1: i64):
; check: return $v2
}
function %sym() -> i64 {
gv0 = globalsym %something
gv1 = globalsym #d0bad180d0b5d182d0bed0bd
ebb1:
v0 = global_addr.i64 gv0
; check: $v0 = globalsym_addr.i64 gv0
v1 = global_addr.i64 gv1
; check: $v1 = globalsym_addr.i64 gv1
v2 = bxor v0, v1
return v2
}
; SpiderMonkey VM-style static 4+2 GB heap.
; This eliminates bounds checks completely for offsets < 2GB.
function %staticheap_sm64(i32, i64 vmctx) -> f32 spiderwasm {