diff options
author | Sam Clegg <sbc@chromium.org> | 2020-05-18 12:49:36 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-18 09:49:36 -0700 |
commit | 86697b641baf3d54dd4c3e0331d5ccec47a33efc (patch) | |
tree | f645eb4f8ce2bce3287b77cef479ee6a731998d4 /test | |
parent | b3275eb89f086b3a2b0effbafa3b38b4f6ce4ef6 (diff) | |
download | binaryen-86697b641baf3d54dd4c3e0331d5ccec47a33efc.tar.gz binaryen-86697b641baf3d54dd4c3e0331d5ccec47a33efc.tar.bz2 binaryen-86697b641baf3d54dd4c3e0331d5ccec47a33efc.zip |
Machine-generated update of lld tests (#2856)
This change was generated by running:
$ ./scripts/test/generate_lld_tests.py --binaryen-bin=$PWD/../binaryen-out/bin/ $PWD/../llvm-build/bin/ $PWD/../emscripten
Then:
$ ./auto_update_tests.py --binaryen-bin=../binaryen-out/bin/ lld
Diffstat (limited to 'test')
-rw-r--r-- | test/lld/em_asm.wat | 14 | ||||
-rw-r--r-- | test/lld/em_asm_shared.wat | 22 | ||||
-rw-r--r-- | test/lld/hello_world.wat | 14 | ||||
-rw-r--r-- | test/lld/init.wat | 16 | ||||
-rw-r--r-- | test/lld/longjmp.wat | 6 | ||||
-rw-r--r-- | test/lld/recursive.wat | 14 | ||||
-rw-r--r-- | test/lld/reserved_func_ptr.wat | 34 | ||||
-rw-r--r-- | test/lld/shared.wat | 18 | ||||
-rw-r--r-- | test/lld/shared_longjmp.wat | 28 |
9 files changed, 89 insertions, 77 deletions
diff --git a/test/lld/em_asm.wat b/test/lld/em_asm.wat index 84250b6ac..f91f7321e 100644 --- a/test/lld/em_asm.wat +++ b/test/lld/em_asm.wat @@ -1,8 +1,8 @@ (module - (type $0 (func (param i32 i32 i32) (result i32))) - (type $1 (func)) - (type $2 (func (result i32))) - (type $3 (func (param i32 i32) (result i32))) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "emscripten_asm_const_int" (func $emscripten_asm_const_int (param i32 i32 i32) (result i32))) (memory $0 2) (data (i32.const 568) "{ Module.print(\"Hello world\"); }\00\00{ return $0 + $1; }\00ii\00{ Module.print(\"Got \" + $0); }\00i\00") @@ -13,9 +13,9 @@ (export "__wasm_call_ctors" (func $__wasm_call_ctors)) (export "main" (func $main)) (export "__data_end" (global $global$1)) - (func $__wasm_call_ctors (; 1 ;) (type $1) + (func $__wasm_call_ctors ) - (func $__original_main (; 2 ;) (type $2) (result i32) + (func $__original_main (result i32) (local $0 i32) (global.set $global$0 (local.tee $0 @@ -62,7 +62,7 @@ ) (i32.const 0) ) - (func $main (; 3 ;) (type $3) (param $0 i32) (param $1 i32) (result i32) + (func $main (param $0 i32) (param $1 i32) (result i32) (call $__original_main) ) ;; custom section "producers", size 112 diff --git a/test/lld/em_asm_shared.wat b/test/lld/em_asm_shared.wat index ba70886ec..7d3ad8651 100644 --- a/test/lld/em_asm_shared.wat +++ b/test/lld/em_asm_shared.wat @@ -1,8 +1,8 @@ (module - (type $0 (func (param i32 i32 i32) (result i32))) - (type $1 (func)) - (type $2 (func (result i32))) - (type $3 (func (param i32 i32) (result i32))) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "memory" (memory $0 0)) (data (global.get $gimport$3) "{ Module.print(\"Hello world\"); }\00\00{ return $0 + $1; }\00ii\00{ Module.print(\"Got \" + $0); }\00i\00") (import "env" "__indirect_function_table" (table $timport$1 0 funcref)) @@ -22,12 +22,12 @@ (export "_ZN20__em_asm_sig_builderI19__em_asm_type_tupleIJiiEEE6bufferE" (global $global$1)) (export "_ZN20__em_asm_sig_builderI19__em_asm_type_tupleIJiEEE6bufferE" (global $global$2)) (export "main" (func $main)) - (func $__wasm_call_ctors (; 1 ;) (type $1) + (func $__wasm_call_ctors (call $__wasm_apply_relocs) ) - (func $__wasm_apply_relocs (; 2 ;) (type $1) + (func $__wasm_apply_relocs ) - (func $__original_main (; 3 ;) (type $2) (result i32) + (func $__original_main (result i32) (local $0 i32) (local $1 i32) (global.set $gimport$2 @@ -86,10 +86,14 @@ ) (i32.const 0) ) - (func $main (; 4 ;) (type $3) (param $0 i32) (param $1 i32) (result i32) + (func $main (param $0 i32) (param $1 i32) (result i32) (call $__original_main) ) - ;; custom section "dylink", size 5 + ;; dylink section + ;; memorysize: 90 + ;; memoryalignment: 0 + ;; tablesize: 0 + ;; tablealignment: 0 ;; custom section "producers", size 112 ) diff --git a/test/lld/hello_world.wat b/test/lld/hello_world.wat index f4b32d0fe..aa7f086ba 100644 --- a/test/lld/hello_world.wat +++ b/test/lld/hello_world.wat @@ -1,8 +1,8 @@ (module - (type $0 (func (param i32) (result i32))) - (type $1 (func)) - (type $2 (func (result i32))) - (type $3 (func (param i32 i32) (result i32))) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (import "env" "puts" (func $puts (param i32) (result i32))) (memory $0 2) (data (i32.const 568) "Hello, world\00") @@ -13,9 +13,9 @@ (export "__wasm_call_ctors" (func $__wasm_call_ctors)) (export "main" (func $main)) (export "__data_end" (global $global$1)) - (func $__wasm_call_ctors (; 1 ;) (type $1) + (func $__wasm_call_ctors ) - (func $__original_main (; 2 ;) (type $2) (result i32) + (func $__original_main (result i32) (drop (call $puts (i32.const 568) @@ -23,7 +23,7 @@ ) (i32.const 0) ) - (func $main (; 3 ;) (type $3) (param $0 i32) (param $1 i32) (result i32) + (func $main (param $0 i32) (param $1 i32) (result i32) (call $__original_main) ) ;; custom section "producers", size 112 diff --git a/test/lld/init.wat b/test/lld/init.wat index fe3e5b7b2..89af36bd4 100644 --- a/test/lld/init.wat +++ b/test/lld/init.wat @@ -1,7 +1,7 @@ (module - (type $0 (func)) - (type $1 (func (result i32))) - (type $2 (func (param i32 i32) (result i32))) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (memory $0 2) (table $0 1 1 funcref) (global $global$0 (mut i32) (i32.const 66112)) @@ -10,23 +10,23 @@ (export "__wasm_call_ctors" (func $__wasm_call_ctors)) (export "main" (func $main)) (export "__data_end" (global $global$1)) - (func $__wasm_call_ctors (; 0 ;) (type $0) + (func $__wasm_call_ctors (call $init_x) (call $init_y) ) - (func $init_x (; 1 ;) (type $0) + (func $init_x (i32.store offset=568 (i32.const 0) (i32.const 14) ) ) - (func $init_y (; 2 ;) (type $0) + (func $init_y (i32.store offset=572 (i32.const 0) (i32.const 144) ) ) - (func $__original_main (; 3 ;) (type $1) (result i32) + (func $__original_main (result i32) (i32.add (i32.load offset=568 (i32.const 0) @@ -36,7 +36,7 @@ ) ) ) - (func $main (; 4 ;) (type $2) (param $0 i32) (param $1 i32) (result i32) + (func $main (param $0 i32) (param $1 i32) (result i32) (call $__original_main) ) ;; custom section "producers", size 112 diff --git a/test/lld/longjmp.wat b/test/lld/longjmp.wat index 7241a298b..1e26f0dd5 100644 --- a/test/lld/longjmp.wat +++ b/test/lld/longjmp.wat @@ -26,9 +26,9 @@ (export "__wasm_call_ctors" (func $0)) (export "main" (func $2)) (export "__data_end" (global $global$1)) - (func $0 (; 9 ;) + (func $0 ) - (func $1 (; 10 ;) (result i32) + (func $1 (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -128,7 +128,7 @@ ) (unreachable) ) - (func $2 (; 11 ;) (param $0 i32) (param $1 i32) (result i32) + (func $2 (param $0 i32) (param $1 i32) (result i32) (call $1) ) ;; custom section "producers", size 112 diff --git a/test/lld/recursive.wat b/test/lld/recursive.wat index cd6a4ae86..767f3d82a 100644 --- a/test/lld/recursive.wat +++ b/test/lld/recursive.wat @@ -1,7 +1,7 @@ (module - (type $0 (func (param i32 i32) (result i32))) - (type $1 (func)) - (type $2 (func (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) (import "env" "iprintf" (func $iprintf (param i32 i32) (result i32))) (memory $0 2) (data (i32.const 568) "%d:%d\n\00Result: %d\n\00") @@ -12,9 +12,9 @@ (export "__wasm_call_ctors" (func $__wasm_call_ctors)) (export "main" (func $main)) (export "__data_end" (global $global$1)) - (func $__wasm_call_ctors (; 1 ;) (type $1) + (func $__wasm_call_ctors ) - (func $foo (; 2 ;) (type $0) (param $0 i32) (param $1 i32) (result i32) + (func $foo (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (global.set $global$0 (local.tee $2 @@ -49,7 +49,7 @@ (local.get $0) ) ) - (func $__original_main (; 3 ;) (type $2) (result i32) + (func $__original_main (result i32) (local $0 i32) (global.set $global$0 (local.tee $0 @@ -80,7 +80,7 @@ ) (i32.const 0) ) - (func $main (; 4 ;) (type $0) (param $0 i32) (param $1 i32) (result i32) + (func $main (param $0 i32) (param $1 i32) (result i32) (call $__original_main) ) ;; custom section "producers", size 112 diff --git a/test/lld/reserved_func_ptr.wat b/test/lld/reserved_func_ptr.wat index f979bd2d8..b3cac4043 100644 --- a/test/lld/reserved_func_ptr.wat +++ b/test/lld/reserved_func_ptr.wat @@ -1,11 +1,11 @@ (module - (type $0 (func)) - (type $1 (func (param i32))) - (type $2 (func (param i32 i32) (result i32))) - (type $3 (func (param f32 f32 i32) (result f32))) - (type $4 (func (param f64 i32) (result f64))) - (type $5 (func (param i32 i32 i32))) - (type $6 (func (param i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $none_=>_none (func)) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $f32_f32_i32_=>_f32 (func (param f32 f32 i32) (result f32))) + (type $f64_i32_=>_f64 (func (param f64 i32) (result f64))) (import "env" "_Z4atoiPKc" (func $atoi\28char\20const*\29 (param i32) (result i32))) (memory $0 2) (table $0 3 3 funcref) @@ -16,13 +16,13 @@ (export "__wasm_call_ctors" (func $__wasm_call_ctors)) (export "main" (func $main)) (export "__data_end" (global $global$1)) - (func $__wasm_call_ctors (; 1 ;) (type $0) + (func $__wasm_call_ctors ) - (func $address_taken_func\28int\2c\20int\2c\20int\29 (; 2 ;) (type $5) (param $0 i32) (param $1 i32) (param $2 i32) + (func $address_taken_func\28int\2c\20int\2c\20int\29 (param $0 i32) (param $1 i32) (param $2 i32) ) - (func $address_taken_func2\28int\2c\20int\2c\20int\29 (; 3 ;) (type $5) (param $0 i32) (param $1 i32) (param $2 i32) + (func $address_taken_func2\28int\2c\20int\2c\20int\29 (param $0 i32) (param $1 i32) (param $2 i32) ) - (func $main (; 4 ;) (type $2) (param $0 i32) (param $1 i32) (result i32) + (func $main (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -62,22 +62,22 @@ ) ) ) - (call_indirect (type $0) + (call_indirect (type $none_=>_none) (local.get $2) ) - (call_indirect (type $1) + (call_indirect (type $i32_=>_none) (i32.const 3) (local.get $3) ) (drop - (call_indirect (type $2) + (call_indirect (type $i32_i32_=>_i32) (i32.const 4) (i32.const 5) (local.get $4) ) ) (drop - (call_indirect (type $3) + (call_indirect (type $f32_f32_i32_=>_f32) (f32.const 3.0999999046325684) (f32.const 4.199999809265137) (i32.const 5) @@ -85,13 +85,13 @@ ) ) (drop - (call_indirect (type $4) + (call_indirect (type $f64_i32_=>_f64) (f64.const 4.2) (i32.const 5) (local.get $1) ) ) - (call_indirect (type $5) + (call_indirect (type $i32_i32_i32_=>_none) (i32.const 1) (i32.const 2) (i32.const 3) diff --git a/test/lld/shared.wat b/test/lld/shared.wat index 99b667e42..1e4ced811 100644 --- a/test/lld/shared.wat +++ b/test/lld/shared.wat @@ -1,7 +1,7 @@ (module - (type $0 (func (param i32) (result i32))) - (type $1 (func)) - (type $2 (func (result i32))) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "memory" (memory $0 0)) (data (global.get $gimport$2) "Hello, world\00\00\00\00\00\00\00\00\00\00\00\00") (import "env" "__indirect_function_table" (table $timport$1 0 funcref)) @@ -17,10 +17,10 @@ (export "_Z13print_messagev" (func $print_message\28\29)) (export "ptr_puts" (global $global$0)) (export "ptr_local_func" (global $global$1)) - (func $__wasm_call_ctors (; 1 ;) (type $1) + (func $__wasm_call_ctors (call $__wasm_apply_relocs) ) - (func $__wasm_apply_relocs (; 2 ;) (type $1) + (func $__wasm_apply_relocs (i32.store (i32.add (global.get $gimport$2) @@ -36,7 +36,7 @@ (global.get $gimport$7) ) ) - (func $print_message\28\29 (; 3 ;) (type $2) (result i32) + (func $print_message\28\29 (result i32) (drop (call $puts (i32.add @@ -49,7 +49,11 @@ (global.get $gimport$5) ) ) - ;; custom section "dylink", size 5 + ;; dylink section + ;; memorysize: 24 + ;; memoryalignment: 2 + ;; tablesize: 0 + ;; tablealignment: 0 ;; custom section "producers", size 112 ) diff --git a/test/lld/shared_longjmp.wat b/test/lld/shared_longjmp.wat index b5179676c..d80e51623 100644 --- a/test/lld/shared_longjmp.wat +++ b/test/lld/shared_longjmp.wat @@ -1,12 +1,12 @@ (module - (type $0 (func (param i32) (result i32))) - (type $1 (func (param i32 i32 i32 i32) (result i32))) - (type $2 (func (result i32))) - (type $3 (func (param i32 i32))) - (type $4 (func (param i32 i32 i32))) - (type $5 (func (param i32 i32 i32) (result i32))) - (type $6 (func (param i32))) - (type $7 (func)) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (import "env" "memory" (memory $0 0)) (data (global.get $gimport$2) "\00\00\00\00\00\00\00\00") (import "env" "__indirect_function_table" (table $timport$1 0 funcref)) @@ -30,12 +30,12 @@ (export "_start" (func $2)) (export "__THREW__" (global $global$0)) (export "__threwValue" (global $global$1)) - (func $0 (; 9 ;) (type $7) + (func $0 (call $1) ) - (func $1 (; 10 ;) (type $7) + (func $1 ) - (func $2 (; 11 ;) (type $7) + (func $2 (local $0 i32) (local $1 i32) (local $2 i32) @@ -138,7 +138,11 @@ ) (unreachable) ) - ;; custom section "dylink", size 5 + ;; dylink section + ;; memorysize: 8 + ;; memoryalignment: 2 + ;; tablesize: 0 + ;; tablealignment: 0 ;; custom section "producers", size 112 ) |