Browse Source

* x86: Made a check for BMI2 more explicit in the integer division code generator

J. Gareth "Curious Kit" Moreton 2 years ago
parent
commit
63a2395e2c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      compiler/x86/nx86mat.pas

+ 1 - 1
compiler/x86/nx86mat.pas

@@ -572,7 +572,7 @@ interface
             DoMod: Boolean;
           begin
 {$ifndef i8086}
-            if (current_settings.cputype = cpu_core_avx2) then
+            IF (CPUX86_HAS_BMI2 in cpu_capabilities[current_settings.cputype]) then
               begin
                 { If BMI2 is available, use more efficient instructions }
                 DoBMI2ReciprocalDivision;