From 986396545d53feb6c02fba854a55045e99e77d88 Mon Sep 17 00:00:00 2001 From: yury Date: Wed, 31 Oct 2007 23:11:50 +0000 Subject: [PATCH] * Fixed register saving in fpc_mul_qword for arm. It fixed bug #10017. * Removed unneeded register lists for some pure asm routines for arm. git-svn-id: trunk@9019 - --- rtl/arm/arm.inc | 8 ++++---- rtl/arm/int64p.inc | 10 ++++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/rtl/arm/arm.inc b/rtl/arm/arm.inc index a6170ed5c2..c7c7bf2a85 100644 --- a/rtl/arm/arm.inc +++ b/rtl/arm/arm.inc @@ -68,7 +68,7 @@ end; function get_frame:pointer;assembler;nostackframe;{$ifdef SYSTEMINLINE}inline;{$endif} asm mov r0,r11 -end ['R0']; +end; {$ENDIF not INTERNAL_BACKTRACE} {$define FPC_SYSTEM_HAS_GET_CALLER_ADDR} @@ -78,7 +78,7 @@ asm beq .Lg_a_null ldr r0,[r0,#-4] .Lg_a_null: -end ['R0']; +end; {$define FPC_SYSTEM_HAS_GET_CALLER_FRAME} @@ -88,14 +88,14 @@ asm beq .Lgnf_null ldr r0,[r0,#-12] .Lgnf_null: -end ['R0']; +end; {$define FPC_SYSTEM_HAS_SPTR} Function Sptr : pointer;assembler;{$ifdef SYSTEMINLINE}inline;{$endif} asm mov r0,sp -end ['R0']; +end; {$ifndef FPC_SYSTEM_HAS_FILLCHAR} diff --git a/rtl/arm/int64p.inc b/rtl/arm/int64p.inc index 045a24c186..2da4b3c06b 100644 --- a/rtl/arm/int64p.inc +++ b/rtl/arm/int64p.inc @@ -14,8 +14,9 @@ **********************************************************************} {$define FPC_SYSTEM_HAS_MUL_QWORD} -function fpc_mul_qword(f1,f2 : qword;checkoverflow : longbool) : qword;assembler;[public,alias: 'FPC_MUL_QWORD']; compilerproc; +function fpc_mul_qword(f1,f2 : qword;checkoverflow : longbool) : qword;assembler;nostackframe;[public,alias: 'FPC_MUL_QWORD']; compilerproc; asm + stmfd sp!,{r4,r5,r6,r14} mov r6,#0 // lo(f1)*lo(f2) umull r4,r5,r0,r2 @@ -32,8 +33,8 @@ asm mov r1,r5 // no overflow? beq .Lexit - - ldr r2,checkoverflow + // checkoverflow? + ldr r2,[sp,#24] cmp r2,#0 beq .Lexit @@ -41,6 +42,7 @@ asm mov r1,fp bl HandleErrorFrame .Lexit: -end ['r4','r5','r6']; + ldmfd sp!,{r4,r5,r6,r15} +end;