Browse Source

* use VPXORD in avx-512 mode as VPXOR does not work for the upper 16 registers

git-svn-id: trunk@47368 -
florian 4 years ago
parent
commit
78244d89dc
3 changed files with 7 additions and 0 deletions
  1. 2 0
      compiler/i386/aoptcpu.pas
  2. 3 0
      compiler/x86/cgx86.pas
  3. 2 0
      compiler/x86_64/aoptcpu.pas

+ 2 - 0
compiler/i386/aoptcpu.pas

@@ -143,6 +143,8 @@ unit aoptcpu;
                   Result:=OptPass1Imul(p);
                 A_CMP:
                   Result:=OptPass1Cmp(p);
+                A_VPXORD,
+                A_VPXORQ,
                 A_VXORPS,
                 A_VXORPD,
                 A_VPXOR:

+ 3 - 0
compiler/x86/cgx86.pas

@@ -1891,6 +1891,9 @@ unit cgx86;
             if UseAVX then
               begin
                 asmop:=opmm2asmop_full_avx[op];
+                { A_VPXOR does not support the upper 16 registers }
+                if (asmop=A_VPXOR) and (FPUX86_HAS_32MMREGS in fpu_capabilities[current_settings.fputype]) then
+                  asmop:=A_VPXORD;
                 if size in [OS_M256,OS_M512] then
                   Include(current_procinfo.flags,pi_uses_ymm);
               end

+ 2 - 0
compiler/x86_64/aoptcpu.pas

@@ -129,6 +129,8 @@ uses
                   result:=OptPass1FLD(p);
                 A_CMP:
                   result:=OptPass1Cmp(p);
+                A_VPXORD,
+                A_VPXORQ,
                 A_VXORPS,
                 A_VXORPD,
                 A_VPXOR: