backport tlsf fixes, add asrt allocator test

This commit is contained in:
dcode
2019-04-15 12:41:29 +02:00
parent c13f4db641
commit 586ca8b580
11 changed files with 2179 additions and 81 deletions

View File

@ -39,10 +39,10 @@
call $~lib/builtins/abort
unreachable
)
(func $~lib/allocator/tlsf/Root#set:tailRef (; 3 ;) (type $FUNCSIG$vi) (param $0 i32)
i32.const 2912
(func $~lib/allocator/tlsf/Root#set:tailRef (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
local.get $0
i32.store
local.get $1
i32.store offset=2912
)
(func $~lib/allocator/tlsf/Root#setSLMap (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
local.get $0
@ -340,8 +340,8 @@
(local $3 i32)
local.get $2
block (result i32)
i32.const 2912
i32.load
local.get $0
i32.load offset=2912
local.tee $2
if
local.get $1
@ -393,6 +393,7 @@
local.tee $2
i32.const 2
i32.store
local.get $0
local.get $2
call $~lib/allocator/tlsf/Root#set:tailRef
local.get $0
@ -575,6 +576,7 @@
local.get $4
local.tee $1
global.set $~lib/allocator/tlsf/ROOT
local.get $1
i32.const 0
call $~lib/allocator/tlsf/Root#set:tailRef
local.get $1

View File

@ -43,7 +43,7 @@
unreachable
)
(func $~lib/allocator/tlsf/Root#set:tailRef (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
i32.const 0
local.get $0
local.get $1
i32.store offset=2912
)
@ -101,7 +101,7 @@
i32.store offset=96
)
(func $~lib/allocator/tlsf/Root#get:tailRef (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 0
local.get $0
i32.load offset=2912
)
(func $~lib/allocator/tlsf/Block#get:right (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
@ -152,7 +152,7 @@
if
i32.const 0
i32.const 72
i32.const 452
i32.const 454
i32.const 2
call $~lib/builtins/abort
unreachable
@ -713,6 +713,17 @@
local.get $3
i32.load
local.set $4
else
i32.const 0
i32.eqz
if
i32.const 0
i32.const 72
i32.const 415
i32.const 8
call $~lib/builtins/abort
unreachable
end
end
else
local.get $1
@ -724,7 +735,7 @@
if
i32.const 0
i32.const 72
i32.const 417
i32.const 419
i32.const 6
call $~lib/builtins/abort
unreachable
@ -795,7 +806,7 @@
if
i32.const 0
i32.const 72
i32.const 446
i32.const 448
i32.const 2
call $~lib/builtins/abort
unreachable
@ -811,7 +822,7 @@
if
i32.const 0
i32.const 72
i32.const 446
i32.const 448
i32.const 2
call $~lib/builtins/abort
unreachable
@ -1237,7 +1248,7 @@
if (result i32)
i32.const 0
i32.const 72
i32.const 507
i32.const 509
i32.const 12
call $~lib/builtins/abort
unreachable
@ -1258,7 +1269,7 @@
if
i32.const 0
i32.const 72
i32.const 510
i32.const 512
i32.const 2
call $~lib/builtins/abort
unreachable
@ -1287,7 +1298,7 @@
if
i32.const 0
i32.const 72
i32.const 519
i32.const 521
i32.const 4
call $~lib/builtins/abort
unreachable
@ -1311,7 +1322,7 @@
if
i32.const 0
i32.const 72
i32.const 524
i32.const 526
i32.const 6
call $~lib/builtins/abort
unreachable