diff options
Diffstat (limited to 'test/passes/instrument-memory64.txt')
-rw-r--r-- | test/passes/instrument-memory64.txt | 603 |
1 files changed, 603 insertions, 0 deletions
diff --git a/test/passes/instrument-memory64.txt b/test/passes/instrument-memory64.txt new file mode 100644 index 000000000..0ef357223 --- /dev/null +++ b/test/passes/instrument-memory64.txt @@ -0,0 +1,603 @@ +(module + (type $none_=>_none (func)) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i64_i64_=>_i64 (func (param i32 i32 i64 i64) (result i64))) + (type $i32_i64_=>_i64 (func (param i32 i64) (result i64))) + (type $i32_f32_=>_f32 (func (param i32 f32) (result f32))) + (type $i32_f64_=>_f64 (func (param i32 f64) (result f64))) + (import "env" "load_ptr" (func $load_ptr (param i32 i32 i64 i64) (result i64))) + (import "env" "load_val_i32" (func $load_val_i32 (param i32 i32) (result i32))) + (import "env" "load_val_i64" (func $load_val_i64 (param i32 i64) (result i64))) + (import "env" "load_val_f32" (func $load_val_f32 (param i32 f32) (result f32))) + (import "env" "load_val_f64" (func $load_val_f64 (param i32 f64) (result f64))) + (import "env" "store_ptr" (func $store_ptr (param i32 i32 i64 i64) (result i64))) + (import "env" "store_val_i32" (func $store_val_i32 (param i32 i32) (result i32))) + (import "env" "store_val_i64" (func $store_val_i64 (param i32 i64) (result i64))) + (import "env" "store_val_f32" (func $store_val_f32 (param i32 f32) (result f32))) + (import "env" "store_val_f64" (func $store_val_f64 (param i32 f64) (result f64))) + (memory $0 i64 256 256) + (func $A + (drop + (call $load_val_i32 + (i32.const 1) + (i32.load8_s + (call $load_ptr + (i32.const 1) + (i32.const 1) + (i64.const 0) + (i64.const 0) + ) + ) + ) + ) + (drop + (call $load_val_i32 + (i32.const 2) + (i32.load8_u + (call $load_ptr + (i32.const 2) + (i32.const 1) + (i64.const 0) + (i64.const 0) + ) + ) + ) + ) + (drop + (call $load_val_i32 + (i32.const 3) + (i32.load16_s + (call $load_ptr + (i32.const 3) + (i32.const 2) + (i64.const 0) + (i64.const 0) + ) + ) + ) + ) + (drop + (call $load_val_i32 + (i32.const 4) + (i32.load16_u + (call $load_ptr + (i32.const 4) + (i32.const 2) + (i64.const 0) + (i64.const 0) + ) + ) + ) + ) + (drop + (call $load_val_i32 + (i32.const 5) + (i32.load + (call $load_ptr + (i32.const 5) + (i32.const 4) + (i64.const 0) + (i64.const 0) + ) + ) + ) + ) + (drop + (call $load_val_i64 + (i32.const 6) + (i64.load8_s + (call $load_ptr + (i32.const 6) + (i32.const 1) + (i64.const 0) + (i64.const 0) + ) + ) + ) + ) + (drop + (call $load_val_i64 + (i32.const 7) + (i64.load8_u + (call $load_ptr + (i32.const 7) + (i32.const 1) + (i64.const 0) + (i64.const 0) + ) + ) + ) + ) + (drop + (call $load_val_i64 + (i32.const 8) + (i64.load16_s + (call $load_ptr + (i32.const 8) + (i32.const 2) + (i64.const 0) + (i64.const 0) + ) + ) + ) + ) + (drop + (call $load_val_i64 + (i32.const 9) + (i64.load16_u + (call $load_ptr + (i32.const 9) + (i32.const 2) + (i64.const 0) + (i64.const 0) + ) + ) + ) + ) + (drop + (call $load_val_i64 + (i32.const 10) + (i64.load32_s + (call $load_ptr + (i32.const 10) + (i32.const 4) + (i64.const 0) + (i64.const 0) + ) + ) + ) + ) + (drop + (call $load_val_i64 + (i32.const 11) + (i64.load32_u + (call $load_ptr + (i32.const 11) + (i32.const 4) + (i64.const 0) + (i64.const 0) + ) + ) + ) + ) + (drop + (call $load_val_i64 + (i32.const 12) + (i64.load + (call $load_ptr + (i32.const 12) + (i32.const 8) + (i64.const 0) + (i64.const 0) + ) + ) + ) + ) + (drop + (call $load_val_f32 + (i32.const 13) + (f32.load + (call $load_ptr + (i32.const 13) + (i32.const 4) + (i64.const 0) + (i64.const 0) + ) + ) + ) + ) + (drop + (call $load_val_f64 + (i32.const 14) + (f64.load + (call $load_ptr + (i32.const 14) + (i32.const 8) + (i64.const 0) + (i64.const 0) + ) + ) + ) + ) + (drop + (call $load_val_i32 + (i32.const 15) + (i32.load8_s offset=1 + (call $load_ptr + (i32.const 15) + (i32.const 1) + (i64.const 1) + (i64.const 0) + ) + ) + ) + ) + (drop + (call $load_val_i32 + (i32.const 16) + (i32.load8_u offset=2 + (call $load_ptr + (i32.const 16) + (i32.const 1) + (i64.const 2) + (i64.const 0) + ) + ) + ) + ) + (drop + (call $load_val_i32 + (i32.const 17) + (i32.load16_s offset=3 align=1 + (call $load_ptr + (i32.const 17) + (i32.const 2) + (i64.const 3) + (i64.const 0) + ) + ) + ) + ) + (drop + (call $load_val_i32 + (i32.const 18) + (i32.load16_u offset=4 align=1 + (call $load_ptr + (i32.const 18) + (i32.const 2) + (i64.const 4) + (i64.const 0) + ) + ) + ) + ) + (drop + (call $load_val_i32 + (i32.const 19) + (i32.load offset=5 align=2 + (call $load_ptr + (i32.const 19) + (i32.const 4) + (i64.const 5) + (i64.const 0) + ) + ) + ) + ) + (drop + (call $load_val_i64 + (i32.const 20) + (i64.load8_s offset=6 + (call $load_ptr + (i32.const 20) + (i32.const 1) + (i64.const 6) + (i64.const 0) + ) + ) + ) + ) + (drop + (call $load_val_i64 + (i32.const 21) + (i64.load8_u offset=7 + (call $load_ptr + (i32.const 21) + (i32.const 1) + (i64.const 7) + (i64.const 0) + ) + ) + ) + ) + (drop + (call $load_val_i64 + (i32.const 22) + (i64.load16_s offset=8 align=1 + (call $load_ptr + (i32.const 22) + (i32.const 2) + (i64.const 8) + (i64.const 0) + ) + ) + ) + ) + (drop + (call $load_val_i64 + (i32.const 23) + (i64.load16_u offset=9 align=1 + (call $load_ptr + (i32.const 23) + (i32.const 2) + (i64.const 9) + (i64.const 0) + ) + ) + ) + ) + (drop + (call $load_val_i64 + (i32.const 24) + (i64.load32_s offset=10 align=2 + (call $load_ptr + (i32.const 24) + (i32.const 4) + (i64.const 10) + (i64.const 0) + ) + ) + ) + ) + (drop + (call $load_val_i64 + (i32.const 25) + (i64.load32_u offset=11 align=2 + (call $load_ptr + (i32.const 25) + (i32.const 4) + (i64.const 11) + (i64.const 0) + ) + ) + ) + ) + (drop + (call $load_val_i64 + (i32.const 26) + (i64.load offset=12 align=2 + (call $load_ptr + (i32.const 26) + (i32.const 8) + (i64.const 12) + (i64.const 0) + ) + ) + ) + ) + (drop + (call $load_val_f32 + (i32.const 27) + (f32.load offset=13 align=2 + (call $load_ptr + (i32.const 27) + (i32.const 4) + (i64.const 13) + (i64.const 0) + ) + ) + ) + ) + (drop + (call $load_val_f64 + (i32.const 28) + (f64.load offset=14 align=2 + (call $load_ptr + (i32.const 28) + (i32.const 8) + (i64.const 14) + (i64.const 0) + ) + ) + ) + ) + ) + (func $B + (i32.store8 + (call $store_ptr + (i32.const 29) + (i32.const 1) + (i64.const 0) + (i64.const 0) + ) + (call $store_val_i32 + (i32.const 29) + (i32.const 1) + ) + ) + (i32.store16 + (call $store_ptr + (i32.const 30) + (i32.const 2) + (i64.const 0) + (i64.const 0) + ) + (call $store_val_i32 + (i32.const 30) + (i32.const 2) + ) + ) + (i32.store + (call $store_ptr + (i32.const 31) + (i32.const 4) + (i64.const 0) + (i64.const 0) + ) + (call $store_val_i32 + (i32.const 31) + (i32.const 3) + ) + ) + (i64.store8 + (call $store_ptr + (i32.const 32) + (i32.const 1) + (i64.const 0) + (i64.const 0) + ) + (call $store_val_i64 + (i32.const 32) + (i64.const 4) + ) + ) + (i64.store16 + (call $store_ptr + (i32.const 33) + (i32.const 2) + (i64.const 0) + (i64.const 0) + ) + (call $store_val_i64 + (i32.const 33) + (i64.const 5) + ) + ) + (i64.store32 + (call $store_ptr + (i32.const 34) + (i32.const 4) + (i64.const 0) + (i64.const 0) + ) + (call $store_val_i64 + (i32.const 34) + (i64.const 6) + ) + ) + (i64.store + (call $store_ptr + (i32.const 35) + (i32.const 8) + (i64.const 0) + (i64.const 0) + ) + (call $store_val_i64 + (i32.const 35) + (i64.const 7) + ) + ) + (f32.store + (call $store_ptr + (i32.const 36) + (i32.const 4) + (i64.const 0) + (i64.const 0) + ) + (call $store_val_f32 + (i32.const 36) + (f32.const 8) + ) + ) + (f64.store + (call $store_ptr + (i32.const 37) + (i32.const 8) + (i64.const 0) + (i64.const 0) + ) + (call $store_val_f64 + (i32.const 37) + (f64.const 9) + ) + ) + (i32.store8 offset=1 + (call $store_ptr + (i32.const 38) + (i32.const 1) + (i64.const 1) + (i64.const 0) + ) + (call $store_val_i32 + (i32.const 38) + (i32.const 1) + ) + ) + (i32.store16 offset=2 align=1 + (call $store_ptr + (i32.const 39) + (i32.const 2) + (i64.const 2) + (i64.const 0) + ) + (call $store_val_i32 + (i32.const 39) + (i32.const 2) + ) + ) + (i32.store offset=3 align=2 + (call $store_ptr + (i32.const 40) + (i32.const 4) + (i64.const 3) + (i64.const 0) + ) + (call $store_val_i32 + (i32.const 40) + (i32.const 3) + ) + ) + (i64.store8 offset=4 + (call $store_ptr + (i32.const 41) + (i32.const 1) + (i64.const 4) + (i64.const 0) + ) + (call $store_val_i64 + (i32.const 41) + (i64.const 4) + ) + ) + (i64.store16 offset=5 + (call $store_ptr + (i32.const 42) + (i32.const 2) + (i64.const 5) + (i64.const 0) + ) + (call $store_val_i64 + (i32.const 42) + (i64.const 5) + ) + ) + (i64.store32 offset=6 align=2 + (call $store_ptr + (i32.const 43) + (i32.const 4) + (i64.const 6) + (i64.const 0) + ) + (call $store_val_i64 + (i32.const 43) + (i64.const 6) + ) + ) + (i64.store offset=7 align=2 + (call $store_ptr + (i32.const 44) + (i32.const 8) + (i64.const 7) + (i64.const 0) + ) + (call $store_val_i64 + (i32.const 44) + (i64.const 7) + ) + ) + (f32.store offset=8 align=2 + (call $store_ptr + (i32.const 45) + (i32.const 4) + (i64.const 8) + (i64.const 0) + ) + (call $store_val_f32 + (i32.const 45) + (f32.const 8) + ) + ) + (f64.store offset=9 align=2 + (call $store_ptr + (i32.const 46) + (i32.const 8) + (i64.const 9) + (i64.const 0) + ) + (call $store_val_f64 + (i32.const 46) + (f64.const 9) + ) + ) + ) +) |