summaryrefslogtreecommitdiff
path: root/thumb2startup.s
diff options
context:
space:
mode:
authorCamil Staps2016-11-26 13:44:41 +0000
committerCamil Staps2016-11-26 13:44:41 +0000
commit355c7daa2cfc3a6b29f72376dcea6a3976a8695f (patch)
treec2cd8bf37d5b9e240b36c473bc6aac88cb74a101 /thumb2startup.s
parentWIP fixes for bit 0 in compacting collector (diff)
monster commit: replace all registers with aliases to ease optimisation
Diffstat (limited to 'thumb2startup.s')
-rw-r--r--thumb2startup.s4121
1 files changed, 2057 insertions, 2064 deletions
diff --git a/thumb2startup.s b/thumb2startup.s
index 7ef4a08..f33e04e 100644
--- a/thumb2startup.s
+++ b/thumb2startup.s
@@ -3,14 +3,7 @@
@ Author: John van Groningen, adapted for Thumb-2 by Camil Staps
@ Machine: ARM
-@ B stack registers: r4 r3 r2 r1 r0
-@ A stack registers: r6 r7 r8 r11 (fp)
-@ n free heap words: r5
-@ A stack pointer: r9 (sb)
-@ heap pointer: r10 (sl)
-@ scratch register: r12 (ip)
-@ B stack pointer: r13 (sp)
-@ link/scratch register: r14 (lr)
+ .include "thumb2regs.s"
.fpu vfp3
.thumb
@@ -491,18 +484,18 @@ start_address:
abc_main:
str lr,[sp,#-4]!
- stmdb sp!,{r4-r11}
+ stmdb sp!,{BSTACK_0-ASTACK_3}
.ifdef DLL
- ldr r4,[sp,#28]
- lao r12,start_address,0
- sto r4,r12,start_address,0
+ ldr BSTACK_0,[sp,#28]
+ lao SCRATCH_REG,start_address,0
+ sto BSTACK_0,SCRATCH_REG,start_address,0
.endif
.align
add lr,pc,#9
str lr,[sp,#-4]!
bl init_clean
- tst r4,r4
+ tst BSTACK_0,BSTACK_0
bne init_error
.align
@@ -510,8 +503,8 @@ abc_main:
str lr,[sp,#-4]!
bl init_timer
- lao r12,halt_sp,0
- sto sp,r12,halt_sp,0
+ lao SCRATCH_REG,halt_sp,0
+ sto sp,SCRATCH_REG,halt_sp,0
.ifdef PROFILE
.align
@@ -521,12 +514,12 @@ abc_main:
.endif
.ifdef DLL
- lao r12,start_address,1
- ldo r4,r12,start_address,1
+ lao SCRATCH_REG,start_address,1
+ ldo BSTACK_0,SCRATCH_REG,start_address,1
.align
add lr,pc,#7
str lr,[sp,#-4]!
- blx r4
+ blx BSTACK_0
.else
.align
add lr,pc,#9
@@ -543,22 +536,22 @@ exit:
.thumb_func
init_error:
- ldmia sp!,{r4-r11,pc}
+ ldmia sp!,{BSTACK_0-ASTACK_3,pc}
.globl clean_init
.thumb_func
clean_init:
- stmdb sp!,{r4-r11,lr}
+ stmdb sp!,{BSTACK_0-ASTACK_3,lr}
- lao r12,dll_initisialised,0
- mov r0,#1
- sto r0,r12,dll_initisialised,0
+ lao SCRATCH_REG,dll_initisialised,0
+ mov BSTACK_4,#1
+ sto BSTACK_4,SCRATCH_REG,dll_initisialised,0
.align
add lr,pc,#9
str lr,[sp,#-4]!
bl init_clean
- tst r4,r4
+ tst BSTACK_0,BSTACK_0
bne init_dll_error
.align
@@ -566,8 +559,8 @@ clean_init:
str lr,[sp,#-4]!
bl init_timer
- lao r12,halt_sp,1
- sto sp,r12,halt_sp,1
+ lao SCRATCH_REG,halt_sp,1
+ sto sp,SCRATCH_REG,halt_sp,1
.ifdef PROFILE
.align
@@ -576,32 +569,32 @@ clean_init:
bl init_profiler
.endif
- lao r12,saved_heap_p,0
- otoa r12,saved_heap_p,0
- str r10,[r12]
- str r5,[r12,#4]
- lao r12,saved_a_stack_p,0
- sto r9,r12,saved_a_stack_p,0
+ lao SCRATCH_REG,saved_heap_p,0
+ otoa SCRATCH_REG,saved_heap_p,0
+ str HEAP_PTR,[SCRATCH_REG]
+ str HEAP_FREE,[SCRATCH_REG,#4]
+ lao SCRATCH_REG,saved_a_stack_p,0
+ sto ASTACK_PTR,SCRATCH_REG,saved_a_stack_p,0
- mov r4,#1
+ mov BSTACK_0,#1
b exit_dll_init
.thumb_func
init_dll_error:
- mov r4,#0
+ mov BSTACK_0,#0
b exit_dll_init
.globl clean_fini
.thumb_func
clean_fini:
- stmdb sp!,{r4-r11,lr}
+ stmdb sp!,{BSTACK_0-ASTACK_3,lr}
- lao r12,saved_heap_p,1
- otoa r12,saved_heap_p,1
- ldr r10,[r12]
- ldr r5,[r12,#4]
- lao r12,saved_a_stack_p,1
- ldo r9,r12,saved_a_stack_p,1
+ lao SCRATCH_REG,saved_heap_p,1
+ otoa SCRATCH_REG,saved_heap_p,1
+ ldr HEAP_PTR,[SCRATCH_REG]
+ ldr HEAP_FREE,[SCRATCH_REG,#4]
+ lao SCRATCH_REG,saved_a_stack_p,1
+ ldo ASTACK_PTR,SCRATCH_REG,saved_a_stack_p,1
.align
add lr,pc,#9
@@ -610,212 +603,212 @@ clean_fini:
.thumb_func
exit_dll_init:
- ldmia sp!,{r4-r11,pc}
+ ldmia sp!,{BSTACK_0-ASTACK_3,pc}
.thumb_func
init_clean:
- add r4,sp,#128
- lao r12,ab_stack_size,0
- ldo r12,r12,ab_stack_size,0
- sub r4,r4,r12
- lao r12,end_b_stack,0
- sto r4,r12,end_b_stack,0
-
- lao r12,flags,0
- ldo r4,r12,flags,0
- and r4,r4,#1
- lao r12,basic_only,0
- sto r4,r12,basic_only,0
-
- lao r12,heap_size,0
- ldo r4,r12,heap_size,0
+ add BSTACK_0,sp,#128
+ lao SCRATCH_REG,ab_stack_size,0
+ ldo SCRATCH_REG,SCRATCH_REG,ab_stack_size,0
+ sub BSTACK_0,BSTACK_0,SCRATCH_REG
+ lao SCRATCH_REG,end_b_stack,0
+ sto BSTACK_0,SCRATCH_REG,end_b_stack,0
+
+ lao SCRATCH_REG,flags,0
+ ldo BSTACK_0,SCRATCH_REG,flags,0
+ and BSTACK_0,BSTACK_0,#1
+ lao SCRATCH_REG,basic_only,0
+ sto BSTACK_0,SCRATCH_REG,basic_only,0
+
+ lao SCRATCH_REG,heap_size,0
+ ldo BSTACK_0,SCRATCH_REG,heap_size,0
.if PREFETCH2
- subs r4,r4,#63
+ subs BSTACK_0,BSTACK_0,#63
.else
- subs r4,r4,#3
+ subs BSTACK_0,BSTACK_0,#3
.endif
@ divide by 33
- ldr r12,=1041204193
- umull r11,r4,r12,r4
- lsr r4,r4,#3
- lao r12,heap_size_33,0
- sto r4,r12,heap_size_33,0
-
- lao r12,heap_size,1
- ldo r4,r12,heap_size,1
- subs r4,r4,#3
+ ldr SCRATCH_REG,=1041204193
+ umull ASTACK_3,BSTACK_0,SCRATCH_REG,BSTACK_0
+ lsr BSTACK_0,BSTACK_0,#3
+ lao SCRATCH_REG,heap_size_33,0
+ sto BSTACK_0,SCRATCH_REG,heap_size_33,0
+
+ lao SCRATCH_REG,heap_size,1
+ ldo BSTACK_0,SCRATCH_REG,heap_size,1
+ subs BSTACK_0,BSTACK_0,#3
@ divide by 129
- ldr r12,=266354561
- umull r11,r4,r12,r4
- lsr r4,r4,#3
- lao r12,heap_size_129,0
- sto r4,r12,heap_size_129,0
- add r4,r4,#3
- and r4,r4,#-4
- lao r12,heap_copied_vector_size,0
- sto r4,r12,heap_copied_vector_size,0
- lao r12,heap_end_after_copy_gc,0
- mov r11,#0
- sto r11,r12,heap_end_after_copy_gc,0
-
- lao r12,heap_size,2
- ldo r4,r12,heap_size,2
- add r4,r4,#7
- and r4,r4,#-8
+ ldr SCRATCH_REG,=266354561
+ umull ASTACK_3,BSTACK_0,SCRATCH_REG,BSTACK_0
+ lsr BSTACK_0,BSTACK_0,#3
+ lao SCRATCH_REG,heap_size_129,0
+ sto BSTACK_0,SCRATCH_REG,heap_size_129,0
+ add BSTACK_0,BSTACK_0,#3
+ and BSTACK_0,BSTACK_0,#-4
+ lao SCRATCH_REG,heap_copied_vector_size,0
+ sto BSTACK_0,SCRATCH_REG,heap_copied_vector_size,0
+ lao SCRATCH_REG,heap_end_after_copy_gc,0
+ mov ASTACK_3,#0
+ sto ASTACK_3,SCRATCH_REG,heap_end_after_copy_gc,0
+
+ lao SCRATCH_REG,heap_size,2
+ ldo BSTACK_0,SCRATCH_REG,heap_size,2
+ add BSTACK_0,BSTACK_0,#7
+ and BSTACK_0,BSTACK_0,#-8
.ifdef PIC
- lao r12,heap_size,3
+ lao SCRATCH_REG,heap_size,3
.endif
- sto r4,r12,heap_size,3
- add r4,r4,#7
+ sto BSTACK_0,SCRATCH_REG,heap_size,3
+ add BSTACK_0,BSTACK_0,#7
- mov r0,r4
+ mov BSTACK_4,BSTACK_0
bl malloc
- movs r4,r0
+ movs BSTACK_0,BSTACK_4
beq no_memory_2
- lao r12,heap_mbp,0
- sto r4,r12,heap_mbp,0
- add r10,r4,#3
- and r10,r10,#-4
- lao r12,heap_p,0
- sto r10,r12,heap_p,0
+ lao SCRATCH_REG,heap_mbp,0
+ sto BSTACK_0,SCRATCH_REG,heap_mbp,0
+ add HEAP_PTR,BSTACK_0,#3
+ and HEAP_PTR,HEAP_PTR,#-4
+ lao SCRATCH_REG,heap_p,0
+ sto HEAP_PTR,SCRATCH_REG,heap_p,0
- lao r8,ab_stack_size,1
- ldo r8,r8,ab_stack_size,1
- add r8,r8,#3
+ lao ASTACK_2,ab_stack_size,1
+ ldo ASTACK_2,ASTACK_2,ab_stack_size,1
+ add ASTACK_2,ASTACK_2,#3
- mov r0,r8
+ mov BSTACK_4,ASTACK_2
.if STACK_OVERFLOW_EXCEPTION_HANDLER
bl allocate_memory_with_guard_page_at_end
.else
bl malloc
.endif
- movs r4,r0
+ movs BSTACK_0,BSTACK_4
beq no_memory_3
- lao r12,stack_mbp,0
- sto r4,r12,stack_mbp,0
+ lao SCRATCH_REG,stack_mbp,0
+ sto BSTACK_0,SCRATCH_REG,stack_mbp,0
.if STACK_OVERFLOW_EXCEPTION_HANDLER
- lao r12,ab_stack_size,2
- ldo r12,r12,ab_stack_size,2
- add r4,r4,r12
- lao r12,a_stack_guard_page,0
- add r4,r4,#4096
- add r4,r4,#(3+4095)-4096
- bic r4,r4,#255
- bic r4,r4,#4095-255
- sto r4,r12,a_stack_guard_page,0
- lao r12,ab_stack_size,3
- ldo r12,r12,ab_stack_size,3
- sub r4,r4,r12
-.endif
- add r4,r4,#3
- and r4,r4,#-4
-
- mov r9,r4
- lao r12,stack_p,0
- sto r4,r12,stack_p,0
-
- lao r12,ab_stack_size,4
- ldo r12,r12,ab_stack_size,4
- add r4,r4,r12
- subs r4,r4,#64
- lao r12,end_a_stack,0
- sto r4,r12,end_a_stack,0
+ lao SCRATCH_REG,ab_stack_size,2
+ ldo SCRATCH_REG,SCRATCH_REG,ab_stack_size,2
+ add BSTACK_0,BSTACK_0,SCRATCH_REG
+ lao SCRATCH_REG,a_stack_guard_page,0
+ add BSTACK_0,BSTACK_0,#4096
+ add BSTACK_0,BSTACK_0,#(3+4095)-4096
+ bic BSTACK_0,BSTACK_0,#255
+ bic BSTACK_0,BSTACK_0,#4095-255
+ sto BSTACK_0,SCRATCH_REG,a_stack_guard_page,0
+ lao SCRATCH_REG,ab_stack_size,3
+ ldo SCRATCH_REG,SCRATCH_REG,ab_stack_size,3
+ sub BSTACK_0,BSTACK_0,SCRATCH_REG
+.endif
+ add BSTACK_0,BSTACK_0,#3
+ and BSTACK_0,BSTACK_0,#-4
+
+ mov ASTACK_PTR,BSTACK_0
+ lao SCRATCH_REG,stack_p,0
+ sto BSTACK_0,SCRATCH_REG,stack_p,0
+
+ lao SCRATCH_REG,ab_stack_size,4
+ ldo SCRATCH_REG,SCRATCH_REG,ab_stack_size,4
+ add BSTACK_0,BSTACK_0,SCRATCH_REG
+ subs BSTACK_0,BSTACK_0,#64
+ lao SCRATCH_REG,end_a_stack,0
+ sto BSTACK_0,SCRATCH_REG,end_a_stack,0
.if SHARE_CHAR_INT
- lao r6,small_integers,0
- otoa r6,small_integers,0
- mov r4,#0
- laol r3,INT+2,INT_o_2,0
- otoa r3,INT_o_2,0
+ lao ASTACK_0,small_integers,0
+ otoa ASTACK_0,small_integers,0
+ mov BSTACK_0,#0
+ laol BSTACK_1,INT+2,INT_o_2,0
+ otoa BSTACK_1,INT_o_2,0
.thumb_func
make_small_integers_lp:
- str r3,[r6]
- str r4,[r6,#4]
- add r4,r4,#1
- add r6,r6,#8
- cmp r4,#33
+ str BSTACK_1,[ASTACK_0]
+ str BSTACK_0,[ASTACK_0,#4]
+ add BSTACK_0,BSTACK_0,#1
+ add ASTACK_0,ASTACK_0,#8
+ cmp BSTACK_0,#33
bne make_small_integers_lp
- lao r6,static_characters,0
- otoa r6,static_characters,0
- mov r4,#0
- laol r3,CHAR+2,CHAR_O_2,0
- otoa r3,CHAR_O_2,0
+ lao ASTACK_0,static_characters,0
+ otoa ASTACK_0,static_characters,0
+ mov BSTACK_0,#0
+ laol BSTACK_1,CHAR+2,CHAR_O_2,0
+ otoa BSTACK_1,CHAR_O_2,0
.thumb_func
make_static_characters_lp:
- str r3,[r6]
- str r4,[r6,#4]
- add r4,r4,#1
- add r6,r6,#8
- cmp r4,#256
+ str BSTACK_1,[ASTACK_0]
+ str BSTACK_0,[ASTACK_0,#4]
+ add BSTACK_0,BSTACK_0,#1
+ add ASTACK_0,ASTACK_0,#8
+ cmp BSTACK_0,#256
bne make_static_characters_lp
.endif
- laol r6,caf_list+4,caf_list_o_4,0
- otoa r6,caf_list_o_4,0
- lao r12,caf_listp,0
- sto r6,r12,caf_listp,0
+ laol ASTACK_0,caf_list+4,caf_list_o_4,0
+ otoa ASTACK_0,caf_list_o_4,0
+ lao SCRATCH_REG,caf_listp,0
+ sto ASTACK_0,SCRATCH_REG,caf_listp,0
.if FINALIZERS
- lao r12,finalizer_list,0
- laol r11,__Nil-4,__Nil_o_m4,0
- otoa r11,__Nil_o_m4,0
- sto r11,r12,finalizer_list,0
- lao r12,free_finalizer_list,0
- sto r11,r12,free_finalizer_list,0
-.endif
-
- lao r12,heap_p1,0
- sto r10,r12,heap_p1,0
-
- lao r12,heap_size_129,1
- ldo r8,r12,heap_size_129,1
- lsl r8,r8,#4
- add r4,r10,r8,lsl #2
- lao r12,heap_copied_vector,0
- sto r4,r12,heap_copied_vector,0
- lao r12,heap_copied_vector_size,1
- ldo r12,r12,heap_copied_vector_size,1
- add r4,r12
- lao r12,heap_p2,0
- sto r4,r12,heap_p2,0
-
- lao r12,garbage_collect_flag,0
- mov r11,#0
- stob r11,r12,garbage_collect_flag,0
+ lao SCRATCH_REG,finalizer_list,0
+ laol ASTACK_3,__Nil-4,__Nil_o_m4,0
+ otoa ASTACK_3,__Nil_o_m4,0
+ sto ASTACK_3,SCRATCH_REG,finalizer_list,0
+ lao SCRATCH_REG,free_finalizer_list,0
+ sto ASTACK_3,SCRATCH_REG,free_finalizer_list,0
+.endif
+
+ lao SCRATCH_REG,heap_p1,0
+ sto HEAP_PTR,SCRATCH_REG,heap_p1,0
+
+ lao SCRATCH_REG,heap_size_129,1
+ ldo ASTACK_2,SCRATCH_REG,heap_size_129,1
+ lsl ASTACK_2,ASTACK_2,#4
+ add BSTACK_0,HEAP_PTR,ASTACK_2,lsl #2
+ lao SCRATCH_REG,heap_copied_vector,0
+ sto BSTACK_0,SCRATCH_REG,heap_copied_vector,0
+ lao SCRATCH_REG,heap_copied_vector_size,1
+ ldo SCRATCH_REG,SCRATCH_REG,heap_copied_vector_size,1
+ add BSTACK_0,SCRATCH_REG
+ lao SCRATCH_REG,heap_p2,0
+ sto BSTACK_0,SCRATCH_REG,heap_p2,0
+
+ lao SCRATCH_REG,garbage_collect_flag,0
+ mov ASTACK_3,#0
+ stob ASTACK_3,SCRATCH_REG,garbage_collect_flag,0
.if MARK_AND_COPY_GC
- lao r12,flags,1
- ldo r12,r12,flags,1
- tst r12,#64
+ lao SCRATCH_REG,flags,1
+ ldo SCRATCH_REG,SCRATCH_REG,flags,1
+ tst SCRATCH_REG,#64
beq no_mark1
.endif
.if MARK_GC || COMPACT_GC_ONLY
- lao r12,heap_size_33,1
- ldo r4,r12,heap_size_33,1
- lao r12,heap_vector,0
- sto r10,r12,heap_vector,0
- add r10,r10,r4
+ lao SCRATCH_REG,heap_size_33,1
+ ldo BSTACK_0,SCRATCH_REG,heap_size_33,1
+ lao SCRATCH_REG,heap_vector,0
+ sto HEAP_PTR,SCRATCH_REG,heap_vector,0
+ add HEAP_PTR,HEAP_PTR,BSTACK_0
.if PREFETCH2
- add r10,r10,#63
- and r10,r10,#-64
+ add HEAP_PTR,HEAP_PTR,#63
+ and HEAP_PTR,HEAP_PTR,#-64
.else
- add r10,r10,#3
- and r10,r10,#-4
+ add HEAP_PTR,HEAP_PTR,#3
+ and HEAP_PTR,HEAP_PTR,#-4
.endif
- lao r12,heap_p3,0
- sto r10,r12,heap_p3,0
- lsl r8,r4,#3
- lao r12,garbage_collect_flag,1
- mov r11,#-1
- stob r11,r12,garbage_collect_flag,1
+ lao SCRATCH_REG,heap_p3,0
+ sto HEAP_PTR,SCRATCH_REG,heap_p3,0
+ lsl ASTACK_2,BSTACK_0,#3
+ lao SCRATCH_REG,garbage_collect_flag,1
+ mov ASTACK_3,#-1
+ stob ASTACK_3,SCRATCH_REG,garbage_collect_flag,1
.endif
.if MARK_AND_COPY_GC
@@ -823,82 +816,82 @@ no_mark1:
.endif
.if ADJUST_HEAP_SIZE
- lao r4,initial_heap_size,0
- ldo r4,r4,initial_heap_size,0
+ lao BSTACK_0,initial_heap_size,0
+ ldo BSTACK_0,BSTACK_0,initial_heap_size,0
.if MARK_AND_COPY_GC
- mov r3,#MINIMUM_HEAP_SIZE_2
- lao r12,flags,2
- ldo r12,r12,flags,2
- tst r12,#64
+ mov BSTACK_1,#MINIMUM_HEAP_SIZE_2
+ lao SCRATCH_REG,flags,2
+ ldo SCRATCH_REG,SCRATCH_REG,flags,2
+ tst SCRATCH_REG,#64
bne no_mark9
- add r3,r3,r3
+ add BSTACK_1,BSTACK_1,BSTACK_1
no_mark9:
.else
.if MARK_GC || COMPACT_GC_ONLY
- mov r3,#MINIMUM_HEAP_SIZE
+ mov BSTACK_1,#MINIMUM_HEAP_SIZE
.else
- mov r3,#MINIMUM_HEAP_SIZE_2
+ mov BSTACK_1,#MINIMUM_HEAP_SIZE_2
.endif
.endif
- cmp r4,r3
+ cmp BSTACK_0,BSTACK_1
ble too_large_or_too_small
- lsr r4,r4,#2
- cmp r4,r8
+ lsr BSTACK_0,BSTACK_0,#2
+ cmp BSTACK_0,ASTACK_2
bge too_large_or_too_small
- mov r8,r4
+ mov ASTACK_2,BSTACK_0
.thumb_func
too_large_or_too_small:
.endif
- add r4,r10,r8,lsl #2
- lao r12,heap_end_after_gc,0
- sto r4,r12,heap_end_after_gc,0
+ add BSTACK_0,HEAP_PTR,ASTACK_2,lsl #2
+ lao SCRATCH_REG,heap_end_after_gc,0
+ sto BSTACK_0,SCRATCH_REG,heap_end_after_gc,0
- mov r5,r8
+ mov HEAP_FREE,ASTACK_2
.if MARK_AND_COPY_GC
- lao r12,flags,3
- ldo r12,r12,flags,3
- tst r12,#64
+ lao SCRATCH_REG,flags,3
+ ldo SCRATCH_REG,SCRATCH_REG,flags,3
+ tst SCRATCH_REG,#64
beq no_mark2
.endif
.if MARK_GC && ADJUST_HEAP_SIZE
- lao r12,bit_vector_size,0
- sto r8,r12,bit_vector_size,0
+ lao SCRATCH_REG,bit_vector_size,0
+ sto ASTACK_2,SCRATCH_REG,bit_vector_size,0
.endif
.if MARK_AND_COPY_GC
no_mark2:
.endif
- mov r4,#0
+ mov BSTACK_0,#0
ldr pc,[sp],#4
no_memory_2:
- lao r0,out_of_memory_string_1,0
- otoa r0,out_of_memory_string_1,0
+ lao BSTACK_4,out_of_memory_string_1,0
+ otoa BSTACK_4,out_of_memory_string_1,0
bl ew_print_string
.ifdef _WINDOWS_
? movl $1,@execution_aborted
.endif
- mov r0,#1
+ mov BSTACK_4,#1
ldr pc,[sp],#4
no_memory_3:
- lao r0,out_of_memory_string_1,1
- otoa r0,out_of_memory_string_1,1
+ lao BSTACK_4,out_of_memory_string_1,1
+ otoa BSTACK_4,out_of_memory_string_1,1
bl ew_print_string
.ifdef _WINDOWS_
? movl $1,@execution_aborted
.endif
- lao r0,heap_mbp,1
- ldo r0,r0,heap_mbp,1
+ lao BSTACK_4,heap_mbp,1
+ ldo BSTACK_4,BSTACK_4,heap_mbp,1
bl free
- mov r0,#1
+ mov BSTACK_4,#1
ldr pc,[sp],#4
.thumb_func
@@ -908,64 +901,64 @@ exit_clean:
str lr,[sp,#-4]!
bl add_execute_time
- lao r4,flags,4
- ldo r4,r4,flags,4
- tst r4,#8
+ lao BSTACK_0,flags,4
+ ldo BSTACK_0,BSTACK_0,flags,4
+ tst BSTACK_0,#8
beq no_print_execution_time
- lao r0,time_string_1,0
- otoa r0,time_string_1,0
+ lao BSTACK_4,time_string_1,0
+ otoa BSTACK_4,time_string_1,0
bl ew_print_string
- lao r12,execute_time,0
- ldo r4,r12,execute_time,0
+ lao SCRATCH_REG,execute_time,0
+ ldo BSTACK_0,SCRATCH_REG,execute_time,0
.align
add lr,pc,#9
str lr,[sp,#-4]!
bl print_time
- lao r0,time_string_2,0
- otoa r0,time_string_2,0
+ lao BSTACK_4,time_string_2,0
+ otoa BSTACK_4,time_string_2,0
bl ew_print_string
- lao r12,garbage_collect_time,0
- ldo r4,r12,garbage_collect_time,0
+ lao SCRATCH_REG,garbage_collect_time,0
+ ldo BSTACK_0,SCRATCH_REG,garbage_collect_time,0
.align
add lr,pc,#9
str lr,[sp,#-4]!
bl print_time
- lao r0,time_string_4,0
- otoa r0,time_string_4,0
+ lao BSTACK_4,time_string_4,0
+ otoa BSTACK_4,time_string_4,0
bl ew_print_string
- lao r12,execute_time,1
- ldo r4,r12,execute_time,1
- lao r12,garbage_collect_time,1
- ldo r12,r12,garbage_collect_time,1
- add r4,r12
- lao r12,IO_time,0
- ldo r12,r12,IO_time,0
- add r4,r12
+ lao SCRATCH_REG,execute_time,1
+ ldo BSTACK_0,SCRATCH_REG,execute_time,1
+ lao SCRATCH_REG,garbage_collect_time,1
+ ldo SCRATCH_REG,SCRATCH_REG,garbage_collect_time,1
+ add BSTACK_0,SCRATCH_REG
+ lao SCRATCH_REG,IO_time,0
+ ldo SCRATCH_REG,SCRATCH_REG,IO_time,0
+ add BSTACK_0,SCRATCH_REG
.align
add lr,pc,#9
str lr,[sp,#-4]!
bl print_time
- mov r0,#10
+ mov BSTACK_4,#10
bl ew_print_char
.thumb_func
no_print_execution_time:
- lao r0,stack_mbp,1
- ldo r0,r0,stack_mbp,1
+ lao BSTACK_4,stack_mbp,1
+ ldo BSTACK_4,BSTACK_4,stack_mbp,1
bl free
- lao r0,heap_mbp,2
- ldo r0,r0,heap_mbp,2
+ lao BSTACK_4,heap_mbp,2
+ ldo BSTACK_4,BSTACK_4,heap_mbp,2
bl free
.ifdef PROFILE
@@ -979,9 +972,9 @@ no_print_execution_time:
.thumb_func
__driver:
- lao r8,flags,5
- ldo r8,r8,flags,5
- tst r8,#16
+ lao ASTACK_2,flags,5
+ ldo ASTACK_2,ASTACK_2,flags,5
+ tst ASTACK_2,#16
beq __print__graph
b __eval__to__nf
@@ -1083,73 +1076,73 @@ __driver:
.thumb_func
print_time:
@ divide by 1000
- ldr r12,=274877907
- umull r11,r6,r12,r4
- lsr r6,r6,#6
+ ldr SCRATCH_REG,=274877907
+ umull ASTACK_3,ASTACK_0,SCRATCH_REG,BSTACK_0
+ lsr ASTACK_0,ASTACK_0,#6
- mov r11,#-1025
- add r11,r11,#-1000-(-1025)
- mla r4,r6,r11,r4
+ mov ASTACK_3,#-1025
+ add ASTACK_3,ASTACK_3,#-1000-(-1025)
+ mla BSTACK_0,ASTACK_0,ASTACK_3,BSTACK_0
@ divide by 10
- ldr r12,=-858993459
- umull r11,r4,r12,r4
- lsr r4,r4,#3
+ ldr SCRATCH_REG,=-858993459
+ umull ASTACK_3,BSTACK_0,SCRATCH_REG,BSTACK_0
+ lsr BSTACK_0,BSTACK_0,#3
.if USE_CLIB
- mov r3,r4
- mov r2,r6
- lao r1,sprintf_time_string,0
- lao r0,sprintf_time_buffer,0
- otoa r1,sprintf_time_string,0
- otoa r0,sprintf_time_buffer,0
+ mov BSTACK_1,BSTACK_0
+ mov BSTACK_2,ASTACK_0
+ lao BSTACK_3,sprintf_time_string,0
+ lao BSTACK_4,sprintf_time_buffer,0
+ otoa BSTACK_3,sprintf_time_string,0
+ otoa BSTACK_4,sprintf_time_buffer,0
bl sprintf
- lao r0,sprintf_time_buffer,1
- otoa r0,sprintf_time_buffer,1
+ lao BSTACK_4,sprintf_time_buffer,1
+ otoa BSTACK_4,sprintf_time_buffer,1
bl ew_print_string
.else
- mov r0,r6
+ mov BSTACK_4,ASTACK_0
bl ew_print_int
- lao r6,sprintf_time_buffer,0
- otoa r6,sprintf_time_buffer,0
+ lao ASTACK_0,sprintf_time_buffer,0
+ otoa ASTACK_0,sprintf_time_buffer,0
- eor r7,r7,r7
- mov r3,#10
+ eor ASTACK_1,ASTACK_1,ASTACK_1
+ mov BSTACK_1,#10
- mov r12,#46
- strb r12,[r6]
+ mov SCRATCH_REG,#46
+ strb SCRATCH_REG,[ASTACK_0]
@ divide by 10
- ldr r12,=-858993459
- umull r11,r0,r12,r4
- lsr r0,r0,#3
+ ldr SCRATCH_REG,=-858993459
+ umull ASTACK_3,BSTACK_4,SCRATCH_REG,BSTACK_0
+ lsr BSTACK_4,BSTACK_4,#3
- sub r4,r4,r0,lsl #1
- sub r4,r4,r0,lsl #3
+ sub BSTACK_0,BSTACK_0,BSTACK_4,lsl #1
+ sub BSTACK_0,BSTACK_0,BSTACK_4,lsl #3
- add r4,r4,#48
- add r7,r7,#48
- strb r0,[r6,#1]
- strb r4,[r6,#2]
+ add BSTACK_0,BSTACK_0,#48
+ add ASTACK_1,ASTACK_1,#48
+ strb BSTACK_4,[ASTACK_0,#1]
+ strb BSTACK_0,[ASTACK_0,#2]
- mov r1,#3
- mov r0,r6
+ mov BSTACK_3,#3
+ mov BSTACK_4,ASTACK_0
bl ew_print_text
.endif
ldr pc,[sp],#4
.thumb_func
print_sc:
- lao r12,basic_only,1
- ldo r8,r12,basic_only,1
- cmp r8,#0
+ lao SCRATCH_REG,basic_only,1
+ ldo ASTACK_2,SCRATCH_REG,basic_only,1
+ cmp ASTACK_2,#0
bne end_print
.thumb_func
print:
- mov r0,r4
+ mov BSTACK_4,BSTACK_0
bl w_print_string
.thumb_func
@@ -1164,93 +1157,93 @@ dump:
bl print
b halt
-printD: tst r4,#2
+printD: tst BSTACK_0,#2
bne printD_
- mov r8,r4
+ mov ASTACK_2,BSTACK_0
b print_string_a2
DtoAC_record:
- ldr r8,[r4,#-6]
+ ldr ASTACK_2,[BSTACK_0,#-6]
@.ifdef PIC
.if 0
- add r12,r4,#-6
- add r8,r8,r12
+ add SCRATCH_REG,BSTACK_0,#-6
+ add ASTACK_2,ASTACK_2,SCRATCH_REG
.endif
b DtoAC_string_a2
-DtoAC: tst r4,#2
+DtoAC: tst BSTACK_0,#2
bne DtoAC_
- mov r8,r4
+ mov ASTACK_2,BSTACK_0
b DtoAC_string_a2
DtoAC_:
- ldrh r12,[r4,#-2]
- cmp r12,#256
+ ldrh SCRATCH_REG,[BSTACK_0,#-2]
+ cmp SCRATCH_REG,#256
bhs DtoAC_record
- ldrh r3,[r4]
- add r12,r4,#10
- add r8,r12,r3
+ ldrh BSTACK_1,[BSTACK_0]
+ add SCRATCH_REG,BSTACK_0,#10
+ add ASTACK_2,SCRATCH_REG,BSTACK_1
DtoAC_string_a2:
- ldr r4,[r8]
- add r6,r8,#4
+ ldr BSTACK_0,[ASTACK_2]
+ add ASTACK_0,ASTACK_2,#4
b build_string
.thumb_func
print_symbol:
- mov r3,#0
+ mov BSTACK_1,#0
b print_symbol_2
.thumb_func
print_symbol_sc:
- lao r12,basic_only,2
- ldo r3,r12,basic_only,2
+ lao SCRATCH_REG,basic_only,2
+ ldo BSTACK_1,SCRATCH_REG,basic_only,2
print_symbol_2:
- ldr r4,[r6]
+ ldr BSTACK_0,[ASTACK_0]
- laol r12,INT+2,INT_o_2,1
- otoa r12,INT_o_2,1
- cmp r4,r12
+ laol SCRATCH_REG,INT+2,INT_o_2,1
+ otoa SCRATCH_REG,INT_o_2,1
+ cmp BSTACK_0,SCRATCH_REG
beq print_int_node
- laol r12,CHAR+2,CHAR_o_2,0
- otoa r12,CHAR_o_2,0
- cmp r4,r12
+ laol SCRATCH_REG,CHAR+2,CHAR_o_2,0
+ otoa SCRATCH_REG,CHAR_o_2,0
+ cmp BSTACK_0,SCRATCH_REG
beq print_char_denotation
- laol r12,BOOL+2,BOOL_o_2,0
- otoa r12,BOOL_o_2,0
- cmp r4,r12
+ laol SCRATCH_REG,BOOL+2,BOOL_o_2,0
+ otoa SCRATCH_REG,BOOL_o_2,0
+ cmp BSTACK_0,SCRATCH_REG
beq print_bool
- laol r12,REAL+2,REAL_o_2,0
- otoa r12,REAL_o_2,0
- cmp r4,r12
+ laol SCRATCH_REG,REAL+2,REAL_o_2,0
+ otoa SCRATCH_REG,REAL_o_2,0
+ cmp BSTACK_0,SCRATCH_REG
beq print_real_node
- cmp r3,#0
+ cmp BSTACK_1,#0
bne end_print_symbol
printD_:
- ldrh r12,[r4,#-2]
- cmp r12,#256
+ ldrh SCRATCH_REG,[BSTACK_0,#-2]
+ cmp SCRATCH_REG,#256
bhs print_record
- ldrh r3,[r4]
- add r12,r4,#10
- add r8,r12,r3
+ ldrh BSTACK_1,[BSTACK_0]
+ add SCRATCH_REG,BSTACK_0,#10
+ add ASTACK_2,SCRATCH_REG,BSTACK_1
b print_string_a2
.thumb_func
print_record:
- ldr r8,[r4,#-6]
+ ldr ASTACK_2,[BSTACK_0,#-6]
@.ifdef PIC
.if 0
- add r12,r4,#-6
- add r8,r8,r12
+ add SCRATCH_REG,BSTACK_0,#-6
+ add ASTACK_2,ASTACK_2,SCRATCH_REG
.endif
b print_string_a2
@@ -1260,108 +1253,108 @@ end_print_symbol:
.thumb_func
print_int_node:
- ldr r0,[r6,#4]
+ ldr BSTACK_4,[ASTACK_0,#4]
bl w_print_int
ldr pc,[sp],#4
.thumb_func
print_int:
- mov r0,r4
+ mov BSTACK_4,BSTACK_0
bl w_print_int
ldr pc,[sp],#4
.thumb_func
print_char_denotation:
- tst r3,r3
+ tst BSTACK_1,BSTACK_1
bne print_char_node
- ldr r12,[r6,#4]
- str r12,[sp,#-4]!
+ ldr SCRATCH_REG,[ASTACK_0,#4]
+ str SCRATCH_REG,[sp,#-4]!
- mov r0,#0x27
+ mov BSTACK_4,#0x27
bl w_print_char
- ldr r0,[sp],#4
+ ldr BSTACK_4,[sp],#4
bl w_print_char
- mov r0,#0x27
+ mov BSTACK_4,#0x27
bl w_print_char
ldr pc,[sp],#4
.thumb_func
print_char_node:
- ldr r0,[r6,#4]
+ ldr BSTACK_4,[ASTACK_0,#4]
bl w_print_char
ldr pc,[sp],#4
.thumb_func
print_char:
- str r4,[sp,#-4]!
+ str BSTACK_0,[sp,#-4]!
bl w_print_char
add sp,sp,#4
ldr pc,[sp],#4
.thumb_func
print_bool:
- ldsb r6,[r6,#4]
- tst r6,r6
+ ldsb ASTACK_0,[ASTACK_0,#4]
+ tst ASTACK_0,ASTACK_0
beq print_false
.thumb_func
print_true:
- lao r0,true_c_string,0
- otoa r0,true_c_string,0
+ lao BSTACK_4,true_c_string,0
+ otoa BSTACK_4,true_c_string,0
bl w_print_string
ldr pc,[sp],#4
.thumb_func
print_false:
- lao r0,false_c_string,0
- otoa r0,false_c_string,0
+ lao BSTACK_4,false_c_string,0
+ otoa BSTACK_4,false_c_string,0
bl w_print_string
ldr pc,[sp],#4
.thumb_func
print_real:
.ifdef SOFT_FP_CC
- vmov r0,r1,d0
+ vmov BSTACK_4,BSTACK_3,d0
.endif
b print_real_
.thumb_func
print_real_node:
.ifdef SOFT_FP_CC
- ldrd r0,r1,[r6,#4]
+ ldrd BSTACK_4,BSTACK_3,[ASTACK_0,#4]
.else
- vldr.f64 d0,[r6,#4]
+ vldr.f64 d0,[ASTACK_0,#4]
.endif
.thumb_func
print_real_:
- mov r11,sp
+ mov ASTACK_3,sp
mov lr,sp
bic lr,lr,#7
mov sp,lr
bl w_print_real
- mov sp,r11
+ mov sp,ASTACK_3
ldr pc,[sp],#4
print_string_a2:
- ldr r1,[r8]
- add r0,r8,#4
+ ldr BSTACK_3,[ASTACK_2]
+ add BSTACK_4,ASTACK_2,#4
bl w_print_text
ldr pc,[sp],#4
.thumb_func
print__chars__sc:
- lao r12,basic_only,3
- ldo r8,r12,basic_only,3
- cmp r8,#0
+ lao SCRATCH_REG,basic_only,3
+ ldo ASTACK_2,SCRATCH_REG,basic_only,3
+ cmp ASTACK_2,#0
bne no_print_chars
.thumb_func
print__string__:
- ldr r1,[r6,#4]
- add r0,r6,#8
+ ldr BSTACK_3,[ASTACK_0,#4]
+ add BSTACK_4,ASTACK_0,#8
bl w_print_text
.thumb_func
no_print_chars:
@@ -1369,350 +1362,350 @@ no_print_chars:
.thumb_func
push_a_r_args:
- str r10,[sp,#-4]!
+ str HEAP_PTR,[sp,#-4]!
- ldr r7,[r6,#8]
- subs r7,r7,#2
- ldrh r10,[r7]
- subs r10,r10,#256
- ldrh r3,[r7,#2]
- add r7,r7,#4
- str r7,[sp,#-4]!
+ ldr ASTACK_1,[ASTACK_0,#8]
+ subs ASTACK_1,ASTACK_1,#2
+ ldrh HEAP_PTR,[ASTACK_1]
+ subs HEAP_PTR,HEAP_PTR,#256
+ ldrh BSTACK_1,[ASTACK_1,#2]
+ add ASTACK_1,ASTACK_1,#4
+ str ASTACK_1,[sp,#-4]!
- mov r7,r10
- subs r7,r7,r3
+ mov ASTACK_1,HEAP_PTR
+ subs ASTACK_1,ASTACK_1,BSTACK_1
- lsl r4,r4,#2
- add r12,r6,#12
- add r6,r12,r3,lsl #2
- subs r10,r10,#1
+ lsl BSTACK_0,BSTACK_0,#2
+ add SCRATCH_REG,ASTACK_0,#12
+ add ASTACK_0,SCRATCH_REG,BSTACK_1,lsl #2
+ subs HEAP_PTR,HEAP_PTR,#1
.thumb_func
mul_array_size_lp:
- add r6,r6,r4
- subs r10,r10,#1
+ add ASTACK_0,ASTACK_0,BSTACK_0
+ subs HEAP_PTR,HEAP_PTR,#1
bcs mul_array_size_lp
- add r10,r6,r7,lsl #2
+ add HEAP_PTR,ASTACK_0,ASTACK_1,lsl #2
b push_a_elements
.thumb_func
push_a_elements_lp:
- ldr r4,[r6,#-4]!
- str r4,[r9],#4
+ ldr BSTACK_0,[ASTACK_0,#-4]!
+ str BSTACK_0,[ASTACK_PTR],#4
.thumb_func
push_a_elements:
- subs r3,r3,#1
+ subs BSTACK_1,BSTACK_1,#1
bcs push_a_elements_lp
- mov r6,r10
- ldr r4,[sp],#4
- ldr r10,[sp],#4
+ mov ASTACK_0,HEAP_PTR
+ ldr BSTACK_0,[sp],#4
+ ldr HEAP_PTR,[sp],#4
- ldr r8,[sp],#4
+ ldr ASTACK_2,[sp],#4
b push_b_elements
.thumb_func
push_b_elements_lp:
- ldr r12,[r6,#-4]!
- str r12,[sp,#-4]!
+ ldr SCRATCH_REG,[ASTACK_0,#-4]!
+ str SCRATCH_REG,[sp,#-4]!
.thumb_func
push_b_elements:
- subs r7,r7,#1
+ subs ASTACK_1,ASTACK_1,#1
bcs push_b_elements_lp
- mov pc,r8
+ mov pc,ASTACK_2
.thumb_func
push_t_r_args:
- ldr r8,[sp],#4
+ ldr ASTACK_2,[sp],#4
- ldr r7,[r6]
- add r6,r6,#4
- subs r7,r7,#2
- ldrh r4,[r7]
- subs r4,r4,#256
- ldrh r3,[r7,#2]
- add r7,r7,#4
+ ldr ASTACK_1,[ASTACK_0]
+ add ASTACK_0,ASTACK_0,#4
+ subs ASTACK_1,ASTACK_1,#2
+ ldrh BSTACK_0,[ASTACK_1]
+ subs BSTACK_0,BSTACK_0,#256
+ ldrh BSTACK_1,[ASTACK_1,#2]
+ add ASTACK_1,ASTACK_1,#4
- str r7,[r9]
- str r3,[r9,#4]
+ str ASTACK_1,[ASTACK_PTR]
+ str BSTACK_1,[ASTACK_PTR,#4]
- sub r3,r4,r3
+ sub BSTACK_1,BSTACK_0,BSTACK_1
- add r7,r6,r4,lsl #2
- cmp r4,#2
+ add ASTACK_1,ASTACK_0,BSTACK_0,lsl #2
+ cmp BSTACK_0,#2
bls small_record
- ldr r7,[r6,#4]
- add r12,r7,#-4
- add r7,r12,r4,lsl #2
+ ldr ASTACK_1,[ASTACK_0,#4]
+ add SCRATCH_REG,ASTACK_1,#-4
+ add ASTACK_1,SCRATCH_REG,BSTACK_0,lsl #2
.thumb_func
small_record:
b push_r_b_elements
.thumb_func
push_r_b_elements_lp:
- subs r4,r4,#1
+ subs BSTACK_0,BSTACK_0,#1
bne not_first_arg_b
- ldr r12,[r6]
- str r12,[sp,#-4]!
+ ldr SCRATCH_REG,[ASTACK_0]
+ str SCRATCH_REG,[sp,#-4]!
b push_r_b_elements
.thumb_func
not_first_arg_b:
- ldr r12,[r7,#-4]!
- str r12,[sp,#-4]!
+ ldr SCRATCH_REG,[ASTACK_1,#-4]!
+ str SCRATCH_REG,[sp,#-4]!
.thumb_func
push_r_b_elements:
- subs r3,r3,#1
+ subs BSTACK_1,BSTACK_1,#1
bcs push_r_b_elements_lp
- ldr r3,[r9,#4]
- str r8,[sp,#-4]!
- ldr r12,[r9]
- str r12,[sp,#-4]!
+ ldr BSTACK_1,[ASTACK_PTR,#4]
+ str ASTACK_2,[sp,#-4]!
+ ldr SCRATCH_REG,[ASTACK_PTR]
+ str SCRATCH_REG,[sp,#-4]!
b push_r_a_elements
.thumb_func
push_r_a_elements_lp:
- subs r4,r4,#1
+ subs BSTACK_0,BSTACK_0,#1
bne not_first_arg_a
- ldr r8,[r6]
- str r8,[r9],#4
+ ldr ASTACK_2,[ASTACK_0]
+ str ASTACK_2,[ASTACK_PTR],#4
b push_r_a_elements
.thumb_func
not_first_arg_a:
- ldr r8,[r7,#-4]!
- str r8,[r9],#4
+ ldr ASTACK_2,[ASTACK_1,#-4]!
+ str ASTACK_2,[ASTACK_PTR],#4
.thumb_func
push_r_a_elements:
- subs r3,r3,#1
+ subs BSTACK_1,BSTACK_1,#1
bcs push_r_a_elements_lp
- ldr r4,[sp],#4
+ ldr BSTACK_0,[sp],#4
ldr pc,[sp],#4
BtoAC:
- tst r4,r4
+ tst BSTACK_0,BSTACK_0
beq BtoAC_false
BtoAC_true:
- lao r6,true_string,0
- otoa r6,true_string,0
+ lao ASTACK_0,true_string,0
+ otoa ASTACK_0,true_string,0
ldr pc,[sp],#4
BtoAC_false:
- lao r6,false_string,0
- otoa r6,false_string,0
+ lao ASTACK_0,false_string,0
+ otoa ASTACK_0,false_string,0
ldr pc,[sp],#4
RtoAC:
.if USE_CLIB
- vmov r2,r3,d0
- lao r1,printf_real_string,0
- lao r0,sprintf_buffer,0
- otoa r1,printf_real_string,0
- otoa r0,sprintf_buffer,0
- mov r4,sp
+ vmov BSTACK_2,BSTACK_1,d0
+ lao BSTACK_3,printf_real_string,0
+ lao BSTACK_4,sprintf_buffer,0
+ otoa BSTACK_3,printf_real_string,0
+ otoa BSTACK_4,sprintf_buffer,0
+ mov BSTACK_0,sp
mov lr,sp
and lr,lr,#-8
mov sp,lr
bl sprintf
- mov sp,r4
+ mov sp,BSTACK_0
.else
- lao r0,sprintf_buffer,1
- otoa r0,sprintf_buffer,1
+ lao BSTACK_4,sprintf_buffer,1
+ otoa BSTACK_4,sprintf_buffer,1
bl convert_real_to_string
.endif
b return_sprintf_buffer
ItoAC:
.if MY_ITOS
- lao r6,sprintf_buffer,2
- otoa r6,sprintf_buffer,2
+ lao ASTACK_0,sprintf_buffer,2
+ otoa ASTACK_0,sprintf_buffer,2
.align
add lr,pc,#9
str lr,[sp,#-4]!
bl int_to_string
- lao r12,sprintf_buffer,3
- otoa r12,sprintf_buffer,3
- sub r4,r6,r12
+ lao SCRATCH_REG,sprintf_buffer,3
+ otoa SCRATCH_REG,sprintf_buffer,3
+ sub BSTACK_0,ASTACK_0,SCRATCH_REG
b sprintf_buffer_to_string
.thumb_func
int_to_string:
- tst r4,r4
+ tst BSTACK_0,BSTACK_0
bpl no_minus
- mov r12,#45
- strb r12,[r6],#1
- neg r4,r4
+ mov SCRATCH_REG,#45
+ strb SCRATCH_REG,[ASTACK_0],#1
+ neg BSTACK_0,BSTACK_0
.thumb_func
no_minus:
- add r8,r6,#12
+ add ASTACK_2,ASTACK_0,#12
beq zero_digit
- ldr r2,=0xcccccccd
+ ldr BSTACK_2,=0xcccccccd
.thumb_func
calculate_digits:
- cmp r4,#10
+ cmp BSTACK_0,#10
blo last_digit
- umull r12,r7,r2,r4
- add r3,r4,#48
+ umull SCRATCH_REG,ASTACK_1,BSTACK_2,BSTACK_0
+ add BSTACK_1,BSTACK_0,#48
- lsr r4,r7,#3
+ lsr BSTACK_0,ASTACK_1,#3
- and r7,r7,#-8
- sub r3,r3,r7
- sub r3,r3,r7,lsr #2
- strb r3,[r8],#1
+ and ASTACK_1,ASTACK_1,#-8
+ sub BSTACK_1,BSTACK_1,ASTACK_1
+ sub BSTACK_1,BSTACK_1,ASTACK_1,lsr #2
+ strb BSTACK_1,[ASTACK_2],#1
b calculate_digits
.thumb_func
last_digit:
- tst r4,r4
+ tst BSTACK_0,BSTACK_0
beq no_zero
.thumb_func
zero_digit:
- add r4,r4,#48
- strb r4,[r8],#1
+ add BSTACK_0,BSTACK_0,#48
+ strb BSTACK_0,[ASTACK_2],#1
.thumb_func
no_zero:
- add r7,r6,#12
+ add ASTACK_1,ASTACK_0,#12
.thumb_func
reverse_digits:
- ldrb r3,[r8,#-1]!
- strb r3,[r6],#1
- cmp r7,r8
+ ldrb BSTACK_1,[ASTACK_2,#-1]!
+ strb BSTACK_1,[ASTACK_0],#1
+ cmp ASTACK_1,ASTACK_2
bne reverse_digits
- mov r12,#0
- strb r12,[r6]
+ mov SCRATCH_REG,#0
+ strb SCRATCH_REG,[ASTACK_0]
ldr pc,[sp],#4
.else
- mov r2,r4
- lao r1,printf_int_string,0
- lao r0,sprintf_buffer,4
- otoa r1,printf_int_string,0
- otoa r0,sprintf_buffer,4
+ mov BSTACK_2,BSTACK_0
+ lao BSTACK_3,printf_int_string,0
+ lao BSTACK_4,sprintf_buffer,4
+ otoa BSTACK_3,printf_int_string,0
+ otoa BSTACK_4,sprintf_buffer,4
bl sprintf
.endif
.thumb_func
return_sprintf_buffer:
.if USE_CLIB
- lao r0,sprintf_buffer,5
- otoa r0,sprintf_buffer,5
+ lao BSTACK_4,sprintf_buffer,5
+ otoa BSTACK_4,sprintf_buffer,5
bl strlen
- mov r4,r0
+ mov BSTACK_0,BSTACK_4
.else
- laol r4,sprintf_buffer-1,sprintf_buffer_o_m1,0
- otoa r4,sprintf_buffer_o_m1,0
+ laol BSTACK_0,sprintf_buffer-1,sprintf_buffer_o_m1,0
+ otoa BSTACK_0,sprintf_buffer_o_m1,0
.thumb_func
skip_characters:
- ldrb r12,[r4,#1]!
- tst r12,r12
+ ldrb SCRATCH_REG,[BSTACK_0,#1]!
+ tst SCRATCH_REG,SCRATCH_REG
bne skip_characters
- lao r12,sprintf_buffer,6
- otoa r12,sprintf_buffer,6
- sub r4,r4,r12
+ lao SCRATCH_REG,sprintf_buffer,6
+ otoa SCRATCH_REG,sprintf_buffer,6
+ sub BSTACK_0,BSTACK_0,SCRATCH_REG
.endif
.if MY_ITOS
.thumb_func
sprintf_buffer_to_string:
- lao r6,sprintf_buffer,7
- otoa r6,sprintf_buffer,7
+ lao ASTACK_0,sprintf_buffer,7
+ otoa ASTACK_0,sprintf_buffer,7
.thumb_func
build_string:
.endif
- add r3,r4,#3
- lsr r3,r3,#2
- add r3,r3,#2
+ add BSTACK_1,BSTACK_0,#3
+ lsr BSTACK_1,BSTACK_1,#2
+ add BSTACK_1,BSTACK_1,#2
- subs r5,r5,r3
+ subs HEAP_FREE,HEAP_FREE,BSTACK_1
bhs D_to_S_no_gc
- str r6,[sp,#-4]!
+ str ASTACK_0,[sp,#-4]!
bl collect_0
- ldr r6,[sp],#4
+ ldr ASTACK_0,[sp],#4
D_to_S_no_gc:
- subs r3,r3,#2
- mov r8,r10
- laol r12,__STRING__+2,__STRING___o_2,0
- otoa r12,__STRING___o_2,0
- str r4,[r10,#4]
- str r12,[r10],#8
+ subs BSTACK_1,BSTACK_1,#2
+ mov ASTACK_2,HEAP_PTR
+ laol SCRATCH_REG,__STRING__+2,__STRING___o_2,0
+ otoa SCRATCH_REG,__STRING___o_2,0
+ str BSTACK_0,[HEAP_PTR,#4]
+ str SCRATCH_REG,[HEAP_PTR],#8
b D_to_S_cp_str_2
D_to_S_cp_str_1:
- ldr r4,[r6],#4
- str r4,[r10],#4
+ ldr BSTACK_0,[ASTACK_0],#4
+ str BSTACK_0,[HEAP_PTR],#4
D_to_S_cp_str_2:
- subs r3,r3,#1
+ subs BSTACK_1,BSTACK_1,#1
bcs D_to_S_cp_str_1
- mov r6,r8
+ mov ASTACK_0,ASTACK_2
ldr pc,[sp],#4
-eqD: ldr r4,[r6]
- ldr r12,[r7]
- cmp r4,r12
+eqD: ldr BSTACK_0,[ASTACK_0]
+ ldr SCRATCH_REG,[ASTACK_1]
+ cmp BSTACK_0,SCRATCH_REG
bne eqD_false
- laol r12,INT+2,INT_o_2,2
- otoa r12,INT_o_2,2
- cmp r4,r12
+ laol SCRATCH_REG,INT+2,INT_o_2,2
+ otoa SCRATCH_REG,INT_o_2,2
+ cmp BSTACK_0,SCRATCH_REG
beq eqD_INT
- laol r12,CHAR+2,CHAR_o_2,1
- otoa r12,CHAR_o_2,1
- cmp r4,r12
+ laol SCRATCH_REG,CHAR+2,CHAR_o_2,1
+ otoa SCRATCH_REG,CHAR_o_2,1
+ cmp BSTACK_0,SCRATCH_REG
beq eqD_CHAR
- laol r12,BOOL+2,BOOL_o_2,1
- otoa r12,BOOL_o_2,1
- cmp r4,r12
+ laol SCRATCH_REG,BOOL+2,BOOL_o_2,1
+ otoa SCRATCH_REG,BOOL_o_2,1
+ cmp BSTACK_0,SCRATCH_REG
beq eqD_BOOL
- laol r12,REAL+2,REAL_o_2,1
- otoa r12,REAL_o_2,1
- cmp r4,r12
+ laol SCRATCH_REG,REAL+2,REAL_o_2,1
+ otoa SCRATCH_REG,REAL_o_2,1
+ cmp BSTACK_0,SCRATCH_REG
beq eqD_REAL
- mov r4,#1
+ mov BSTACK_0,#1
ldr pc,[sp],#4
eqD_CHAR:
eqD_INT:
- ldr r3,[r6,#4]
- mov r4,#0
- ldr r12,[r7,#4]
- cmp r3,r12
+ ldr BSTACK_1,[ASTACK_0,#4]
+ mov BSTACK_0,#0
+ ldr SCRATCH_REG,[ASTACK_1,#4]
+ cmp BSTACK_1,SCRATCH_REG
it eq
- moveq r4,#1
+ moveq BSTACK_0,#1
ldr pc,[sp],#4
eqD_BOOL:
- ldrb r3,[r6,#4]
- mov r4,#0
- ldrb r12,[r7,#4]
- cmp r3,r12
+ ldrb BSTACK_1,[ASTACK_0,#4]
+ mov BSTACK_0,#0
+ ldrb SCRATCH_REG,[ASTACK_1,#4]
+ cmp BSTACK_1,SCRATCH_REG
it eq
- moveq r4,#1
+ moveq BSTACK_0,#1
ldr pc,[sp],#4
eqD_REAL:
- vldr.f64 d0,[r6,#4]
- vldr.f64 d1,[r7,#4]
- mov r4,#0
+ vldr.f64 d0,[ASTACK_0,#4]
+ vldr.f64 d1,[ASTACK_1,#4]
+ mov BSTACK_0,#0
vcmp.f64 d1,d0
vmrs APSR_nzcv,fpscr
it eq
- moveq r4,#1
+ moveq BSTACK_0,#1
ldr pc,[sp],#4
eqD_false:
- mov r4,#0
+ mov BSTACK_0,#0
ldr pc,[sp],#4
@
@ the timer
@@ -1721,40 +1714,40 @@ eqD_false:
.thumb_func
init_timer:
sub sp,sp,#20
- mov r0,sp
+ mov BSTACK_4,sp
bl times
- ldr r4,[sp]
- add r4,r4,r4
- add r4,r4,r4,lsl #2
+ ldr BSTACK_0,[sp]
+ add BSTACK_0,BSTACK_0,BSTACK_0
+ add BSTACK_0,BSTACK_0,BSTACK_0,lsl #2
add sp,sp,#20
- lao r12,last_time,0
- sto r4,r12,last_time,0
- eor r4,r4,r4
- lao r12,execute_time,2
- sto r4,r12,execute_time,2
- lao r12,garbage_collect_time,2
- sto r4,r12,garbage_collect_time,2
- lao r12,IO_time,1
- sto r4,r12,IO_time,1
+ lao SCRATCH_REG,last_time,0
+ sto BSTACK_0,SCRATCH_REG,last_time,0
+ eor BSTACK_0,BSTACK_0,BSTACK_0
+ lao SCRATCH_REG,execute_time,2
+ sto BSTACK_0,SCRATCH_REG,execute_time,2
+ lao SCRATCH_REG,garbage_collect_time,2
+ sto BSTACK_0,SCRATCH_REG,garbage_collect_time,2
+ lao SCRATCH_REG,IO_time,1
+ sto BSTACK_0,SCRATCH_REG,IO_time,1
ldr pc,[sp],#4
.thumb_func
get_time_diff:
sub sp,sp,#20
- mov r0,sp
+ mov BSTACK_4,sp
bl times
- ldr r4,[sp]
- add r4,r4,r4
- add r4,r4,r4,lsl #2
+ ldr BSTACK_0,[sp]
+ add BSTACK_0,BSTACK_0,BSTACK_0
+ add BSTACK_0,BSTACK_0,BSTACK_0,lsl #2
add sp,sp,#20
- lao r6,last_time,1
- otoa r6,last_time,1
- ldr r7,[r6]
- str r4,[r6]
- subs r4,r4,r7
+ lao ASTACK_0,last_time,1
+ otoa ASTACK_0,last_time,1
+ ldr ASTACK_1,[ASTACK_0]
+ str BSTACK_0,[ASTACK_0]
+ subs BSTACK_0,BSTACK_0,ASTACK_1
ldr pc,[sp],#4
.thumb_func
@@ -1763,14 +1756,14 @@ add_execute_time:
add lr,pc,#9
str lr,[sp,#-4]!
bl get_time_diff
- lao r6,execute_time,3
- otoa r6,execute_time,3
+ lao ASTACK_0,execute_time,3
+ otoa ASTACK_0,execute_time,3
.thumb_func
add_time:
- ldr r12,[r6]
- add r4,r4,r12
- str r4,[r6]
+ ldr SCRATCH_REG,[ASTACK_0]
+ add BSTACK_0,BSTACK_0,SCRATCH_REG
+ str BSTACK_0,[ASTACK_0]
ldr pc,[sp],#4
.thumb_func
@@ -1779,8 +1772,8 @@ add_garbage_collect_time:
add lr,pc,#9
str lr,[sp,#-4]!
bl get_time_diff
- lao r6,garbage_collect_time,3
- otoa r6,garbage_collect_time,3
+ lao ASTACK_0,garbage_collect_time,3
+ otoa ASTACK_0,garbage_collect_time,3
b add_time
add_IO_time:
@@ -1788,8 +1781,8 @@ add_IO_time:
add lr,pc,#9
str lr,[sp,#-4]!
bl get_time_diff
- lao r6,IO_time,2
- otoa r6,IO_time,2
+ lao ASTACK_0,IO_time,2
+ otoa ASTACK_0,IO_time,2
b add_time
.ifdef PIC
@@ -1894,21 +1887,21 @@ add_IO_time:
collect_3:
str lr,[sp,#-4]!
.ifdef PROFILE
- lao r8,garbage_collector_name,0
- otoa r8,garbage_collector_name,0
+ lao ASTACK_2,garbage_collector_name,0
+ otoa ASTACK_2,garbage_collector_name,0
.align
add lr,pc,#9
str lr,[sp,#-4]!
bl profile_s
.endif
- str r6,[r9]
- str r7,[r9,#4]
- str r8,[r9,#8]
- add r9,r9,#12
+ str ASTACK_0,[ASTACK_PTR]
+ str ASTACK_1,[ASTACK_PTR,#4]
+ str ASTACK_2,[ASTACK_PTR,#8]
+ add ASTACK_PTR,ASTACK_PTR,#12
bl collect_0_
- ldr r8,[r9,#-4]
- ldr r7,[r9,#-8]
- ldr r6,[r9,#-12]!
+ ldr ASTACK_2,[ASTACK_PTR,#-4]
+ ldr ASTACK_1,[ASTACK_PTR,#-8]
+ ldr ASTACK_0,[ASTACK_PTR,#-12]!
.ifdef PROFILE
b profile_r
.else
@@ -1918,19 +1911,19 @@ collect_3:
collect_2:
str lr,[sp,#-4]!
.ifdef PROFILE
- lao r8,garbage_collector_name,1
- otoa r8,garbage_collector_name,1
+ lao ASTACK_2,garbage_collector_name,1
+ otoa ASTACK_2,garbage_collector_name,1
.align
add lr,pc,#9
str lr,[sp,#-4]!
bl profile_s
.endif
- str r6,[r9]
- str r7,[r9,#4]
- add r9,r9,#8
+ str ASTACK_0,[ASTACK_PTR]
+ str ASTACK_1,[ASTACK_PTR,#4]
+ add ASTACK_PTR,ASTACK_PTR,#8
bl collect_0_
- ldr r7,[r9,#-4]
- ldr r6,[r9,#-8]!
+ ldr ASTACK_1,[ASTACK_PTR,#-4]
+ ldr ASTACK_0,[ASTACK_PTR,#-8]!
.ifdef PROFILE
b profile_r
.else
@@ -1940,16 +1933,16 @@ collect_2:
collect_1:
str lr,[sp,#-4]!
.ifdef PROFILE
- lao r8,garbage_collector_name,2
- otoa r8,garbage_collector_name,2
+ lao ASTACK_2,garbage_collector_name,2
+ otoa ASTACK_2,garbage_collector_name,2
.align
add lr,pc,#9
str lr,[sp,#-4]!
bl profile_s
.endif
- str r6,[r9],#4
+ str ASTACK_0,[ASTACK_PTR],#4
bl collect_0_
- ldr r6,[r9,#-4]!
+ ldr ASTACK_0,[ASTACK_PTR,#-4]!
.ifdef PROFILE
b profile_r
.else
@@ -1960,8 +1953,8 @@ collect_1:
.ifdef PROFILE
collect_0:
str lr,[sp,#-4]!
- lao r8,garbage_collector_name,3
- otoa r8,garbage_collector_name,3
+ lao ASTACK_2,garbage_collector_name,3
+ otoa ASTACK_2,garbage_collector_name,3
.align
add lr,pc,#9
str lr,[sp,#-4]!
@@ -1974,164 +1967,164 @@ collect_0:
collect_0:
.endif
collect_0_:
- stmdb sp!,{r0-r4,lr}
+ stmdb sp!,{BSTACK_4-BSTACK_0,lr}
- lao r12,heap_end_after_gc,1
- ldo r12,r12,heap_end_after_gc,1
- sub r8,r12,r10
- lsr r8,r8,#2
- sub r8,r8,r5
- lao r12,n_allocated_words,0
- sto r8,r12,n_allocated_words,0
+ lao SCRATCH_REG,heap_end_after_gc,1
+ ldo SCRATCH_REG,SCRATCH_REG,heap_end_after_gc,1
+ sub ASTACK_2,SCRATCH_REG,HEAP_PTR
+ lsr ASTACK_2,ASTACK_2,#2
+ sub ASTACK_2,ASTACK_2,HEAP_FREE
+ lao SCRATCH_REG,n_allocated_words,0
+ sto ASTACK_2,SCRATCH_REG,n_allocated_words,0
.if MARK_AND_COPY_GC
- lao r12,flags,6
- ldo r12,r12,flags,6
- tst r12,#64
+ lao SCRATCH_REG,flags,6
+ ldo SCRATCH_REG,SCRATCH_REG,flags,6
+ tst SCRATCH_REG,#64
beq no_mark3
.endif
.if MARK_GC
- lao r12,bit_counter,0
- ldo r8,r12,bit_counter,0
- cmp r8,#0
+ lao SCRATCH_REG,bit_counter,0
+ ldo ASTACK_2,SCRATCH_REG,bit_counter,0
+ cmp ASTACK_2,#0
beq no_scan
- mov r3,#0
- str r9,[sp,#-4]!
+ mov BSTACK_1,#0
+ str ASTACK_PTR,[sp,#-4]!
- lao r12,n_allocated_words,1
- ldo r9,r12,n_allocated_words,1
- lao r12,bit_vector_p,0
- ldo r6,r12,bit_vector_p,0
- lao r12,n_free_words_after_mark,0
- ldo r2,r12,n_free_words_after_mark,0
+ lao SCRATCH_REG,n_allocated_words,1
+ ldo ASTACK_PTR,SCRATCH_REG,n_allocated_words,1
+ lao SCRATCH_REG,bit_vector_p,0
+ ldo ASTACK_0,SCRATCH_REG,bit_vector_p,0
+ lao SCRATCH_REG,n_free_words_after_mark,0
+ ldo BSTACK_2,SCRATCH_REG,n_free_words_after_mark,0
.thumb_func
scan_bits:
- ldr r12,[r6]
- cmp r3,r12
+ ldr SCRATCH_REG,[ASTACK_0]
+ cmp BSTACK_1,SCRATCH_REG
beq zero_bits
- str r3,[r6],#4
- subs r8,r8,#1
+ str BSTACK_1,[ASTACK_0],#4
+ subs ASTACK_2,ASTACK_2,#1
bne scan_bits
b end_scan
.thumb_func
zero_bits:
- add r7,r6,#4
- add r6,r6,#4
- subs r8,r8,#1
+ add ASTACK_1,ASTACK_0,#4
+ add ASTACK_0,ASTACK_0,#4
+ subs ASTACK_2,ASTACK_2,#1
bne skip_zero_bits_lp1
b end_bits
.thumb_func
skip_zero_bits_lp:
- cmp r4,#0
+ cmp BSTACK_0,#0
bne end_zero_bits
skip_zero_bits_lp1:
- ldr r4,[r6],#4
- subs r8,r8,#1
+ ldr BSTACK_0,[ASTACK_0],#4
+ subs ASTACK_2,ASTACK_2,#1
bne skip_zero_bits_lp
- cmp r4,#0
+ cmp BSTACK_0,#0
beq end_bits
- str r3,[r6,#-4]
- subs r4,r6,r7
+ str BSTACK_1,[ASTACK_0,#-4]
+ subs BSTACK_0,ASTACK_0,ASTACK_1
b end_bits2
.thumb_func
end_zero_bits:
- sub r4,r6,r7
- lsl r4,r4,#3
- str r3,[r6,#-4]
- add r2,r2,r4
+ sub BSTACK_0,ASTACK_0,ASTACK_1
+ lsl BSTACK_0,BSTACK_0,#3
+ str BSTACK_1,[ASTACK_0,#-4]
+ add BSTACK_2,BSTACK_2,BSTACK_0
- cmp r4,r9
+ cmp BSTACK_0,ASTACK_PTR
blo scan_bits
.thumb_func
found_free_memory:
- lao r12,bit_counter,1
- sto r8,r12,bit_counter,1
- lao r12,bit_vector_p,1
- sto r6,r12,bit_vector_p,1
- lao r12,n_free_words_after_mark,1
- sto r2,r12,n_free_words_after_mark,1
+ lao SCRATCH_REG,bit_counter,1
+ sto ASTACK_2,SCRATCH_REG,bit_counter,1
+ lao SCRATCH_REG,bit_vector_p,1
+ sto ASTACK_0,SCRATCH_REG,bit_vector_p,1
+ lao SCRATCH_REG,n_free_words_after_mark,1
+ sto BSTACK_2,SCRATCH_REG,n_free_words_after_mark,1
- sub r5,r4,r9
+ sub HEAP_FREE,BSTACK_0,ASTACK_PTR
- add r8,r7,#-4
- lao r12,heap_vector,1
- ldo r12,r12,heap_vector,1
- subs r8,r8,r12
- lsl r8,r8,#5
- lao r12,heap_p3,1
- ldo r10,r12,heap_p3,1
- add r10,r10,r8
+ add ASTACK_2,ASTACK_1,#-4
+ lao SCRATCH_REG,heap_vector,1
+ ldo SCRATCH_REG,SCRATCH_REG,heap_vector,1
+ subs ASTACK_2,ASTACK_2,SCRATCH_REG
+ lsl ASTACK_2,ASTACK_2,#5
+ lao SCRATCH_REG,heap_p3,1
+ ldo HEAP_PTR,SCRATCH_REG,heap_p3,1
+ add HEAP_PTR,HEAP_PTR,ASTACK_2
- add r8,r10,r4,lsl #2
- lao r12,heap_end_after_gc,2
- sto r8,r12,heap_end_after_gc,2
+ add ASTACK_2,HEAP_PTR,BSTACK_0,lsl #2
+ lao SCRATCH_REG,heap_end_after_gc,2
+ sto ASTACK_2,SCRATCH_REG,heap_end_after_gc,2
- ldr r9,[sp],#4
+ ldr ASTACK_PTR,[sp],#4
- ldmia sp!,{r0-r4,pc}
+ ldmia sp!,{BSTACK_4-BSTACK_0,pc}
.thumb_func
end_bits:
- sub r4,r6,r7
- add r4,r4,#4
+ sub BSTACK_0,ASTACK_0,ASTACK_1
+ add BSTACK_0,BSTACK_0,#4
end_bits2:
- lsl r4,r4,#3
- add r2,r2,r4
- cmp r4,r9
+ lsl BSTACK_0,BSTACK_0,#3
+ add BSTACK_2,BSTACK_2,BSTACK_0
+ cmp BSTACK_0,ASTACK_PTR
bhs found_free_memory
.thumb_func
end_scan:
- ldr r9,[sp],#4
- lao r12,bit_counter,2
- sto r8,r12,bit_counter,2
- lao r12,n_free_words_after_mark,2
- sto r2,r12,n_free_words_after_mark,2
+ ldr ASTACK_PTR,[sp],#4
+ lao SCRATCH_REG,bit_counter,2
+ sto ASTACK_2,SCRATCH_REG,bit_counter,2
+ lao SCRATCH_REG,n_free_words_after_mark,2
+ sto BSTACK_2,SCRATCH_REG,n_free_words_after_mark,2
.thumb_func
no_scan:
.endif
-@ to do: check value in r8
+@ to do: check value in ASTACK_2
.if MARK_AND_COPY_GC
no_mark3:
.endif
- lao r12,garbage_collect_flag,2
- ldosb r4,r12,garbage_collect_flag,2
- cmp r4,#0
+ lao SCRATCH_REG,garbage_collect_flag,2
+ ldosb BSTACK_0,SCRATCH_REG,garbage_collect_flag,2
+ cmp BSTACK_0,#0
ble collect
.ifdef PIC
- lao r12,garbage_collect_flag,3
+ lao SCRATCH_REG,garbage_collect_flag,3
.endif
- sub r4,r4,#2
- stob r4,r12,garbage_collect_flag,3
+ sub BSTACK_0,BSTACK_0,#2
+ stob BSTACK_0,SCRATCH_REG,garbage_collect_flag,3
- lao r12,extra_heap_size,0
- ldo r3,r12,extra_heap_size,0
- cmp r8,r3
+ lao SCRATCH_REG,extra_heap_size,0
+ ldo BSTACK_1,SCRATCH_REG,extra_heap_size,0
+ cmp ASTACK_2,BSTACK_1
bhi collect
- sub r5,r3,r8
+ sub HEAP_FREE,BSTACK_1,ASTACK_2
- lao r12,extra_heap,0
- ldo r10,r12,extra_heap,0
- add r3,r10,r3,lsl #2
- lao r12,heap_end_after_gc,3
- sto r3,r12,heap_end_after_gc,3
+ lao SCRATCH_REG,extra_heap,0
+ ldo HEAP_PTR,SCRATCH_REG,extra_heap,0
+ add BSTACK_1,HEAP_PTR,BSTACK_1,lsl #2
+ lao SCRATCH_REG,heap_end_after_gc,3
+ sto BSTACK_1,SCRATCH_REG,heap_end_after_gc,3
- ldmia sp!,{r0-r4,pc}
+ ldmia sp!,{BSTACK_4-BSTACK_0,pc}
.thumb_func
.align
@@ -2140,49 +2133,49 @@ collect:
str lr,[sp,#-4]!
bl add_execute_time
- lao r12,flags,7
- ldo r12,r12,flags,7
- tst r12,#4
+ lao SCRATCH_REG,flags,7
+ ldo SCRATCH_REG,SCRATCH_REG,flags,7
+ tst SCRATCH_REG,#4
beq no_print_stack_sizes
- lao r0,garbage_collect_string_1,0
- otoa r0,garbage_collect_string_1,0
+ lao BSTACK_4,garbage_collect_string_1,0
+ otoa BSTACK_4,garbage_collect_string_1,0
bl ew_print_string
- mov r4,r9
- lao r12,stack_p,1
- ldo r12,r12,stack_p,1
- sub r0,r4,r12
+ mov BSTACK_0,ASTACK_PTR
+ lao SCRATCH_REG,stack_p,1
+ ldo SCRATCH_REG,SCRATCH_REG,stack_p,1
+ sub BSTACK_4,BSTACK_0,SCRATCH_REG
bl ew_print_int
- lao r0,garbage_collect_string_2,0
- otoa r0,garbage_collect_string_2,0
+ lao BSTACK_4,garbage_collect_string_2,0
+ otoa BSTACK_4,garbage_collect_string_2,0
bl ew_print_string
- lao r12,halt_sp,2
- ldo r4,r12,halt_sp,2
- add r0,sp,#0
- sub r0,r4,r0
+ lao SCRATCH_REG,halt_sp,2
+ ldo BSTACK_0,SCRATCH_REG,halt_sp,2
+ add BSTACK_4,sp,#0
+ sub BSTACK_4,BSTACK_0,BSTACK_4
bl ew_print_int
- lao r0,garbage_collect_string_3,0
- otoa r0,garbage_collect_string_3,0
+ lao BSTACK_4,garbage_collect_string_3,0
+ otoa BSTACK_4,garbage_collect_string_3,0
bl ew_print_string
.thumb_func
no_print_stack_sizes:
- lao r12,stack_p,2
- ldo r4,r12,stack_p,2
- lao r12,ab_stack_size,5
- ldo r12,r12,ab_stack_size,5
- add r4,r4,r12
- cmp r9,r4
+ lao SCRATCH_REG,stack_p,2
+ ldo BSTACK_0,SCRATCH_REG,stack_p,2
+ lao SCRATCH_REG,ab_stack_size,5
+ ldo SCRATCH_REG,SCRATCH_REG,ab_stack_size,5
+ add BSTACK_0,BSTACK_0,SCRATCH_REG
+ cmp ASTACK_PTR,BSTACK_0
bhi stack_overflow
.if MARK_AND_COPY_GC
- lao r12,flags,8
- ldo r12,r12,flags,8
- tst r12,#64
+ lao SCRATCH_REG,flags,8
+ ldo SCRATCH_REG,SCRATCH_REG,flags,8
+ tst SCRATCH_REG,#64
@bne compacting_collector
.else
.if MARK_GC
@@ -2191,49 +2184,49 @@ no_print_stack_sizes:
.endif
.if MARK_AND_COPY_GC || !MARK_GC
- lao r12,garbage_collect_flag,4
- ldosb r12,r12,garbage_collect_flag,4
- cmp r12,#0
+ lao SCRATCH_REG,garbage_collect_flag,4
+ ldosb SCRATCH_REG,SCRATCH_REG,garbage_collect_flag,4
+ cmp SCRATCH_REG,#0
@bne compacting_collector
- lao r12,heap_copied_vector,1
- ldo r8,r12,heap_copied_vector,1
+ lao SCRATCH_REG,heap_copied_vector,1
+ ldo ASTACK_2,SCRATCH_REG,heap_copied_vector,1
- lao r12,heap_end_after_copy_gc,1
- ldo r12,r12,heap_end_after_copy_gc,1
- cmp r12,#0
+ lao SCRATCH_REG,heap_end_after_copy_gc,1
+ ldo SCRATCH_REG,SCRATCH_REG,heap_end_after_copy_gc,1
+ cmp SCRATCH_REG,#0
beq zero_all
- mov r4,r10
- lao r12,heap_p1,1
- ldo r12,r12,heap_p1,1
- subs r4,r4,r12
- add r4,r4,#63*4
- lsr r4,r4,#8
+ mov BSTACK_0,HEAP_PTR
+ lao SCRATCH_REG,heap_p1,1
+ ldo SCRATCH_REG,SCRATCH_REG,heap_p1,1
+ subs BSTACK_0,BSTACK_0,SCRATCH_REG
+ add BSTACK_0,BSTACK_0,#63*4
+ lsr BSTACK_0,BSTACK_0,#8
.align
add lr,pc,#9
str lr,[sp,#-4]!
bl zero_bit_vector
- lao r12,heap_end_after_copy_gc,2
- ldo r7,r12,heap_end_after_copy_gc,2
- lao r12,heap_p1,2
- ldo r12,r12,heap_p1,2
- subs r7,r7,r12
- lsr r7,r7,#6
- and r7,r7,#-4
-
- lao r12,heap_copied_vector,2
- ldo r8,r12,heap_copied_vector,2
- lao r12,heap_copied_vector_size,2
- ldo r4,r12,heap_copied_vector_size,2
- add r8,r8,r7
- subs r4,r4,r7
- lsr r4,r4,#2
-
- lao r12,heap_end_after_copy_gc,3
- mov r14,#0
- sto r14,r12,heap_end_after_copy_gc,3
+ lao SCRATCH_REG,heap_end_after_copy_gc,2
+ ldo ASTACK_1,SCRATCH_REG,heap_end_after_copy_gc,2
+ lao SCRATCH_REG,heap_p1,2
+ ldo SCRATCH_REG,SCRATCH_REG,heap_p1,2
+ subs ASTACK_1,ASTACK_1,SCRATCH_REG
+ lsr ASTACK_1,ASTACK_1,#6
+ and ASTACK_1,ASTACK_1,#-4
+
+ lao SCRATCH_REG,heap_copied_vector,2
+ ldo ASTACK_2,SCRATCH_REG,heap_copied_vector,2
+ lao SCRATCH_REG,heap_copied_vector_size,2
+ ldo BSTACK_0,SCRATCH_REG,heap_copied_vector_size,2
+ add ASTACK_2,ASTACK_2,ASTACK_1
+ subs BSTACK_0,BSTACK_0,ASTACK_1
+ lsr BSTACK_0,BSTACK_0,#2
+
+ lao SCRATCH_REG,heap_end_after_copy_gc,3
+ mov LINK_REG,#0
+ sto LINK_REG,SCRATCH_REG,heap_end_after_copy_gc,3
.align
add lr,pc,#9
@@ -2243,9 +2236,9 @@ no_print_stack_sizes:
.thumb_func
zero_all:
- lao r12,heap_copied_vector_size,3
- ldo r4,r12,heap_copied_vector_size,3
- lsr r4,r4,#2
+ lao SCRATCH_REG,heap_copied_vector_size,3
+ ldo BSTACK_0,SCRATCH_REG,heap_copied_vector_size,3
+ lsr BSTACK_0,BSTACK_0,#2
.align
add lr,pc,#9
str lr,[sp,#-4]!
@@ -2257,129 +2250,129 @@ end_zero_bit_vector:
.include "thumb2copy.s"
.if WRITE_HEAP
- lao r12,heap2_begin_and_end,0
- sto r9,r12,heap2_begin_and_end,0
+ lao SCRATCH_REG,heap2_begin_and_end,0
+ sto ASTACK_PTR,SCRATCH_REG,heap2_begin_and_end,0
.endif
- sub r8,r9,r10
- lsr r8,r8,#2
+ sub ASTACK_2,ASTACK_PTR,HEAP_PTR
+ lsr ASTACK_2,ASTACK_2,#2
- ldr r9,[sp],#4
+ ldr ASTACK_PTR,[sp],#4
.align
add lr,pc,#9
str lr,[sp,#-4]!
bl add_garbage_collect_time
- lao r12,n_allocated_words,2
- ldo r12,r12,n_allocated_words,2
- subs r8,r8,r12
- mov r5,r8
+ lao SCRATCH_REG,n_allocated_words,2
+ ldo SCRATCH_REG,SCRATCH_REG,n_allocated_words,2
+ subs ASTACK_2,ASTACK_2,SCRATCH_REG
+ mov HEAP_FREE,ASTACK_2
bls switch_to_mark_scan
- add r4,r8,r8,lsl #2
- lsl r4,r4,#5
- lao r3,heap_size,4
- ldo r3,r3,heap_size,4
- mov r6,r3
- lsl r3,r3,#2
- add r3,r3,r6
- add r3,r3,r3
- add r3,r3,r6
- cmp r4,r3
+ add BSTACK_0,ASTACK_2,ASTACK_2,lsl #2
+ lsl BSTACK_0,BSTACK_0,#5
+ lao BSTACK_1,heap_size,4
+ ldo BSTACK_1,BSTACK_1,heap_size,4
+ mov ASTACK_0,BSTACK_1
+ lsl BSTACK_1,BSTACK_1,#2
+ add BSTACK_1,BSTACK_1,ASTACK_0
+ add BSTACK_1,BSTACK_1,BSTACK_1
+ add BSTACK_1,BSTACK_1,ASTACK_0
+ cmp BSTACK_0,BSTACK_1
bhs no_mark_scan
@ b no_mark_scan
.thumb_func
switch_to_mark_scan:
- lao r12,heap_size_33,2
- ldo r4,r12,heap_size_33,2
- lsl r4,r4,#5
- lao r12,heap_p,1
- ldo r3,r12,heap_p,1
-
- lao r12,heap_p1,3
- ldo r6,r12,heap_p1,3
- lao r12,heap_p2,1
- ldo r12,r12,heap_p2,1
- cmp r6,r12
+ lao SCRATCH_REG,heap_size_33,2
+ ldo BSTACK_0,SCRATCH_REG,heap_size_33,2
+ lsl BSTACK_0,BSTACK_0,#5
+ lao SCRATCH_REG,heap_p,1
+ ldo BSTACK_1,SCRATCH_REG,heap_p,1
+
+ lao SCRATCH_REG,heap_p1,3
+ ldo ASTACK_0,SCRATCH_REG,heap_p1,3
+ lao SCRATCH_REG,heap_p2,1
+ ldo SCRATCH_REG,SCRATCH_REG,heap_p2,1
+ cmp ASTACK_0,SCRATCH_REG
bcc vector_at_begin
.thumb_func
vector_at_end:
- lao r12,heap_p3,2
- sto r3,r12,heap_p3,2
- add r3,r3,r4
- lao r12,heap_vector,2
- sto r3,r12,heap_vector,2
-
- lao r12,heap_p1,4
- ldo r4,r12,heap_p1,4
- lao r12,extra_heap,1
- sto r4,r12,extra_heap,1
- subs r3,r3,r4
- lsr r3,r3,#2
- lao r12,extra_heap_size,1
- sto r3,r12,extra_heap_size,1
+ lao SCRATCH_REG,heap_p3,2
+ sto BSTACK_1,SCRATCH_REG,heap_p3,2
+ add BSTACK_1,BSTACK_1,BSTACK_0
+ lao SCRATCH_REG,heap_vector,2
+ sto BSTACK_1,SCRATCH_REG,heap_vector,2
+
+ lao SCRATCH_REG,heap_p1,4
+ ldo BSTACK_0,SCRATCH_REG,heap_p1,4
+ lao SCRATCH_REG,extra_heap,1
+ sto BSTACK_0,SCRATCH_REG,extra_heap,1
+ subs BSTACK_1,BSTACK_1,BSTACK_0
+ lsr BSTACK_1,BSTACK_1,#2
+ lao SCRATCH_REG,extra_heap_size,1
+ sto BSTACK_1,SCRATCH_REG,extra_heap_size,1
b switch_to_mark_scan_2
.thumb_func
vector_at_begin:
- lao r12,heap_vector,3
- sto r3,r12,heap_vector,3
- lao r12,heap_size,5
- ldo r12,r12,heap_size,5
- add r3,r3,r12
- subs r3,r3,r4
- lao r12,heap_p3,3
- sto r3,r12,heap_p3,3
-
- lao r12,extra_heap,2
- sto r3,r12,extra_heap,2
- lao r12,heap_p2,2
- ldo r6,r12,heap_p2,2
- subs r6,r6,r3
- lsr r6,r6,#2
- lao r12,extra_heap_size,2
- sto r6,r12,extra_heap_size,2
+ lao SCRATCH_REG,heap_vector,3
+ sto BSTACK_1,SCRATCH_REG,heap_vector,3
+ lao SCRATCH_REG,heap_size,5
+ ldo SCRATCH_REG,SCRATCH_REG,heap_size,5
+ add BSTACK_1,BSTACK_1,SCRATCH_REG
+ subs BSTACK_1,BSTACK_1,BSTACK_0
+ lao SCRATCH_REG,heap_p3,3
+ sto BSTACK_1,SCRATCH_REG,heap_p3,3
+
+ lao SCRATCH_REG,extra_heap,2
+ sto BSTACK_1,SCRATCH_REG,extra_heap,2
+ lao SCRATCH_REG,heap_p2,2
+ ldo ASTACK_0,SCRATCH_REG,heap_p2,2
+ subs ASTACK_0,ASTACK_0,BSTACK_1
+ lsr ASTACK_0,ASTACK_0,#2
+ lao SCRATCH_REG,extra_heap_size,2
+ sto ASTACK_0,SCRATCH_REG,extra_heap_size,2
switch_to_mark_scan_2:
- lao r4,heap_size,6
- ldo r4,r4,heap_size,6
- lsr r4,r4,#3
- sub r4,r4,r8
- lsl r4,r4,#2
+ lao BSTACK_0,heap_size,6
+ ldo BSTACK_0,BSTACK_0,heap_size,6
+ lsr BSTACK_0,BSTACK_0,#3
+ sub BSTACK_0,BSTACK_0,ASTACK_2
+ lsl BSTACK_0,BSTACK_0,#2
- lao r12,garbage_collect_flag,5
- mov r11,#1
- stob r11,r12,garbage_collect_flag,5
+ lao SCRATCH_REG,garbage_collect_flag,5
+ mov ASTACK_3,#1
+ stob ASTACK_3,SCRATCH_REG,garbage_collect_flag,5
- cmp r8,#0
+ cmp ASTACK_2,#0
bpl end_garbage_collect
- mov r11,#-1
- strb r11,[r12]
+ mov ASTACK_3,#-1
+ strb ASTACK_3,[SCRATCH_REG]
- lao r12,extra_heap_size,3
- ldo r3,r12,extra_heap_size,3
- mov r4,r3
- lao r12,n_allocated_words,3
- ldo r12,r12,n_allocated_words,3
- subs r4,r4,r12
+ lao SCRATCH_REG,extra_heap_size,3
+ ldo BSTACK_1,SCRATCH_REG,extra_heap_size,3
+ mov BSTACK_0,BSTACK_1
+ lao SCRATCH_REG,n_allocated_words,3
+ ldo SCRATCH_REG,SCRATCH_REG,n_allocated_words,3
+ subs BSTACK_0,BSTACK_0,SCRATCH_REG
bmi out_of_memory_4
- lao r12,extra_heap,3
- ldo r10,r12,extra_heap,3
- lsl r3,r3,#2
- add r3,r3,r10
- lao r12,heap_end_after_gc,4
- sto r3,r12,heap_end_after_gc,4
+ lao SCRATCH_REG,extra_heap,3
+ ldo HEAP_PTR,SCRATCH_REG,extra_heap,3
+ lsl BSTACK_1,BSTACK_1,#2
+ add BSTACK_1,BSTACK_1,HEAP_PTR
+ lao SCRATCH_REG,heap_end_after_gc,4
+ sto BSTACK_1,SCRATCH_REG,heap_end_after_gc,4
.if WRITE_HEAP
- lao r12,heap_end_write_heap,0
- sto r10,r12,heap_end_write_heap,0
- lao r12,d3_flag_write_heap,0
- mov r11,#1
- sto r11,r12,d3_flag_write_heap,0
+ lao SCRATCH_REG,heap_end_write_heap,0
+ sto HEAP_PTR,SCRATCH_REG,heap_end_write_heap,0
+ lao SCRATCH_REG,d3_flag_write_heap,0
+ mov ASTACK_3,#1
+ sto ASTACK_3,SCRATCH_REG,d3_flag_write_heap,0
b end_garbage_collect_
.else
b end_garbage_collect
@@ -2387,112 +2380,112 @@ switch_to_mark_scan_2:
.thumb_func
no_mark_scan:
@ exchange the semi_spaces
- lao r12,heap_p1,5
- ldo r4,r12,heap_p1,5
- lao r12,heap_p2,3
- ldo r3,r12,heap_p2,3
- lao r12,heap_p2,4
- sto r4,r12,heap_p2,4
- lao r12,heap_p1,6
- sto r3,r12,heap_p1,6
-
- lao r12,heap_size_129,2
- ldo r4,r12,heap_size_129,2
- lsl r4,r4,#6-2
+ lao SCRATCH_REG,heap_p1,5
+ ldo BSTACK_0,SCRATCH_REG,heap_p1,5
+ lao SCRATCH_REG,heap_p2,3
+ ldo BSTACK_1,SCRATCH_REG,heap_p2,3
+ lao SCRATCH_REG,heap_p2,4
+ sto BSTACK_0,SCRATCH_REG,heap_p2,4
+ lao SCRATCH_REG,heap_p1,6
+ sto BSTACK_1,SCRATCH_REG,heap_p1,6
+
+ lao SCRATCH_REG,heap_size_129,2
+ ldo BSTACK_0,SCRATCH_REG,heap_size_129,2
+ lsl BSTACK_0,BSTACK_0,#6-2
.ifdef MUNMAP
- lao r12,heap_p2,5
- ldo r3,r12,heap_p2,5
- add r6,r3,r4,lsl #2
- add r3,r3,#4095
- and r3,r3,#-4096
- and r6,r6,#-4096
- subs r6,r6,r3
+ lao SCRATCH_REG,heap_p2,5
+ ldo BSTACK_1,SCRATCH_REG,heap_p2,5
+ add ASTACK_0,BSTACK_1,BSTACK_0,lsl #2
+ add BSTACK_1,BSTACK_1,#4095
+ and BSTACK_1,BSTACK_1,#-4096
+ and ASTACK_0,ASTACK_0,#-4096
+ subs ASTACK_0,ASTACK_0,BSTACK_1
bls no_pages
- str r4,[sp,#-4]!
+ str BSTACK_0,[sp,#-4]!
- str r6,[sp,#-4]!
- str r3,[sp,#-4]!
+ str ASTACK_0,[sp,#-4]!
+ str BSTACK_1,[sp,#-4]!
.align
add lr,pc,#9
str lr,[sp,#-4]!
bl _munmap
add sp,sp,#8
- ldr r4,[sp],#4
+ ldr BSTACK_0,[sp],#4
.thumb_func
no_pages:
.endif
.if ADJUST_HEAP_SIZE
- mov r3,r4
+ mov BSTACK_1,BSTACK_0
.endif
- subs r4,r4,r8
+ subs BSTACK_0,BSTACK_0,ASTACK_2
.if ADJUST_HEAP_SIZE
- mov r6,r4
- lao r12,heap_size_multiple,0
- ldo r12,r12,heap_size_multiple,0
- umull r4,r7,r12,r4
- lsr r4,r4,#9
- orr r4,r4,r7,lsl #32-9
- lsrs r7,r7,#9
+ mov ASTACK_0,BSTACK_0
+ lao SCRATCH_REG,heap_size_multiple,0
+ ldo SCRATCH_REG,SCRATCH_REG,heap_size_multiple,0
+ umull BSTACK_0,ASTACK_1,SCRATCH_REG,BSTACK_0
+ lsr BSTACK_0,BSTACK_0,#9
+ orr BSTACK_0,BSTACK_0,ASTACK_1,lsl #32-9
+ lsrs ASTACK_1,ASTACK_1,#9
bne no_small_heap1
- cmp r4,#MINIMUM_HEAP_SIZE_2
+ cmp BSTACK_0,#MINIMUM_HEAP_SIZE_2
bhs not_too_small1
- mov r4,#MINIMUM_HEAP_SIZE_2
+ mov BSTACK_0,#MINIMUM_HEAP_SIZE_2
not_too_small1:
- subs r3,r3,r4
+ subs BSTACK_1,BSTACK_1,BSTACK_0
blo no_small_heap1
- sub r5,r5,r3
- lsl r3,r3,#2
- lao r12,heap_end_after_gc,5
- ldo r8,r12,heap_end_after_gc,5
- lao r12,heap_end_after_copy_gc,4
- sto r8,r12,heap_end_after_copy_gc,4
- sub r8,r8,r3
- lao r12,heap_end_after_gc,6
- sto r8,r12,heap_end_after_gc,6
+ sub HEAP_FREE,HEAP_FREE,BSTACK_1
+ lsl BSTACK_1,BSTACK_1,#2
+ lao SCRATCH_REG,heap_end_after_gc,5
+ ldo ASTACK_2,SCRATCH_REG,heap_end_after_gc,5
+ lao SCRATCH_REG,heap_end_after_copy_gc,4
+ sto ASTACK_2,SCRATCH_REG,heap_end_after_copy_gc,4
+ sub ASTACK_2,ASTACK_2,BSTACK_1
+ lao SCRATCH_REG,heap_end_after_gc,6
+ sto ASTACK_2,SCRATCH_REG,heap_end_after_gc,6
no_small_heap1:
- mov r4,r6
+ mov BSTACK_0,ASTACK_0
.endif
- lsl r4,r4,#2
+ lsl BSTACK_0,BSTACK_0,#2
.endif
.thumb_func
end_garbage_collect:
.if WRITE_HEAP
- lao r12,heap_end_write_heap,1
- sto r10,r12,heap_end_write_heap,1
- lao r12,d3_flag_write_heap,1
- mov r11,#0
- sto r11,r12,d3_flag_write_heap,1
+ lao SCRATCH_REG,heap_end_write_heap,1
+ sto HEAP_PTR,SCRATCH_REG,heap_end_write_heap,1
+ lao SCRATCH_REG,d3_flag_write_heap,1
+ mov ASTACK_3,#0
+ sto ASTACK_3,SCRATCH_REG,d3_flag_write_heap,1
.thumb_func
end_garbage_collect_:
.endif
- str r4,[sp,#-4]!
+ str BSTACK_0,[sp,#-4]!
- lao r12,flags,9
- ldo r12,r12,flags,9
- tst r12,#2
+ lao SCRATCH_REG,flags,9
+ ldo SCRATCH_REG,SCRATCH_REG,flags,9
+ tst SCRATCH_REG,#2
beq no_heap_use_message
- str r4,[sp,#-4]!
+ str BSTACK_0,[sp,#-4]!
- lao r0,heap_use_after_gc_string_1,0
- otoa r0,heap_use_after_gc_string_1,0
+ lao BSTACK_4,heap_use_after_gc_string_1,0
+ otoa BSTACK_4,heap_use_after_gc_string_1,0
bl ew_print_string
- ldr r0,[sp],#4
+ ldr BSTACK_4,[sp],#4
bl ew_print_int
- lao r0,heap_use_after_gc_string_2,0
- otoa r0,heap_use_after_gc_string_2,0
+ lao BSTACK_4,heap_use_after_gc_string_2,0
+ otoa BSTACK_4,heap_use_after_gc_string_2,0
bl ew_print_string
.thumb_func
@@ -2505,72 +2498,72 @@ no_heap_use_message:
bl call_finalizers
.endif
- ldr r4,[sp],#4
+ ldr BSTACK_0,[sp],#4
.if WRITE_HEAP
@ Check whether memory profiling is on or off
- lao r12,flags,10
- ldo r12,r12,flags,10
- tst r12,#32
+ lao SCRATCH_REG,flags,10
+ ldo SCRATCH_REG,SCRATCH_REG,flags,10
+ tst SCRATCH_REG,#32
beq no_write_heap
- lao r12,min_write_heap_size,0
- ldo r12,r12,min_write_heap_size,0
- cmp r4,r12
+ lao SCRATCH_REG,min_write_heap_size,0
+ ldo SCRATCH_REG,SCRATCH_REG,min_write_heap_size,0
+ cmp BSTACK_0,SCRATCH_REG
blo no_write_heap
- str r6,[sp,#-4]!
- str r7,[sp,#-4]!
- str r8,[sp,#-4]!
- str r9,[sp,#-4]!
- str r10,[sp,#-4]!
+ str ASTACK_0,[sp,#-4]!
+ str ASTACK_1,[sp,#-4]!
+ str ASTACK_2,[sp,#-4]!
+ str ASTACK_PTR,[sp,#-4]!
+ str HEAP_PTR,[sp,#-4]!
subs sp,sp,#64
- lao r12,d3_flag_write_heap,2
- ldo r4,r12,d3_flag_write_heap,2
- tst r4,r4
+ lao SCRATCH_REG,d3_flag_write_heap,2
+ ldo BSTACK_0,SCRATCH_REG,d3_flag_write_heap,2
+ tst BSTACK_0,BSTACK_0
bne copy_to_compact_with_alloc_in_extra_heap
- lao r4,garbage_collect_flag,6
- ldosb r4,r4,garbage_collect_flag,6
+ lao BSTACK_0,garbage_collect_flag,6
+ ldosb BSTACK_0,BSTACK_0,garbage_collect_flag,6
- lao r12,heap2_begin_and_end,1
- ldo r6,r12,heap2_begin_and_end,1
- laol r12,heap2_begin_and_end+4,heap2_begin_and_end_o_4,0
- ldo r7,r12,heap2_begin_and_end_o_4,0
+ lao SCRATCH_REG,heap2_begin_and_end,1
+ ldo ASTACK_0,SCRATCH_REG,heap2_begin_and_end,1
+ laol SCRATCH_REG,heap2_begin_and_end+4,heap2_begin_and_end_o_4,0
+ ldo ASTACK_1,SCRATCH_REG,heap2_begin_and_end_o_4,0
- lao r3,heap_p1,7
- otoa r3,heap_p1,7
+ lao BSTACK_1,heap_p1,7
+ otoa BSTACK_1,heap_p1,7
- tst r4,r4
+ tst BSTACK_0,BSTACK_0
beq gc0
- lao r3,heap_p2,6
- otoa r3,heap_p2,6
+ lao BSTACK_1,heap_p2,6
+ otoa BSTACK_1,heap_p2,6
bgt gc1
- lao r3,heap_p3,4
- otoa r3,heap_p3,4
- mov r6,#0
- mov r7,#0
+ lao BSTACK_1,heap_p3,4
+ otoa BSTACK_1,heap_p3,4
+ mov ASTACK_0,#0
+ mov ASTACK_1,#0
gc0:
gc1:
- ldr r3,[r3]
+ ldr BSTACK_1,[BSTACK_1]
? /* fill record */
- mov r4,sp
+ mov BSTACK_0,sp
- str r3,[r4,#0]
+ str BSTACK_1,[BSTACK_0,#0]
? movl a4,4(d0) // klop dit?
? movl a0,8(d0) // heap2_begin
? movl a1,12(d0) // heap2_end
- lao r12,stack_p,3
- ldo r3,r12,stack_p,3
+ lao SCRATCH_REG,stack_p,3
+ ldo BSTACK_1,SCRATCH_REG,stack_p,3
? movl d1,16(d0) // stack_begin
? movl a3,20(d0) // stack_end
@@ -2587,22 +2580,22 @@ gc1:
? movl $__STRING__+2,56(d0) // STRING-descP
? movl $__ARRAY__+2,60(d0) // ARRAY-descP
- str r4,[sp,#-4]!
+ str BSTACK_0,[sp,#-4]!
bl write_heap
add sp,sp,#68
- ldr r10,[sp],#4
- ldr r9,[sp],#4
- ldr r8,[sp],#4
- ldr r7,[sp],#4
- ldr r6,[sp],#4
+ ldr HEAP_PTR,[sp],#4
+ ldr ASTACK_PTR,[sp],#4
+ ldr ASTACK_2,[sp],#4
+ ldr ASTACK_1,[sp],#4
+ ldr ASTACK_0,[sp],#4
.thumb_func
no_write_heap:
.endif
- ldmia sp!,{r0-r4,pc}
+ ldmia sp!,{BSTACK_4-BSTACK_0,pc}
.ifdef PIC
.if MARK_AND_COPY_GC
@@ -2723,43 +2716,43 @@ no_write_heap:
.if FINALIZERS
.thumb_func
call_finalizers:
- lao r12,free_finalizer_list,1
- ldo r4,r12,free_finalizer_list,1
+ lao SCRATCH_REG,free_finalizer_list,1
+ ldo BSTACK_0,SCRATCH_REG,free_finalizer_list,1
.thumb_func
call_finalizers_lp:
- laol r12,__Nil-4,__Nil_o_m4,1
- otoa r12,__Nil_o_m4,1
- cmp r4,r12
+ laol SCRATCH_REG,__Nil-4,__Nil_o_m4,1
+ otoa SCRATCH_REG,__Nil_o_m4,1
+ cmp BSTACK_0,SCRATCH_REG
beq end_call_finalizers
- ldr r12,[r4,#4]
- str r12,[sp,#-4]!
- ldr r3,[r4,#8]
- ldr r12,[r3,#4]
- str r12,[sp,#-4]!
- ldr r12,[r3]
- blx r12
+ ldr SCRATCH_REG,[BSTACK_0,#4]
+ str SCRATCH_REG,[sp,#-4]!
+ ldr BSTACK_1,[BSTACK_0,#8]
+ ldr SCRATCH_REG,[BSTACK_1,#4]
+ str SCRATCH_REG,[sp,#-4]!
+ ldr SCRATCH_REG,[BSTACK_1]
+ blx SCRATCH_REG
add sp,sp,#4
- ldr r4,[sp],#4
+ ldr BSTACK_0,[sp],#4
b call_finalizers_lp
.thumb_func
end_call_finalizers:
- lao r12,free_finalizer_list,2
- laol r11,__Nil-4,__Nil_o_m4,2
- otoa r11,__Nil_o_m4,2
- sto r11,r12,free_finalizer_list,2
+ lao SCRATCH_REG,free_finalizer_list,2
+ laol ASTACK_3,__Nil-4,__Nil_o_m4,2
+ otoa ASTACK_3,__Nil_o_m4,2
+ sto ASTACK_3,SCRATCH_REG,free_finalizer_list,2
ldr pc,[sp],#4
.endif
.if WRITE_HEAP
.thumb_func
copy_to_compact_with_alloc_in_extra_heap:
- lao r12,heap2_begin_and_end,2
- ldo r6,r12,heap2_begin_and_end,2
- laol r12,heap2_begin_and_end+4,heap2_begin_and_end_o_4,1
- ldo r7,r12,heap2_begin_and_end_o_4,1
- lao r3,heap_p2,7
- otoa r3,heap_p2,7
+ lao SCRATCH_REG,heap2_begin_and_end,2
+ ldo ASTACK_0,SCRATCH_REG,heap2_begin_and_end,2
+ laol SCRATCH_REG,heap2_begin_and_end+4,heap2_begin_and_end_o_4,1
+ ldo ASTACK_1,SCRATCH_REG,heap2_begin_and_end_o_4,1
+ lao BSTACK_1,heap_p2,7
+ otoa BSTACK_1,heap_p2,7
b gc1
.endif
@@ -2769,91 +2762,91 @@ out_of_memory_4:
str lr,[sp,#-4]!
bl add_garbage_collect_time
- lao r8,out_of_memory_string_4,0
- otoa r8,out_of_memory_string_4,0
+ lao ASTACK_2,out_of_memory_string_4,0
+ otoa ASTACK_2,out_of_memory_string_4,0
b print_error
.thumb_func
zero_bit_vector:
- eor r7,r7,r7
- tst r4,#1
+ eor ASTACK_1,ASTACK_1,ASTACK_1
+ tst BSTACK_0,#1
beq zero_bits1_1
- str r7,[r8]
- add r8,r8,#4
+ str ASTACK_1,[ASTACK_2]
+ add ASTACK_2,ASTACK_2,#4
zero_bits1_1:
- lsr r4,r4,#1
+ lsr BSTACK_0,BSTACK_0,#1
- mov r3,r4
- lsr r4,r4,#1
- tst r3,#1
+ mov BSTACK_1,BSTACK_0
+ lsr BSTACK_0,BSTACK_0,#1
+ tst BSTACK_1,#1
beq zero_bits1_5
- subs r8,r8,#8
+ subs ASTACK_2,ASTACK_2,#8
b zero_bits1_2
zero_bits1_4:
- str r7,[r8]
- str r7,[r8,#4]
+ str ASTACK_1,[ASTACK_2]
+ str ASTACK_1,[ASTACK_2,#4]
zero_bits1_2:
- str r7,[r8,#8]
- str r7,[r8,#12]
- add r8,r8,#16
+ str ASTACK_1,[ASTACK_2,#8]
+ str ASTACK_1,[ASTACK_2,#12]
+ add ASTACK_2,ASTACK_2,#16
zero_bits1_5:
- subs r4,r4,#1
+ subs BSTACK_0,BSTACK_0,#1
bhs zero_bits1_4
ldr pc,[sp],#4
.thumb_func
reorder:
- str r9,[sp,#-4]!
- str r8,[sp,#-4]!
-
- mov r8,r4
- lsl r8,r8,#2
- mov r9,r3
- lsl r9,r9,#2
- add r6,r6,r9
- subs r7,r7,r8
-
- str r9,[sp,#-4]!
- str r8,[sp,#-4]!
- str r3,[sp,#-4]!
- str r4,[sp,#-4]!
+ str ASTACK_PTR,[sp,#-4]!
+ str ASTACK_2,[sp,#-4]!
+
+ mov ASTACK_2,BSTACK_0
+ lsl ASTACK_2,ASTACK_2,#2
+ mov ASTACK_PTR,BSTACK_1
+ lsl ASTACK_PTR,ASTACK_PTR,#2
+ add ASTACK_0,ASTACK_0,ASTACK_PTR
+ subs ASTACK_1,ASTACK_1,ASTACK_2
+
+ str ASTACK_PTR,[sp,#-4]!
+ str ASTACK_2,[sp,#-4]!
+ str BSTACK_1,[sp,#-4]!
+ str BSTACK_0,[sp,#-4]!
b st_reorder_lp
.thumb_func
reorder_lp:
- ldr r8,[r6]
- ldr r9,[r7,#-4]
- str r8,[r7,#-4]
- subs r7,r7,#4
- str r9,[r6]
- add r6,r6,#4
-
- subs r4,r4,#1
+ ldr ASTACK_2,[ASTACK_0]
+ ldr ASTACK_PTR,[ASTACK_1,#-4]
+ str ASTACK_2,[ASTACK_1,#-4]
+ subs ASTACK_1,ASTACK_1,#4
+ str ASTACK_PTR,[ASTACK_0]
+ add ASTACK_0,ASTACK_0,#4
+
+ subs BSTACK_0,BSTACK_0,#1
bne next_b_in_element
- ldr r4,[sp]
- ldr r12,[sp,#12]
- add r6,r6,r12
+ ldr BSTACK_0,[sp]
+ ldr SCRATCH_REG,[sp,#12]
+ add ASTACK_0,ASTACK_0,SCRATCH_REG
.thumb_func
next_b_in_element:
- subs r3,r3,#1
+ subs BSTACK_1,BSTACK_1,#1
bne next_a_in_element
- ldr r3,[sp,#4]
- ldr r12,[sp,#8]
- subs r7,r7,r12
+ ldr BSTACK_1,[sp,#4]
+ ldr SCRATCH_REG,[sp,#8]
+ subs ASTACK_1,ASTACK_1,SCRATCH_REG
.thumb_func
next_a_in_element:
.thumb_func
st_reorder_lp:
- cmp r7,r6
+ cmp ASTACK_1,ASTACK_0
bhi reorder_lp
- ldr r4,[sp],#4
- ldr r3,[sp],#4
+ ldr BSTACK_0,[sp],#4
+ ldr BSTACK_1,[sp],#4
add sp,sp,#8
- ldr r8,[sp],#4
- ldr r9,[sp],#4
+ ldr ASTACK_2,[sp],#4
+ ldr ASTACK_PTR,[sp],#4
ldr pc,[sp],#4
@
@@ -2864,110 +2857,110 @@ st_reorder_lp:
compacting_collector:
@ zero all mark bits
- lao r12,stack_top,0
- sto r9,r12,stack_top,0
+ lao SCRATCH_REG,stack_top,0
+ sto ASTACK_PTR,SCRATCH_REG,stack_top,0
- lao r12,heap_vector,4
- ldo r10,r12,heap_vector,4
+ lao SCRATCH_REG,heap_vector,4
+ ldo HEAP_PTR,SCRATCH_REG,heap_vector,4
.if MARK_GC
.if MARK_AND_COPY_GC
- lao r12,flags,11
- ldo r12,r12,flags,11
- tst r12,#64
+ lao SCRATCH_REG,flags,11
+ ldo SCRATCH_REG,SCRATCH_REG,flags,11
+ tst SCRATCH_REG,#64
beq no_mark4
.endif
- lao r12,zero_bits_before_mark,0
- otoa r12,zero_bits_before_mark,0
- ldr r11,[r12]
- cmp r11,#0
+ lao SCRATCH_REG,zero_bits_before_mark,0
+ otoa SCRATCH_REG,zero_bits_before_mark,0
+ ldr ASTACK_3,[SCRATCH_REG]
+ cmp ASTACK_3,#0
beq no_zero_bits
- mov r11,#0
- str r11,[r12]
+ mov ASTACK_3,#0
+ str ASTACK_3,[SCRATCH_REG]
.if MARK_AND_COPY_GC
no_mark4:
.endif
.endif
- mov r8,r10
- lao r12,heap_size_33,3
- ldo r4,r12,heap_size_33,3
- add r4,r4,#3
- lsr r4,r4,#2
+ mov ASTACK_2,HEAP_PTR
+ lao SCRATCH_REG,heap_size_33,3
+ ldo BSTACK_0,SCRATCH_REG,heap_size_33,3
+ add BSTACK_0,BSTACK_0,#3
+ lsr BSTACK_0,BSTACK_0,#2
- mov r3,#0
+ mov BSTACK_1,#0
- tst r4,#1
+ tst BSTACK_0,#1
beq zero_bits_1
- str r3,[r8],#4
+ str BSTACK_1,[ASTACK_2],#4
zero_bits_1:
- mov r6,r4
- lsr r4,r4,#2
+ mov ASTACK_0,BSTACK_0
+ lsr BSTACK_0,BSTACK_0,#2
- tst r6,#2
+ tst ASTACK_0,#2
beq zero_bits_5
- subs r8,r8,#8
+ subs ASTACK_2,ASTACK_2,#8
b zero_bits_2
zero_bits_4:
- str r3,[r8]
- str r3,[r8,#4]
+ str BSTACK_1,[ASTACK_2]
+ str BSTACK_1,[ASTACK_2,#4]
zero_bits_2:
- str r3,[r8,#8]
- str r3,[r8,#12]
- add r8,r8,#16
+ str BSTACK_1,[ASTACK_2,#8]
+ str BSTACK_1,[ASTACK_2,#12]
+ add ASTACK_2,ASTACK_2,#16
zero_bits_5:
- subs r4,r4,#1
+ subs BSTACK_0,BSTACK_0,#1
bcs zero_bits_4
.if MARK_GC
.if MARK_AND_COPY_GC
- lao r12,flags,12
- ldo r12,r12,flags,12
- tst r12,#64
+ lao SCRATCH_REG,flags,12
+ ldo SCRATCH_REG,SCRATCH_REG,flags,12
+ tst SCRATCH_REG,#64
beq no_mark5
.endif
.thumb_func
no_zero_bits:
- lao r12,n_last_heap_free_bytes,0
- ldo r4,r12,n_last_heap_free_bytes,0
- lao r12,n_free_words_after_mark,3
- ldo r3,r12,n_free_words_after_mark,3
+ lao SCRATCH_REG,n_last_heap_free_bytes,0
+ ldo BSTACK_0,SCRATCH_REG,n_last_heap_free_bytes,0
+ lao SCRATCH_REG,n_free_words_after_mark,3
+ ldo BSTACK_1,SCRATCH_REG,n_free_words_after_mark,3
.if 1
- lsr r4,r4,#2
+ lsr BSTACK_0,BSTACK_0,#2
.else
- lsl r3,r3,#2
+ lsl BSTACK_1,BSTACK_1,#2
.endif
- add r8,r3,r3,lsl #3
- lsr r8,r8,#2
+ add ASTACK_2,BSTACK_1,BSTACK_1,lsl #3
+ lsr ASTACK_2,ASTACK_2,#2
- cmp r4,r8
+ cmp BSTACK_0,ASTACK_2
bgt compact_gc
.if ADJUST_HEAP_SIZE
- lao r12,bit_vector_size,1
- ldo r3,r12,bit_vector_size,1
- lsl r3,r3,#2
-
- sub r4,r3,r4
-
- lao r12,heap_size_multiple,1
- ldo r12,r12,heap_size_multiple,1
- umull r4,r7,r12,r4
- lsr r4,r4,#7
- orr r4,r4,r7,lsl #32-7
- lsrs r7,r7,#7
+ lao SCRATCH_REG,bit_vector_size,1
+ ldo BSTACK_1,SCRATCH_REG,bit_vector_size,1
+ lsl BSTACK_1,BSTACK_1,#2
+
+ sub BSTACK_0,BSTACK_1,BSTACK_0
+
+ lao SCRATCH_REG,heap_size_multiple,1
+ ldo SCRATCH_REG,SCRATCH_REG,heap_size_multiple,1
+ umull BSTACK_0,ASTACK_1,SCRATCH_REG,BSTACK_0
+ lsr BSTACK_0,BSTACK_0,#7
+ orr BSTACK_0,BSTACK_0,ASTACK_1,lsl #32-7
+ lsrs ASTACK_1,ASTACK_1,#7
bne no_smaller_heap
- cmp r4,r3
+ cmp BSTACK_0,BSTACK_1
bhs no_smaller_heap
- cmp r3,#MINIMUM_HEAP_SIZE
+ cmp BSTACK_1,#MINIMUM_HEAP_SIZE
bls no_smaller_heap
b compact_gc
@@ -2985,15 +2978,15 @@ no_smaller_heap:
.thumb_func
compact_gc:
- lao r12,zero_bits_before_mark,1
- mov r11,#1
- sto r11,r12,zero_bits_before_mark,1
- lao r12,n_last_heap_free_bytes,1
- mov r11,#0
- sto r11,r12,n_last_heap_free_bytes,1
- lao r12,n_free_words_after_mark,4
- mov r11,#1000
- sto r11,r12,n_free_words_after_mark,4
+ lao SCRATCH_REG,zero_bits_before_mark,1
+ mov ASTACK_3,#1
+ sto ASTACK_3,SCRATCH_REG,zero_bits_before_mark,1
+ lao SCRATCH_REG,n_last_heap_free_bytes,1
+ mov ASTACK_3,#0
+ sto ASTACK_3,SCRATCH_REG,n_last_heap_free_bytes,1
+ lao SCRATCH_REG,n_free_words_after_mark,4
+ mov ASTACK_3,#1000
+ sto ASTACK_3,SCRATCH_REG,n_free_words_after_mark,4
.if MARK_AND_COPY_GC
no_mark5:
.endif
@@ -3001,36 +2994,36 @@ no_mark5:
.include "thumb2compact.s"
- lao r12,stack_top,1
- ldo r9,r12,stack_top,1
+ lao SCRATCH_REG,stack_top,1
+ ldo ASTACK_PTR,SCRATCH_REG,stack_top,1
- lao r12,heap_size_33,4
- ldo r3,r12,heap_size_33,4
- lsl r3,r3,#5
- lao r12,heap_p3,5
- ldo r12,r12,heap_p3,5
- add r3,r3,r12
+ lao SCRATCH_REG,heap_size_33,4
+ ldo BSTACK_1,SCRATCH_REG,heap_size_33,4
+ lsl BSTACK_1,BSTACK_1,#5
+ lao SCRATCH_REG,heap_p3,5
+ ldo SCRATCH_REG,SCRATCH_REG,heap_p3,5
+ add BSTACK_1,BSTACK_1,SCRATCH_REG
- lao r12,heap_end_after_gc,7
- sto r3,r12,heap_end_after_gc,7
+ lao SCRATCH_REG,heap_end_after_gc,7
+ sto BSTACK_1,SCRATCH_REG,heap_end_after_gc,7
- subs r3,r3,r10
- lsr r3,r3,#2
+ subs BSTACK_1,BSTACK_1,HEAP_PTR
+ lsr BSTACK_1,BSTACK_1,#2
- lao r12,n_allocated_words,4
- ldo r12,r12,n_allocated_words,4
- subs r3,r3,r12
- mov r5,r3
+ lao SCRATCH_REG,n_allocated_words,4
+ ldo SCRATCH_REG,SCRATCH_REG,n_allocated_words,4
+ subs BSTACK_1,BSTACK_1,SCRATCH_REG
+ mov HEAP_FREE,BSTACK_1
bcc out_of_memory_4
- ldr r12,=107374182
- cmp r3,r12
+ ldr SCRATCH_REG,=107374182
+ cmp BSTACK_1,SCRATCH_REG
bhs not_out_of_memory
- add r4,r3,r3,lsl #2
- lsl r4,r4,#3
- lao r12,heap_size,7
- ldo r12,r12,heap_size,7
- cmp r4,r12
+ add BSTACK_0,BSTACK_1,BSTACK_1,lsl #2
+ lsl BSTACK_0,BSTACK_0,#3
+ lao SCRATCH_REG,heap_size,7
+ ldo SCRATCH_REG,SCRATCH_REG,heap_size,7
+ cmp BSTACK_0,SCRATCH_REG
bcc out_of_memory_4
.thumb_func
not_out_of_memory:
@@ -3038,55 +3031,55 @@ not_out_of_memory:
.if MARK_GC || COMPACT_GC_ONLY
.if MARK_GC && ADJUST_HEAP_SIZE
.if MARK_AND_COPY_GC
- lao r12,flags,13
- ldo r12,r12,flags,13
- tst r12,#64
+ lao SCRATCH_REG,flags,13
+ ldo SCRATCH_REG,SCRATCH_REG,flags,13
+ tst SCRATCH_REG,#64
beq no_mark_6
.endif
- lao r12,heap_p3,6
- ldo r4,r12,heap_p3,6
- sub r4,r10,r4
- lao r12,n_allocated_words,5
- ldo r3,r12,n_allocated_words,5
- add r4,r4,r3,lsl #2
-
- lao r12,heap_size_33,5
- ldo r3,r12,heap_size_33,5
- lsl r3,r3,#5
-
- lao r12,heap_size_multiple,2
- ldo r12,r12,heap_size_multiple,2
- umull r4,r7,r12,r4
- lsr r4,r4,#8
- orr r4,r4,r7,lsl #32-8
- lsrs r7,r7,#8
+ lao SCRATCH_REG,heap_p3,6
+ ldo BSTACK_0,SCRATCH_REG,heap_p3,6
+ sub BSTACK_0,HEAP_PTR,BSTACK_0
+ lao SCRATCH_REG,n_allocated_words,5
+ ldo BSTACK_1,SCRATCH_REG,n_allocated_words,5
+ add BSTACK_0,BSTACK_0,BSTACK_1,lsl #2
+
+ lao SCRATCH_REG,heap_size_33,5
+ ldo BSTACK_1,SCRATCH_REG,heap_size_33,5
+ lsl BSTACK_1,BSTACK_1,#5
+
+ lao SCRATCH_REG,heap_size_multiple,2
+ ldo SCRATCH_REG,SCRATCH_REG,heap_size_multiple,2
+ umull BSTACK_0,ASTACK_1,SCRATCH_REG,BSTACK_0
+ lsr BSTACK_0,BSTACK_0,#8
+ orr BSTACK_0,BSTACK_0,ASTACK_1,lsl #32-8
+ lsrs ASTACK_1,ASTACK_1,#8
bne no_small_heap2
- and r4,r4,#-4
+ and BSTACK_0,BSTACK_0,#-4
- cmp r4,#MINIMUM_HEAP_SIZE
+ cmp BSTACK_0,#MINIMUM_HEAP_SIZE
bhs not_too_small2
- mov r4,#MINIMUM_HEAP_SIZE
+ mov BSTACK_0,#MINIMUM_HEAP_SIZE
not_too_small2:
- mov r6,r3
- subs r6,r6,r4
+ mov ASTACK_0,BSTACK_1
+ subs ASTACK_0,ASTACK_0,BSTACK_0
blo no_small_heap2
- lao r12,heap_end_after_gc,8
- otoa r12,heap_end_after_gc,8
- ldr r11,[r12]
- sub r11,r11,r6
- str r11,[r12]
+ lao SCRATCH_REG,heap_end_after_gc,8
+ otoa SCRATCH_REG,heap_end_after_gc,8
+ ldr ASTACK_3,[SCRATCH_REG]
+ sub ASTACK_3,ASTACK_3,ASTACK_0
+ str ASTACK_3,[SCRATCH_REG]
- sub r5,r5,r6,lsr #2
+ sub HEAP_FREE,HEAP_FREE,ASTACK_0,lsr #2
- mov r3,r4
+ mov BSTACK_1,BSTACK_0
no_small_heap2:
- lsr r3,r3,#2
- lao r12,bit_vector_size,2
- sto r3,r12,bit_vector_size,2
+ lsr BSTACK_1,BSTACK_1,#2
+ lao SCRATCH_REG,bit_vector_size,2
+ sto BSTACK_1,SCRATCH_REG,bit_vector_size,2
.if MARK_AND_COPY_GC
no_mark_6:
@@ -3095,58 +3088,58 @@ no_mark_6:
b no_copy_garbage_collection
.else
@ to do prevent overflow
- lsl r4,r4,#2
- lao r12,heap_size,8
- ldo r12,r12,heap_size,8
- lsl r6,r12,#5
- sub r6,r6,r12
- cmp r4,r6
+ lsl BSTACK_0,BSTACK_0,#2
+ lao SCRATCH_REG,heap_size,8
+ ldo SCRATCH_REG,SCRATCH_REG,heap_size,8
+ lsl ASTACK_0,SCRATCH_REG,#5
+ sub ASTACK_0,ASTACK_0,SCRATCH_REG
+ cmp BSTACK_0,ASTACK_0
ble no_copy_garbage_collection
- lao r12,heap_p,2
- ldo r4,r12,heap_p,2
- lao r12,heap_p1,8
- sto r4,r12,heap_p1,8
-
- lao r12,heap_size_129,3
- lto r3,r12,heap_size_129,3
- lsl r3,r3,#6
- add r4,r4,r3
- lao r12,heap_copied_vector,3
- sto r4,r12,heap_copied_vector,3
- lao r12,heap_end_after_gc,9
- sto r4,r12,heap_end_after_gc,9
- lao r12,heap_copied_vector_size,4
- ldo r3,r12,heap_copied_vector_size,4
- add r3,r3,r4
- lao r12,heap_p2,8
- sto r3,r12,heap_p2,8
-
- lao r12,heap_p3,7
- ldo r4,r12,heap_p3,7
- lao r12,heap_vector,5
- ldo r12,r12,heap_vector,5
- cmp r4,r12
+ lao SCRATCH_REG,heap_p,2
+ ldo BSTACK_0,SCRATCH_REG,heap_p,2
+ lao SCRATCH_REG,heap_p1,8
+ sto BSTACK_0,SCRATCH_REG,heap_p1,8
+
+ lao SCRATCH_REG,heap_size_129,3
+ lto BSTACK_1,SCRATCH_REG,heap_size_129,3
+ lsl BSTACK_1,BSTACK_1,#6
+ add BSTACK_0,BSTACK_0,BSTACK_1
+ lao SCRATCH_REG,heap_copied_vector,3
+ sto BSTACK_0,SCRATCH_REG,heap_copied_vector,3
+ lao SCRATCH_REG,heap_end_after_gc,9
+ sto BSTACK_0,SCRATCH_REG,heap_end_after_gc,9
+ lao SCRATCH_REG,heap_copied_vector_size,4
+ ldo BSTACK_1,SCRATCH_REG,heap_copied_vector_size,4
+ add BSTACK_1,BSTACK_1,BSTACK_0
+ lao SCRATCH_REG,heap_p2,8
+ sto BSTACK_1,SCRATCH_REG,heap_p2,8
+
+ lao SCRATCH_REG,heap_p3,7
+ ldo BSTACK_0,SCRATCH_REG,heap_p3,7
+ lao SCRATCH_REG,heap_vector,5
+ ldo SCRATCH_REG,SCRATCH_REG,heap_vector,5
+ cmp BSTACK_0,SCRATCH_REG
ble vector_at_end_2
- lao r12,heap_vector,6
- ldo r3,r12,heap_vector,6
- lao r12,extra_heap,4
- sto r3,r12,extra_heap,4
- subs r4,r4,r3
- lsr r4,r4,#2
- lao r12,extra_heap_size,4
- sto r4,r12,extra_heap_size,4
-
- lao r12,garbage_collect_flag,7
- mov r11,#2
- stob r11,r12,garbage_collect_flag,7
+ lao SCRATCH_REG,heap_vector,6
+ ldo BSTACK_1,SCRATCH_REG,heap_vector,6
+ lao SCRATCH_REG,extra_heap,4
+ sto BSTACK_1,SCRATCH_REG,extra_heap,4
+ subs BSTACK_0,BSTACK_0,BSTACK_1
+ lsr BSTACK_0,BSTACK_0,#2
+ lao SCRATCH_REG,extra_heap_size,4
+ sto BSTACK_0,SCRATCH_REG,extra_heap_size,4
+
+ lao SCRATCH_REG,garbage_collect_flag,7
+ mov ASTACK_3,#2
+ stob ASTACK_3,SCRATCH_REG,garbage_collect_flag,7
b no_copy_garbage_collection
vector_at_end_2:
- lao r12,garbage_collect_flag,8
- mov r11,#0
- stob r11,r12,garbage_collect_flag,8
+ lao SCRATCH_REG,garbage_collect_flag,8
+ mov ASTACK_3,#0
+ stob ASTACK_3,SCRATCH_REG,garbage_collect_flag,8
.endif
.thumb_func
@@ -3156,13 +3149,13 @@ no_copy_garbage_collection:
str lr,[sp,#-4]!
bl add_garbage_collect_time
- mov r4,r10
- lao r12,heap_p3,8
- ldo r12,r12,heap_p3,8
- subs r4,r4,r12
- lao r12,n_allocated_words,6
- ldo r3,r12,n_allocated_words,6
- add r4,r4,r3,lsl #2
+ mov BSTACK_0,HEAP_PTR
+ lao SCRATCH_REG,heap_p3,8
+ ldo SCRATCH_REG,SCRATCH_REG,heap_p3,8
+ subs BSTACK_0,BSTACK_0,SCRATCH_REG
+ lao SCRATCH_REG,n_allocated_words,6
+ ldo BSTACK_1,SCRATCH_REG,n_allocated_words,6
+ add BSTACK_0,BSTACK_0,BSTACK_1,lsl #2
b end_garbage_collect
.thumb_func
@@ -3172,35 +3165,35 @@ stack_overflow:
str lr,[sp,#-4]!
bl add_execute_time
- lao r8,stack_overflow_string,0
- otoa r8,stack_overflow_string,0
+ lao ASTACK_2,stack_overflow_string,0
+ otoa ASTACK_2,stack_overflow_string,0
b print_error
IO_error:
- str r0,[sp]
+ str BSTACK_4,[sp]
- lao r0,IO_error_string,0
- otoa r0,IO_error_string,0
+ lao BSTACK_4,IO_error_string,0
+ otoa BSTACK_4,IO_error_string,0
bl ew_print_string
- ldr r0,[sp],#4
+ ldr BSTACK_4,[sp],#4
bl ew_print_string
- lao r0,new_line_string,0
- otoa r0,new_line_string,0
+ lao BSTACK_4,new_line_string,0
+ otoa BSTACK_4,new_line_string,0
bl ew_print_string
b halt
.thumb_func
print_error:
- mov r0,r8
+ mov BSTACK_4,ASTACK_2
bl ew_print_string
.thumb_func
halt:
- lao r12,halt_sp,3
- ldo sp,r12,halt_sp,3
+ lao SCRATCH_REG,halt_sp,3
+ ldo sp,SCRATCH_REG,halt_sp,3
.ifdef PROFILE
.align
@@ -3260,22 +3253,22 @@ halt:
e__system__eaind:
.thumb_func
eval_fill:
- str r6,[r9],#4
- mov r6,r7
- ldr r12,[r7]
+ str ASTACK_0,[ASTACK_PTR],#4
+ mov ASTACK_0,ASTACK_1
+ ldr SCRATCH_REG,[ASTACK_1]
.align
add lr,pc,#7
str lr,[sp,#-4]!
- blx r12
- mov r7,r6
- ldr r6,[r9,#-4]!
-
- ldr r8,[r7]
- str r8,[r6]
- ldr r8,[r7,#4]
- str r8,[r6,#4]
- ldr r8,[r7,#8]
- str r8,[r6,#8]
+ blx SCRATCH_REG
+ mov ASTACK_1,ASTACK_0
+ ldr ASTACK_0,[ASTACK_PTR,#-4]!
+
+ ldr ASTACK_2,[ASTACK_1]
+ str ASTACK_2,[ASTACK_0]
+ ldr ASTACK_2,[ASTACK_1,#4]
+ str ASTACK_2,[ASTACK_0,#4]
+ ldr ASTACK_2,[ASTACK_1,#8]
+ str ASTACK_2,[ASTACK_0,#8]
ldr pc,[sp],#4
.p2align 2
@@ -3292,49 +3285,49 @@ eval_fill:
e__system__nind:
.thumb_func
__indirection:
- ldr r7,[r6,#4]
- ldr r4,[r7]
- tst r4,#2
+ ldr ASTACK_1,[ASTACK_0,#4]
+ ldr BSTACK_0,[ASTACK_1]
+ tst BSTACK_0,#2
.if MARK_GC
beq eval_fill2
.else
beq __cycle__in__spine
.endif
- str r4,[r6]
- ldr r8,[r7,#4]
- str r8,[r6,#4]
- ldr r8,[r7,#8]
- str r8,[r6,#8]
+ str BSTACK_0,[ASTACK_0]
+ ldr ASTACK_2,[ASTACK_1,#4]
+ str ASTACK_2,[ASTACK_0,#4]
+ ldr ASTACK_2,[ASTACK_1,#8]
+ str ASTACK_2,[ASTACK_0,#8]
ldr pc,[sp],#4
.if MARK_GC
eval_fill2:
- lao r12,__cycle__in__spine,0
- otoa r12,__cycle__in__spine,0
- str r12,[r6]
- str r6,[r9]
+ lao SCRATCH_REG,__cycle__in__spine,0
+ otoa SCRATCH_REG,__cycle__in__spine,0
+ str SCRATCH_REG,[ASTACK_0]
+ str ASTACK_0,[ASTACK_PTR]
.if MARK_AND_COPY_GC
- lao r12,flags,14
- ldo r12,r12,flags,14
- tst r12,#64
+ lao SCRATCH_REG,flags,14
+ ldo SCRATCH_REG,SCRATCH_REG,flags,14
+ tst SCRATCH_REG,#64
beq __cycle__in__spine
.endif
- add r9,r9,#4
- mov r6,r7
+ add ASTACK_PTR,ASTACK_PTR,#4
+ mov ASTACK_0,ASTACK_1
.align
add lr,pc,#7
str lr,[sp,#-4]!
- blx r4
- mov r7,r6
- ldr r6,[r9,#-4]!
-
- ldr r8,[r7]
- str r8,[r6]
- ldr r8,[r7,#4]
- str r8,[r6,#4]
- ldr r8,[r7,#8]
- str r8,[r6,#8]
+ blx BSTACK_0
+ mov ASTACK_1,ASTACK_0
+ ldr ASTACK_0,[ASTACK_PTR,#-4]!
+
+ ldr ASTACK_2,[ASTACK_1]
+ str ASTACK_2,[ASTACK_0]
+ ldr ASTACK_2,[ASTACK_1,#4]
+ str ASTACK_2,[ASTACK_0,#4]
+ ldr ASTACK_2,[ASTACK_1,#8]
+ str ASTACK_2,[ASTACK_0,#8]
ldr pc,[sp],#4
.endif
@@ -3343,182 +3336,182 @@ eval_fill2:
add lr,pc,#9
str lr,[sp,#-4]!
bl profile_n
- mov r8,r4
+ mov ASTACK_2,BSTACK_0
.endif
eval_upd_0:
- lao r12,e__system__nind,0
- otoa r12,e__system__nind,0
- str r12,[r7]
- str r6,[r7,#4]
- mov pc,r11
+ lao SCRATCH_REG,e__system__nind,0
+ otoa SCRATCH_REG,e__system__nind,0
+ str SCRATCH_REG,[ASTACK_1]
+ str ASTACK_0,[ASTACK_1,#4]
+ mov pc,ASTACK_3
.ifdef PROFILE
.align
add lr,pc,#9
str lr,[sp,#-4]!
bl profile_n
- mov r8,r4
+ mov ASTACK_2,BSTACK_0
.endif
eval_upd_1:
- lao r12,e__system__nind,1
- otoa r12,e__system__nind,1
- str r12,[r7]
- ldr r4,[r7,#4]
- str r6,[r7,#4]
- mov r7,r4
- mov pc,r11
+ lao SCRATCH_REG,e__system__nind,1
+ otoa SCRATCH_REG,e__system__nind,1
+ str SCRATCH_REG,[ASTACK_1]
+ ldr BSTACK_0,[ASTACK_1,#4]
+ str ASTACK_0,[ASTACK_1,#4]
+ mov ASTACK_1,BSTACK_0
+ mov pc,ASTACK_3
.ifdef PROFILE
.align
add lr,pc,#9
str lr,[sp,#-4]!
bl profile_n
- mov r8,r4
+ mov ASTACK_2,BSTACK_0
.endif
eval_upd_2:
- lao r12,e__system__nind,2
- otoa r12,e__system__nind,2
- str r12,[r7]
- ldr r8,[r7,#4]
- str r6,[r7,#4]
- ldr r7,[r7,#8]
- mov pc,r11
+ lao SCRATCH_REG,e__system__nind,2
+ otoa SCRATCH_REG,e__system__nind,2
+ str SCRATCH_REG,[ASTACK_1]
+ ldr ASTACK_2,[ASTACK_1,#4]
+ str ASTACK_0,[ASTACK_1,#4]
+ ldr ASTACK_1,[ASTACK_1,#8]
+ mov pc,ASTACK_3
.ifdef PROFILE
.align
add lr,pc,#9
str lr,[sp,#-4]!
bl profile_n
- mov r8,r4
+ mov ASTACK_2,BSTACK_0
.endif
eval_upd_3:
- lao r12,e__system__nind,3
- otoa r12,e__system__nind,3
- str r12,[r7]
- ldr r8,[r7,#4]
- str r6,[r7,#4]
- str r6,[r9],#4
- ldr r6,[r7,#12]
- ldr r7,[r7,#8]
- mov pc,r11
+ lao SCRATCH_REG,e__system__nind,3
+ otoa SCRATCH_REG,e__system__nind,3
+ str SCRATCH_REG,[ASTACK_1]
+ ldr ASTACK_2,[ASTACK_1,#4]
+ str ASTACK_0,[ASTACK_1,#4]
+ str ASTACK_0,[ASTACK_PTR],#4
+ ldr ASTACK_0,[ASTACK_1,#12]
+ ldr ASTACK_1,[ASTACK_1,#8]
+ mov pc,ASTACK_3
.ifdef PROFILE
.align
add lr,pc,#9
str lr,[sp,#-4]!
bl profile_n
- mov r8,r4
+ mov ASTACK_2,BSTACK_0
.endif
eval_upd_4:
- lao r12,e__system__nind,4
- otoa r12,e__system__nind,4
- str r12,[r7]
- ldr r8,[r7,#4]
- str r6,[r7,#4]
- str r6,[r9]
- ldr r3,[r7,#16]
- str r3,[r9,#4]
- add r9,r9,#8
- ldr r6,[r7,#12]
- ldr r7,[r7,#8]
- mov pc,r11
+ lao SCRATCH_REG,e__system__nind,4
+ otoa SCRATCH_REG,e__system__nind,4
+ str SCRATCH_REG,[ASTACK_1]
+ ldr ASTACK_2,[ASTACK_1,#4]
+ str ASTACK_0,[ASTACK_1,#4]
+ str ASTACK_0,[ASTACK_PTR]
+ ldr BSTACK_1,[ASTACK_1,#16]
+ str BSTACK_1,[ASTACK_PTR,#4]
+ add ASTACK_PTR,ASTACK_PTR,#8
+ ldr ASTACK_0,[ASTACK_1,#12]
+ ldr ASTACK_1,[ASTACK_1,#8]
+ mov pc,ASTACK_3
.ifdef PROFILE
.align
add lr,pc,#9
str lr,[sp,#-4]!
bl profile_n
- mov r8,r4
+ mov ASTACK_2,BSTACK_0
.endif
eval_upd_5:
- lao r12,e__system__nind,5
- otoa r12,e__system__nind,5
- str r12,[r7]
- ldr r8,[r7,#4]
- str r6,[r9]
- str r6,[r7,#4]
- ldr r3,[r7,#20]
- str r3,[r9,#4]
- ldr r3,[r7,#16]
- str r3,[r9,#8]
- add r9,r9,#12
- ldr r6,[r7,#12]
- ldr r7,[r7,#8]
- mov pc,r11
+ lao SCRATCH_REG,e__system__nind,5
+ otoa SCRATCH_REG,e__system__nind,5
+ str SCRATCH_REG,[ASTACK_1]
+ ldr ASTACK_2,[ASTACK_1,#4]
+ str ASTACK_0,[ASTACK_PTR]
+ str ASTACK_0,[ASTACK_1,#4]
+ ldr BSTACK_1,[ASTACK_1,#20]
+ str BSTACK_1,[ASTACK_PTR,#4]
+ ldr BSTACK_1,[ASTACK_1,#16]
+ str BSTACK_1,[ASTACK_PTR,#8]
+ add ASTACK_PTR,ASTACK_PTR,#12
+ ldr ASTACK_0,[ASTACK_1,#12]
+ ldr ASTACK_1,[ASTACK_1,#8]
+ mov pc,ASTACK_3
.ifdef PROFILE
.align
add lr,pc,#9
str lr,[sp,#-4]!
bl profile_n
- mov r8,r4
+ mov ASTACK_2,BSTACK_0
.endif
eval_upd_6:
- lao r12,e__system__nind,6
- otoa r12,e__system__nind,6
- str r12,[r7]
- ldr r8,[r7,#4]
- str r6,[r9]
- str r6,[r7,#4]
- ldr r3,[r7,#24]
- str r3,[r9,#4]
- ldr r3,[r7,#20]
- str r3,[r9,#8]
- ldr r3,[r7,#16]
- str r3,[r9,#12]
- add r9,r9,#16
- ldr r6,[r7,#12]
- ldr r7,[r7,#8]
- mov pc,r11
+ lao SCRATCH_REG,e__system__nind,6
+ otoa SCRATCH_REG,e__system__nind,6
+ str SCRATCH_REG,[ASTACK_1]
+ ldr ASTACK_2,[ASTACK_1,#4]
+ str ASTACK_0,[ASTACK_PTR]
+ str ASTACK_0,[ASTACK_1,#4]
+ ldr BSTACK_1,[ASTACK_1,#24]
+ str BSTACK_1,[ASTACK_PTR,#4]
+ ldr BSTACK_1,[ASTACK_1,#20]
+ str BSTACK_1,[ASTACK_PTR,#8]
+ ldr BSTACK_1,[ASTACK_1,#16]
+ str BSTACK_1,[ASTACK_PTR,#12]
+ add ASTACK_PTR,ASTACK_PTR,#16
+ ldr ASTACK_0,[ASTACK_1,#12]
+ ldr ASTACK_1,[ASTACK_1,#8]
+ mov pc,ASTACK_3
.ifdef PROFILE
.align
add lr,pc,#9
str lr,[sp,#-4]!
bl profile_n
- mov r8,r4
+ mov ASTACK_2,BSTACK_0
.endif
eval_upd_7:
- mov r4,#0
- mov r3,#20
+ mov BSTACK_0,#0
+ mov BSTACK_1,#20
.thumb_func
eval_upd_n:
- lao r12,e__system__nind,7
- otoa r12,e__system__nind,7
- add r2,r7,r3
- str r12,[r7]
- ldr r8,[r7,#4]
- str r6,[r9]
- str r6,[r7,#4]
- ldr r3,[r2,#8]
- str r3,[r9,#4]
- ldr r3,[r2,#4]
- str r3,[r9,#8]
- ldr r3,[r2]
- str r3,[r9,#12]
- add r9,r9,#16
+ lao SCRATCH_REG,e__system__nind,7
+ otoa SCRATCH_REG,e__system__nind,7
+ add BSTACK_2,ASTACK_1,BSTACK_1
+ str SCRATCH_REG,[ASTACK_1]
+ ldr ASTACK_2,[ASTACK_1,#4]
+ str ASTACK_0,[ASTACK_PTR]
+ str ASTACK_0,[ASTACK_1,#4]
+ ldr BSTACK_1,[BSTACK_2,#8]
+ str BSTACK_1,[ASTACK_PTR,#4]
+ ldr BSTACK_1,[BSTACK_2,#4]
+ str BSTACK_1,[ASTACK_PTR,#8]
+ ldr BSTACK_1,[BSTACK_2]
+ str BSTACK_1,[ASTACK_PTR,#12]
+ add ASTACK_PTR,ASTACK_PTR,#16
.thumb_func
eval_upd_n_lp:
- ldr r3,[r2,#-4]!
- str r3,[r9],#4
- subs r4,r4,#1
+ ldr BSTACK_1,[BSTACK_2,#-4]!
+ str BSTACK_1,[ASTACK_PTR],#4
+ subs BSTACK_0,BSTACK_0,#1
bcs eval_upd_n_lp
- ldr r6,[r7,#12]
- ldr r7,[r7,#8]
- mov pc,r11
+ ldr ASTACK_0,[ASTACK_1,#12]
+ ldr ASTACK_1,[ASTACK_1,#8]
+ mov pc,ASTACK_3
.ifdef PROFILE
.align
add lr,pc,#9
str lr,[sp,#-4]!
bl profile_n
- mov r8,r4
+ mov ASTACK_2,BSTACK_0
.endif
eval_upd_8:
- mov r4,#1
- mov r3,#24
+ mov BSTACK_0,#1
+ mov BSTACK_1,#24
b eval_upd_n
.ifdef PROFILE
@@ -3526,11 +3519,11 @@ eval_upd_8:
add lr,pc,#9
str lr,[sp,#-4]!
bl profile_n
- mov r8,r4
+ mov ASTACK_2,BSTACK_0
.endif
eval_upd_9:
- mov r4,#2
- mov r3,#28
+ mov BSTACK_0,#2
+ mov BSTACK_1,#28
b eval_upd_n
.ifdef PROFILE
@@ -3538,11 +3531,11 @@ eval_upd_9:
add lr,pc,#9
str lr,[sp,#-4]!
bl profile_n
- mov r8,r4
+ mov ASTACK_2,BSTACK_0
.endif
eval_upd_10:
- mov r4,#3
- mov r3,#32
+ mov BSTACK_0,#3
+ mov BSTACK_1,#32
b eval_upd_n
.ifdef PROFILE
@@ -3550,11 +3543,11 @@ eval_upd_10:
add lr,pc,#9
str lr,[sp,#-4]!
bl profile_n
- mov r8,r4
+ mov ASTACK_2,BSTACK_0
.endif
eval_upd_11:
- mov r4,#4
- mov r3,#36
+ mov BSTACK_0,#4
+ mov BSTACK_1,#36
b eval_upd_n
.ifdef PROFILE
@@ -3562,11 +3555,11 @@ eval_upd_11:
add lr,pc,#9
str lr,[sp,#-4]!
bl profile_n
- mov r8,r4
+ mov ASTACK_2,BSTACK_0
.endif
eval_upd_12:
- mov r4,#5
- mov r3,#40
+ mov BSTACK_0,#5
+ mov BSTACK_1,#40
b eval_upd_n
.ifdef PROFILE
@@ -3574,11 +3567,11 @@ eval_upd_12:
add lr,pc,#9
str lr,[sp,#-4]!
bl profile_n
- mov r8,r4
+ mov ASTACK_2,BSTACK_0
.endif
eval_upd_13:
- mov r4,#6
- mov r3,#44
+ mov BSTACK_0,#6
+ mov BSTACK_1,#44
b eval_upd_n
.ifdef PROFILE
@@ -3586,11 +3579,11 @@ eval_upd_13:
add lr,pc,#9
str lr,[sp,#-4]!
bl profile_n
- mov r8,r4
+ mov ASTACK_2,BSTACK_0
.endif
eval_upd_14:
- mov r4,#7
- mov r3,#48
+ mov BSTACK_0,#7
+ mov BSTACK_1,#48
b eval_upd_n
.ifdef PROFILE
@@ -3598,11 +3591,11 @@ eval_upd_14:
add lr,pc,#9
str lr,[sp,#-4]!
bl profile_n
- mov r8,r4
+ mov ASTACK_2,BSTACK_0
.endif
eval_upd_15:
- mov r4,#8
- mov r3,#52
+ mov BSTACK_0,#8
+ mov BSTACK_1,#52
b eval_upd_n
.ifdef PROFILE
@@ -3610,11 +3603,11 @@ eval_upd_15:
add lr,pc,#9
str lr,[sp,#-4]!
bl profile_n
- mov r8,r4
+ mov ASTACK_2,BSTACK_0
.endif
eval_upd_16:
- mov r4,#9
- mov r3,#56
+ mov BSTACK_0,#9
+ mov BSTACK_1,#56
b eval_upd_n
.ifdef PROFILE
@@ -3622,11 +3615,11 @@ eval_upd_16:
add lr,pc,#9
str lr,[sp,#-4]!
bl profile_n
- mov r8,r4
+ mov ASTACK_2,BSTACK_0
.endif
eval_upd_17:
- mov r4,#10
- mov r3,#60
+ mov BSTACK_0,#10
+ mov BSTACK_1,#60
b eval_upd_n
.ifdef PROFILE
@@ -3634,11 +3627,11 @@ eval_upd_17:
add lr,pc,#9
str lr,[sp,#-4]!
bl profile_n
- mov r8,r4
+ mov ASTACK_2,BSTACK_0
.endif
eval_upd_18:
- mov r4,#11
- mov r3,#64
+ mov BSTACK_0,#11
+ mov BSTACK_1,#64
b eval_upd_n
.ifdef PROFILE
@@ -3646,11 +3639,11 @@ eval_upd_18:
add lr,pc,#9
str lr,[sp,#-4]!
bl profile_n
- mov r8,r4
+ mov ASTACK_2,BSTACK_0
.endif
eval_upd_19:
- mov r4,#12
- mov r3,#68
+ mov BSTACK_0,#12
+ mov BSTACK_1,#68
b eval_upd_n
.ifdef PROFILE
@@ -3658,11 +3651,11 @@ eval_upd_19:
add lr,pc,#9
str lr,[sp,#-4]!
bl profile_n
- mov r8,r4
+ mov ASTACK_2,BSTACK_0
.endif
eval_upd_20:
- mov r4,#13
- mov r3,#72
+ mov BSTACK_0,#13
+ mov BSTACK_1,#72
b eval_upd_n
.ifdef PROFILE
@@ -3670,11 +3663,11 @@ eval_upd_20:
add lr,pc,#9
str lr,[sp,#-4]!
bl profile_n
- mov r8,r4
+ mov ASTACK_2,BSTACK_0
.endif
eval_upd_21:
- mov r4,#14
- mov r3,#76
+ mov BSTACK_0,#14
+ mov BSTACK_1,#76
b eval_upd_n
.ifdef PROFILE
@@ -3682,11 +3675,11 @@ eval_upd_21:
add lr,pc,#9
str lr,[sp,#-4]!
bl profile_n
- mov r8,r4
+ mov ASTACK_2,BSTACK_0
.endif
eval_upd_22:
- mov r4,#15
- mov r3,#80
+ mov BSTACK_0,#15
+ mov BSTACK_1,#80
b eval_upd_n
.ifdef PROFILE
@@ -3694,11 +3687,11 @@ eval_upd_22:
add lr,pc,#9
str lr,[sp,#-4]!
bl profile_n
- mov r8,r4
+ mov ASTACK_2,BSTACK_0
.endif
eval_upd_23:
- mov r4,#16
- mov r3,#84
+ mov BSTACK_0,#16
+ mov BSTACK_1,#84
b eval_upd_n
.ifdef PROFILE
@@ -3706,11 +3699,11 @@ eval_upd_23:
add lr,pc,#9
str lr,[sp,#-4]!
bl profile_n
- mov r8,r4
+ mov ASTACK_2,BSTACK_0
.endif
eval_upd_24:
- mov r4,#17
- mov r3,#88
+ mov BSTACK_0,#17
+ mov BSTACK_1,#88
b eval_upd_n
.ifdef PROFILE
@@ -3718,11 +3711,11 @@ eval_upd_24:
add lr,pc,#9
str lr,[sp,#-4]!
bl profile_n
- mov r8,r4
+ mov ASTACK_2,BSTACK_0
.endif
eval_upd_25:
- mov r4,#18
- mov r3,#92
+ mov BSTACK_0,#18
+ mov BSTACK_1,#92
b eval_upd_n
.ifdef PROFILE
@@ -3730,11 +3723,11 @@ eval_upd_25:
add lr,pc,#9
str lr,[sp,#-4]!
bl profile_n
- mov r8,r4
+ mov ASTACK_2,BSTACK_0
.endif
eval_upd_26:
- mov r4,#19
- mov r3,#96
+ mov BSTACK_0,#19
+ mov BSTACK_1,#96
b eval_upd_n
.ifdef PROFILE
@@ -3742,11 +3735,11 @@ eval_upd_26:
add lr,pc,#9
str lr,[sp,#-4]!
bl profile_n
- mov r8,r4
+ mov ASTACK_2,BSTACK_0
.endif
eval_upd_27:
- mov r4,#20
- mov r3,#100
+ mov BSTACK_0,#20
+ mov BSTACK_1,#100
b eval_upd_n
.ifdef PROFILE
@@ -3754,11 +3747,11 @@ eval_upd_27:
add lr,pc,#9
str lr,[sp,#-4]!
bl profile_n
- mov r8,r4
+ mov ASTACK_2,BSTACK_0
.endif
eval_upd_28:
- mov r4,#21
- mov r3,#104
+ mov BSTACK_0,#21
+ mov BSTACK_1,#104
b eval_upd_n
.ifdef PROFILE
@@ -3766,11 +3759,11 @@ eval_upd_28:
add lr,pc,#9
str lr,[sp,#-4]!
bl profile_n
- mov r8,r4
+ mov ASTACK_2,BSTACK_0
.endif
eval_upd_29:
- mov r4,#22
- mov r3,#108
+ mov BSTACK_0,#22
+ mov BSTACK_1,#108
b eval_upd_n
.ifdef PROFILE
@@ -3778,11 +3771,11 @@ eval_upd_29:
add lr,pc,#9
str lr,[sp,#-4]!
bl profile_n
- mov r8,r4
+ mov ASTACK_2,BSTACK_0
.endif
eval_upd_30:
- mov r4,#23
- mov r3,#112
+ mov BSTACK_0,#23
+ mov BSTACK_1,#112
b eval_upd_n
.ifdef PROFILE
@@ -3790,11 +3783,11 @@ eval_upd_30:
add lr,pc,#9
str lr,[sp,#-4]!
bl profile_n
- mov r8,r4
+ mov ASTACK_2,BSTACK_0
.endif
eval_upd_31:
- mov r4,#24
- mov r3,#116
+ mov BSTACK_0,#24
+ mov BSTACK_1,#116
b eval_upd_n
.ifdef PROFILE
@@ -3802,11 +3795,11 @@ eval_upd_31:
add lr,pc,#9
str lr,[sp,#-4]!
bl profile_n
- mov r8,r4
+ mov ASTACK_2,BSTACK_0
.endif
eval_upd_32:
- mov r4,#25
- mov r3,#120
+ mov BSTACK_0,#25
+ mov BSTACK_1,#120
b eval_upd_n
@
@@ -3814,76 +3807,76 @@ eval_upd_32:
@
.section .text. (catAC)
catAC:
- ldr r4,[r6,#4]
- ldr r3,[r7,#4]
- add r8,r4,r3
- add r8,r8,#8+3
- lsr r8,r8,#2
+ ldr BSTACK_0,[ASTACK_0,#4]
+ ldr BSTACK_1,[ASTACK_1,#4]
+ add ASTACK_2,BSTACK_0,BSTACK_1
+ add ASTACK_2,ASTACK_2,#8+3
+ lsr ASTACK_2,ASTACK_2,#2
- subs r5,r5,r8
+ subs HEAP_FREE,HEAP_FREE,ASTACK_2
blo gc_3
gc_r_3:
- add r6,r6,#8
- add r7,r7,#8
+ add ASTACK_0,ASTACK_0,#8
+ add ASTACK_1,ASTACK_1,#8
@ fill_node
- str r10,[sp,#-4]!
- laol r12,__STRING__+2,__STRING___o_2,1
- otoa r12,__STRING___o_2,1
- str r12,[r10]
+ str HEAP_PTR,[sp,#-4]!
+ laol SCRATCH_REG,__STRING__+2,__STRING___o_2,1
+ otoa SCRATCH_REG,__STRING___o_2,1
+ str SCRATCH_REG,[HEAP_PTR]
@ store length
- add r8,r4,r3
- str r8,[r10,#4]
- add r10,r10,#8
+ add ASTACK_2,BSTACK_0,BSTACK_1
+ str ASTACK_2,[HEAP_PTR,#4]
+ add HEAP_PTR,HEAP_PTR,#8
@ copy string 1
- add r8,r3,#3
- add r3,r3,r10
- lsrs r8,r8,#2
+ add ASTACK_2,BSTACK_1,#3
+ add BSTACK_1,BSTACK_1,HEAP_PTR
+ lsrs ASTACK_2,ASTACK_2,#2
beq catAC_after_copy_lp1
catAC_copy_lp1:
- ldr r12,[r7],#4
- str r12,[r10],#4
- subs r8,r8,#1
+ ldr SCRATCH_REG,[ASTACK_1],#4
+ str SCRATCH_REG,[HEAP_PTR],#4
+ subs ASTACK_2,ASTACK_2,#1
bne catAC_copy_lp1
catAC_after_copy_lp1:
- mov r10,r3
+ mov HEAP_PTR,BSTACK_1
@ copy_string 2
cat_string_6:
- lsrs r8,r4,#2
+ lsrs ASTACK_2,BSTACK_0,#2
beq cat_string_9
cat_string_7:
- ldr r3,[r6],#4
+ ldr BSTACK_1,[ASTACK_0],#4
@ store not aligned
- str r3,[r10],#4
- subs r8,r8,#1
+ str BSTACK_1,[HEAP_PTR],#4
+ subs ASTACK_2,ASTACK_2,#1
bne cat_string_7
cat_string_9:
- tst r4,#2
+ tst BSTACK_0,#2
beq cat_string_10
- ldrh r3,[r6],#2
- strh r3,[r10],#2
+ ldrh BSTACK_1,[ASTACK_0],#2
+ strh BSTACK_1,[HEAP_PTR],#2
cat_string_10:
- tst r4,#1
+ tst BSTACK_0,#1
beq cat_string_11
- ldrb r3,[r6]
- strb r3,[r10],#1
+ ldrb BSTACK_1,[ASTACK_0]
+ strb BSTACK_1,[HEAP_PTR],#1
cat_string_11:
- ldr r6,[sp],#4
+ ldr ASTACK_0,[sp],#4
@ align heap pointer
- add r10,r10,#3
- and r10,r10,#-4
+ add HEAP_PTR,HEAP_PTR,#3
+ and HEAP_PTR,HEAP_PTR,#-4
ldr pc,[sp],#4
gc_3: bl collect_2
@@ -3891,8 +3884,8 @@ gc_3: bl collect_2
.thumb_func
empty_string:
- lao r6,zero_length_string,0
- otoa r6,zero_length_string,0
+ lao ASTACK_0,zero_length_string,0
+ otoa ASTACK_0,zero_length_string,0
ldr pc,[sp],#4
.ifdef PIC
@@ -3902,49 +3895,49 @@ empty_string:
.section .text.sliceAC,"ax"
sliceAC:
- ldr r8,[r6,#4]
- tst r3,r3
+ ldr ASTACK_2,[ASTACK_0,#4]
+ tst BSTACK_1,BSTACK_1
bpl slice_string_1
- mov r3,#0
+ mov BSTACK_1,#0
slice_string_1:
- cmp r3,r8
+ cmp BSTACK_1,ASTACK_2
bge empty_string
- cmp r4,r3
+ cmp BSTACK_0,BSTACK_1
blt empty_string
- add r4,r4,#1
- cmp r4,r8
+ add BSTACK_0,BSTACK_0,#1
+ cmp BSTACK_0,ASTACK_2
ble slice_string_2
- mov r4,r8
+ mov BSTACK_0,ASTACK_2
slice_string_2:
- subs r4,r4,r3
+ subs BSTACK_0,BSTACK_0,BSTACK_1
- add r8,r4,#8+3
- lsr r8,r8,#2
+ add ASTACK_2,BSTACK_0,#8+3
+ lsr ASTACK_2,ASTACK_2,#2
- subs r5,r5,r8
+ subs HEAP_FREE,HEAP_FREE,ASTACK_2
blo gc_4
r_gc_4:
- subs r8,r8,#2
- add r12,r6,#8
- add r7,r12,r3
+ subs ASTACK_2,ASTACK_2,#2
+ add SCRATCH_REG,ASTACK_0,#8
+ add ASTACK_1,SCRATCH_REG,BSTACK_1
- laol r12,__STRING__+2,__STRING___o_2,2
- otoa r12,__STRING___o_2,2
- str r12,[r10]
- str r4,[r10,#4]
+ laol SCRATCH_REG,__STRING__+2,__STRING___o_2,2
+ otoa SCRATCH_REG,__STRING___o_2,2
+ str SCRATCH_REG,[HEAP_PTR]
+ str BSTACK_0,[HEAP_PTR,#4]
@ copy part of string
- mov r6,r10
- add r10,r10,#8
+ mov ASTACK_0,HEAP_PTR
+ add HEAP_PTR,HEAP_PTR,#8
- cmp r8,#0
+ cmp ASTACK_2,#0
beq sliceAC_after_copy_lp
sliceAC_copy_lp:
@ load not aligned
- ldr r12,[r7],#4
- str r12,[r10],#4
- subs r8,r8,#1
+ ldr SCRATCH_REG,[ASTACK_1],#4
+ str SCRATCH_REG,[HEAP_PTR],#4
+ subs ASTACK_2,ASTACK_2,#1
bne sliceAC_copy_lp
sliceAC_after_copy_lp:
@@ -3952,8 +3945,8 @@ sliceAC_after_copy_lp:
gc_4:
bl collect_1
- add r8,r4,#8+3
- lsr r8,r8,#2
+ add ASTACK_2,BSTACK_0,#8+3
+ lsr ASTACK_2,ASTACK_2,#2
b r_gc_4
.ifdef PIC
@@ -3962,44 +3955,44 @@ gc_4:
.section .text.updateAC,"ax"
updateAC:
- ldr r8,[r6,#4]
- cmp r3,r8
+ ldr ASTACK_2,[ASTACK_0,#4]
+ cmp BSTACK_1,ASTACK_2
bhs update_string_error
- add r8,r8,#8+3
- lsr r8,r8,#2
+ add ASTACK_2,ASTACK_2,#8+3
+ lsr ASTACK_2,ASTACK_2,#2
- subs r5,r5,r8
+ subs HEAP_FREE,HEAP_FREE,ASTACK_2
blo gc_5
r_gc_5:
- ldr r8,[r6,#4]
- add r8,r8,#3
- lsr r8,r8,#2
+ ldr ASTACK_2,[ASTACK_0,#4]
+ add ASTACK_2,ASTACK_2,#3
+ lsr ASTACK_2,ASTACK_2,#2
- mov r7,r6
- mov r6,r10
+ mov ASTACK_1,ASTACK_0
+ mov ASTACK_0,HEAP_PTR
- laol r12,__STRING__+2,__STRING___o_2,3
- otoa r12,__STRING___o_2,3
- str r12,[r10]
- ldr r12,[r7,#4]
- add r7,r7,#8
- str r12,[r10,#4]
- add r10,r10,#8
+ laol SCRATCH_REG,__STRING__+2,__STRING___o_2,3
+ otoa SCRATCH_REG,__STRING___o_2,3
+ str SCRATCH_REG,[HEAP_PTR]
+ ldr SCRATCH_REG,[ASTACK_1,#4]
+ add ASTACK_1,ASTACK_1,#8
+ str SCRATCH_REG,[HEAP_PTR,#4]
+ add HEAP_PTR,HEAP_PTR,#8
- add r3,r3,r10
+ add BSTACK_1,BSTACK_1,HEAP_PTR
- cmp r8,#0
+ cmp ASTACK_2,#0
beq updateAC_after_copy_lp
updateAC_copy_lp:
- ldr r12,[r7],#4
- str r12,[r10],#4
- subs r8,r8,#1
+ ldr SCRATCH_REG,[ASTACK_1],#4
+ str SCRATCH_REG,[HEAP_PTR],#4
+ subs ASTACK_2,ASTACK_2,#1
bne updateAC_copy_lp
updateAC_after_copy_lp:
- strb r4,[r3]
+ strb BSTACK_0,[BSTACK_1]
ldr pc,[sp],#4
@@ -4008,12 +4001,12 @@ gc_5: bl collect_1
.thumb_func
update_string_error:
- lao r8,high_index_string,0
- otoa r8,high_index_string,0
- tst r4,r4
+ lao ASTACK_2,high_index_string,0
+ otoa ASTACK_2,high_index_string,0
+ tst BSTACK_0,BSTACK_0
bpl update_string_error_2
- lao r8,low_index_string,0
- otoa r8,low_index_string,0
+ lao ASTACK_2,low_index_string,0
+ otoa ASTACK_2,low_index_string,0
update_string_error_2:
b print_error
@@ -4025,170 +4018,170 @@ update_string_error_2:
.section .text.eqAC,"ax"
eqAC:
- ldr r4,[r6,#4]
- ldr r12,[r7,#4]
- cmp r4,r12
+ ldr BSTACK_0,[ASTACK_0,#4]
+ ldr SCRATCH_REG,[ASTACK_1,#4]
+ cmp BSTACK_0,SCRATCH_REG
bne equal_string_ne
- add r6,r6,#8
- add r7,r7,#8
- and r3,r4,#3
- lsrs r4,r4,#2
+ add ASTACK_0,ASTACK_0,#8
+ add ASTACK_1,ASTACK_1,#8
+ and BSTACK_1,BSTACK_0,#3
+ lsrs BSTACK_0,BSTACK_0,#2
beq equal_string_b
equal_string_1:
- ldr r8,[r6]
- ldr r12,[r7]
- cmp r8,r12
+ ldr ASTACK_2,[ASTACK_0]
+ ldr SCRATCH_REG,[ASTACK_1]
+ cmp ASTACK_2,SCRATCH_REG
bne equal_string_ne
- add r6,r6,#4
- add r7,r7,#4
- subs r4,r4,#1
+ add ASTACK_0,ASTACK_0,#4
+ add ASTACK_1,ASTACK_1,#4
+ subs BSTACK_0,BSTACK_0,#1
bne equal_string_1
.thumb_func
equal_string_b:
- tst r3,#2
+ tst BSTACK_1,#2
beq equal_string_2
- ldrh r4,[r6]
- ldrh r12,[r7]
- cmp r4,r12
+ ldrh BSTACK_0,[ASTACK_0]
+ ldrh SCRATCH_REG,[ASTACK_1]
+ cmp BSTACK_0,SCRATCH_REG
bne equal_string_ne
- add r6,r6,#2
- add r7,r7,#2
+ add ASTACK_0,ASTACK_0,#2
+ add ASTACK_1,ASTACK_1,#2
equal_string_2:
- tst r3,#1
+ tst BSTACK_1,#1
beq equal_string_eq
- ldrb r3,[r6]
- ldrb r12,[r7]
- cmp r3,r12
+ ldrb BSTACK_1,[ASTACK_0]
+ ldrb SCRATCH_REG,[ASTACK_1]
+ cmp BSTACK_1,SCRATCH_REG
bne equal_string_ne
.thumb_func
equal_string_eq:
- mov r4,#1
+ mov BSTACK_0,#1
ldr pc,[sp],#4
.thumb_func
equal_string_ne:
- mov r4,#0
+ mov BSTACK_0,#0
ldr pc,[sp],#4
.section .text.cmpAC,"ax"
cmpAC:
- ldr r3,[r6,#4]
- ldr r8,[r7,#4]
- add r6,r6,#8
- add r7,r7,#8
- cmp r8,r3
+ ldr BSTACK_1,[ASTACK_0,#4]
+ ldr ASTACK_2,[ASTACK_1,#4]
+ add ASTACK_0,ASTACK_0,#8
+ add ASTACK_1,ASTACK_1,#8
+ cmp ASTACK_2,BSTACK_1
blo cmp_string_less
bhi cmp_string_more
- mov r4,#0
+ mov BSTACK_0,#0
b cmp_string_chars
.thumb_func
cmp_string_more:
- mov r4,#1
+ mov BSTACK_0,#1
b cmp_string_chars
.thumb_func
cmp_string_less:
- mov r4,#-1
- mov r3,r8
+ mov BSTACK_0,#-1
+ mov BSTACK_1,ASTACK_2
b cmp_string_chars
cmp_string_1:
- ldr r8,[r7]
- ldr r12,[r6]
- cmp r8,r12
+ ldr ASTACK_2,[ASTACK_1]
+ ldr SCRATCH_REG,[ASTACK_0]
+ cmp ASTACK_2,SCRATCH_REG
bne cmp_string_ne4
- add r7,r7,#4
- add r6,r6,#4
+ add ASTACK_1,ASTACK_1,#4
+ add ASTACK_0,ASTACK_0,#4
.thumb_func
cmp_string_chars:
- subs r3,r3,#4
+ subs BSTACK_1,BSTACK_1,#4
bcs cmp_string_1
.thumb_func
cmp_string_b:
@ to do compare bytes using and instead of ldrb
- tst r3,#2
+ tst BSTACK_1,#2
beq cmp_string_2
- ldrb r8,[r7]
- ldrb r12,[r6]
- cmp r8,r12
+ ldrb ASTACK_2,[ASTACK_1]
+ ldrb SCRATCH_REG,[ASTACK_0]
+ cmp ASTACK_2,SCRATCH_REG
bne cmp_string_ne
- ldrb r8,[r7,#1]
- ldrb r12,[r6,#1]
- cmp r8,r12
+ ldrb ASTACK_2,[ASTACK_1,#1]
+ ldrb SCRATCH_REG,[ASTACK_0,#1]
+ cmp ASTACK_2,SCRATCH_REG
bne cmp_string_ne
- add r7,r7,#2
- add r6,r6,#2
+ add ASTACK_1,ASTACK_1,#2
+ add ASTACK_0,ASTACK_0,#2
cmp_string_2:
- tst r3,#1
+ tst BSTACK_1,#1
beq cmp_string_eq
- ldrb r8,[r7]
- ldrb r12,[r6]
- cmp r8,r12
+ ldrb ASTACK_2,[ASTACK_1]
+ ldrb SCRATCH_REG,[ASTACK_0]
+ cmp ASTACK_2,SCRATCH_REG
bne cmp_string_ne
.thumb_func
cmp_string_eq:
ldr pc,[sp],#4
cmp_string_ne4:
@ to do compare bytes using and instead of ldrb
- ldrb r3,[r7]
- ldrb r12,[r6]
- cmp r3,r12
+ ldrb BSTACK_1,[ASTACK_1]
+ ldrb SCRATCH_REG,[ASTACK_0]
+ cmp BSTACK_1,SCRATCH_REG
bne cmp_string_ne
- ldrb r3,[r7,#1]
- ldrb r12,[r6,#1]
- cmp r3,r12
+ ldrb BSTACK_1,[ASTACK_1,#1]
+ ldrb SCRATCH_REG,[ASTACK_0,#1]
+ cmp BSTACK_1,SCRATCH_REG
bne cmp_string_ne
- ldrb r3,[r7,#2]
- ldrb r12,[r6,#2]
- cmp r3,r12
+ ldrb BSTACK_1,[ASTACK_1,#2]
+ ldrb SCRATCH_REG,[ASTACK_0,#2]
+ cmp BSTACK_1,SCRATCH_REG
bne cmp_string_ne
- ldrb r3,[r7,#3]
- ldrb r12,[r6,#3]
- cmp r3,r12
+ ldrb BSTACK_1,[ASTACK_1,#3]
+ ldrb SCRATCH_REG,[ASTACK_0,#3]
+ cmp BSTACK_1,SCRATCH_REG
.thumb_func
cmp_string_ne:
bhi cmp_string_r1
- mov r4,#-1
+ mov BSTACK_0,#-1
ldr pc,[sp],#4
cmp_string_r1:
- mov r4,#1
+ mov BSTACK_0,#1
ldr pc,[sp],#4
.section .text.string_to_string_node,"ax"
.thumb_func
string_to_string_node:
- ldr r8,[r6],#4
+ ldr ASTACK_2,[ASTACK_0],#4
- add r4,r8,#3
- lsr r4,r4,#2
+ add BSTACK_0,ASTACK_2,#3
+ lsr BSTACK_0,BSTACK_0,#2
- add r12,r4,#2
- subs r5,r5,r12
+ add SCRATCH_REG,BSTACK_0,#2
+ subs HEAP_FREE,HEAP_FREE,SCRATCH_REG
blo string_to_string_node_gc
.thumb_func
string_to_string_node_r:
- laol r12,__STRING__+2,__STRING___o_2,4
- otoa r12,__STRING___o_2,4
- str r12,[r10]
- str r8,[r10,#4]
- mov r8,r10
- add r10,r10,#8
+ laol SCRATCH_REG,__STRING__+2,__STRING___o_2,4
+ otoa SCRATCH_REG,__STRING___o_2,4
+ str SCRATCH_REG,[HEAP_PTR]
+ str ASTACK_2,[HEAP_PTR,#4]
+ mov ASTACK_2,HEAP_PTR
+ add HEAP_PTR,HEAP_PTR,#8
b string_to_string_node_4
string_to_string_node_2:
- ldr r12,[r6],#4
- str r12,[r10],#4
+ ldr SCRATCH_REG,[ASTACK_0],#4
+ str SCRATCH_REG,[HEAP_PTR],#4
string_to_string_node_4:
- subs r4,r4,#1
+ subs BSTACK_0,BSTACK_0,#1
bge string_to_string_node_2
- mov r6,r8
+ mov ASTACK_0,ASTACK_2
ldr pc,[sp],#4
.thumb_func
string_to_string_node_gc:
- stmdb sp!,{r6,r8}
+ stmdb sp!,{ASTACK_0,ASTACK_2}
bl collect_0
- ldmia sp!,{r6,r8}
+ ldmia sp!,{ASTACK_0,ASTACK_2}
b string_to_string_node_r
.ifdef PIC
@@ -4198,40 +4191,40 @@ string_to_string_node_gc:
.section .text.int_array_to_node,"ax"
.thumb_func
int_array_to_node:
- ldr r4,[r6,#-8]
+ ldr BSTACK_0,[ASTACK_0,#-8]
- add r12,r4,#3
- subs r5,r5,r12
+ add SCRATCH_REG,BSTACK_0,#3
+ subs HEAP_FREE,HEAP_FREE,SCRATCH_REG
blo int_array_to_node_gc
.thumb_func
int_array_to_node_r:
- laol r12,__ARRAY__+2,__ARRAY___o_2,0
- otoa r12,__ARRAY___o_2,0
- str r12,[r10]
- mov r7,r6
- str r4,[r10,#4]
- mov r6,r10
- laol r12,INT+2,INT_o_2,3
- otoa r12,INT_o_2,3
- str r12,[r10,#8]
- add r10,r10,#12
+ laol SCRATCH_REG,__ARRAY__+2,__ARRAY___o_2,0
+ otoa SCRATCH_REG,__ARRAY___o_2,0
+ str SCRATCH_REG,[HEAP_PTR]
+ mov ASTACK_1,ASTACK_0
+ str BSTACK_0,[HEAP_PTR,#4]
+ mov ASTACK_0,HEAP_PTR
+ laol SCRATCH_REG,INT+2,INT_o_2,3
+ otoa SCRATCH_REG,INT_o_2,3
+ str SCRATCH_REG,[HEAP_PTR,#8]
+ add HEAP_PTR,HEAP_PTR,#12
b int_array_to_node_4
int_array_to_node_2:
- ldr r12,[r7],#4
- str r12,[r10],#4
+ ldr SCRATCH_REG,[ASTACK_1],#4
+ str SCRATCH_REG,[HEAP_PTR],#4
int_array_to_node_4:
- subs r4,r4,#1
+ subs BSTACK_0,BSTACK_0,#1
bge int_array_to_node_2
ldr pc,[sp],#4
.thumb_func
int_array_to_node_gc:
- str r6,[sp,#-4]!
+ str ASTACK_0,[sp,#-4]!
bl collect_0
- ldr r6,[sp],#4
+ ldr ASTACK_0,[sp],#4
b int_array_to_node_r
.ifdef PIC
@@ -4242,48 +4235,48 @@ int_array_to_node_gc:
.section .text.real_array_to_node,"ax"
.thumb_func
real_array_to_node:
- ldr r4,[r6,#-8]
+ ldr BSTACK_0,[ASTACK_0,#-8]
- add r12,r4,#3+1
- subs r5,r5,r12
+ add SCRATCH_REG,BSTACK_0,#3+1
+ subs HEAP_FREE,HEAP_FREE,SCRATCH_REG
blo real_array_to_node_gc
.thumb_func
real_array_to_node_r:
- tst r10,#4
- orr r10,r10,#4
+ tst HEAP_PTR,#4
+ orr HEAP_PTR,HEAP_PTR,#4
it ne
- addne r5,r5,#1
- mov r7,r6
- laol r12,__ARRAY__+2,__ARRAY___o_2,1
- otoa r12,__ARRAY___o_2,1
- str r12,[r10]
- str r4,[r10,#4]
- mov r6,r10
- laol r12,REAL+2,REAL_o_2,2
- otoa r12,REAL_o_2,2
- str r12,[r10,#8]
- add r10,r10,#12
+ addne HEAP_FREE,HEAP_FREE,#1
+ mov ASTACK_1,ASTACK_0
+ laol SCRATCH_REG,__ARRAY__+2,__ARRAY___o_2,1
+ otoa SCRATCH_REG,__ARRAY___o_2,1
+ str SCRATCH_REG,[HEAP_PTR]
+ str BSTACK_0,[HEAP_PTR,#4]
+ mov ASTACK_0,HEAP_PTR
+ laol SCRATCH_REG,REAL+2,REAL_o_2,2
+ otoa SCRATCH_REG,REAL_o_2,2
+ str SCRATCH_REG,[HEAP_PTR,#8]
+ add HEAP_PTR,HEAP_PTR,#12
b real_array_to_node_4
real_array_to_node_2:
- ldr r12,[r7]
- str r12,[r10]
- ldr r8,[r7,#4]
- add r7,r7,#8
- str r8,[r10,#4]
- add r10,r10,#8
+ ldr SCRATCH_REG,[ASTACK_1]
+ str SCRATCH_REG,[HEAP_PTR]
+ ldr ASTACK_2,[ASTACK_1,#4]
+ add ASTACK_1,ASTACK_1,#8
+ str ASTACK_2,[HEAP_PTR,#4]
+ add HEAP_PTR,HEAP_PTR,#8
real_array_to_node_4:
- subs r4,r4,#1
+ subs BSTACK_0,BSTACK_0,#1
bge real_array_to_node_2
ldr pc,[sp],#4
.thumb_func
real_array_to_node_gc:
- str r6,[sp,#-4]!
+ str ASTACK_0,[sp,#-4]!
bl collect_0
- ldr r6,[sp],#4
+ ldr ASTACK_0,[sp],#4
b real_array_to_node_r
.ifdef PIC
@@ -4389,720 +4382,720 @@ _c32: b __cycle__in__spine
@
_create_arrayB:
- add r3,r4,#3
- lsr r3,r3,#2
+ add BSTACK_1,BSTACK_0,#3
+ lsr BSTACK_1,BSTACK_1,#2
- add r12,r3,#3
- subs r5,r5,r12
+ add SCRATCH_REG,BSTACK_1,#3
+ subs HEAP_FREE,HEAP_FREE,SCRATCH_REG
bhs no_collect_4574
bl collect_0
no_collect_4574:
- mov r6,r10
- laol r12,__ARRAY__+2,__ARRAY___o_2,2
- otoa r12,__ARRAY___o_2,2
- str r12,[r10]
- str r4,[r10,#4]
- laol r12,BOOL+2,BOOL_o_2,2
- otoa r12,BOOL_o_2,2
- str r12,[r10,#8]
- add r12,r10,#12
- add r10,r12,r3,lsl #2
+ mov ASTACK_0,HEAP_PTR
+ laol SCRATCH_REG,__ARRAY__+2,__ARRAY___o_2,2
+ otoa SCRATCH_REG,__ARRAY___o_2,2
+ str SCRATCH_REG,[HEAP_PTR]
+ str BSTACK_0,[HEAP_PTR,#4]
+ laol SCRATCH_REG,BOOL+2,BOOL_o_2,2
+ otoa SCRATCH_REG,BOOL_o_2,2
+ str SCRATCH_REG,[HEAP_PTR,#8]
+ add SCRATCH_REG,HEAP_PTR,#12
+ add HEAP_PTR,SCRATCH_REG,BSTACK_1,lsl #2
ldr pc,[sp],#4
_create_arrayC:
- add r3,r4,#3
- lsr r3,r3,#2
+ add BSTACK_1,BSTACK_0,#3
+ lsr BSTACK_1,BSTACK_1,#2
- add r12,r3,#2
- subs r5,r5,r12
+ add SCRATCH_REG,BSTACK_1,#2
+ subs HEAP_FREE,HEAP_FREE,SCRATCH_REG
bhs no_collect_4573
bl collect_0
no_collect_4573:
- mov r6,r10
- laol r12,__STRING__+2,__STRING___o_2,5
- otoa r12,__STRING___o_2,5
- str r12,[r10]
- str r4,[r10,#4]
- add r12,r10,#8
- add r10,r12,r3,lsl #2
+ mov ASTACK_0,HEAP_PTR
+ laol SCRATCH_REG,__STRING__+2,__STRING___o_2,5
+ otoa SCRATCH_REG,__STRING___o_2,5
+ str SCRATCH_REG,[HEAP_PTR]
+ str BSTACK_0,[HEAP_PTR,#4]
+ add SCRATCH_REG,HEAP_PTR,#8
+ add HEAP_PTR,SCRATCH_REG,BSTACK_1,lsl #2
ldr pc,[sp],#4
_create_arrayI:
- add r12,r4,#3
- subs r5,r5,r12
+ add SCRATCH_REG,BSTACK_0,#3
+ subs HEAP_FREE,HEAP_FREE,SCRATCH_REG
bhs no_collect_4572
bl collect_0
no_collect_4572:
- mov r6,r10
- laol r12,__ARRAY__+2,__ARRAY___o_2,3
- otoa r12,__ARRAY___o_2,3
- str r12,[r10]
- str r4,[r10,#4]
- laol r12,INT+2,INT_o_2,4
- otoa r12,INT_o_2,4
- str r12,[r10,#8]
- add r12,r10,#12
- add r10,r12,r4,lsl #2
+ mov ASTACK_0,HEAP_PTR
+ laol SCRATCH_REG,__ARRAY__+2,__ARRAY___o_2,3
+ otoa SCRATCH_REG,__ARRAY___o_2,3
+ str SCRATCH_REG,[HEAP_PTR]
+ str BSTACK_0,[HEAP_PTR,#4]
+ laol SCRATCH_REG,INT+2,INT_o_2,4
+ otoa SCRATCH_REG,INT_o_2,4
+ str SCRATCH_REG,[HEAP_PTR,#8]
+ add SCRATCH_REG,HEAP_PTR,#12
+ add HEAP_PTR,SCRATCH_REG,BSTACK_0,lsl #2
ldr pc,[sp],#4
_create_arrayR:
- add r12,r4,r4
- add r12,r12,#3+1
- subs r5,r5,r12
+ add SCRATCH_REG,BSTACK_0,BSTACK_0
+ add SCRATCH_REG,SCRATCH_REG,#3+1
+ subs HEAP_FREE,HEAP_FREE,SCRATCH_REG
bhs no_collect_4580
bl collect_0
no_collect_4580:
- tst r10,#4
- orr r10,r10,#4
+ tst HEAP_PTR,#4
+ orr HEAP_PTR,HEAP_PTR,#4
it ne
- addne r5,r5,#1
- mov r6,r10
- laol r12,__ARRAY__+2,__ARRAY___o_2,4
- otoa r12,__ARRAY___o_2,4
- str r12,[r10]
- str r4,[r10,#4]
- laol r12,REAL+2,REAL_o_2,3
- otoa r12,REAL_o_2,3
- str r12,[r10,#8]
- add r12,r10,#12
- add r10,r12,r4,lsl #3
+ addne HEAP_FREE,HEAP_FREE,#1
+ mov ASTACK_0,HEAP_PTR
+ laol SCRATCH_REG,__ARRAY__+2,__ARRAY___o_2,4
+ otoa SCRATCH_REG,__ARRAY___o_2,4
+ str SCRATCH_REG,[HEAP_PTR]
+ str BSTACK_0,[HEAP_PTR,#4]
+ laol SCRATCH_REG,REAL+2,REAL_o_2,3
+ otoa SCRATCH_REG,REAL_o_2,3
+ str SCRATCH_REG,[HEAP_PTR,#8]
+ add SCRATCH_REG,HEAP_PTR,#12
+ add HEAP_PTR,SCRATCH_REG,BSTACK_0,lsl #3
ldr pc,[sp],#4
-@ r4: number of elements, r3: element descriptor
-@ r2: element size, r1: element a size, a0:a_element-> a0: array
+@ BSTACK_0: number of elements, BSTACK_1: element descriptor
+@ BSTACK_2: element size, BSTACK_3: element a size, a0:a_element-> a0: array
.thumb_func
_create_r_array:
- mul r12,r4,r2
- add r12,r12,#3
- subs r5,r5,r12
+ mul SCRATCH_REG,BSTACK_0,BSTACK_2
+ add SCRATCH_REG,SCRATCH_REG,#3
+ subs HEAP_FREE,HEAP_FREE,SCRATCH_REG
bhs no_collect_4586
bl collect_1
no_collect_4586:
- mov r8,r6
+ mov ASTACK_2,ASTACK_0
- laol r12,__ARRAY__+2,__ARRAY___o_2,5
- otoa r12,__ARRAY___o_2,5
- str r12,[r10]
- str r4,[r10,#4]
- str r3,[r10,#8]
+ laol SCRATCH_REG,__ARRAY__+2,__ARRAY___o_2,5
+ otoa SCRATCH_REG,__ARRAY___o_2,5
+ str SCRATCH_REG,[HEAP_PTR]
+ str BSTACK_0,[HEAP_PTR,#4]
+ str BSTACK_1,[HEAP_PTR,#8]
- mov r6,r10
- add r10,r10,#12
+ mov ASTACK_0,HEAP_PTR
+ add HEAP_PTR,HEAP_PTR,#12
-@ r4: number of elements, a0: array
-@ r2: element size, r1: element a size, a2:a_element
+@ BSTACK_0: number of elements, a0: array
+@ BSTACK_2: element size, BSTACK_3: element a size, a2:a_element
- cmp r1,#0
+ cmp BSTACK_3,#0
beq _create_r_array_0
- cmp r1,#2
+ cmp BSTACK_3,#2
blo _create_r_array_1
beq _create_r_array_2
- cmp r1,#4
+ cmp BSTACK_3,#4
blo _create_r_array_3
beq _create_r_array_4
b _create_r_array_5
_create_r_array_0:
- lsl r2,r2,#2
- mul r12,r4,r2
- add r10,r10,r12
+ lsl BSTACK_2,BSTACK_2,#2
+ mul SCRATCH_REG,BSTACK_0,BSTACK_2
+ add HEAP_PTR,HEAP_PTR,SCRATCH_REG
ldr pc,[sp],#4
_create_r_array_1:
- lsl r2,r2,#2
- b _st_fillr1_array
-_fillr1_array:
- str r8,[r10]
- add r10,r10,r2
-_st_fillr1_array:
- subs r4,r4,#1
- bcs _fillr1_array
+ lsl BSTACK_2,BSTACK_2,#2
+ b _st_fillBSTACK_3_array
+_fillBSTACK_3_array:
+ str ASTACK_2,[HEAP_PTR]
+ add HEAP_PTR,HEAP_PTR,BSTACK_2
+_st_fillBSTACK_3_array:
+ subs BSTACK_0,BSTACK_0,#1
+ bcs _fillBSTACK_3_array
ldr pc,[sp],#4
_create_r_array_2:
- lsl r2,r2,#2
- b _st_fillr2_array
-_fillr2_array:
- str r8,[r10]
- str r8,[r10,#4]
- add r10,r10,r2
-_st_fillr2_array:
- subs r4,r4,#1
- bcs _fillr2_array
+ lsl BSTACK_2,BSTACK_2,#2
+ b _st_fillBSTACK_2_array
+_fillBSTACK_2_array:
+ str ASTACK_2,[HEAP_PTR]
+ str ASTACK_2,[HEAP_PTR,#4]
+ add HEAP_PTR,HEAP_PTR,BSTACK_2
+_st_fillBSTACK_2_array:
+ subs BSTACK_0,BSTACK_0,#1
+ bcs _fillBSTACK_2_array
ldr pc,[sp],#4
_create_r_array_3:
- lsl r2,r2,#2
- b _st_fillr3_array
-_fillr3_array:
- str r8,[r10]
- str r8,[r10,#4]
- str r8,[r10,#8]
- add r10,r10,r2
-_st_fillr3_array:
- subs r4,r4,#1
- bcs _fillr3_array
+ lsl BSTACK_2,BSTACK_2,#2
+ b _st_fillBSTACK_1_array
+_fillBSTACK_1_array:
+ str ASTACK_2,[HEAP_PTR]
+ str ASTACK_2,[HEAP_PTR,#4]
+ str ASTACK_2,[HEAP_PTR,#8]
+ add HEAP_PTR,HEAP_PTR,BSTACK_2
+_st_fillBSTACK_1_array:
+ subs BSTACK_0,BSTACK_0,#1
+ bcs _fillBSTACK_1_array
ldr pc,[sp],#4
_create_r_array_4:
- lsl r2,r2,#2
- b _st_fillr4_array
-_fillr4_array:
- str r8,[r10]
- str r8,[r10,#4]
- str r8,[r10,#8]
- str r8,[r10,#12]
- add r10,r10,r2
-_st_fillr4_array:
- subs r4,r4,#1
- bcs _fillr4_array
+ lsl BSTACK_2,BSTACK_2,#2
+ b _st_fillBSTACK_0_array
+_fillBSTACK_0_array:
+ str ASTACK_2,[HEAP_PTR]
+ str ASTACK_2,[HEAP_PTR,#4]
+ str ASTACK_2,[HEAP_PTR,#8]
+ str ASTACK_2,[HEAP_PTR,#12]
+ add HEAP_PTR,HEAP_PTR,BSTACK_2
+_st_fillBSTACK_0_array:
+ subs BSTACK_0,BSTACK_0,#1
+ bcs _fillBSTACK_0_array
ldr pc,[sp],#4
_create_r_array_5:
- sub r2,r2,r1
- lsl r2,r2,#2
+ sub BSTACK_2,BSTACK_2,BSTACK_3
+ lsl BSTACK_2,BSTACK_2,#2
b _st_fillr5_array
_fillr5_array:
- str r8,[r10]
- str r8,[r10,#4]
- str r8,[r10,#8]
- str r8,[r10,#12]
- add r10,r10,#16
+ str ASTACK_2,[HEAP_PTR]
+ str ASTACK_2,[HEAP_PTR,#4]
+ str ASTACK_2,[HEAP_PTR,#8]
+ str ASTACK_2,[HEAP_PTR,#12]
+ add HEAP_PTR,HEAP_PTR,#16
- sub r3,r1,#5
+ sub BSTACK_1,BSTACK_3,#5
_copy_elem_5_lp:
- str r8,[r10],#4
- subs r3,r3,#1
+ str ASTACK_2,[HEAP_PTR],#4
+ subs BSTACK_1,BSTACK_1,#1
bcs _copy_elem_5_lp
- add r10,r10,r2
+ add HEAP_PTR,HEAP_PTR,BSTACK_2
_st_fillr5_array:
- subs r4,r4,#1
+ subs BSTACK_0,BSTACK_0,#1
bcs _fillr5_array
ldr pc,[sp],#4
create_arrayB:
- mov r7,r3
- add r3,r3,#3
- lsr r3,r3,#2
+ mov ASTACK_1,BSTACK_1
+ add BSTACK_1,BSTACK_1,#3
+ lsr BSTACK_1,BSTACK_1,#2
- add r12,r3,#3
- subs r5,r5,r12
+ add SCRATCH_REG,BSTACK_1,#3
+ subs HEAP_FREE,HEAP_FREE,SCRATCH_REG
bhs no_collect_4575
- str r7,[sp,#-4]!
+ str ASTACK_1,[sp,#-4]!
bl collect_0
- ldr r7,[sp],#4
+ ldr ASTACK_1,[sp],#4
no_collect_4575:
- orr r4,r4,r4,lsl #8
- orr r4,r4,r4,lsl #16
- mov r6,r10
- laol r12,__ARRAY__+2,__ARRAY___o_2,6
- otoa r12,__ARRAY___o_2,6
- str r12,[r10]
- str r7,[r10,#4]
- laol r12,BOOL+2,BOOL_o_2,3
- otoa r12,BOOL_o_2,3
- str r12,[r10,#8]
- add r10,r10,#12
+ orr BSTACK_0,BSTACK_0,BSTACK_0,lsl #8
+ orr BSTACK_0,BSTACK_0,BSTACK_0,lsl #16
+ mov ASTACK_0,HEAP_PTR
+ laol SCRATCH_REG,__ARRAY__+2,__ARRAY___o_2,6
+ otoa SCRATCH_REG,__ARRAY___o_2,6
+ str SCRATCH_REG,[HEAP_PTR]
+ str ASTACK_1,[HEAP_PTR,#4]
+ laol SCRATCH_REG,BOOL+2,BOOL_o_2,3
+ otoa SCRATCH_REG,BOOL_o_2,3
+ str SCRATCH_REG,[HEAP_PTR,#8]
+ add HEAP_PTR,HEAP_PTR,#12
b create_arrayBCI
create_arrayC:
- mov r7,r3
- add r3,r3,#3
- lsr r3,r3,#2
+ mov ASTACK_1,BSTACK_1
+ add BSTACK_1,BSTACK_1,#3
+ lsr BSTACK_1,BSTACK_1,#2
- add r12,r3,#2
- subs r5,r5,r12
+ add SCRATCH_REG,BSTACK_1,#2
+ subs HEAP_FREE,HEAP_FREE,SCRATCH_REG
bhs no_collect_4578
- str r7,[sp,#-4]!
+ str ASTACK_1,[sp,#-4]!
bl collect_0
- ldr r7,[sp],#4
+ ldr ASTACK_1,[sp],#4
no_collect_4578:
- orr r4,r4,r4,lsl #8
- orr r4,r4,r4,lsl #16
- mov r6,r10
- laol r12,__STRING__+2,__STRING___o_2,6
- otoa r12,__STRING___o_2,6
- str r12,[r10]
- str r7,[r10,#4]
- add r10,r10,#8
+ orr BSTACK_0,BSTACK_0,BSTACK_0,lsl #8
+ orr BSTACK_0,BSTACK_0,BSTACK_0,lsl #16
+ mov ASTACK_0,HEAP_PTR
+ laol SCRATCH_REG,__STRING__+2,__STRING___o_2,6
+ otoa SCRATCH_REG,__STRING___o_2,6
+ str SCRATCH_REG,[HEAP_PTR]
+ str ASTACK_1,[HEAP_PTR,#4]
+ add HEAP_PTR,HEAP_PTR,#8
b create_arrayBCI
create_arrayI:
- add r12,r3,#3
- subs r5,r5,r12
+ add SCRATCH_REG,BSTACK_1,#3
+ subs HEAP_FREE,HEAP_FREE,SCRATCH_REG
bhs no_collect_4577
bl collect_0
no_collect_4577:
- mov r6,r10
- laol r12,__ARRAY__+2,__ARRAY___o_2,7
- otoa r12,__ARRAY___o_2,7
- str r12,[r10]
- str r3,[r10,#4]
- laol r12,INT+2,INT_o_2,5
- otoa r12,INT_o_2,5
- str r12,[r10,#8]
- add r10,r10,#12
+ mov ASTACK_0,HEAP_PTR
+ laol SCRATCH_REG,__ARRAY__+2,__ARRAY___o_2,7
+ otoa SCRATCH_REG,__ARRAY___o_2,7
+ str SCRATCH_REG,[HEAP_PTR]
+ str BSTACK_1,[HEAP_PTR,#4]
+ laol SCRATCH_REG,INT+2,INT_o_2,5
+ otoa SCRATCH_REG,INT_o_2,5
+ str SCRATCH_REG,[HEAP_PTR,#8]
+ add HEAP_PTR,HEAP_PTR,#12
create_arrayBCI:
- tst r3,#1
- lsr r3,r3,#1
+ tst BSTACK_1,#1
+ lsr BSTACK_1,BSTACK_1,#1
beq st_filli_array
- str r4,[r10],#4
+ str BSTACK_0,[HEAP_PTR],#4
b st_filli_array
.thumb_func
filli_array:
- str r4,[r10]
- str r4,[r10,#4]
- add r10,r10,#8
+ str BSTACK_0,[HEAP_PTR]
+ str BSTACK_0,[HEAP_PTR,#4]
+ add HEAP_PTR,HEAP_PTR,#8
.thumb_func
st_filli_array:
- subs r3,r3,#1
+ subs BSTACK_1,BSTACK_1,#1
bcs filli_array
ldr pc,[sp],#4
create_arrayR:
- add r12,r4,r4
- add r12,r12,#3+1
+ add SCRATCH_REG,BSTACK_0,BSTACK_0
+ add SCRATCH_REG,SCRATCH_REG,#3+1
- vmov r3,r7,d0
+ vmov BSTACK_1,ASTACK_1,d0
- subs r5,r5,r12
+ subs HEAP_FREE,HEAP_FREE,SCRATCH_REG
bhs no_collect_4579
- str r7,[sp,#-4]!
+ str ASTACK_1,[sp,#-4]!
bl collect_0
- ldr r7,[sp],#4
+ ldr ASTACK_1,[sp],#4
no_collect_4579:
- tst r10,#4
- orr r10,r10,#4
+ tst HEAP_PTR,#4
+ orr HEAP_PTR,HEAP_PTR,#4
it ne
- addne r5,r5,#1
-
- mov r6,r10
- laol r12,__ARRAY__+2,__ARRAY___o_2,8
- otoa r12,__ARRAY___o_2,8
- str r12,[r10]
- str r4,[r10,#4]
- laol r12,REAL+2,REAL_o_2,4
- otoa r12,REAL_o_2,4
- str r12,[r10,#8]
- add r10,r10,#12
+ addne HEAP_FREE,HEAP_FREE,#1
+
+ mov ASTACK_0,HEAP_PTR
+ laol SCRATCH_REG,__ARRAY__+2,__ARRAY___o_2,8
+ otoa SCRATCH_REG,__ARRAY___o_2,8
+ str SCRATCH_REG,[HEAP_PTR]
+ str BSTACK_0,[HEAP_PTR,#4]
+ laol SCRATCH_REG,REAL+2,REAL_o_2,4
+ otoa SCRATCH_REG,REAL_o_2,4
+ str SCRATCH_REG,[HEAP_PTR,#8]
+ add HEAP_PTR,HEAP_PTR,#12
b st_fillr_array
.thumb_func
fillr_array:
- str r3,[r10]
- str r7,[r10,#4]
- add r10,r10,#8
+ str BSTACK_1,[HEAP_PTR]
+ str ASTACK_1,[HEAP_PTR,#4]
+ add HEAP_PTR,HEAP_PTR,#8
.thumb_func
st_fillr_array:
- subs r4,r4,#1
+ subs BSTACK_0,BSTACK_0,#1
bcs fillr_array
ldr pc,[sp],#4
.thumb_func
create_array:
- add r12,r4,#3
- subs r5,r5,r12
+ add SCRATCH_REG,BSTACK_0,#3
+ subs HEAP_FREE,HEAP_FREE,SCRATCH_REG
bhs no_collect_4576
bl collect_1
no_collect_4576:
- mov r3,r6
- mov r6,r10
- laol r12,__ARRAY__+2,__ARRAY___o_2,9
- otoa r12,__ARRAY___o_2,9
- str r12,[r10]
- str r4,[r10,#4]
- mov r12,#0
- str r12,[r10,#8]
- add r10,r10,#12
- mov r1,r4
- b fillr1_array
-
-@ in r4: number of elements, r3: element descriptor
-@ r2: element size, r1: element a size -> a0: array
+ mov BSTACK_1,ASTACK_0
+ mov ASTACK_0,HEAP_PTR
+ laol SCRATCH_REG,__ARRAY__+2,__ARRAY___o_2,9
+ otoa SCRATCH_REG,__ARRAY___o_2,9
+ str SCRATCH_REG,[HEAP_PTR]
+ str BSTACK_0,[HEAP_PTR,#4]
+ mov SCRATCH_REG,#0
+ str SCRATCH_REG,[HEAP_PTR,#8]
+ add HEAP_PTR,HEAP_PTR,#12
+ mov BSTACK_3,BSTACK_0
+ b fillBSTACK_3_array
+
+@ in BSTACK_0: number of elements, BSTACK_1: element descriptor
+@ BSTACK_2: element size, BSTACK_3: element a size -> a0: array
create_R_array:
- cmp r2,#2
+ cmp BSTACK_2,#2
blo create_R_array_1
beq create_R_array_2
- cmp r2,#4
+ cmp BSTACK_2,#4
blo create_R_array_3
beq create_R_array_4
b create_R_array_5
create_R_array_1:
-@ r4: number of elements, r3: element descriptor
-@ r1: element a size
+@ BSTACK_0: number of elements, BSTACK_1: element descriptor
+@ BSTACK_3: element a size
- add r12,r4,#3
- subs r5,r5,r12
+ add SCRATCH_REG,BSTACK_0,#3
+ subs HEAP_FREE,HEAP_FREE,SCRATCH_REG
bhs no_collect_4581
bl collect_0
no_collect_4581:
- mov r6,r10
- laol r12,__ARRAY__+2,__ARRAY___o_2,10
- otoa r12,__ARRAY___o_2,10
- str r12,[r10]
- str r4,[r10,#4]
- str r3,[r10,#8]
- add r10,r10,#12
-
- cmp r1,#0
+ mov ASTACK_0,HEAP_PTR
+ laol SCRATCH_REG,__ARRAY__+2,__ARRAY___o_2,10
+ otoa SCRATCH_REG,__ARRAY___o_2,10
+ str SCRATCH_REG,[HEAP_PTR]
+ str BSTACK_0,[HEAP_PTR,#4]
+ str BSTACK_1,[HEAP_PTR,#8]
+ add HEAP_PTR,HEAP_PTR,#12
+
+ cmp BSTACK_3,#0
beq r_array_1_b
- ldr r3,[r9,#-4]
- b fillr1_array
+ ldr BSTACK_1,[ASTACK_PTR,#-4]
+ b fillBSTACK_3_array
r_array_1_b:
- ldr r3,[sp,#4]
+ ldr BSTACK_1,[sp,#4]
-fillr1_array:
- tst r4,#1
- lsr r4,r4,#1
- beq st_fillr1_array_1
+fillBSTACK_3_array:
+ tst BSTACK_0,#1
+ lsr BSTACK_0,BSTACK_0,#1
+ beq st_fillBSTACK_3_array_1
- str r3,[r10],#4
- b st_fillr1_array_1
+ str BSTACK_1,[HEAP_PTR],#4
+ b st_fillBSTACK_3_array_1
-fillr1_array_lp:
- str r3,[r10]
- str r3,[r10,#4]
- add r10,r10,#8
-st_fillr1_array_1:
- subs r4,r4,#1
- bcs fillr1_array_lp
+fillBSTACK_3_array_lp:
+ str BSTACK_1,[HEAP_PTR]
+ str BSTACK_1,[HEAP_PTR,#4]
+ add HEAP_PTR,HEAP_PTR,#8
+st_fillBSTACK_3_array_1:
+ subs BSTACK_0,BSTACK_0,#1
+ bcs fillBSTACK_3_array_lp
ldr pc,[sp],#4
create_R_array_2:
-@ r4: number of elements, r3: element descriptor
-@ r1: element a size
+@ BSTACK_0: number of elements, BSTACK_1: element descriptor
+@ BSTACK_3: element a size
- add r12,r4,r4
- add r12,r12,#3
- subs r5,r5,r12
+ add SCRATCH_REG,BSTACK_0,BSTACK_0
+ add SCRATCH_REG,SCRATCH_REG,#3
+ subs HEAP_FREE,HEAP_FREE,SCRATCH_REG
bhs no_collect_4582
bl collect_0
no_collect_4582:
- mov r6,r10
- laol r12,__ARRAY__+2,__ARRAY___o_2,11
- otoa r12,__ARRAY___o_2,11
- str r12,[r10]
- str r4,[r10,#4]
- str r3,[r10,#8]
- add r10,r10,#12
-
- subs r1,r1,#1
+ mov ASTACK_0,HEAP_PTR
+ laol SCRATCH_REG,__ARRAY__+2,__ARRAY___o_2,11
+ otoa SCRATCH_REG,__ARRAY___o_2,11
+ str SCRATCH_REG,[HEAP_PTR]
+ str BSTACK_0,[HEAP_PTR,#4]
+ str BSTACK_1,[HEAP_PTR,#8]
+ add HEAP_PTR,HEAP_PTR,#12
+
+ subs BSTACK_3,BSTACK_3,#1
blo r_array_2_bb
beq r_array_2_ab
r_array_2_aa:
- ldr r3,[r9,#-4]
- ldr r8,[r9,#-8]
- b st_fillr2_array
+ ldr BSTACK_1,[ASTACK_PTR,#-4]
+ ldr ASTACK_2,[ASTACK_PTR,#-8]
+ b st_fillBSTACK_2_array
r_array_2_ab:
- ldr r3,[r9,#-4]
- ldr r8,[sp,#4]
- b st_fillr2_array
+ ldr BSTACK_1,[ASTACK_PTR,#-4]
+ ldr ASTACK_2,[sp,#4]
+ b st_fillBSTACK_2_array
r_array_2_bb:
- ldr r3,[sp,#4]
- ldr r8,[sp,#8]
- b st_fillr2_array
-
-fillr2_array_1:
- str r3,[r10]
- str r8,[r10,#4]
- add r10,r10,#8
-st_fillr2_array:
- subs r4,r4,#1
- bcs fillr2_array_1
+ ldr BSTACK_1,[sp,#4]
+ ldr ASTACK_2,[sp,#8]
+ b st_fillBSTACK_2_array
+
+fillBSTACK_2_array_1:
+ str BSTACK_1,[HEAP_PTR]
+ str ASTACK_2,[HEAP_PTR,#4]
+ add HEAP_PTR,HEAP_PTR,#8
+st_fillBSTACK_2_array:
+ subs BSTACK_0,BSTACK_0,#1
+ bcs fillBSTACK_2_array_1
ldr pc,[sp],#4
create_R_array_3:
-@ r4: number of elements, r3: element descriptor
-@ r1: element a size
+@ BSTACK_0: number of elements, BSTACK_1: element descriptor
+@ BSTACK_3: element a size
- add r12,r4,r4,lsl #1
- add r12,r12,#3
- subs r5,r5,r12
+ add SCRATCH_REG,BSTACK_0,BSTACK_0,lsl #1
+ add SCRATCH_REG,SCRATCH_REG,#3
+ subs HEAP_FREE,HEAP_FREE,SCRATCH_REG
bhs no_collect_4583
bl collect_0
no_collect_4583:
- mov r6,r10
- laol r12,__ARRAY__+2,__ARRAY___o_2,12
- otoa r12,__ARRAY___o_2,12
- str r12,[r10]
- str r4,[r10,#4]
- str r3,[r10,#8]
- add r10,r10,#12
+ mov ASTACK_0,HEAP_PTR
+ laol SCRATCH_REG,__ARRAY__+2,__ARRAY___o_2,12
+ otoa SCRATCH_REG,__ARRAY___o_2,12
+ str SCRATCH_REG,[HEAP_PTR]
+ str BSTACK_0,[HEAP_PTR,#4]
+ str BSTACK_1,[HEAP_PTR,#8]
+ add HEAP_PTR,HEAP_PTR,#12
ldr lr,[sp],#4
- mov r2,sp
+ mov BSTACK_2,sp
- cmp r1,#0
+ cmp BSTACK_3,#0
beq r_array_3
- sub r8,r9,r1,lsl #2
- subs r1,r1,#1
+ sub ASTACK_2,ASTACK_PTR,BSTACK_3,lsl #2
+ subs BSTACK_3,BSTACK_3,#1
copy_a_to_b_lp3:
- ldr r12,[r8],#4
- str r12,[sp,#-4]!
- subs r1,r1,#1
+ ldr SCRATCH_REG,[ASTACK_2],#4
+ str SCRATCH_REG,[sp,#-4]!
+ subs BSTACK_3,BSTACK_3,#1
bcs copy_a_to_b_lp3
r_array_3:
- ldr r3,[sp]
- ldr r7,[sp,#4]
- ldr r8,[sp,#8]
-
- mov sp,r2
- b st_fillr3_array
-
-fillr3_array_1:
- str r3,[r10]
- str r7,[r10,#4]
- str r8,[r10,#8]
- add r10,r10,#12
-st_fillr3_array:
- subs r4,r4,#1
- bcs fillr3_array_1
+ ldr BSTACK_1,[sp]
+ ldr ASTACK_1,[sp,#4]
+ ldr ASTACK_2,[sp,#8]
+
+ mov sp,BSTACK_2
+ b st_fillBSTACK_1_array
+
+fillBSTACK_1_array_1:
+ str BSTACK_1,[HEAP_PTR]
+ str ASTACK_1,[HEAP_PTR,#4]
+ str ASTACK_2,[HEAP_PTR,#8]
+ add HEAP_PTR,HEAP_PTR,#12
+st_fillBSTACK_1_array:
+ subs BSTACK_0,BSTACK_0,#1
+ bcs fillBSTACK_1_array_1
bx lr
create_R_array_4:
-@ r4: number of elements, r3: element descriptor
-@ r1: element a size
+@ BSTACK_0: number of elements, BSTACK_1: element descriptor
+@ BSTACK_3: element a size
- lsl r12,r4,#2
- add r12,r12,#3
- subs r5,r5,r12
+ lsl SCRATCH_REG,BSTACK_0,#2
+ add SCRATCH_REG,SCRATCH_REG,#3
+ subs HEAP_FREE,HEAP_FREE,SCRATCH_REG
bhs no_collect_4584
bl collect_0
no_collect_4584:
- mov r6,r10
- laol r12,__ARRAY__+2,__ARRAY___o_2,13
- otoa r12,__ARRAY___o_2,13
- str r12,[r10]
- str r4,[r10,#4]
- str r3,[r10,#8]
- add r10,r10,#12
+ mov ASTACK_0,HEAP_PTR
+ laol SCRATCH_REG,__ARRAY__+2,__ARRAY___o_2,13
+ otoa SCRATCH_REG,__ARRAY___o_2,13
+ str SCRATCH_REG,[HEAP_PTR]
+ str BSTACK_0,[HEAP_PTR,#4]
+ str BSTACK_1,[HEAP_PTR,#8]
+ add HEAP_PTR,HEAP_PTR,#12
ldr lr,[sp],#4
- mov r2,sp
+ mov BSTACK_2,sp
- cmp r1,#0
+ cmp BSTACK_3,#0
beq r_array_4
- sub r8,r9,r1,lsl #2
- subs r1,r1,#1
+ sub ASTACK_2,ASTACK_PTR,BSTACK_3,lsl #2
+ subs BSTACK_3,BSTACK_3,#1
copy_a_to_b_lp4:
- ldr r12,[r8],#4
- str r12,[sp,#-4]!
- subs r1,r1,#1
+ ldr SCRATCH_REG,[ASTACK_2],#4
+ str SCRATCH_REG,[sp,#-4]!
+ subs BSTACK_3,BSTACK_3,#1
bcs copy_a_to_b_lp4
r_array_4:
- ldr r0,[sp]
- ldr r3,[sp,#4]
- ldr r7,[sp,#8]
- ldr r8,[sp,#12]
-
- mov sp,r2
- b st_fillr4_array
-
-fillr4_array:
- str r0,[r10]
- str r3,[r10,#4]
- str r7,[r10,#8]
- str r8,[r10,#12]
- add r10,r10,#16
-st_fillr4_array:
- subs r4,r4,#1
- bcs fillr4_array
+ ldr BSTACK_4,[sp]
+ ldr BSTACK_1,[sp,#4]
+ ldr ASTACK_1,[sp,#8]
+ ldr ASTACK_2,[sp,#12]
+
+ mov sp,BSTACK_2
+ b st_fillBSTACK_0_array
+
+fillBSTACK_0_array:
+ str BSTACK_4,[HEAP_PTR]
+ str BSTACK_1,[HEAP_PTR,#4]
+ str ASTACK_1,[HEAP_PTR,#8]
+ str ASTACK_2,[HEAP_PTR,#12]
+ add HEAP_PTR,HEAP_PTR,#16
+st_fillBSTACK_0_array:
+ subs BSTACK_0,BSTACK_0,#1
+ bcs fillBSTACK_0_array
bx lr
create_R_array_5:
-@ r4: number of elements, r3: element descriptor
-@ r1: element a size, r2: element size
+@ BSTACK_0: number of elements, BSTACK_1: element descriptor
+@ BSTACK_3: element a size, BSTACK_2: element size
- mul r12,r4,r2
- add r12,r12,#3
- subs r5,r5,r12
+ mul SCRATCH_REG,BSTACK_0,BSTACK_2
+ add SCRATCH_REG,SCRATCH_REG,#3
+ subs HEAP_FREE,HEAP_FREE,SCRATCH_REG
bhs no_collect_4585
bl collect_0
no_collect_4585:
- laol r12,__ARRAY__+2,__ARRAY___o_2,14
- otoa r12,__ARRAY___o_2,14
- str r12,[r10]
- str r4,[r10,#4]
- str r3,[r10,#8]
+ laol SCRATCH_REG,__ARRAY__+2,__ARRAY___o_2,14
+ otoa SCRATCH_REG,__ARRAY___o_2,14
+ str SCRATCH_REG,[HEAP_PTR]
+ str BSTACK_0,[HEAP_PTR,#4]
+ str BSTACK_1,[HEAP_PTR,#8]
ldr lr,[sp],#4
- mov r11,sp
+ mov ASTACK_3,sp
- cmp r1,#0
+ cmp BSTACK_3,#0
beq r_array_5
- sub r8,r9,r1,lsl #2
- subs r1,r1,#1
+ sub ASTACK_2,ASTACK_PTR,BSTACK_3,lsl #2
+ subs BSTACK_3,BSTACK_3,#1
copy_a_to_b_lp5:
- ldr r12,[r8],#4
- str r12,[sp,#-4]!
- subs r1,r1,#1
+ ldr SCRATCH_REG,[ASTACK_2],#4
+ str SCRATCH_REG,[sp,#-4]!
+ subs BSTACK_3,BSTACK_3,#1
bcs copy_a_to_b_lp5
r_array_5:
- mov r6,r10
- add r10,r10,#12
+ mov ASTACK_0,HEAP_PTR
+ add HEAP_PTR,HEAP_PTR,#12
- ldr r3,[sp]
- ldr r7,[sp,#4]
+ ldr BSTACK_1,[sp]
+ ldr ASTACK_1,[sp,#4]
b st_fillr5_array
fillr5_array_1:
- str r3,[r10]
- str r7,[r10,#4]
+ str BSTACK_1,[HEAP_PTR]
+ str ASTACK_1,[HEAP_PTR,#4]
- sub r12,r2,#5
+ sub SCRATCH_REG,BSTACK_2,#5
- ldr r8,[sp,#8]
- str r8,[r10,#8]
+ ldr ASTACK_2,[sp,#8]
+ str ASTACK_2,[HEAP_PTR,#8]
- ldr r8,[sp,#12]
- add r0,sp,#16
- str r8,[r10,#12]
- add r10,r10,#16
+ ldr ASTACK_2,[sp,#12]
+ add BSTACK_4,sp,#16
+ str ASTACK_2,[HEAP_PTR,#12]
+ add HEAP_PTR,HEAP_PTR,#16
copy_elem_lp5:
- ldr r8,[r0],#4
- str r8,[r10],#4
- subs r12,r12,#1
+ ldr ASTACK_2,[BSTACK_4],#4
+ str ASTACK_2,[HEAP_PTR],#4
+ subs SCRATCH_REG,SCRATCH_REG,#1
bcs copy_elem_lp5
st_fillr5_array:
- subs r4,r4,#1
+ subs BSTACK_0,BSTACK_0,#1
bcs fillr5_array_1
- mov sp,r11
+ mov sp,ASTACK_3
bx lr
.thumb_func
repl_args_b:
- cmp r4,#0
+ cmp BSTACK_0,#0
ble repl_args_b_1
- subs r4,r4,#1
+ subs BSTACK_0,BSTACK_0,#1
beq repl_args_b_4
- ldr r7,[r6,#8]
- subs r3,r3,#2
+ ldr ASTACK_1,[ASTACK_0,#8]
+ subs BSTACK_1,BSTACK_1,#2
bne repl_args_b_2
- str r7,[r9],#4
+ str ASTACK_1,[ASTACK_PTR],#4
b repl_args_b_4
repl_args_b_2:
- add r7,r7,r4,lsl #2
+ add ASTACK_1,ASTACK_1,BSTACK_0,lsl #2
repl_args_b_3:
- ldr r8,[r7,#-4]!
- str r8,[r9],#4
- subs r4,r4,#1
+ ldr ASTACK_2,[ASTACK_1,#-4]!
+ str ASTACK_2,[ASTACK_PTR],#4
+ subs BSTACK_0,BSTACK_0,#1
bne repl_args_b_3
repl_args_b_4:
- ldr r8,[r6,#4]
- str r8,[r9],#4
+ ldr ASTACK_2,[ASTACK_0,#4]
+ str ASTACK_2,[ASTACK_PTR],#4
repl_args_b_1:
ldr pc,[sp],#4
.thumb_func
push_arg_b:
- cmp r3,#2
+ cmp BSTACK_1,#2
blo push_arg_b_1
bne push_arg_b_2
- cmp r3,r4
+ cmp BSTACK_1,BSTACK_0
beq push_arg_b_1
push_arg_b_2:
- ldr r6,[r6,#8]
- subs r3,r3,#2
+ ldr ASTACK_0,[ASTACK_0,#8]
+ subs BSTACK_1,BSTACK_1,#2
push_arg_b_1:
- ldr r6,[r6,r3,lsl #2]
+ ldr ASTACK_0,[ASTACK_0,BSTACK_1,lsl #2]
ldr pc,[sp],#4
.thumb_func
del_args:
- ldr r3,[r6]
- subs r3,r3,r4
- ldrsh r4,[r3,#-2]
- subs r4,r4,#2
+ ldr BSTACK_1,[ASTACK_0]
+ subs BSTACK_1,BSTACK_1,BSTACK_0
+ ldrsh BSTACK_0,[BSTACK_1,#-2]
+ subs BSTACK_0,BSTACK_0,#2
bge del_args_2
- str r3,[r7]
- ldr r8,[r6,#4]
- str r8,[r7,#4]
- ldr r8,[r6,#8]
- str r8,[r7,#8]
+ str BSTACK_1,[ASTACK_1]
+ ldr ASTACK_2,[ASTACK_0,#4]
+ str ASTACK_2,[ASTACK_1,#4]
+ ldr ASTACK_2,[ASTACK_0,#8]
+ str ASTACK_2,[ASTACK_1,#8]
ldr pc,[sp],#4
del_args_2:
bne del_args_3
- str r3,[r7]
- ldr r8,[r6,#4]
- str r8,[r7,#4]
- ldr r8,[r6,#8]
- ldr r8,[r8]
- str r8,[r7,#8]
+ str BSTACK_1,[ASTACK_1]
+ ldr ASTACK_2,[ASTACK_0,#4]
+ str ASTACK_2,[ASTACK_1,#4]
+ ldr ASTACK_2,[ASTACK_0,#8]
+ ldr ASTACK_2,[ASTACK_2]
+ str ASTACK_2,[ASTACK_1,#8]
ldr pc,[sp],#4
del_args_3:
- subs r5,r5,r4
+ subs HEAP_FREE,HEAP_FREE,BSTACK_0
blo del_args_gc
.thumb_func
del_args_r_gc:
- str r3,[r7]
- str r10,[r7,#8]
- ldr r8,[r6,#4]
- ldr r6,[r6,#8]
- str r8,[r7,#4]
+ str BSTACK_1,[ASTACK_1]
+ str HEAP_PTR,[ASTACK_1,#8]
+ ldr ASTACK_2,[ASTACK_0,#4]
+ ldr ASTACK_0,[ASTACK_0,#8]
+ str ASTACK_2,[ASTACK_1,#4]
.thumb_func
del_args_copy_args:
- ldr r8,[r6],#4
- str r8,[r10],#4
- subs r4,r4,#1
+ ldr ASTACK_2,[ASTACK_0],#4
+ str ASTACK_2,[HEAP_PTR],#4
+ subs BSTACK_0,BSTACK_0,#1
bgt del_args_copy_args
ldr pc,[sp],#4
@@ -5116,11 +5109,11 @@ del_args_gc:
.thumb_func
sin_real:
.ifdef SOFT_FP_CC
- vmov r0,r1,d0
+ vmov BSTACK_4,BSTACK_3,d0
.endif
bl sin
.ifdef SOFT_FP_CC
- vmov d0,r0,r1
+ vmov d0,BSTACK_4,BSTACK_3
.endif
ldr pc,[sp],#4
@@ -5128,11 +5121,11 @@ sin_real:
.thumb_func
cos_real:
.ifdef SOFT_FP_CC
- vmov r0,r1,d0
+ vmov BSTACK_4,BSTACK_3,d0
.endif
bl cos
.ifdef SOFT_FP_CC
- vmov d0,r0,r1
+ vmov d0,BSTACK_4,BSTACK_3
.endif
ldr pc,[sp],#4
@@ -5140,11 +5133,11 @@ cos_real:
.thumb_func
tan_real:
.ifdef SOFT_FP_CC
- vmov r0,r1,d0
+ vmov BSTACK_4,BSTACK_3,d0
.endif
bl tan
.ifdef SOFT_FP_CC
- vmov d0,r0,r1
+ vmov d0,BSTACK_4,BSTACK_3
.endif
ldr pc,[sp],#4
@@ -5152,11 +5145,11 @@ tan_real:
.thumb_func
asin_real:
.ifdef SOFT_FP_CC
- vmov r0,r1,d0
+ vmov BSTACK_4,BSTACK_3,d0
.endif
bl asin
.ifdef SOFT_FP_CC
- vmov d0,r0,r1
+ vmov d0,BSTACK_4,BSTACK_3
.endif
ldr pc,[sp],#4
@@ -5164,11 +5157,11 @@ asin_real:
.thumb_func
acos_real:
.ifdef SOFT_FP_CC
- vmov r0,r1,d0
+ vmov BSTACK_4,BSTACK_3,d0
.endif
bl acos
.ifdef SOFT_FP_CC
- vmov d0,r0,r1
+ vmov d0,BSTACK_4,BSTACK_3
.endif
ldr pc,[sp],#4
@@ -5176,11 +5169,11 @@ acos_real:
.thumb_func
atan_real:
.ifdef SOFT_FP_CC
- vmov r0,r1,d0
+ vmov BSTACK_4,BSTACK_3,d0
.endif
bl atan
.ifdef SOFT_FP_CC
- vmov d0,r0,r1
+ vmov d0,BSTACK_4,BSTACK_3
.endif
ldr pc,[sp],#4
@@ -5188,22 +5181,22 @@ atan_real:
.thumb_func
ln_real:
.ifdef SOFT_FP_CC
- vmov r0,r1,d0
+ vmov BSTACK_4,BSTACK_3,d0
.endif
bl log
.ifdef SOFT_FP_CC
- vmov d0,r0,r1
+ vmov d0,BSTACK_4,BSTACK_3
.endif
ldr pc,[sp],#4
.section .text.log10_real,"ax"
log10_real:
.ifdef SOFT_FP_CC
- vmov r0,r1,d0
+ vmov BSTACK_4,BSTACK_3,d0
.endif
bl log10
.ifdef SOFT_FP_CC
- vmov d0,r0,r1
+ vmov d0,BSTACK_4,BSTACK_3
.endif
ldr pc,[sp],#4
@@ -5211,11 +5204,11 @@ log10_real:
.thumb_func
exp_real:
.ifdef SOFT_FP_CC
- vmov r0,r1,d0
+ vmov BSTACK_4,BSTACK_3,d0
.endif
bl exp
.ifdef SOFT_FP_CC
- vmov d0,r0,r1
+ vmov d0,BSTACK_4,BSTACK_3
.endif
ldr pc,[sp],#4
@@ -5223,8 +5216,8 @@ exp_real:
.thumb_func
pow_real:
.ifdef SOFT_FP_CC
- vmov r0,r1,d1
- vmov r2,r3,d0
+ vmov BSTACK_4,BSTACK_3,d1
+ vmov BSTACK_2,BSTACK_1,d0
.else
vmov.f64 d2,d0
vmov.f64 d0,d1
@@ -5232,7 +5225,7 @@ pow_real:
.endif
bl pow
.ifdef SOFT_FP_CC
- vmov d0,r0,r1
+ vmov d0,BSTACK_4,BSTACK_3
.endif
ldr pc,[sp],#4
@@ -5240,17 +5233,17 @@ pow_real:
.thumb_func
entier_real:
.ifdef SOFT_FP_CC
- vmov r0,r1,d0
+ vmov BSTACK_4,BSTACK_3,d0
.endif
bl floor
.ifdef SOFT_FP_CC
- vmov d0,r0,r1
+ vmov d0,BSTACK_4,BSTACK_3
.endif
.thumb_func
r_to_i_real:
vcvtr.s32.f64 s0,d0
- vmov r4,s0
+ vmov BSTACK_0,s0
ldr pc,[sp],#4
.text