diff --git a/compiler/arm/narmcon.pas b/compiler/arm/narmcon.pas index 19fd6d71aa..810098f735 100644 --- a/compiler/arm/narmcon.pas +++ b/compiler/arm/narmcon.pas @@ -66,7 +66,8 @@ interface location_reset(location,LOC_CREFERENCE,def_cgsize(resultdef)); lastlabel:=nil; realait:=floattype2ait[tfloatdef(resultdef).floattype]; - hiloswapped:=current_settings.fputype in [fpu_fpa,fpu_fpa10,fpu_fpa11]; + hiloswapped:=(current_settings.fputype in [fpu_fpa,fpu_fpa10,fpu_fpa11]) and + not(cs_fp_emulation in current_settings.moduleswitches);; { const already used ? } if not assigned(lab_real) then begin diff --git a/compiler/ncgcon.pas b/compiler/ncgcon.pas index 01112b02ae..7a6f8bc3be 100644 --- a/compiler/ncgcon.pas +++ b/compiler/ncgcon.pas @@ -122,7 +122,8 @@ implementation lastlabel:=nil; realait:=floattype2ait[tfloatdef(resultdef).floattype]; {$ifdef ARM} - hiloswapped:=current_settings.fputype in [fpu_fpa,fpu_fpa10,fpu_fpa11]; + hiloswapped:=(current_settings.fputype in [fpu_fpa,fpu_fpa10,fpu_fpa11]) and + not(cs_fp_emulation in current_settings.moduleswitches); {$endif ARM} { const already used ? } if not assigned(lab_real) then diff --git a/compiler/ptconst.pas b/compiler/ptconst.pas index 98a7fa4483..1d31056880 100644 --- a/compiler/ptconst.pas +++ b/compiler/ptconst.pas @@ -163,7 +163,8 @@ implementation list.concat(Tai_real_32bit.Create(ts32real(value))); s64real : {$ifdef ARM} - if current_settings.fputype in [fpu_fpa,fpu_fpa10,fpu_fpa11] then + if (current_settings.fputype in [fpu_fpa,fpu_fpa10,fpu_fpa11]) and + not(cs_fp_emulation in current_settings.moduleswitches) then list.concat(Tai_real_64bit.Create_hiloswapped(ts64real(value))) else {$endif ARM} diff --git a/compiler/rautils.pas b/compiler/rautils.pas index 3fade1499d..e7bc843b4b 100644 --- a/compiler/rautils.pas +++ b/compiler/rautils.pas @@ -1482,7 +1482,8 @@ end; s32real : p.concat(Tai_real_32bit.Create(value)); s64real : {$ifdef ARM} - if current_settings.fputype in [fpu_fpa,fpu_fpa10,fpu_fpa11] then + if (current_settings.fputype in [fpu_fpa,fpu_fpa10,fpu_fpa11]) and + not(cs_fp_emulation in current_settings.moduleswitches) then p.concat(Tai_real_64bit.Create_hiloswapped(value)) else {$endif ARM}