-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1b55add
commit 5f87d59
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
.text | ||
#(RO, Global, 13, 17, 13) | ||
mov r10 pc | ||
lea r10 -1 | ||
load r10 r10 ; fetch data capanbility | ||
lea r10 2 | ||
load r1 r10 ; fetch capability to global Main.g | ||
lea r10 1 | ||
load r10 r10 ; fetch common.link_tbl cap | ||
lea r10 5 | ||
load r10 r10 ; fetch store_global cap | ||
mov r2 31 | ||
loadU r0 stk -3 | ||
jmp r10 | ||
|
||
.data | ||
#(E, Global, 0, 13, 1) ; function adv | ||
#{1: (RW, Global, 17, 20, 17)} ; sealed to global | ||
$main.g | ||
$_Common.link_tbl | ||
#0 | ||
#0 | ||
;; Global h | ||
#3 | ||
#0 | ||
#1 | ||
|
||
.symtab | ||
$env.h: 1 | ||
$env.adv: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
(module $main | ||
(type $main_t (func)) | ||
(global $g mut i32 10) | ||
|
||
(import "env" "adv" (func $env.adv (type 0))) | ||
(import "env" "h" (global mut i32)) | ||
(export "g" (global 1)) | ||
|
||
(func $main (type 0) | ||
global.get 0 | ||
i32.const 0 | ||
i32.add | ||
global.set 0 | ||
|
||
call 0) | ||
|
||
(start 1)) |