From c3350d13f94b4d88ca355f289594c15d468cf846 Mon Sep 17 00:00:00 2001 From: sergei Date: Wed, 17 Jul 2013 11:00:46 +0000 Subject: [PATCH] * MIPS: floating point parameters on stack should be loaded to/from FPU registers directly, without using temp. git-svn-id: trunk@25122 - --- compiler/mips/cpupara.pas | 5 ++++- compiler/ncgutil.pas | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/compiler/mips/cpupara.pas b/compiler/mips/cpupara.pas index a5db3253cc..02d6767686 100644 --- a/compiler/mips/cpupara.pas +++ b/compiler/mips/cpupara.pas @@ -439,7 +439,10 @@ implementation intparareg:=mips_nb_used_registers; end; paraloc^.loc:=LOC_REFERENCE; - paraloc^.size:=int_cgsize(paralen); + if (paradef.typ=floatdef) then + paraloc^.size:=int_float_cgsize(paralen) + else + paraloc^.size:=int_cgsize(paralen); paraloc^.def:=get_paraloc_def(locdef,paralen,firstparaloc); if side=callerside then diff --git a/compiler/ncgutil.pas b/compiler/ncgutil.pas index c8f00552ea..cc88e85a77 100644 --- a/compiler/ncgutil.pas +++ b/compiler/ncgutil.pas @@ -1058,11 +1058,11 @@ implementation begin {$ifdef mips} if (destloc.size = paraloc^.Size) and - (paraloc^.Loc in [LOC_FPUREGISTER,LOC_CFPUREGISTER]) then + (paraloc^.Loc in [LOC_FPUREGISTER,LOC_CFPUREGISTER,LOC_REFERENCE,LOC_CREFERENCE]) then begin unget_para(paraloc^); gen_alloc_regloc(list,destloc); - cg.a_loadfpu_reg_reg(list,paraloc^.Size, destloc.size, paraloc^.register, destloc.register); + cg.a_load_cgparaloc_anyreg(list,destloc.size,paraloc^,destloc.register,para.alignment); end else if (destloc.size = OS_F32) and (paraloc^.Loc in [LOC_REGISTER,LOC_CREGISTER]) then