Add wasm tacle-bench targets
This commit is contained in:
215
targets/wasm-tacle/kernel/bitonic/generated/default/bitonic.wat
Normal file
215
targets/wasm-tacle/kernel/bitonic/generated/default/bitonic.wat
Normal file
@ -0,0 +1,215 @@
|
||||
(module $bitonic.wasm
|
||||
(type (;0;) (func (param i32 i32)))
|
||||
(type (;1;) (func))
|
||||
(type (;2;) (func (param i32 i32 i32)))
|
||||
(type (;3;) (func (result i32)))
|
||||
(import "__pragma" "loopbound" (func $__pragma_loopbound (type 0)))
|
||||
(func $__wasm_apply_data_relocs (type 1))
|
||||
(func $bitonic_merge (type 2) (param i32 i32 i32)
|
||||
(local i32 i32 i32 i32 i32 i32 i32 i32 i32)
|
||||
i32.const 0
|
||||
i32.const 16
|
||||
call $__pragma_loopbound
|
||||
block ;; label = @1
|
||||
local.get 1
|
||||
i32.const 2
|
||||
i32.lt_s
|
||||
br_if 0 (;@1;)
|
||||
local.get 1
|
||||
i32.const 1
|
||||
i32.shr_u
|
||||
local.tee 3
|
||||
local.get 0
|
||||
i32.add
|
||||
local.set 4
|
||||
loop ;; label = @2
|
||||
local.get 4
|
||||
local.set 5
|
||||
local.get 0
|
||||
i32.const 2
|
||||
i32.shl
|
||||
local.set 4
|
||||
local.get 3
|
||||
local.tee 6
|
||||
i32.const 2
|
||||
i32.shl
|
||||
i32.const 1024
|
||||
i32.add
|
||||
local.set 7
|
||||
local.get 0
|
||||
local.set 3
|
||||
loop ;; label = @3
|
||||
block ;; label = @4
|
||||
local.get 4
|
||||
i32.const 1024
|
||||
i32.add
|
||||
local.tee 8
|
||||
i32.load
|
||||
local.tee 9
|
||||
local.get 7
|
||||
local.get 4
|
||||
i32.add
|
||||
local.tee 10
|
||||
i32.load
|
||||
local.tee 11
|
||||
i32.gt_s
|
||||
local.get 2
|
||||
i32.ne
|
||||
br_if 0 (;@4;)
|
||||
local.get 8
|
||||
local.get 11
|
||||
i32.store
|
||||
local.get 10
|
||||
local.get 9
|
||||
i32.store
|
||||
end
|
||||
local.get 4
|
||||
i32.const 4
|
||||
i32.add
|
||||
local.set 4
|
||||
local.get 3
|
||||
i32.const 1
|
||||
i32.add
|
||||
local.tee 3
|
||||
local.get 5
|
||||
i32.lt_s
|
||||
br_if 0 (;@3;)
|
||||
end
|
||||
local.get 1
|
||||
i32.const 4
|
||||
i32.lt_s
|
||||
br_if 1 (;@1;)
|
||||
local.get 0
|
||||
local.get 6
|
||||
local.get 2
|
||||
call $bitonic_merge
|
||||
i32.const 0
|
||||
i32.const 16
|
||||
call $__pragma_loopbound
|
||||
local.get 6
|
||||
i32.const 2
|
||||
i32.div_s
|
||||
local.tee 3
|
||||
local.get 5
|
||||
i32.add
|
||||
local.set 4
|
||||
local.get 6
|
||||
local.set 1
|
||||
local.get 5
|
||||
local.set 0
|
||||
local.get 6
|
||||
i32.const 1
|
||||
i32.gt_s
|
||||
br_if 0 (;@2;)
|
||||
end
|
||||
end)
|
||||
(func $bitonic_sort (type 2) (param i32 i32 i32)
|
||||
(local i32)
|
||||
block ;; label = @1
|
||||
local.get 1
|
||||
i32.const 2
|
||||
i32.lt_s
|
||||
br_if 0 (;@1;)
|
||||
local.get 0
|
||||
local.get 1
|
||||
i32.const 1
|
||||
i32.shr_u
|
||||
local.tee 3
|
||||
i32.const 1
|
||||
call $bitonic_sort
|
||||
local.get 3
|
||||
local.get 0
|
||||
i32.add
|
||||
local.get 3
|
||||
i32.const 0
|
||||
call $bitonic_sort
|
||||
end
|
||||
local.get 0
|
||||
local.get 1
|
||||
local.get 2
|
||||
call $bitonic_merge)
|
||||
(func $bitonic_main (type 1)
|
||||
i32.const 0
|
||||
i32.const 32
|
||||
i32.const 1
|
||||
call $bitonic_sort
|
||||
i32.const 32
|
||||
i32.const 32
|
||||
call $__pragma_loopbound)
|
||||
(func $__original_main (type 3) (result i32)
|
||||
i32.const 32
|
||||
i32.const 32
|
||||
call $__pragma_loopbound
|
||||
i32.const 0
|
||||
i64.const 4294967298
|
||||
i64.store offset=1144
|
||||
i32.const 0
|
||||
i64.const 12884901892
|
||||
i64.store offset=1136
|
||||
i32.const 0
|
||||
i64.const 21474836486
|
||||
i64.store offset=1128
|
||||
i32.const 0
|
||||
i64.const 30064771080
|
||||
i64.store offset=1120
|
||||
i32.const 0
|
||||
i64.const 38654705674
|
||||
i64.store offset=1112
|
||||
i32.const 0
|
||||
i64.const 47244640268
|
||||
i64.store offset=1104
|
||||
i32.const 0
|
||||
i64.const 55834574862
|
||||
i64.store offset=1096
|
||||
i32.const 0
|
||||
i64.const 64424509456
|
||||
i64.store offset=1088
|
||||
i32.const 0
|
||||
i64.const 73014444050
|
||||
i64.store offset=1080
|
||||
i32.const 0
|
||||
i64.const 81604378644
|
||||
i64.store offset=1072
|
||||
i32.const 0
|
||||
i64.const 90194313238
|
||||
i64.store offset=1064
|
||||
i32.const 0
|
||||
i64.const 98784247832
|
||||
i64.store offset=1056
|
||||
i32.const 0
|
||||
i64.const 107374182426
|
||||
i64.store offset=1048
|
||||
i32.const 0
|
||||
i64.const 115964117020
|
||||
i64.store offset=1040
|
||||
i32.const 0
|
||||
i64.const 124554051614
|
||||
i64.store offset=1032
|
||||
i32.const 0
|
||||
i64.const 133143986208
|
||||
i64.store offset=1024
|
||||
call $bitonic_main
|
||||
i32.const -1
|
||||
i32.const 0
|
||||
i32.const 0
|
||||
i32.load offset=1108
|
||||
i32.const 0
|
||||
i32.load offset=1024
|
||||
i32.add
|
||||
i32.const 0
|
||||
i32.load offset=1148
|
||||
i32.add
|
||||
i32.const 55
|
||||
i32.ne
|
||||
select)
|
||||
(table (;0;) 1 1 funcref)
|
||||
(memory (;0;) 1)
|
||||
(global $__stack_pointer (mut i32) (i32.const 5248))
|
||||
(global (;1;) i32 (i32.const 1152))
|
||||
(global (;2;) i32 (i32.const 5248))
|
||||
(export "memory" (memory 0))
|
||||
(export "__wasm_apply_data_relocs" (func $__wasm_apply_data_relocs))
|
||||
(export "entrypoint" (func $bitonic_main))
|
||||
(export "main" (func $__original_main))
|
||||
(export "__data_end" (global 1))
|
||||
(export "__heap_base" (global 2)))
|
||||
Reference in New Issue
Block a user