diff options
author | florian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2020-10-10 21:08:13 +0000 |
---|---|---|
committer | florian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2020-10-10 21:08:13 +0000 |
commit | d9bbb95db0aa0d0a1c37bf476814ffeffadc9d51 (patch) | |
tree | 55aae56e637a0e59132eb1cbbcf5431d98476233 /compiler/x86_64 | |
parent | f569ecefbee789529af48d4dadd835bebb23e8fd (diff) | |
download | fpc-d9bbb95db0aa0d0a1c37bf476814ffeffadc9d51.tar.gz |
+ make use of avx-512 instructions vcvtuis2s* if possible
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@47078 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/x86_64')
-rw-r--r-- | compiler/x86_64/cpuinfo.pas | 5 | ||||
-rw-r--r-- | compiler/x86_64/nx64cnv.pas | 7 |
2 files changed, 7 insertions, 5 deletions
diff --git a/compiler/x86_64/cpuinfo.pas b/compiler/x86_64/cpuinfo.pas index 2c9bd3d8d4..05d0537b72 100644 --- a/compiler/x86_64/cpuinfo.pas +++ b/compiler/x86_64/cpuinfo.pas @@ -181,7 +181,8 @@ type tfpuflags = (FPUX86_HAS_AVXUNIT, - FPUX86_HAS_32MMREGS + FPUX86_HAS_32MMREGS, + FPUX86_HAS_AVX512F ); const @@ -202,7 +203,7 @@ type { fpu_sse42 } [], { fpu_avx } [FPUX86_HAS_AVXUNIT], { fpu_avx2 } [FPUX86_HAS_AVXUNIT], - { fpu_avx512 } [FPUX86_HAS_AVXUNIT,FPUX86_HAS_32MMREGS] + { fpu_avx512 } [FPUX86_HAS_AVXUNIT,FPUX86_HAS_32MMREGS,FPUX86_HAS_AVX512F] ); Implementation diff --git a/compiler/x86_64/nx64cnv.pas b/compiler/x86_64/nx64cnv.pas index d39de187fc..80e1248114 100644 --- a/compiler/x86_64/nx64cnv.pas +++ b/compiler/x86_64/nx64cnv.pas @@ -64,7 +64,7 @@ implementation symconst,symdef, cgbase,cga, ncnv, - cpubase, + cpubase,cpuinfo, cgutils,cgobj,hlcgobj,cgx86; @@ -72,7 +72,8 @@ implementation begin result:=nil; if use_vectorfpu(resultdef) and - (torddef(left.resultdef).ordtype=u32bit) then + (torddef(left.resultdef).ordtype=u32bit) and + not(FPUX86_HAS_AVX512F in fpu_capabilities[current_settings.fputype]) then begin inserttypeconv(left,s64inttype); firstpass(left); @@ -90,7 +91,7 @@ implementation l1,l2 : tasmlabel; op : tasmop; begin - if use_vectorfpu(resultdef) then + if use_vectorfpu(resultdef) and not(FPUX86_HAS_AVX512F in fpu_capabilities[current_settings.fputype]) then begin if is_double(resultdef) then op:=A_CVTSI2SD |