From 08f4cf835d2038591702e16c4df7c83348c842d3 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Mon, 7 Nov 2016 21:44:11 +0000 Subject: Fix divmod --- thumb2divmod.s | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/thumb2divmod.s b/thumb2divmod.s index 2f19976..8aeabb4 100644 --- a/thumb2divmod.s +++ b/thumb2divmod.s @@ -29,19 +29,17 @@ divide: bhs divide_large_result add r1,r1,r1,lsl #1 - .align - add r14,pc,#8 + .align @ alignment is right now, try to not make this a nop + add r14,pc,#6 add r14,r14,r1,lsl #2 mov pc,r14 - nop .set shift,32-5-11 .rept 32-5-11 .set shift,shift-1 subs r1,r3,r4,lsl #shift - it cs + itt cs movcs r3,r1 - it cs orrcs r2,r2,#1<