From 847adff94dbc0ac1d0a57f50f0b7114f0125adc3 Mon Sep 17 00:00:00 2001 From: sergei Date: Mon, 30 Jun 2014 17:50:34 +0000 Subject: [PATCH] * Load double-precision locations from integer registers directly into cgpara if sizes match and destination has a single location. git-svn-id: trunk@28102 - --- compiler/hlcg2ll.pas | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/compiler/hlcg2ll.pas b/compiler/hlcg2ll.pas index 84f62f68de..2d2e6e39cf 100644 --- a/compiler/hlcg2ll.pas +++ b/compiler/hlcg2ll.pas @@ -1410,10 +1410,16 @@ implementation by typecasting an int64 constant to a record of 8 bytes } if locsize = OS_F64 then begin - tmploc:=l; - location_force_mem(list,tmploc,size); - cg.a_load_loc_cgpara(list,tmploc,cgpara); - location_freetemp(list,tmploc); + if (cgpara.Location^.Next=nil) and (l.size in [OS_64,OS_S64]) and + (cgpara.size in [OS_64,OS_S64]) then + cg64.a_load64_reg_cgpara(list,l.register64,cgpara) + else + begin + tmploc:=l; + location_force_mem(list,tmploc,size); + cg.a_load_loc_cgpara(list,tmploc,cgpara); + location_freetemp(list,tmploc); + end; end else {$endif not cpu64bitalu}