summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--thumb2copy.s23
1 files changed, 7 insertions, 16 deletions
diff --git a/thumb2copy.s b/thumb2copy.s
index cbacb1b..24ebaea 100644
--- a/thumb2copy.s
+++ b/thumb2copy.s
@@ -78,13 +78,10 @@ end_copy0:
determine_free_finalizers_after_copy:
ldr BSTACK_0,[ASTACK_2]
- tst BSTACK_0,#3
- beq finalizer_not_used_after_copy
- tst BSTACK_0,#0
+ tst BSTACK_0,#1
beq finalizer_not_used_after_copy
ldr ASTACK_2,[ASTACK_2,#4]
- add BSTACK_0,BSTACK_0,#1
str BSTACK_0,[ASTACK_0]
add ASTACK_0,BSTACK_0,#4
b determine_free_finalizers_after_copy
@@ -282,10 +279,9 @@ copy_record_node2_1_b:
str ASTACK_0,[ASTACK_PTR,#-8]
str BSTACK_0,[ASTACK_PTR,#-4]
- sub ASTACK_PTR,ASTACK_PTR,#7
+ sub ASTACK_PTR,ASTACK_PTR,#8
str ASTACK_PTR,[ASTACK_1]
- sub ASTACK_PTR,ASTACK_PTR,#1
str ASTACK_PTR,[HEAP_FREE]
@@ -331,7 +327,6 @@ copy_real_or_file_2:
b copy_lp1
already_copied_2:
- add ASTACK_0,ASTACK_0,#1
subs BSTACK_1,BSTACK_1,#1
str ASTACK_0,[HEAP_FREE]
@@ -615,12 +610,11 @@ copy_node2_1_:
copy_node2_3:
str HEAP_PTR,[HEAP_FREE]
str ASTACK_0,[HEAP_PTR]
- add HEAP_PTR,HEAP_PTR,#1
str HEAP_PTR,[ASTACK_1]
ldr ASTACK_0,[ASTACK_1,#4]
add ASTACK_1,ASTACK_1,#8
- str ASTACK_0,[HEAP_PTR,#4-1]
- add HEAP_PTR,HEAP_PTR,#8-1
+ str ASTACK_0,[HEAP_PTR,#4]
+ add HEAP_PTR,HEAP_PTR,#8
cp_arg_lp2:
ldr ASTACK_0,[ASTACK_1],#4
@@ -638,15 +632,14 @@ copy_arity_1_node2__:
copy_arity_1_node2:
copy_arity_1_node2_:
str HEAP_PTR,[HEAP_FREE]
- add HEAP_PTR,HEAP_PTR,#1
str HEAP_PTR,[ASTACK_1]
ldr BSTACK_0,[ASTACK_1,#4]
- str ASTACK_0,[HEAP_PTR,#-1]
+ str ASTACK_0,[HEAP_PTR]
- str BSTACK_0,[HEAP_PTR,#4-1]
- add HEAP_PTR,HEAP_PTR,#12-1
+ str BSTACK_0,[HEAP_PTR,#4]
+ add HEAP_PTR,HEAP_PTR,#12
subs BSTACK_1,BSTACK_1,#1
bne copy_lp2
@@ -968,8 +961,6 @@ copy_arity_0_node2_:
str ASTACK_0,[ASTACK_PTR,#-12]!
str ASTACK_PTR,[ASTACK_1]
- @add BSTACK_0,ASTACK_PTR,#1
-
str ASTACK_PTR,[HEAP_FREE]
subs BSTACK_1,BSTACK_1,#1