-
Notifications
You must be signed in to change notification settings - Fork 745
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow specifying the external memory #7125
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,116 @@ | ||||||||||
;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. | ||||||||||
;; NOTE: This test was ported using port_passes_tests_to_lit.py and could be cleaned up. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
|
||||||||||
;; RUN: foreach %s %t wasm-opt --enable-multimemory --enable-mutable-globals --asyncify --pass-arg=asyncify-memory@memory -S -o - | filecheck %s | ||||||||||
|
||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
(module | ||||||||||
(memory (export "memory") 1 1) | ||||||||||
(memory (export "unused") 1 1) | ||||||||||
Comment on lines
+7
to
+8
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Indentation, and give them names. The names should make the test output easier to read. (Can update the output using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (I intentionally did not use the export names, so that the test verifies we use the export names to pick the memory.) |
||||||||||
) | ||||||||||
;; CHECK: (type $0 (func (param i32))) | ||||||||||
|
||||||||||
;; CHECK: (type $1 (func)) | ||||||||||
|
||||||||||
;; CHECK: (type $2 (func (result i32))) | ||||||||||
|
||||||||||
;; CHECK: (global $__asyncify_state (mut i32) (i32.const 0)) | ||||||||||
|
||||||||||
;; CHECK: (global $__asyncify_data (mut i32) (i32.const 0)) | ||||||||||
|
||||||||||
;; CHECK: (memory $0 1 1) | ||||||||||
|
||||||||||
;; CHECK: (export "asyncify_start_unwind" (func $asyncify_start_unwind)) | ||||||||||
|
||||||||||
;; CHECK: (export "asyncify_stop_unwind" (func $asyncify_stop_unwind)) | ||||||||||
|
||||||||||
;; CHECK: (export "asyncify_start_rewind" (func $asyncify_start_rewind)) | ||||||||||
|
||||||||||
;; CHECK: (export "asyncify_stop_rewind" (func $asyncify_stop_rewind)) | ||||||||||
|
||||||||||
;; CHECK: (export "asyncify_get_state" (func $asyncify_get_state)) | ||||||||||
|
||||||||||
;; CHECK: (func $asyncify_start_unwind (param $0 i32) | ||||||||||
;; CHECK-NEXT: (global.set $__asyncify_state | ||||||||||
;; CHECK-NEXT: (i32.const 1) | ||||||||||
;; CHECK-NEXT: ) | ||||||||||
;; CHECK-NEXT: (global.set $__asyncify_data | ||||||||||
;; CHECK-NEXT: (local.get $0) | ||||||||||
;; CHECK-NEXT: ) | ||||||||||
;; CHECK-NEXT: (if | ||||||||||
;; CHECK-NEXT: (i32.gt_u | ||||||||||
;; CHECK-NEXT: (i32.load $0 | ||||||||||
;; CHECK-NEXT: (global.get $__asyncify_data) | ||||||||||
;; CHECK-NEXT: ) | ||||||||||
;; CHECK-NEXT: (i32.load $0 offset=4 | ||||||||||
;; CHECK-NEXT: (global.get $__asyncify_data) | ||||||||||
;; CHECK-NEXT: ) | ||||||||||
;; CHECK-NEXT: ) | ||||||||||
;; CHECK-NEXT: (then | ||||||||||
;; CHECK-NEXT: (unreachable) | ||||||||||
;; CHECK-NEXT: ) | ||||||||||
;; CHECK-NEXT: ) | ||||||||||
;; CHECK-NEXT: ) | ||||||||||
|
||||||||||
;; CHECK: (func $asyncify_stop_unwind | ||||||||||
;; CHECK-NEXT: (global.set $__asyncify_state | ||||||||||
;; CHECK-NEXT: (i32.const 0) | ||||||||||
;; CHECK-NEXT: ) | ||||||||||
;; CHECK-NEXT: (if | ||||||||||
;; CHECK-NEXT: (i32.gt_u | ||||||||||
;; CHECK-NEXT: (i32.load $0 | ||||||||||
;; CHECK-NEXT: (global.get $__asyncify_data) | ||||||||||
;; CHECK-NEXT: ) | ||||||||||
;; CHECK-NEXT: (i32.load $0 offset=4 | ||||||||||
;; CHECK-NEXT: (global.get $__asyncify_data) | ||||||||||
;; CHECK-NEXT: ) | ||||||||||
;; CHECK-NEXT: ) | ||||||||||
;; CHECK-NEXT: (then | ||||||||||
;; CHECK-NEXT: (unreachable) | ||||||||||
;; CHECK-NEXT: ) | ||||||||||
;; CHECK-NEXT: ) | ||||||||||
;; CHECK-NEXT: ) | ||||||||||
|
||||||||||
;; CHECK: (func $asyncify_start_rewind (param $0 i32) | ||||||||||
;; CHECK-NEXT: (global.set $__asyncify_state | ||||||||||
;; CHECK-NEXT: (i32.const 2) | ||||||||||
;; CHECK-NEXT: ) | ||||||||||
;; CHECK-NEXT: (global.set $__asyncify_data | ||||||||||
;; CHECK-NEXT: (local.get $0) | ||||||||||
;; CHECK-NEXT: ) | ||||||||||
;; CHECK-NEXT: (if | ||||||||||
;; CHECK-NEXT: (i32.gt_u | ||||||||||
;; CHECK-NEXT: (i32.load $0 | ||||||||||
;; CHECK-NEXT: (global.get $__asyncify_data) | ||||||||||
;; CHECK-NEXT: ) | ||||||||||
;; CHECK-NEXT: (i32.load $0 offset=4 | ||||||||||
;; CHECK-NEXT: (global.get $__asyncify_data) | ||||||||||
;; CHECK-NEXT: ) | ||||||||||
;; CHECK-NEXT: ) | ||||||||||
;; CHECK-NEXT: (then | ||||||||||
;; CHECK-NEXT: (unreachable) | ||||||||||
;; CHECK-NEXT: ) | ||||||||||
;; CHECK-NEXT: ) | ||||||||||
;; CHECK-NEXT: ) | ||||||||||
|
||||||||||
;; CHECK: (func $asyncify_stop_rewind | ||||||||||
;; CHECK-NEXT: (global.set $__asyncify_state | ||||||||||
;; CHECK-NEXT: (i32.const 0) | ||||||||||
;; CHECK-NEXT: ) | ||||||||||
;; CHECK-NEXT: (if | ||||||||||
;; CHECK-NEXT: (i32.gt_u | ||||||||||
;; CHECK-NEXT: (i32.load $0 | ||||||||||
;; CHECK-NEXT: (global.get $__asyncify_data) | ||||||||||
;; CHECK-NEXT: ) | ||||||||||
;; CHECK-NEXT: (i32.load $0 offset=4 | ||||||||||
;; CHECK-NEXT: (global.get $__asyncify_data) | ||||||||||
;; CHECK-NEXT: ) | ||||||||||
;; CHECK-NEXT: ) | ||||||||||
;; CHECK-NEXT: (then | ||||||||||
;; CHECK-NEXT: (unreachable) | ||||||||||
;; CHECK-NEXT: ) | ||||||||||
;; CHECK-NEXT: ) | ||||||||||
;; CHECK-NEXT: ) | ||||||||||
|
||||||||||
;; CHECK: (func $asyncify_get_state (result i32) | ||||||||||
;; CHECK-NEXT: (global.get $__asyncify_state) | ||||||||||
;; CHECK-NEXT: ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.