* 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"
20 lines
463 B
Plaintext
20 lines
463 B
Plaintext
test verifier
|
|
target x86_64
|
|
|
|
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
|
|
|
|
ebb0(v0: i64):
|
|
v1 = global_value.i32 gv0 ; error: global_value instruction with type i32 references global value with type i64
|
|
return
|
|
}
|