summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCamil Staps2016-09-19 07:43:48 +0000
committerCamil Staps2016-09-19 07:43:48 +0000
commit361b44e9a757fcafd5a3132417df429e3e3c4c0f (patch)
treeaa98c9637bea37034258a2c4cfba753bf30a395a
parentdivmod edited for Thumb-2 (diff)
Added .thumb_func
-rw-r--r--thumb2compact.s55
-rw-r--r--thumb2divmod.s8
-rw-r--r--thumb2fileIO3.s2
-rw-r--r--thumb2mark.s109
-rw-r--r--thumb2startup.s186
5 files changed, 360 insertions, 0 deletions
diff --git a/thumb2compact.s b/thumb2compact.s
index ac79a79..cb79d52 100644
--- a/thumb2compact.s
+++ b/thumb2compact.s
@@ -30,6 +30,7 @@ NO_BIT_INSTRUCTIONS = 1
cmp r4,#0
beq end_mark_cafs
+ .thumb_func
mark_cafs_lp:
ldr r12,[r4,#-4]
str r12,[sp,#-4]!
@@ -57,6 +58,7 @@ mark_cafs_lp:
tst r4,r4
bne mark_cafs_lp
+ .thumb_func
end_mark_cafs:
.if COMPACT_MARK_WITH_STACK
lao r12,stack_p,6
@@ -110,6 +112,7 @@ end_mark_cafs:
@ compact the heap
+ .thumb_func
compact_heap:
.ifdef FINALIZERS
@@ -142,10 +145,12 @@ determine_free_finalizers_after_compact1:
mov r9,r8
b finalizer_find_descriptor
+ .thumb_func
finalizer_find_descriptor_lp:
and r4,r4,#-4
mov r9,r4
ldr r4,[r4]
+ .thumb_func
finalizer_find_descriptor:
tst r4,#1
bne finalizer_find_descriptor_lp
@@ -161,6 +166,7 @@ finalizer_find_descriptor:
str r9,[r8]
str r4,[r6]
+ .thumb_func
finalizer_no_reverse:
add r6,r8,#4
ldr r8,[r8,#4]
@@ -195,7 +201,9 @@ end_finalizers_after_compact1:
str r12,[r6]
lao r12,finalizer_list,5
sto r4,r12,finalizer_list,5
+ .thumb_func
finalizer_list_already_reversed:
+ .thumb_func
finalizer_list_empty:
.if COMPACT_MARK_WITH_STACK
@@ -224,6 +232,7 @@ finalizer_list_empty:
str r12,[sp,#-4]!
bl mark_stack_nodes
.endif
+ .thumb_func
free_finalizer_list_empty:
.endif
@@ -264,7 +273,9 @@ free_finalizer_list_empty:
b skip_zeros
@ d0,a0,a2: free
+ .thumb_func
find_non_zero_long:
+ .thumb_func
skip_zeros:
subs r2,r2,#1
bcc end_copy
@@ -272,6 +283,7 @@ skip_zeros:
cmp r9,#0
beq skip_zeros
@ a2: free
+ .thumb_func
end_skip_zeros:
lao r12,neg_heap_vector_plus_4,1
ldo r8,r12,neg_heap_vector_plus_4,1
@@ -279,12 +291,14 @@ end_skip_zeros:
add r8,r11,r8,lsl #5
+ .thumb_func
bsf_and_copy_nodes:
neg r12,r9
and r12,r12,r9
clz r3,r12
rsb r3,r3,#31
+ .thumb_func
copy_nodes:
ldr r4,[r8,r3,lsl #2]
@@ -321,6 +335,7 @@ end_list_2:
sub r3,r3,#256
sub r3,r3,#3
+ .thumb_func
copy_record_arguments_all_b:
str r3,[sp,#-4]!
lao r12,heap_vector,10
@@ -371,6 +386,7 @@ copy_argument_part_1r:
add r8,r8,r1
add r8,r11,r8,lsl #5
+ .thumb_func
bit_in_this_word:
mov r12,#1
lsl r12,r12,r3
@@ -378,6 +394,7 @@ bit_in_this_word:
ldr r3,[sp],#4
+ .thumb_func
copy_b_record_argument_part_arguments:
ldr r4,[r6],#4
str r4,[r10],#4
@@ -388,6 +405,7 @@ copy_b_record_argument_part_arguments:
bne bsf_and_copy_nodes
b find_non_zero_long
+ .thumb_func
copy_record_arguments_aa:
mov r12,#(256+2)/2
sub r3,r3,r7
@@ -426,6 +444,7 @@ copy_record_argument_2:
subs r3,r3,#1
bcc no_pointers_in_record
+ .thumb_func
copy_record_pointers:
ldr r7,[r6],#4
cmp r7,r6
@@ -444,23 +463,27 @@ copy_record_pointers_2:
subs r3,r3,#1
bcs copy_record_pointers
+ .thumb_func
no_pointers_in_record:
ldr r3,[sp],#4
subs r3,r3,#1
bcc no_non_pointers_in_record
+ .thumb_func
copy_non_pointers_in_record:
ldr r4,[r6],#4
str r4,[r10],#4
subs r3,r3,#1
bcs copy_non_pointers_in_record
+ .thumb_func
no_non_pointers_in_record:
cmp r9,#0
bne bsf_and_copy_nodes
b find_non_zero_long
+ .thumb_func
no_record_arguments:
subs r3,r3,#3
update_up_list_2:
@@ -490,6 +513,7 @@ copy_argument_part_2:
copy_arguments_1:
str r4,[r10],#4
+ .thumb_func
copy_argument_part_arguments:
ldr r7,[r6],#4
cmp r7,r6
@@ -634,6 +658,7 @@ move_hnf_1_:
bne bsf_and_copy_nodes
b find_non_zero_long
+ .thumb_func
move_record:
mov r12,#258/2
subs r3,r3,r12,lsl #1
@@ -741,6 +766,7 @@ move_record_3_2:
bne bsf_and_copy_nodes
b find_non_zero_long
+ .thumb_func
bit_in_next_word:
sub r2,r2,#1
ldr r9,[r1],#4
@@ -787,9 +813,11 @@ move_record_1:
bne move_hnf_1
b move_int_bool_or_char
+ .thumb_func
move_real_or_file:
ldr r4,[r6],#4
str r4,[r10],#4
+ .thumb_func
move_int_bool_or_char:
ldr r4,[r6],#4
str r4,[r10],#4
@@ -815,6 +843,7 @@ move_normal_hnf_0:
bne bsf_and_copy_nodes
b find_non_zero_long
+ .thumb_func
move_real_file_string_or_array:
laol r12,__STRING__+2,__STRING___o_2,10
otoa r12,__STRING___o_2,10
@@ -836,6 +865,7 @@ cp_s_arg_lp3:
bne bsf_and_copy_nodes
b find_non_zero_long
+ .thumb_func
move_array:
.ifdef DLL
laol r12,__ARRAY__+2,__ARRAY___o_2,2
@@ -846,6 +876,7 @@ move_array:
cmp r9,#0
bne bsf_and_end_array_bit
+ .thumb_func
skip_zeros_a:
ldr r9,[r1],#4
sub r2,r2,#1
@@ -858,12 +889,14 @@ skip_zeros_a:
add r8,r11,r8,lsl #5
+ .thumb_func
bsf_and_end_array_bit:
neg r12,r9
and r12,r12,r9
clz r3,r12
rsb r3,r3,#31
+ .thumb_func
end_array_bit:
bic r9,r9,r12
@@ -872,6 +905,7 @@ end_array_bit:
cmp r6,r3
bne move_a_array
+ .thumb_func
move_b_array:
ldr r7,[r6]
str r7,[r10]
@@ -886,6 +920,7 @@ move_b_array:
mov r4,r7
b cp_s_arg_lp3
+ .thumb_func
move_strict_basic_array:
mov r4,r7
laol r12,INT+2,INT_o_2,14
@@ -901,11 +936,13 @@ move_strict_basic_array:
add r4,r4,r4
b cp_s_arg_lp3
+ .thumb_func
move_bool_array:
add r4,r4,#3
lsr r4,r4,#2
b cp_s_arg_lp3
+ .thumb_func
move_a_array:
mov r7,r3
subs r3,r3,r6
@@ -935,6 +972,7 @@ move_a_array:
cmp r4,r9
beq st_move_array_lp
+ .thumb_func
move_array_ab:
str r6,[sp,#-4]!
@@ -961,6 +999,7 @@ move_array_ab:
move_array_ab_lp1:
ldr r4,[sp,#8]
+ .thumb_func
move_array_ab_a_elements:
ldr r3,[r6],#4
cmp r3,r6
@@ -974,18 +1013,21 @@ move_array_ab_a_elements:
add r10,r10,#1
str r10,[r7]
subs r10,r10,#1
+ .thumb_func
move_array_element_ab:
str r3,[r10],#4
subs r4,r4,#1
bcs move_array_ab_a_elements
ldr r4,[sp,#4]
+ .thumb_func
move_array_ab_b_elements:
ldr r3,[r6],#4
str r3,[r10],#4
subs r4,r4,#1
bcs move_array_ab_b_elements
+ .thumb_func
st_move_array_lp_ab:
ldr r12,[sp]
subs r12,r12,#1
@@ -1015,12 +1057,15 @@ move_array_lp1:
b end_array
+ .thumb_func
move_array_element:
str r4,[r10,#-4]
+ .thumb_func
st_move_array_lp:
subs r3,r3,#1
bcs move_array_lp1
+ .thumb_func
end_array:
ldr r9,[sp],#4
@@ -1028,6 +1073,7 @@ end_array:
bne bsf_and_copy_nodes
b find_non_zero_long
+ .thumb_func
move_lazy_node:
mov r7,r4
ldr r3,[r7,#-4]
@@ -1040,6 +1086,7 @@ move_lazy_node:
cmp r3,#256
bge move_closure_with_unboxed_arguments
+ .thumb_func
move_lazy_node_arguments:
ldr r7,[r6],#4
cmp r7,r6
@@ -1060,6 +1107,7 @@ move_lazy_node_arguments:
bne bsf_and_copy_nodes
b find_non_zero_long
+ .thumb_func
move_lazy_node_arguments_:
str r7,[r10],#4
subs r3,r3,#1
@@ -1096,6 +1144,7 @@ move_lazy_node_0:
bne bsf_and_copy_nodes
b find_non_zero_long
+ .thumb_func
move_closure_with_unboxed_arguments:
beq move_closure_with_unboxed_arguments_1
add r3,r3,#1
@@ -1107,6 +1156,7 @@ move_closure_with_unboxed_arguments:
str r4,[sp,#-4]!
+ .thumb_func
move_closure_with_unboxed_arguments_lp:
ldr r7,[r6],#4
cmp r7,r6
@@ -1126,6 +1176,7 @@ move_closure_with_unboxed_arguments_lp:
ldr r4,[sp],#4
b move_non_pointers_of_closure
+ .thumb_func
move_closure_with_unboxed_arguments_:
str r7,[r10],#4
subs r3,r3,#1
@@ -1133,6 +1184,7 @@ move_closure_with_unboxed_arguments_:
ldr r4,[sp],#4
+ .thumb_func
move_non_pointers_of_closure:
ldr r3,[r6],#4
str r3,[r10],#4
@@ -1197,12 +1249,14 @@ move_closure_with_unboxed_arguments_1:
.endif
.endif
+ .thumb_func
end_copy:
.ifdef FINALIZERS
lao r12,finalizer_list,6
ldo r6,r12,finalizer_list,6
+ .thumb_func
restore_finalizer_descriptors:
laol r12,__Nil-4,__Nil_o_m4,8
otoa r12,__Nil_o_m4,8
@@ -1215,5 +1269,6 @@ restore_finalizer_descriptors:
ldr r6,[r6,#4]
b restore_finalizer_descriptors
+ .thumb_func
end_restore_finalizer_descriptors:
.endif
diff --git a/thumb2divmod.s b/thumb2divmod.s
index e123c5e..3343db6 100644
--- a/thumb2divmod.s
+++ b/thumb2divmod.s
@@ -6,6 +6,7 @@
.text
.globl divide
+ .thumb_func
divide:
eor r12,r3,r4
cmp r4,#0
@@ -49,6 +50,7 @@ divide:
neglt r4,r4
ldr pc,[sp],#4
+ .thumb_func
divide_large_result:
bpl divide_result_0
@@ -68,6 +70,7 @@ divide_result_0:
mov r4,#0
ldr pc,[sp],#4
+ .thumb_func
divide_by_small_number:
mov r1,pc
add r1,r1,r4,lsl #3
@@ -84,6 +87,7 @@ divide_by_small_number:
ldr pc,[sp],#4
.globl modulo
+ .thumb_func
modulo:
cmp r4,#0
it lt
@@ -116,6 +120,7 @@ modulo:
movcs r3,r1
.endr
+ .thumb_func
modulo_large_divide_result:
bpl modulo_divide_result_0
@@ -135,6 +140,7 @@ modulo_divide_result_0:
neglt r4,r4
ldr pc,[sp],#4
+ .thumb_func
modulo_of_small_number:
mov r1,pc
add r1,r1,r4,lsl #3
@@ -145,6 +151,7 @@ modulo_of_small_number:
it cc
umullcc r0,r2,r14,r2
lsr r2,r2,r1
+ .thumb_func
modulo_from_quotient:
@ mls r4,r4,r2,r3
neg r3,r3
@@ -154,6 +161,7 @@ modulo_from_quotient:
neglt r4,r4
ldr pc,[sp],#4
+ .thumb_func
div_mod_table:
.long 0,0
.long 0x100,0xffffffff
diff --git a/thumb2fileIO3.s b/thumb2fileIO3.s
index da498ae..a18ff1e 100644
--- a/thumb2fileIO3.s
+++ b/thumb2fileIO3.s
@@ -8,10 +8,12 @@
.data
.p2align 3
+ .thumb_func
freadstring_error:
.ascii "Error in freadsubstring parameters."
.byte 10,0
.byte 0,0,0
+ .thumb_func
fwritestring_error:
.ascii "Error in fwritesubstring parameters."
.byte 10,0
diff --git a/thumb2mark.s b/thumb2mark.s
index a4168c8..d1df94d 100644
--- a/thumb2mark.s
+++ b/thumb2mark.s
@@ -40,6 +40,7 @@ ZERO_ARITY_DESCRIPTOR_OFFSET = -4
tst r4,r4
beq _end_mark_cafs
+ .thumb_func
_mark_cafs_lp:
ldr r3,[r4]
ldr r8,[r4,#-4]
@@ -59,6 +60,7 @@ _mark_cafs_lp:
tst r4,r4
bne _mark_cafs_lp
+ .thumb_func
_end_mark_cafs:
lao r12,stack_top,2
ldo r9,r12,stack_top,2
@@ -77,6 +79,7 @@ _end_mark_cafs:
cmp r6,#0
beq end_restore_arrays
+ .thumb_func
restore_arrays:
ldr r3,[r6]
laol r12,__ARRAY__+2,__ARRAY___o_2,16
@@ -123,9 +126,11 @@ restore_arrays:
.word 1332920885
.word -1108378657
+ .thumb_func
skip_mod_inverse_table:
mul r3,r8,r3
+ .thumb_func
restore_lazy_array:
ldr r10,[r6,#8]
ldr r8,[r6,#4]
@@ -155,6 +160,7 @@ restore_lazy_array:
str r12,[sp,#-4]!
bl reorder
+ .thumb_func
no_reorder_array:
mov r6,r9
cmp r6,#0
@@ -174,6 +180,7 @@ restore_array_size_1:
tst r6,r6
bne restore_arrays
+ .thumb_func
end_restore_arrays:
.ifdef FINALIZERS
@@ -185,6 +192,7 @@ end_restore_arrays:
otoa r7,free_finalizer_list,4
ldr r8,[r6]
+ .thumb_func
determine_free_finalizers_after_mark:
laol r12,__Nil-4,__Nil_o_m4,4
otoa r12,__Nil_o_m4,4
@@ -206,6 +214,7 @@ determine_free_finalizers_after_mark:
ldr r8,[r8,#4]
b determine_free_finalizers_after_mark
+ .thumb_func
finalizer_not_used_after_mark:
str r8,[r7]
add r7,r8,#4
@@ -214,6 +223,7 @@ finalizer_not_used_after_mark:
str r8,[r6]
b determine_free_finalizers_after_mark
+ .thumb_func
end_finalizers_after_mark:
str r8,[r7]
.endif
@@ -265,6 +275,7 @@ end_finalizers_after_mark:
ldo r3,r12,heap_size_33,8
lsl r3,r3,#5
+ .thumb_func
not_largest_heap:
cmp r3,r9
bls no_larger_heap
@@ -275,10 +286,12 @@ not_largest_heap:
cmp r3,r9
bls not_larger_then_heap
mov r3,r9
+ .thumb_func
not_larger_then_heap:
lsr r4,r3,#2
lao r12,bit_vector_size,4
sto r4,r12,bit_vector_size,4
+ .thumb_func
no_larger_heap:
.endif
mov r8,r4
@@ -294,6 +307,7 @@ no_larger_heap:
mov r12,#0
str r12,[r10,r8,lsl #2]
+ .thumb_func
no_extra_word:
sub r4,r4,r2
lsl r4,r4,#2
@@ -337,6 +351,7 @@ _no_heap_use_message2:
mov r6,r10
mov r2,#0
+ .thumb_func
_scan_bits:
ldr r12,[r6]
cmp r3,r12
@@ -349,6 +364,7 @@ _scan_bits:
sto r2,r12,n_free_words_after_mark,5
b _end_scan
+ .thumb_func
_zero_bits:
add r7,r6,#4
add r6,r6,#4
@@ -359,6 +375,7 @@ _zero_bits:
sto r2,r12,n_free_words_after_mark,6
b _end_bits
+ .thumb_func
_skip_zero_bits_lp:
cmp r4,#0
bne _end_zero_bits
@@ -377,6 +394,7 @@ _skip_zero_bits_lp1:
subs r4,r4,r7
b _end_bits2
+ .thumb_func
_end_zero_bits:
sub r4,r6,r7
lsl r4,r4,#3
@@ -387,6 +405,7 @@ _end_zero_bits:
blo _scan_bits
@ n_free_words_after_mark updated
+ .thumb_func
_found_free_memory:
lao r12,n_free_words_after_mark,8
sto r2,r12,n_free_words_after_mark,8
@@ -414,6 +433,7 @@ _found_free_memory:
ldmia sp!,{r0-r4,pc}
@ n_free_words_after_mark updated
+ .thumb_func
_end_bits:
sub r4,r6,r7
add r4,r4,#4
@@ -428,6 +448,7 @@ _end_bits2:
sto r2,r12,n_free_words_after_mark,9
@ n_free_words_after_mark updated
+ .thumb_func
_end_scan:
lao r12,bit_counter,4
sto r8,r12,bit_counter,4
@@ -488,11 +509,13 @@ _end_scan:
@ a4: heap_vector
@ d0,d1,a0,a1,a3: free
+ .thumb_func
_mark_stack_nodes:
lao r12,end_vector,2
ldo r12,r12,end_vector,2
cmp r8,r12
beq _end_mark_nodes
+ .thumb_func
_mark_stack_nodes_:
ldr r6,[r8],#4
@@ -516,6 +539,7 @@ _mark_stack_nodes_:
mov r9,#1
b __mark_node
+ .thumb_func
__end_mark_using_reversal:
ldr r8,[sp],#4
str r6,[r8,#-4]
@@ -544,9 +568,11 @@ _mark_record_2_c:
blo __mark_using_reversal
_mark_node2:
+ .thumb_func
_shared_argument_part:
ldr r6,[r6]
+ .thumb_func
_mark_node:
sub r7,r6,r0
cmp r7,r1
@@ -562,6 +588,7 @@ _mark_node:
tst r9,r12
bne _mark_next_node
+ .thumb_func
_mark_arguments:
ldr r4,[r6]
tst r4,#2
@@ -609,6 +636,7 @@ fits_in_word_1:
tst r9,r12
bne _shared_argument_part
+ .thumb_func
_no_shared_argument_part:
orr r12,r12,r9
str r12,[r10,r3,lsl #2]
@@ -631,6 +659,7 @@ fits_in_word_2:
sub r8,r8,#2
str r3,[sp,#-4]!
+ .thumb_func
_push_hnf_args:
ldr r3,[r7,#-4]!
str r3,[sp,#-4]!
@@ -701,6 +730,7 @@ _mark_selector_node_1:
cmp r12,#2
bls _small_tuple_or_record
+ .thumb_func
_large_tuple_or_record:
ldr r8,[r7,#8]
sub r8,r8,r0
@@ -742,6 +772,7 @@ _mark_tuple_selector_node_2:
str r6,[r8]
b _mark_node
+ .thumb_func
_small_tuple_or_record:
lao r8,e__system__nind,12
.ifdef PIC
@@ -840,6 +871,7 @@ _mark_strict_record_selector_node_1:
tst r8,r12
bne _mark_node3
+ .thumb_func
_select_from_small_record:
.ifdef PIC
ldr r12,[r4,#-8]
@@ -889,11 +921,13 @@ _mark_strict_record_selector_node_5:
str r4,[r6]
b _mark_next_node
+ .thumb_func
_mark_indirection_node:
_mark_node3:
mov r6,r7
b _mark_node
+ .thumb_func
_mark_next_node:
ldr r6,[sp],#4
tst r6,r6
@@ -905,9 +939,11 @@ _mark_next_node:
cmp r8,r12
bne _mark_stack_nodes_
+ .thumb_func
_end_mark_nodes:
ldr pc,[sp],#4
+ .thumb_func
_mark_lazy_node:
ldr r8,[r4,#-4]
tst r8,r8
@@ -935,6 +971,7 @@ _mark_lazy_node:
str r7,[r12,r3,lsl #2]
fits_in_word_7:
sub r8,r8,#3
+ .thumb_func
_push_lazy_args:
ldr r3,[r6,#-4]!
str r3,[sp,#-4]!
@@ -948,6 +985,7 @@ _push_lazy_args:
b __mark_using_reversal
+ .thumb_func
_mark_closure_with_unboxed_arguments:
mov r4,r8
and r8,r8,#255
@@ -979,6 +1017,7 @@ fits_in_word_7_:
add r6,r12,r8,lsl #2
bne _push_lazy_args
+ .thumb_func
_mark_closure_with_one_boxed_argument:
ldr r6,[r6,#-4]
b _mark_node
@@ -998,6 +1037,7 @@ _mark_hnf_0:
cmp r4,r12
bhi _mark_normal_hnf_0
+ .thumb_func
_mark_bool:
add r2,r2,#2
@@ -1014,12 +1054,14 @@ _mark_normal_hnf_0:
add r2,r2,#1
b _mark_next_node
+ .thumb_func
_mark_real_file_or_string:
laol r12,__STRING__+2,__STRING___o_2,8
otoa r12,__STRING___o_2,8
cmp r4,r12
bls _mark_string_or_array
+ .thumb_func
_mark_real_or_file:
ldr r12,[r10,r3,lsl #2]
orr r12,r12,r9
@@ -1035,6 +1077,7 @@ _mark_real_or_file:
str r9,[r12,r3,lsl #2]
b _mark_next_node
+ .thumb_func
_mark_record:
mov r12,#258/2
subs r8,r8,r12,lsl #1
@@ -1084,6 +1127,7 @@ fits_in_word_13:
ldr r7,[r12,r4,lsl #2]
orr r7,r7,#1
str r7,[r12,r4,lsl #2]
+ .thumb_func
_push_record_arguments:
ldr r7,[r6,#4]
mov r8,r3
@@ -1138,9 +1182,11 @@ _mark_record_1:
b _mark_bool
+ .thumb_func
_mark_string_or_array:
beq _mark_string_
+ .thumb_func
_mark_array:
ldr r8,[r6,#8]
cmp r8,#0
@@ -1162,6 +1208,7 @@ _mark_array:
cmp r4,r8
beq _mark_a_record_array
+ .thumb_func
_mark_ab_record_array:
ldr r12,[r10,r3,lsl #2]
orr r12,r12,r9
@@ -1186,6 +1233,7 @@ _mark_ab_record_array:
cmp r3,r4
bhs _last_ab_array_bits
+ .thumb_func
_mark_ab_array_lp:
ldr r12,[r10,r3,lsl #2]
orr r12,r12,r8
@@ -1194,11 +1242,13 @@ _mark_ab_array_lp:
cmp r3,r4
blo _mark_ab_array_lp
+ .thumb_func
_last_ab_array_bits:
ldr r12,[r10,r3,lsl #2]
orr r12,r12,r8
str r12,[r10,r3,lsl #2]
+ .thumb_func
_end_set_ab_array_bits:
ldr r4,[r6,#4]
ldr r7,[r6,#8]
@@ -1216,6 +1266,7 @@ _end_set_ab_array_bits:
str r12,[sp,#-4]!
b _mark_ab_array_begin
+ .thumb_func
_mark_ab_array:
ldr r3,[sp,#8]
str r4,[sp,#-4]!
@@ -1232,6 +1283,7 @@ _mark_ab_array:
ldr r8,[sp],#4
ldr r4,[sp],#4
add r8,r8,r3
+ .thumb_func
_mark_ab_array_begin:
subs r4,r4,#1
bcs _mark_ab_array
@@ -1242,6 +1294,7 @@ _mark_ab_array_begin:
add sp,sp,#12
b _mark_next_node
+ .thumb_func
_mark_a_record_array:
ldr r12,[r10,r3,lsl #2]
orr r12,r12,r9
@@ -1268,6 +1321,7 @@ _mark_a_record_array:
cmp r3,r4
bhs _last_a_array_bits
+ .thumb_func
_mark_a_array_lp:
ldr r12,[r10,r3,lsl #2]
orr r12,r12,r8
@@ -1276,11 +1330,13 @@ _mark_a_array_lp:
cmp r3,r4
blo _mark_a_array_lp
+ .thumb_func
_last_a_array_bits:
ldr r12,[r10,r3,lsl #2]
orr r12,r12,r8
str r12,[r10,r3,lsl #2]
+ .thumb_func
_end_set_a_array_bits:
ldr r4,[sp],#4
add r8,r6,#12
@@ -1302,6 +1358,7 @@ _end_set_a_array_bits:
sto r6,r12,end_vector,9
b _mark_next_node
+ .thumb_func
_mark_lazy_array:
cmp sp,r11
blo _mark_array_using_reversal
@@ -1328,6 +1385,7 @@ _mark_lazy_array:
cmp r3,r4
bhs _last_lazy_array_bits
+ .thumb_func
_mark_lazy_array_lp:
ldr r12,[r10,r3,lsl #2]
orr r12,r12,r8
@@ -1336,11 +1394,13 @@ _mark_lazy_array_lp:
cmp r3,r4
blo _mark_lazy_array_lp
+ .thumb_func
_last_lazy_array_bits:
ldr r12,[r10,r3,lsl #2]
orr r12,r12,r8
str r12,[r10,r3,lsl #2]
+ .thumb_func
_end_set_lazy_array_bits:
ldr r4,[r6,#4]
add r8,r6,#12
@@ -1362,12 +1422,14 @@ _end_set_lazy_array_bits:
sto r6,r12,end_vector,12
b _mark_next_node
+ .thumb_func
_mark_array_using_reversal:
mov r12,#0
str r12,[sp,#-4]!
mov r9,#1
b __mark_node
+ .thumb_func
_mark_strict_basic_array:
ldr r4,[r6,#4]
laol r12,INT+2,INT_o_2,8
@@ -1378,16 +1440,20 @@ _mark_strict_basic_array:
otoa r12,BOOL_o_2,5
cmp r8,r12
beq _mark_strict_bool_array
+ .thumb_func
_mark_strict_real_array:
add r4,r4,r4
+ .thumb_func
_mark_strict_int_array:
add r4,r4,#3
b _mark_basic_array_
+ .thumb_func
_mark_strict_bool_array:
add r4,r4,#12+3
lsr r4,r4,#2
b _mark_basic_array_
+ .thumb_func
_mark_b_record_array:
ldr r8,[r6,#4]
sub r4,r4,#256
@@ -1395,11 +1461,13 @@ _mark_b_record_array:
add r4,r4,#3
b _mark_basic_array_
+ .thumb_func
_mark_string_:
ldr r4,[r6,#4]
add r4,r4,#8+3
lsr r4,r4,#2
+ .thumb_func
_mark_basic_array_:
ldr r12,[r10,r3,lsl #2]
orr r12,r12,r9
@@ -1420,6 +1488,7 @@ _mark_basic_array_:
cmp r3,r4
bhs _last_string_bits
+ .thumb_func
_mark_string_lp:
ldr r12,[r10,r3,lsl #2]
orr r12,r12,r8
@@ -1428,12 +1497,14 @@ _mark_string_lp:
cmp r3,r4
blo _mark_string_lp
+ .thumb_func
_last_string_bits:
ldr r12,[r10,r3,lsl #2]
orr r12,r12,r8
str r12,[r10,r3,lsl #2]
b _mark_next_node
+ .thumb_func
__end_mark_using_reversal:
ldr r7,[sp],#4
tst r7,r7
@@ -1465,12 +1536,14 @@ __end_mark_using_reversal:
.endif
.ltorg
+ .thumb_func
__mark_using_reversal:
str r6,[sp,#-4]!
mov r9,#1
ldr r6,[r6]
b __mark_node
+ .thumb_func
__mark_arguments:
ldr r4,[r6]
tst r4,#2
@@ -1520,6 +1593,7 @@ fits__in__word__1:
tst r7,r12
bne __shared_argument_part
+ .thumb_func
__no_shared_argument_part:
ldr r12,[r10,r3,lsl #2]
orr r12,r12,r7
@@ -1568,6 +1642,7 @@ __mark_hnf_1:
ldr r7,[r12,r3,lsl #2]
orr r7,r7,#1
str r7,[r12,r3,lsl #2]
+ .thumb_func
__shared_argument_part:
ldr r8,[r6]
str r9,[r6]
@@ -1675,6 +1750,7 @@ __mark_tuple_selector_node_2:
str r6,[r8]
b __mark_node
+ .thumb_func
__small_tuple_or_record:
.ifdef PIC
ldr r12,[r4,#-8]
@@ -1736,6 +1812,7 @@ __mark_record_selector_node_1:
tst r8,r12
bne __mark_no_selector_2
+ .thumb_func
__small_record:
.ifdef PIC
ldr r12,[r4,#-8]
@@ -1800,6 +1877,7 @@ __mark_strict_record_selector_node_1:
tst r8,r12
bne __mark_no_selector_2
+ .thumb_func
__select_from_small_record:
.ifdef PIC
ldr r4,[r4,#-8]
@@ -1851,6 +1929,7 @@ __mark_strict_record_selector_node_5:
str r4,[r6]
b __mark_node
+ .thumb_func
__mark_indirection_node:
ldr r6,[r6]
b __mark_node
@@ -1880,6 +1959,7 @@ __mark_record_2_c:
add r9,r6,#4
mov r6,r8
+ .thumb_func
__mark_node:
sub r7,r6,r0
cmp r7,r1
@@ -1895,6 +1975,7 @@ __mark_node:
tst r8,r12
beq __mark_arguments
+ .thumb_func
__mark_next_node:
tst r9,#3
bne __mark_parent
@@ -1911,6 +1992,7 @@ __mark_next_node:
orr r9,r9,r8
b __mark_node
+ .thumb_func
__mark_parent:
mov r3,r9
bics r9,r9,#3
@@ -1927,6 +2009,7 @@ __mark_parent:
mov r9,r8
b __mark_next_node
+ .thumb_func
__argument_part_parent:
and r8,r8,#-4
mov r7,r9
@@ -1937,6 +2020,7 @@ __argument_part_parent:
add r9,r8,#2-4
b __mark_node
+ .thumb_func
__mark_lazy_node:
ldr r8,[r4,#-4]
tst r8,r8
@@ -1979,6 +2063,7 @@ __mark_closure_with_unboxed_arguments__2:
mov r9,r7
b __mark_node
+ .thumb_func
__mark_closure_with_unboxed_arguments:
mov r4,r8
and r8,r8,#255
@@ -2029,6 +2114,7 @@ __mark_hnf_0:
cmp r8,#33
blo ____small_int
+ .thumb_func
__mark_bool_or_small_string:
lsr r7,r7,#2
mov r12,#1
@@ -2045,6 +2131,7 @@ __mark_bool_or_small_string:
str r7,[r12,r3,lsl #2]
b __mark_next_node
+ .thumb_func
____small_int:
lao r6,small_integers,2
otoa r6,small_integers,2
@@ -2071,12 +2158,14 @@ __no_char_3:
add r6,r4,#ZERO_ARITY_DESCRIPTOR_OFFSET-2
b __mark_next_node
+ .thumb_func
__mark_real_file_or_string:
laol r12,__STRING__+2,__STRING___o_2,9
otoa r12,__STRING___o_2,9
cmp r4,r12
bls __mark_string_or_array
+ .thumb_func
__mark_real_or_file:
lsr r7,r7,#2
mov r12,#1
@@ -2096,6 +2185,7 @@ __mark_real_or_file:
str r7,[r12,r3,lsl #2]
b __mark_next_node
+ .thumb_func
__mark__record:
mov r12,#258/2
subs r8,r8,r12,lsl #1
@@ -2183,6 +2273,7 @@ __mark_record_3_aab:
mov r6,r8
b __mark_node
+ .thumb_func
__shared_record_argument_part:
ldr r7,[r6,#4]
@@ -2222,9 +2313,11 @@ __mark_record_1:
sub r6,r6,#4
b __mark_bool_or_small_string
+ .thumb_func
__mark_string_or_array:
beq __mark_string_
+ .thumb_func
__mark_array:
ldr r8,[r6,#8]
cmp r8,#0
@@ -2242,6 +2335,7 @@ __mark_array:
cmp r4,r8
beq __mark_a_record_array
+ .thumb_func
__mark__ab__record__array:
str r7,[sp,#-4]!
str r3,[sp,#-4]!
@@ -2291,16 +2385,19 @@ __mark__ab__record__array:
add r7,r6,r4,lsl #2
b __mark_r_array
+ .thumb_func
__mark_a_record_array:
ldr r12,[r6,#4]
mul r4,r12,r4
add r6,r6,#8
b __mark_lr_array
+ .thumb_func
__mark_lazy_array:
ldr r4,[r6,#4]
add r6,r6,#8
+ .thumb_func
__mark_lr_array:
lsr r7,r7,#2
mov r12,#1
@@ -2310,6 +2407,7 @@ __mark_lr_array:
str r12,[r10,r3,lsl #2]
add r7,r6,r4,lsl #2
sub r8,r7,r0
+ .thumb_func
__mark_r_array:
lsr r8,r8,#7
@@ -2318,6 +2416,7 @@ __mark_r_array:
add r3,r3,#1
+ .thumb_func
__mark_lazy_array_bits:
ldr r12,[r10,r3,lsl #2]
orr r12,r12,#1
@@ -2326,6 +2425,7 @@ __mark_lazy_array_bits:
cmp r3,r8
bls __mark_lazy_array_bits
+ .thumb_func
__skip_mark_lazy_array_bits:
add r2,r2,#3
add r2,r2,r4
@@ -2377,6 +2477,7 @@ __mark_array_length_0_1:
mov r6,r8
b __mark_node
+ .thumb_func
__mark_b_record_array:
ldr r8,[r6,#4]
sub r4,r4,#256
@@ -2384,6 +2485,7 @@ __mark_b_record_array:
add r4,r4,#3
b __mark_basic_array
+ .thumb_func
__mark_strict_basic_array:
ldr r4,[r6,#4]
laol r12,INT+2,INT_o_2,10
@@ -2394,21 +2496,26 @@ __mark_strict_basic_array:
otoa r12,BOOL_o_2,6
cmp r8,r12
beq __mark__strict__bool__array
+ .thumb_func
__mark__strict__real__array:
add r4,r4,r4
+ .thumb_func
__mark__strict__int__array:
add r4,r4,#3
b __mark_basic_array
+ .thumb_func
__mark__strict__bool__array:
add r4,r4,#12+3
lsr r4,r4,#2
b __mark_basic_array
+ .thumb_func
__mark_string_:
ldr r4,[r6,#4]
add r4,r4,#8+3
lsr r4,r4,#2
+ .thumb_func
__mark_basic_array:
lsr r7,r7,#2
mov r12,#1
@@ -2433,6 +2540,7 @@ __mark_basic_array:
cmp r3,r4
bhs __last__string__bits
+ .thumb_func
__mark_string_lp:
ldr r12,[r10,r3,lsl #2]
orr r12,r12,r8
@@ -2441,6 +2549,7 @@ __mark_string_lp:
cmp r3,r4
blo __mark_string_lp
+ .thumb_func
__last__string__bits:
ldr r12,[r10,r3,lsl #2]
orr r12,r12,r8
diff --git a/thumb2startup.s b/thumb2startup.s
index 3e3cd8c..57dcb00 100644
--- a/thumb2startup.s
+++ b/thumb2startup.s
@@ -158,53 +158,71 @@ ZERO_ARITY_DESCRIPTOR_OFFSET = (-4)
.p2align 2
.if MARK_GC
+ .thumb_func
bit_counter:
.long 0
+ .thumb_func
bit_vector_p:
.long 0
+ .thumb_func
zero_bits_before_mark:
.long 1
+ .thumb_func
n_free_words_after_mark:
.long 1000
+ .thumb_func
n_last_heap_free_bytes:
.long 0
+ .thumb_func
lazy_array_list:
.long 0
+ .thumb_func
n_marked_words:
.long 0
+ .thumb_func
end_stack:
.long 0
.if ADJUST_HEAP_SIZE
+ .thumb_func
bit_vector_size:
.long 0
.endif
.endif
+ .thumb_func
caf_list:
.long 0
.globl caf_listp
.hidden caf_listp
+ .thumb_func
caf_listp:
.long 0
+ .thumb_func
zero_length_string:
.long __STRING__+2
.long 0
+ .thumb_func
true_string:
.long __STRING__+2
.long 4
+ .thumb_func
true_c_string:
.ascii "True"
.byte 0,0,0,0
+ .thumb_func
false_string:
.long __STRING__+2
.long 5
+ .thumb_func
false_c_string:
.ascii "False"
.byte 0,0,0
+ .thumb_func
file_c_string:
.ascii "File"
.byte 0,0,0,0
+ .thumb_func
garbage_collect_flag:
.byte 0
.byte 0,0,0
@@ -215,15 +233,19 @@ garbage_collect_flag:
out_of_memory_string_1:
.ascii "Not enough memory to allocate heap and stack"
.byte 10,0
+ .thumb_func
printf_int_string:
.ascii "%d"
.byte 0
+ .thumb_func
printf_real_string:
.ascii "%.15g"
.byte 0
+ .thumb_func
printf_string_string:
.ascii "%s"
.byte 0
+ .thumb_func
printf_char_string:
.ascii "%c"
.byte 0
@@ -240,6 +262,7 @@ heap_use_after_gc_string_1:
heap_use_after_gc_string_2:
.ascii " Bytes."
.byte 10,0
+ .thumb_func
stack_overflow_string:
.ascii "Stack overflow."
.byte 10,0
@@ -255,18 +278,22 @@ time_string_2:
time_string_4:
.ascii " Total: "
.byte 0
+ .thumb_func
high_index_string:
.ascii "Index too high in UPDATE string."
.byte 10,0
+ .thumb_func
low_index_string:
.ascii "Index negative in UPDATE string."
.byte 10,0
IO_error_string:
.ascii "IO error: "
.byte 0
+ .thumb_func
new_line_string:
.byte 10,0
+ .thumb_func
sprintf_time_string:
.ascii "%d.%02d"
.byte 0
@@ -282,6 +309,7 @@ marked_gc_string_1:
.ifdef LINUX
.globl m_system
.endif
+ .thumb_func
m_system:
.long 6
.ascii "System"
@@ -290,6 +318,7 @@ m_system:
.long m_system
.endif
+ .thumb_func
garbage_collector_name:
.long 0
.asciz "garbage_collector"
@@ -297,6 +326,7 @@ garbage_collector_name:
.endif
.ifdef DLL
+ .thumb_func
start_address:
.long 0
.endif
@@ -487,6 +517,7 @@ start_address:
.comm free_finalizer_list,4
.endif
+ .thumb_func
abc_main:
str lr,[sp,#-4]!
@@ -528,15 +559,18 @@ abc_main:
bl __start
.endif
+ .thumb_func
exit:
mov r12,pc
str r12,[sp,#-4]!
bl exit_clean
+ .thumb_func
init_error:
ldmia sp!,{r4-r11,pc}
.globl clean_init
+ .thumb_func
clean_init:
stmdb sp!,{r4-r11,lr}
@@ -573,11 +607,13 @@ clean_init:
mov r4,#1
b exit_dll_init
+ .thumb_func
init_dll_error:
mov r4,#0
b exit_dll_init
.globl clean_fini
+ .thumb_func
clean_fini:
stmdb sp!,{r4-r11,lr}
@@ -592,9 +628,11 @@ clean_fini:
str r12,[sp,#-4]!
bl exit_clean
+ .thumb_func
exit_dll_init:
ldmia sp!,{r4-r11,pc}
+ .thumb_func
init_clean:
add r4,sp,#128
lao r12,ab_stack_size,0
@@ -714,6 +752,7 @@ init_clean:
laol r3,INT+2,INT_o_2,0
otoa r3,INT_o_2,0
+ .thumb_func
make_small_integers_lp:
str r3,[r6]
str r4,[r6,#4]
@@ -728,6 +767,7 @@ make_small_integers_lp:
laol r3,CHAR+2,CHAR_O_2,0
otoa r3,CHAR_O_2,0
+ .thumb_func
make_static_characters_lp:
str r3,[r6]
str r4,[r6,#4]
@@ -827,6 +867,7 @@ no_mark9:
cmp r4,r8
bge too_large_or_too_small
mov r8,r4
+ .thumb_func
too_large_or_too_small:
.endif
@@ -880,6 +921,7 @@ no_memory_3:
mov r0,#1
ldr pc,[sp],#4
+ .thumb_func
exit_clean:
mov r12,pc
str r12,[sp,#-4]!
@@ -932,6 +974,7 @@ exit_clean:
mov r0,#10
bl ew_print_char
+ .thumb_func
no_print_execution_time:
lao r0,stack_mbp,1
ldo r0,r0,stack_mbp,1
@@ -949,6 +992,7 @@ no_print_execution_time:
ldr pc,[sp],#4
+ .thumb_func
__driver:
lao r8,flags,5
ldo r8,r8,flags,5
@@ -1051,6 +1095,7 @@ __driver:
.endif
.ltorg
+ .thumb_func
print_time:
@ divide by 1000
ldr r12,=274877907
@@ -1110,19 +1155,23 @@ print_time:
.endif
ldr pc,[sp],#4
+ .thumb_func
print_sc:
lao r12,basic_only,1
ldo r8,r12,basic_only,1
cmp r8,#0
bne end_print
+ .thumb_func
print:
mov r0,r4
bl w_print_string
+ .thumb_func
end_print:
ldr pc,[sp],#4
+ .thumb_func
dump:
mov r12,pc
str r12,[sp,#-4]!
@@ -1164,10 +1213,12 @@ DtoAC_string_a2:
add r6,r8,#4
b build_string
+ .thumb_func
print_symbol:
mov r3,#0
b print_symbol_2
+ .thumb_func
print_symbol_sc:
lao r12,basic_only,2
ldo r3,r12,basic_only,2
@@ -1207,6 +1258,7 @@ printD_:
add r8,r12,r3
b print_string_a2
+ .thumb_func
print_record:
ldr r8,[r4,#-6]
@.ifdef PIC
@@ -1216,19 +1268,23 @@ print_record:
.endif
b print_string_a2
+ .thumb_func
end_print_symbol:
ldr pc,[sp],#4
+ .thumb_func
print_int_node:
ldr r0,[r6,#4]
bl w_print_int
ldr pc,[sp],#4
+ .thumb_func
print_int:
mov r0,r4
bl w_print_int
ldr pc,[sp],#4
+ .thumb_func
print_char_denotation:
tst r3,r3
bne print_char_node
@@ -1247,45 +1303,53 @@ print_char_denotation:
ldr pc,[sp],#4
+ .thumb_func
print_char_node:
ldr r0,[r6,#4]
bl w_print_char
ldr pc,[sp],#4
+ .thumb_func
print_char:
str r4,[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
beq print_false
+ .thumb_func
print_true:
lao r0,true_c_string,0
otoa r0,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
bl w_print_string
ldr pc,[sp],#4
+ .thumb_func
print_real:
.ifdef SOFT_FP_CC
vmov r0,r1,d0
.endif
b print_real_
+ .thumb_func
print_real_node:
.ifdef SOFT_FP_CC
ldrd r0,r1,[r6,#4]
.else
vldr.f64 d0,[r6,#4]
.endif
+ .thumb_func
print_real_:
mov r11,sp
@bic sp,sp,#7 @ TODO
@@ -1299,19 +1363,23 @@ print_string_a2:
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
bne no_print_chars
+ .thumb_func
print__string__:
ldr r1,[r6,#4]
add r0,r6,#8
bl w_print_text
+ .thumb_func
no_print_chars:
ldr pc,[sp],#4
+ .thumb_func
push_a_r_args:
str r10,[sp,#-4]!
@@ -1330,6 +1398,7 @@ push_a_r_args:
add r12,r6,#12
add r6,r12,r3,lsl #2
subs r10,r10,#1
+ .thumb_func
mul_array_size_lp:
add r6,r6,r4
subs r10,r10,#1
@@ -1337,9 +1406,11 @@ mul_array_size_lp:
add r10,r6,r7,lsl #2
b push_a_elements
+ .thumb_func
push_a_elements_lp:
ldr r4,[r6,#-4]!
str r4,[r9],#4
+ .thumb_func
push_a_elements:
subs r3,r3,#1
bcs push_a_elements_lp
@@ -1350,15 +1421,18 @@ push_a_elements:
ldr r8,[sp],#4
b push_b_elements
+ .thumb_func
push_b_elements_lp:
ldr r12,[r6,#-4]!
str r12,[sp,#-4]!
+ .thumb_func
push_b_elements:
subs r7,r7,#1
bcs push_b_elements_lp
mov pc,r8
+ .thumb_func
push_t_r_args:
ldr r8,[sp],#4
@@ -1381,9 +1455,11 @@ push_t_r_args:
ldr r7,[r6,#4]
add r12,r7,#-4
add r7,r12,r4,lsl #2
+ .thumb_func
small_record:
b push_r_b_elements
+ .thumb_func
push_r_b_elements_lp:
subs r4,r4,#1
bne not_first_arg_b
@@ -1391,9 +1467,11 @@ push_r_b_elements_lp:
ldr r12,[r6]
str r12,[sp,#-4]!
b push_r_b_elements
+ .thumb_func
not_first_arg_b:
ldr r12,[r7,#-4]!
str r12,[sp,#-4]!
+ .thumb_func
push_r_b_elements:
subs r3,r3,#1
bcs push_r_b_elements_lp
@@ -1404,6 +1482,7 @@ push_r_b_elements:
str r12,[sp,#-4]!
b push_r_a_elements
+ .thumb_func
push_r_a_elements_lp:
subs r4,r4,#1
bne not_first_arg_a
@@ -1411,9 +1490,11 @@ push_r_a_elements_lp:
ldr r8,[r6]
str r8,[r9],#4
b push_r_a_elements
+ .thumb_func
not_first_arg_a:
ldr r8,[r7,#-4]!
str r8,[r9],#4
+ .thumb_func
push_r_a_elements:
subs r3,r3,#1
bcs push_r_a_elements_lp
@@ -1464,12 +1545,14 @@ ItoAC:
sub r4,r6,r12
b sprintf_buffer_to_string
+ .thumb_func
int_to_string:
tst r4,r4
bpl no_minus
mov r12,#45
strb r12,[r6],#1
neg r4,r4
+ .thumb_func
no_minus:
add r8,r6,#12
@@ -1477,6 +1560,7 @@ no_minus:
ldr r2,=0xcccccccd
+ .thumb_func
calculate_digits:
cmp r4,#10
blo last_digit
@@ -1492,15 +1576,19 @@ calculate_digits:
strb r3,[r8],#1
b calculate_digits
+ .thumb_func
last_digit:
tst r4,r4
beq no_zero
+ .thumb_func
zero_digit:
add r4,r4,#48
strb r4,[r8],#1
+ .thumb_func
no_zero:
add r7,r6,#12
+ .thumb_func
reverse_digits:
ldrb r3,[r8,#-1]!
strb r3,[r6],#1
@@ -1519,6 +1607,7 @@ reverse_digits:
bl sprintf
.endif
+ .thumb_func
return_sprintf_buffer:
.if USE_CLIB
lao r0,sprintf_buffer,5
@@ -1528,6 +1617,7 @@ return_sprintf_buffer:
.else
laol r4,sprintf_buffer-1,sprintf_buffer_o_m1,0
otoa r4,sprintf_buffer_o_m1,0
+ .thumb_func
skip_characters:
ldrb r12,[r4,#1]!
tst r12,r12
@@ -1539,9 +1629,11 @@ skip_characters:
.endif
.if MY_ITOS
+ .thumb_func
sprintf_buffer_to_string:
lao r6,sprintf_buffer,7
otoa r6,sprintf_buffer,7
+ .thumb_func
build_string:
.endif
add r3,r4,#3
@@ -1635,6 +1727,7 @@ eqD_false:
@ the timer
@
+ .thumb_func
init_timer:
sub sp,sp,#20
mov r0,sp
@@ -1656,6 +1749,7 @@ init_timer:
ldr pc,[sp],#4
+ .thumb_func
get_time_diff:
sub sp,sp,#20
mov r0,sp
@@ -1672,6 +1766,7 @@ get_time_diff:
subs r4,r4,r7
ldr pc,[sp],#4
+ .thumb_func
add_execute_time:
mov r12,pc
str r12,[sp,#-4]!
@@ -1679,12 +1774,14 @@ add_execute_time:
lao r6,execute_time,3
otoa r6,execute_time,3
+ .thumb_func
add_time:
ldr r12,[r6]
add r4,r4,r12
str r4,[r6]
ldr pc,[sp],#4
+ .thumb_func
add_garbage_collect_time:
mov r12,pc
str r12,[sp,#-4]!
@@ -1911,6 +2008,7 @@ collect_0_:
lao r12,n_free_words_after_mark,0
ldo r2,r12,n_free_words_after_mark,0
+ .thumb_func
scan_bits:
ldr r12,[r6]
cmp r3,r12
@@ -1921,6 +2019,7 @@ scan_bits:
b end_scan
+ .thumb_func
zero_bits:
add r7,r6,#4
add r6,r6,#4
@@ -1928,6 +2027,7 @@ zero_bits:
bne skip_zero_bits_lp1
b end_bits
+ .thumb_func
skip_zero_bits_lp:
cmp r4,#0
bne end_zero_bits
@@ -1942,6 +2042,7 @@ skip_zero_bits_lp1:
subs r4,r6,r7
b end_bits2
+ .thumb_func
end_zero_bits:
sub r4,r6,r7
lsl r4,r4,#3
@@ -1951,6 +2052,7 @@ end_zero_bits:
cmp r4,r9
blo scan_bits
+ .thumb_func
found_free_memory:
lao r12,bit_counter,1
sto r8,r12,bit_counter,1
@@ -1978,6 +2080,7 @@ found_free_memory:
ldmia sp!,{r0-r4,pc}
+ .thumb_func
end_bits:
sub r4,r6,r7
add r4,r4,#4
@@ -1987,6 +2090,7 @@ end_bits2:
cmp r4,r9
bhs found_free_memory
+ .thumb_func
end_scan:
ldr r9,[sp],#4
lao r12,bit_counter,2
@@ -1994,6 +2098,7 @@ end_scan:
lao r12,n_free_words_after_mark,2
sto r2,r12,n_free_words_after_mark,2
+ .thumb_func
no_scan:
.endif
@@ -2029,6 +2134,7 @@ no_mark3:
ldmia sp!,{r0-r4,pc}
+ .thumb_func
collect:
mov r12,pc
str r12,[sp,#-4]!
@@ -2063,6 +2169,7 @@ collect:
otoa r0,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
@@ -2132,6 +2239,7 @@ no_print_stack_sizes:
bl zero_bit_vector
b end_zero_bit_vector
+ .thumb_func
zero_all:
lao r12,heap_copied_vector_size,3
ldo r4,r12,heap_copied_vector_size,3
@@ -2140,6 +2248,7 @@ zero_all:
str r12,[sp,#-4]!
bl zero_bit_vector
+ .thumb_func
end_zero_bit_vector:
.include "thumb2copy.s"
@@ -2177,6 +2286,7 @@ end_zero_bit_vector:
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
@@ -2191,6 +2301,7 @@ switch_to_mark_scan:
cmp r6,r12
bcc vector_at_begin
+ .thumb_func
vector_at_end:
lao r12,heap_p3,2
sto r3,r12,heap_p3,2
@@ -2208,6 +2319,7 @@ vector_at_end:
sto r3,r12,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
@@ -2268,6 +2380,7 @@ switch_to_mark_scan_2:
.else
b end_garbage_collect
.endif
+ .thumb_func
no_mark_scan:
@ exchange the semi_spaces
lao r12,heap_p1,5
@@ -2302,6 +2415,7 @@ no_mark_scan:
add sp,sp,#8
ldr r4,[sp],#4
+ .thumb_func
no_pages:
.endif
@@ -2344,6 +2458,7 @@ no_small_heap1:
lsl r4,r4,#2
.endif
+ .thumb_func
end_garbage_collect:
.if WRITE_HEAP
lao r12,heap_end_write_heap,1
@@ -2351,6 +2466,7 @@ end_garbage_collect:
lao r12,d3_flag_write_heap,1
mov r11,#0
sto r11,r12,d3_flag_write_heap,1
+ .thumb_func
end_garbage_collect_:
.endif
@@ -2374,6 +2490,7 @@ end_garbage_collect_:
otoa r0,heap_use_after_gc_string_2,0
bl ew_print_string
+ .thumb_func
no_heap_use_message:
.if FINALIZERS
@@ -2474,6 +2591,7 @@ gc1:
ldr r8,[sp],#4
ldr r7,[sp],#4
ldr r6,[sp],#4
+ .thumb_func
no_write_heap:
.endif
@@ -2597,10 +2715,12 @@ no_write_heap:
.endif
.if FINALIZERS
+ .thumb_func
call_finalizers:
lao r12,free_finalizer_list,1
ldo r4,r12,free_finalizer_list,1
+ .thumb_func
call_finalizers_lp:
laol r12,__Nil-4,__Nil_o_m4,1
otoa r12,__Nil_o_m4,1
@@ -2616,6 +2736,7 @@ call_finalizers_lp:
add sp,sp,#4
ldr r4,[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
@@ -2625,6 +2746,7 @@ end_call_finalizers:
.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
@@ -2644,6 +2766,7 @@ out_of_memory_4:
otoa r8,out_of_memory_string_4,0
b print_error
+ .thumb_func
zero_bit_vector:
eor r7,r7,r7
tst r4,#1
@@ -2673,6 +2796,7 @@ zero_bits1_5:
bhs zero_bits1_4
ldr pc,[sp],#4
+ .thumb_func
reorder:
str r9,[sp,#-4]!
str r8,[sp,#-4]!
@@ -2690,6 +2814,7 @@ reorder:
str r4,[sp,#-4]!
b st_reorder_lp
+ .thumb_func
reorder_lp:
ldr r8,[r6]
ldr r9,[r7,#-4]
@@ -2703,13 +2828,16 @@ reorder_lp:
ldr r4,[sp]
ldr r12,[sp,#12]
add r6,r6,r12
+ .thumb_func
next_b_in_element:
subs r3,r3,#1
bne next_a_in_element
ldr r3,[sp,#4]
ldr r12,[sp,#8]
subs r7,r7,r12
+ .thumb_func
next_a_in_element:
+ .thumb_func
st_reorder_lp:
cmp r7,r6
bhi reorder_lp
@@ -2725,6 +2853,7 @@ st_reorder_lp:
@ the sliding compacting garbage collector
@
+ .thumb_func
compacting_collector:
@ zero all mark bits
@@ -2794,6 +2923,7 @@ zero_bits_5:
tst r12,#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
@@ -2834,6 +2964,7 @@ no_zero_bits:
bls no_smaller_heap
b compact_gc
+ .thumb_func
no_smaller_heap:
.endif
@@ -2845,6 +2976,7 @@ no_smaller_heap:
lto n_free_words_after_mark,4
.endif
+ .thumb_func
compact_gc:
lao r12,zero_bits_before_mark,1
mov r11,#1
@@ -2893,6 +3025,7 @@ no_mark5:
ldo r12,r12,heap_size,7
cmp r4,r12
bcc out_of_memory_4
+ .thumb_func
not_out_of_memory:
.if MARK_GC || COMPACT_GC_ONLY
@@ -3009,6 +3142,7 @@ vector_at_end_2:
stob r11,r12,garbage_collect_flag,8
.endif
+ .thumb_func
no_copy_garbage_collection:
mov r12,pc
str r12,[sp,#-4]!
@@ -3023,6 +3157,7 @@ no_copy_garbage_collection:
add r4,r4,r3,lsl #2
b end_garbage_collect
+ .thumb_func
stack_overflow:
mov r12,pc
str r12,[sp,#-4]!
@@ -3048,10 +3183,12 @@ IO_error:
b halt
+ .thumb_func
print_error:
mov r0,r8
bl ew_print_string
+ .thumb_func
halt:
lao r12,halt_sp,3
ldo sp,r12,halt_sp,3
@@ -3109,7 +3246,9 @@ halt:
.endif
.ltorg
+ .thumb_func
e__system__eaind:
+ .thumb_func
eval_fill:
str r6,[r9],#4
mov r6,r7
@@ -3138,7 +3277,9 @@ eval_fill:
.long e__system__dind
.endif
.long -2
+ .thumb_func
e__system__nind:
+ .thumb_func
__indirection:
ldr r7,[r6,#4]
ldr r4,[r7]
@@ -3320,6 +3461,7 @@ eval_upd_6:
eval_upd_7:
mov r4,#0
mov r3,#20
+ .thumb_func
eval_upd_n:
lao r12,e__system__nind,7
otoa r12,e__system__nind,7
@@ -3336,6 +3478,7 @@ eval_upd_n:
str r3,[r9,#12]
add r9,r9,#16
+ .thumb_func
eval_upd_n_lp:
ldr r3,[r2,#-4]!
str r3,[r9],#4
@@ -3701,6 +3844,7 @@ cat_string_11:
gc_3: bl collect_2
b gc_r_3
+ .thumb_func
empty_string:
lao r6,zero_length_string,0
otoa r6,zero_length_string,0
@@ -3817,6 +3961,7 @@ updateAC_after_copy_lp:
gc_5: bl collect_1
b r_gc_5
+ .thumb_func
update_string_error:
lao r8,high_index_string,0
otoa r8,high_index_string,0
@@ -3853,6 +3998,7 @@ equal_string_1:
add r7,r7,#4
subs r4,r4,#1
bne equal_string_1
+ .thumb_func
equal_string_b:
tst r3,#2
beq equal_string_2
@@ -3869,9 +4015,11 @@ equal_string_2:
ldrb r12,[r7]
cmp r3,r12
bne equal_string_ne
+ .thumb_func
equal_string_eq:
mov r4,#1
ldr pc,[sp],#4
+ .thumb_func
equal_string_ne:
mov r4,#0
ldr pc,[sp],#4
@@ -3887,9 +4035,11 @@ cmpAC:
bhi cmp_string_more
mov r4,#0
b cmp_string_chars
+ .thumb_func
cmp_string_more:
mov r4,#1
b cmp_string_chars
+ .thumb_func
cmp_string_less:
mov r4,#-1
mov r3,r8
@@ -3902,9 +4052,11 @@ cmp_string_1:
bne cmp_string_ne4
add r7,r7,#4
add r6,r6,#4
+ .thumb_func
cmp_string_chars:
subs r3,r3,#4
bcs cmp_string_1
+ .thumb_func
cmp_string_b:
@ to do compare bytes using and instead of ldrb
tst r3,#2
@@ -3926,6 +4078,7 @@ cmp_string_2:
ldrb r12,[r6]
cmp r8,r12
bne cmp_string_ne
+ .thumb_func
cmp_string_eq:
ldr pc,[sp],#4
cmp_string_ne4:
@@ -3945,6 +4098,7 @@ cmp_string_ne4:
ldrb r3,[r7,#3]
ldrb r12,[r6,#3]
cmp r3,r12
+ .thumb_func
cmp_string_ne:
bhi cmp_string_r1
mov r4,#-1
@@ -3954,6 +4108,7 @@ cmp_string_r1:
ldr pc,[sp],#4
.section .text.string_to_string_node,"ax"
+ .thumb_func
string_to_string_node:
ldr r8,[r6],#4
@@ -3964,6 +4119,7 @@ string_to_string_node:
subs r5,r5,r12
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
@@ -3983,6 +4139,7 @@ string_to_string_node_4:
mov r6,r8
ldr pc,[sp],#4
+ .thumb_func
string_to_string_node_gc:
stmdb sp!,{r6,r8}
bl collect_0
@@ -3994,6 +4151,7 @@ string_to_string_node_gc:
.endif
.section .text.int_array_to_node,"ax"
+ .thumb_func
int_array_to_node:
ldr r4,[r6,#-8]
@@ -4001,6 +4159,7 @@ int_array_to_node:
subs r5,r5,r12
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
@@ -4023,6 +4182,7 @@ int_array_to_node_4:
ldr pc,[sp],#4
+ .thumb_func
int_array_to_node_gc:
str r6,[sp,#-4]!
bl collect_0
@@ -4035,6 +4195,7 @@ int_array_to_node_gc:
.endif
.section .text.real_array_to_node,"ax"
+ .thumb_func
real_array_to_node:
ldr r4,[r6,#-8]
@@ -4042,6 +4203,7 @@ real_array_to_node:
subs r5,r5,r12
blo real_array_to_node_gc
+ .thumb_func
real_array_to_node_r:
tst r10,#4
orr r10,r10,#4
@@ -4072,6 +4234,7 @@ real_array_to_node_4:
ldr pc,[sp],#4
+ .thumb_func
real_array_to_node_gc:
str r6,[sp,#-4]!
bl collect_0
@@ -4263,6 +4426,7 @@ no_collect_4580:
@ r4: number of elements, r3: element descriptor
@ r2: element size, r1: element a size, a0:a_element-> a0: array
+ .thumb_func
_create_r_array:
mul r12,r4,r2
add r12,r12,#3
@@ -4451,10 +4615,12 @@ create_arrayBCI:
str r4,[r10],#4
b st_filli_array
+ .thumb_func
filli_array:
str r4,[r10]
str r4,[r10,#4]
add r10,r10,#8
+ .thumb_func
st_filli_array:
subs r3,r3,#1
bcs filli_array
@@ -4490,16 +4656,19 @@ no_collect_4579:
str r12,[r10,#8]
add r10,r10,#12
b st_fillr_array
+ .thumb_func
fillr_array:
str r3,[r10]
str r7,[r10,#4]
add r10,r10,#8
+ .thumb_func
st_fillr_array:
subs r4,r4,#1
bcs fillr_array
ldr pc,[sp],#4
+ .thumb_func
create_array:
add r12,r4,#3
subs r5,r5,r12
@@ -4803,6 +4972,7 @@ st_fillr5_array:
bx lr
+ .thumb_func
repl_args_b:
cmp r4,#0
ble repl_args_b_1
@@ -4832,6 +5002,7 @@ repl_args_b_4:
repl_args_b_1:
ldr pc,[sp],#4
+ .thumb_func
push_arg_b:
cmp r3,#2
blo push_arg_b_1
@@ -4845,6 +5016,7 @@ push_arg_b_1:
ldr r6,[r6,r3,lsl #2]
ldr pc,[sp],#4
+ .thumb_func
del_args:
ldr r3,[r6]
subs r3,r3,r4
@@ -4873,6 +5045,7 @@ del_args_2:
del_args_3:
subs r5,r5,r4
blo del_args_gc
+ .thumb_func
del_args_r_gc:
str r3,[r7]
str r10,[r7,#8]
@@ -4880,6 +5053,7 @@ del_args_r_gc:
ldr r6,[r6,#8]
str r8,[r7,#4]
+ .thumb_func
del_args_copy_args:
ldr r8,[r6],#4
str r8,[r10],#4
@@ -4888,11 +5062,13 @@ del_args_copy_args:
ldr pc,[sp],#4
+ .thumb_func
del_args_gc:
bl collect_2
b del_args_r_gc
.section .text.sin_real,"ax"
+ .thumb_func
sin_real:
.ifdef SOFT_FP_CC
vmov r0,r1,d0
@@ -4904,6 +5080,7 @@ sin_real:
ldr pc,[sp],#4
.section .text.cos_real,"ax"
+ .thumb_func
cos_real:
.ifdef SOFT_FP_CC
vmov r0,r1,d0
@@ -4915,6 +5092,7 @@ cos_real:
ldr pc,[sp],#4
.section .text.tan_real,"ax"
+ .thumb_func
tan_real:
.ifdef SOFT_FP_CC
vmov r0,r1,d0
@@ -4926,6 +5104,7 @@ tan_real:
ldr pc,[sp],#4
.section .text.asin_real,"ax"
+ .thumb_func
asin_real:
.ifdef SOFT_FP_CC
vmov r0,r1,d0
@@ -4937,6 +5116,7 @@ asin_real:
ldr pc,[sp],#4
.section .text.acos_real,"ax"
+ .thumb_func
acos_real:
.ifdef SOFT_FP_CC
vmov r0,r1,d0
@@ -4948,6 +5128,7 @@ acos_real:
ldr pc,[sp],#4
.section .text.atan_real,"ax"
+ .thumb_func
atan_real:
.ifdef SOFT_FP_CC
vmov r0,r1,d0
@@ -4959,6 +5140,7 @@ atan_real:
ldr pc,[sp],#4
.section .text.ln_real,"ax"
+ .thumb_func
ln_real:
.ifdef SOFT_FP_CC
vmov r0,r1,d0
@@ -4981,6 +5163,7 @@ log10_real:
ldr pc,[sp],#4
.section .text.exp_real,"ax"
+ .thumb_func
exp_real:
.ifdef SOFT_FP_CC
vmov r0,r1,d0
@@ -4992,6 +5175,7 @@ exp_real:
ldr pc,[sp],#4
.section .text.pow_real,"ax"
+ .thumb_func
pow_real:
.ifdef SOFT_FP_CC
vmov r0,r1,d1
@@ -5008,6 +5192,7 @@ pow_real:
ldr pc,[sp],#4
.section .text.entier_real,"ax"
+ .thumb_func
entier_real:
.ifdef SOFT_FP_CC
vmov r0,r1,d0
@@ -5017,6 +5202,7 @@ entier_real:
vmov d0,r0,r1
.endif
+ .thumb_func
r_to_i_real:
vcvtr.s32.f64 s0,d0
vmov r4,s0