|
@@ -30,6 +30,8 @@ interface
|
|
|
|
|
|
type
|
|
type
|
|
tx86typeconvnode = class(tcgtypeconvnode)
|
|
tx86typeconvnode = class(tcgtypeconvnode)
|
|
|
|
+ private
|
|
|
|
+ function int_to_real_mm_location: boolean;
|
|
protected
|
|
protected
|
|
function first_real_to_real : tnode;override;
|
|
function first_real_to_real : tnode;override;
|
|
{ procedure second_int_to_int;override; }
|
|
{ procedure second_int_to_int;override; }
|
|
@@ -223,6 +225,25 @@ implementation
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
+ function tx86typeconvnode.int_to_real_mm_location : boolean;
|
|
|
|
+ begin
|
|
|
|
+ result:=use_vectorfpu(resultdef) and
|
|
|
|
+{$ifdef cpu64bitalu}
|
|
|
|
+ ((torddef(left.resultdef).ordtype in [s32bit,s64bit]) or
|
|
|
|
+ ((torddef(left.resultdef).ordtype in [u32bit,u64bit]) and
|
|
|
|
+ (FPUX86_HAS_AVX512F in fpu_capabilities[current_settings.fputype]))
|
|
|
|
+ );
|
|
|
|
+{$else cpu64bitalu}
|
|
|
|
+ ((torddef(left.resultdef).ordtype=s32bit)
|
|
|
|
+{$ifdef i386}
|
|
|
|
+ or ((torddef(left.resultdef).ordtype=u32bit) and
|
|
|
|
+ (FPUX86_HAS_AVX512F in fpu_capabilities[current_settings.fputype]))
|
|
|
|
+{$endif i386}
|
|
|
|
+ );
|
|
|
|
+{$endif cpu64bitalu}
|
|
|
|
+ end;
|
|
|
|
+
|
|
|
|
+
|
|
function tx86typeconvnode.first_int_to_real : tnode;
|
|
function tx86typeconvnode.first_int_to_real : tnode;
|
|
|
|
|
|
begin
|
|
begin
|
|
@@ -233,8 +254,7 @@ implementation
|
|
firstpass(left)
|
|
firstpass(left)
|
|
end;
|
|
end;
|
|
|
|
|
|
- if use_vectorfpu(resultdef) and
|
|
|
|
- (torddef(left.resultdef).ordtype = s32bit) then
|
|
|
|
|
|
+ if int_to_real_mm_location then
|
|
expectloc:=LOC_MMREGISTER
|
|
expectloc:=LOC_MMREGISTER
|
|
else
|
|
else
|
|
expectloc:=LOC_FPUREGISTER;
|
|
expectloc:=LOC_FPUREGISTER;
|
|
@@ -259,20 +279,7 @@ implementation
|
|
{$endif i8086}
|
|
{$endif i8086}
|
|
if not(left.location.loc in [LOC_REGISTER,LOC_CREGISTER,LOC_REFERENCE,LOC_CREFERENCE]) then
|
|
if not(left.location.loc in [LOC_REGISTER,LOC_CREGISTER,LOC_REFERENCE,LOC_CREFERENCE]) then
|
|
hlcg.location_force_reg(current_asmdata.CurrAsmList,left.location,left.resultdef,left.resultdef,false);
|
|
hlcg.location_force_reg(current_asmdata.CurrAsmList,left.location,left.resultdef,left.resultdef,false);
|
|
- if use_vectorfpu(resultdef) and
|
|
|
|
-{$ifdef cpu64bitalu}
|
|
|
|
- ((torddef(left.resultdef).ordtype in [s32bit,s64bit]) or
|
|
|
|
- ((torddef(left.resultdef).ordtype in [u32bit,u64bit]) and
|
|
|
|
- (FPUX86_HAS_AVX512F in fpu_capabilities[current_settings.fputype]))
|
|
|
|
- ) then
|
|
|
|
-{$else cpu64bitalu}
|
|
|
|
- ((torddef(left.resultdef).ordtype=s32bit)
|
|
|
|
-{$ifdef i386}
|
|
|
|
- or ((torddef(left.resultdef).ordtype=u32bit) and
|
|
|
|
- (FPUX86_HAS_AVX512F in fpu_capabilities[current_settings.fputype]))
|
|
|
|
-{$endif i386}
|
|
|
|
- ) then
|
|
|
|
-{$endif cpu64bitalu}
|
|
|
|
|
|
+ if int_to_real_mm_location then
|
|
begin
|
|
begin
|
|
location_reset(location,LOC_MMREGISTER,def_cgsize(resultdef));
|
|
location_reset(location,LOC_MMREGISTER,def_cgsize(resultdef));
|
|
location.register:=cg.getmmregister(current_asmdata.CurrAsmList,location.size);
|
|
location.register:=cg.getmmregister(current_asmdata.CurrAsmList,location.size);
|