summaryrefslogtreecommitdiff
path: root/thumb2divmod.s
diff options
context:
space:
mode:
Diffstat (limited to 'thumb2divmod.s')
-rw-r--r--thumb2divmod.s8
1 files changed, 8 insertions, 0 deletions
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