|
@@ -1315,15 +1315,25 @@ implementation
|
|
|
case tfloatdef(left.resultdef).floattype of
|
|
|
s32real:
|
|
|
begin
|
|
|
- { using left.location.register here as 3rd parameter is crucial to break dependency chains }
|
|
|
- current_asmdata.CurrAsmList.concat(taicpu.op_const_reg_reg_reg(A_VROUNDSS,S_NO,3,left.location.register,left.location.register,location.register));
|
|
|
- current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg_reg(A_VSUBSS,S_NO,location.register,left.location.register,location.register));
|
|
|
+ if UseAVX512 and (FPUX86_HAS_AVX512DQ in fpu_capabilities[current_settings.fputype]) then
|
|
|
+ current_asmdata.CurrAsmList.concat(taicpu.op_const_reg_reg_reg(A_VREDUCESS,S_NO,3,left.location.register,left.location.register,location.register))
|
|
|
+ else
|
|
|
+ begin
|
|
|
+ { using left.location.register here as 3rd parameter is crucial to break dependency chains }
|
|
|
+ current_asmdata.CurrAsmList.concat(taicpu.op_const_reg_reg_reg(A_VROUNDSS,S_NO,3,left.location.register,left.location.register,location.register));
|
|
|
+ current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg_reg(A_VSUBSS,S_NO,location.register,left.location.register,location.register));
|
|
|
+ end;
|
|
|
end;
|
|
|
s64real:
|
|
|
begin
|
|
|
- { using left.location.register here as 3rd parameter is crucial to break dependency chains }
|
|
|
- current_asmdata.CurrAsmList.concat(taicpu.op_const_reg_reg_reg(A_VROUNDSD,S_NO,3,left.location.register,left.location.register,location.register));
|
|
|
- current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg_reg(A_VSUBSD,S_NO,location.register,left.location.register,location.register));
|
|
|
+ if UseAVX512 and (FPUX86_HAS_AVX512DQ in fpu_capabilities[current_settings.fputype]) then
|
|
|
+ current_asmdata.CurrAsmList.concat(taicpu.op_const_reg_reg_reg(A_VREDUCESD,S_NO,3,left.location.register,left.location.register,location.register))
|
|
|
+ else
|
|
|
+ begin
|
|
|
+ { using left.location.register here as 3rd parameter is crucial to break dependency chains }
|
|
|
+ current_asmdata.CurrAsmList.concat(taicpu.op_const_reg_reg_reg(A_VROUNDSD,S_NO,3,left.location.register,left.location.register,location.register));
|
|
|
+ current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg_reg(A_VSUBSD,S_NO,location.register,left.location.register,location.register));
|
|
|
+ end;
|
|
|
end;
|
|
|
else
|
|
|
internalerror(2017052102);
|