mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 22:29:24 +02:00
+ cpu capability CPUX86_HAS_CMOV
git-svn-id: trunk@29776 -
This commit is contained in:
parent
6ef8a8afc9
commit
de17e9fa1c
@ -151,7 +151,8 @@ Const
|
||||
|
||||
type
|
||||
tcpuflags =
|
||||
(CPUX86_HAS_SSEUNIT,
|
||||
(CPUX86_HAS_CMOV,
|
||||
CPUX86_HAS_SSEUNIT,
|
||||
CPUX86_HAS_BMI1,
|
||||
CPUX86_HAS_BMI2,
|
||||
CPUX86_HAS_POPCNT,
|
||||
@ -167,13 +168,13 @@ type
|
||||
{ cpu_none } [],
|
||||
{ cpu_386 } [],
|
||||
{ cpu_Pentium } [],
|
||||
{ cpu_Pentium2 } [],
|
||||
{ cpu_Pentium3 } [CPUX86_HAS_SSEUNIT],
|
||||
{ cpu_Pentium4 } [CPUX86_HAS_SSEUNIT],
|
||||
{ cpu_PentiumM } [CPUX86_HAS_SSEUNIT],
|
||||
{ cpu_core_i } [CPUX86_HAS_SSEUNIT,CPUX86_HAS_POPCNT],
|
||||
{ cpu_core_avx } [CPUX86_HAS_SSEUNIT,CPUX86_HAS_POPCNT,CPUX86_HAS_AVXUNIT],
|
||||
{ cpu_core_avx2 } [CPUX86_HAS_SSEUNIT,CPUX86_HAS_POPCNT,CPUX86_HAS_AVXUNIT,CPUX86_HAS_BMI1,CPUX86_HAS_BMI2,CPUX86_HAS_LZCNT,CPUX86_HAS_MOVBE,CPUX86_HAS_FMA]
|
||||
{ cpu_Pentium2 } [CPUX86_HAS_CMOV],
|
||||
{ cpu_Pentium3 } [CPUX86_HAS_CMOV,CPUX86_HAS_SSEUNIT],
|
||||
{ cpu_Pentium4 } [CPUX86_HAS_CMOV,CPUX86_HAS_SSEUNIT],
|
||||
{ cpu_PentiumM } [CPUX86_HAS_CMOV,CPUX86_HAS_SSEUNIT],
|
||||
{ cpu_core_i } [CPUX86_HAS_CMOV,CPUX86_HAS_SSEUNIT,CPUX86_HAS_POPCNT],
|
||||
{ cpu_core_avx } [CPUX86_HAS_CMOV,CPUX86_HAS_SSEUNIT,CPUX86_HAS_POPCNT,CPUX86_HAS_AVXUNIT],
|
||||
{ cpu_core_avx2 } [CPUX86_HAS_CMOV,CPUX86_HAS_SSEUNIT,CPUX86_HAS_POPCNT,CPUX86_HAS_AVXUNIT,CPUX86_HAS_BMI1,CPUX86_HAS_BMI2,CPUX86_HAS_LZCNT,CPUX86_HAS_MOVBE,CPUX86_HAS_FMA]
|
||||
);
|
||||
|
||||
|
||||
|
@ -2076,7 +2076,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
if (current_settings.cputype>=cpu_Pentium2) then
|
||||
if CPUX86_HAS_CMOV in cpu_capabilities[current_settings.cputype] then
|
||||
begin
|
||||
{ check for
|
||||
jCC xxx
|
||||
|
@ -609,7 +609,7 @@ implementation
|
||||
hp : taicpu;
|
||||
begin
|
||||
{$ifdef i386}
|
||||
if current_settings.cputype<cpu_Pentium2 then
|
||||
if not(CPUX86_HAS_CMOV in cpu_capabilities[current_settings.cputype]) then
|
||||
begin
|
||||
opsize:=def_cgsize(left.resultdef);
|
||||
secondpass(left);
|
||||
|
@ -143,7 +143,8 @@ Const
|
||||
|
||||
type
|
||||
tcpuflags =
|
||||
(CPUX86_HAS_SSEUNIT,
|
||||
(CPUX86_HAS_CMOV,
|
||||
CPUX86_HAS_SSEUNIT,
|
||||
CPUX86_HAS_BMI1,
|
||||
CPUX86_HAS_BMI2,
|
||||
CPUX86_HAS_POPCNT,
|
||||
@ -157,10 +158,10 @@ type
|
||||
const
|
||||
cpu_capabilities : array[tcputype] of set of tcpuflags = (
|
||||
{ cpu_none } [],
|
||||
{ Athlon64 } [CPUX86_HAS_SSEUNIT],
|
||||
{ cpu_core_i } [CPUX86_HAS_SSEUNIT,CPUX86_HAS_POPCNT],
|
||||
{ cpu_core_avx } [CPUX86_HAS_SSEUNIT,CPUX86_HAS_POPCNT,CPUX86_HAS_AVXUNIT],
|
||||
{ cpu_core_avx2 } [CPUX86_HAS_SSEUNIT,CPUX86_HAS_POPCNT,CPUX86_HAS_AVXUNIT,CPUX86_HAS_BMI1,CPUX86_HAS_BMI2,CPUX86_HAS_LZCNT,CPUX86_HAS_MOVBE,CPUX86_HAS_FMA]
|
||||
{ Athlon64 } [CPUX86_HAS_CMOV,CPUX86_HAS_SSEUNIT],
|
||||
{ cpu_core_i } [CPUX86_HAS_CMOV,CPUX86_HAS_SSEUNIT,CPUX86_HAS_POPCNT],
|
||||
{ cpu_core_avx } [CPUX86_HAS_CMOV,CPUX86_HAS_SSEUNIT,CPUX86_HAS_POPCNT,CPUX86_HAS_AVXUNIT],
|
||||
{ cpu_core_avx2 } [CPUX86_HAS_CMOV,CPUX86_HAS_SSEUNIT,CPUX86_HAS_POPCNT,CPUX86_HAS_AVXUNIT,CPUX86_HAS_BMI1,CPUX86_HAS_BMI2,CPUX86_HAS_LZCNT,CPUX86_HAS_MOVBE,CPUX86_HAS_FMA]
|
||||
);
|
||||
|
||||
Implementation
|
||||
|
Loading…
Reference in New Issue
Block a user