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:
@@ -2,7 +2,7 @@ test verifier
|
||||
|
||||
; Using a vmctx global value without declaring it first leads to an error.
|
||||
function %vmglobal_err(i64) -> i64 {
|
||||
gv4 = vmctx+0 ; error: undeclared vmctx reference
|
||||
gv4 = vmctx ; error: undeclared vmctx reference
|
||||
ebb0(v0: i64):
|
||||
v1 = global_value.i64 gv4
|
||||
return v1
|
||||
@@ -10,7 +10,7 @@ ebb0(v0: i64):
|
||||
|
||||
; If it is declared, all is fine.
|
||||
function %vmglobal_ok(i64 vmctx) -> i64 {
|
||||
gv4 = vmctx+0
|
||||
gv4 = vmctx
|
||||
ebb0(v0: i64):
|
||||
v1 = global_value.i64 gv4
|
||||
return v1
|
||||
|
||||
Reference in New Issue
Block a user