Reorganize the global value kinds. (#490)
* Reorganize the global value kinds. This: - renames "deref" global values to "load" and gives it a offset that works like the "load" instructions' does - adds an explicit "iadd_imm" global value kind, which replaces the builtin iadd in "vmctx" and "deref" global values. - also renames "globalsym" to "symbol"
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
test verifier
|
||||
target x86_64
|
||||
|
||||
function %deref_base_type(i64 vmctx) {
|
||||
gv0 = vmctx+0
|
||||
gv1 = deref(gv0): i32
|
||||
gv2 = deref(gv1): i32 ; error: deref base gv1 has type i32, which is not the pointer type i64
|
||||
function %load_base_type(i64 vmctx) {
|
||||
gv0 = vmctx
|
||||
gv1 = load.i32 notrap aligned gv0
|
||||
gv2 = load.i32 notrap aligned gv1 ; error: base gv1 has type i32, which is not the pointer type i64
|
||||
|
||||
ebb0(v0: i64):
|
||||
return
|
||||
}
|
||||
|
||||
function %global_value_wrong_type(i64 vmctx) {
|
||||
gv0 = vmctx+0
|
||||
gv0 = vmctx
|
||||
|
||||
ebb0(v0: i64):
|
||||
v1 = global_value.i32 gv0 ; error: global_value instruction with type i32 references global value with type i64
|
||||
|
||||
Reference in New Issue
Block a user