mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 17:29:11 +02:00
* moved UseAVX from cgx86 to cpubase
+ UseAVX512 git-svn-id: trunk@47346 -
This commit is contained in:
parent
e46b426ca1
commit
47066f0ce7
@ -178,8 +178,6 @@ unit cgx86;
|
|||||||
winstackpagesize = 4096;
|
winstackpagesize = 4096;
|
||||||
{$endif NOTARGETWIN}
|
{$endif NOTARGETWIN}
|
||||||
|
|
||||||
function UseAVX: boolean;
|
|
||||||
|
|
||||||
function UseIncDec: boolean;
|
function UseIncDec: boolean;
|
||||||
|
|
||||||
{ returns true, if the compiler should use leave instead of mov/pop }
|
{ returns true, if the compiler should use leave instead of mov/pop }
|
||||||
@ -196,12 +194,6 @@ unit cgx86;
|
|||||||
paramgr,procinfo,
|
paramgr,procinfo,
|
||||||
tgobj,ncgutil;
|
tgobj,ncgutil;
|
||||||
|
|
||||||
function UseAVX: boolean;
|
|
||||||
begin
|
|
||||||
Result:={$ifdef i8086}false{$else i8086}(FPUX86_HAS_AVXUNIT in fpu_capabilities[current_settings.fputype]){$endif i8086};
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
{ modern CPUs prefer add/sub over inc/dec because add/sub break instructions dependencies on flags
|
{ modern CPUs prefer add/sub over inc/dec because add/sub break instructions dependencies on flags
|
||||||
because they modify all flags }
|
because they modify all flags }
|
||||||
function UseIncDec: boolean;
|
function UseIncDec: boolean;
|
||||||
|
@ -385,11 +385,15 @@ topsize2memsize: array[topsize] of integer =
|
|||||||
function requires_fwait_on_8087(op: TAsmOp): boolean;
|
function requires_fwait_on_8087(op: TAsmOp): boolean;
|
||||||
{$endif i8086}
|
{$endif i8086}
|
||||||
|
|
||||||
|
function UseAVX: boolean;
|
||||||
|
function UseAVX512: boolean;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
globtype,
|
globtype,
|
||||||
rgbase,verbose;
|
rgbase,verbose,
|
||||||
|
cpuinfo;
|
||||||
|
|
||||||
const
|
const
|
||||||
{$if defined(x86_64)}
|
{$if defined(x86_64)}
|
||||||
@ -948,4 +952,17 @@ implementation
|
|||||||
{$endif i8086}
|
{$endif i8086}
|
||||||
|
|
||||||
|
|
||||||
|
function UseAVX: boolean;
|
||||||
|
begin
|
||||||
|
Result:={$ifdef i8086}false{$else i8086}(FPUX86_HAS_AVXUNIT in fpu_capabilities[current_settings.fputype]){$endif i8086};
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
function UseAVX512: boolean;
|
||||||
|
begin
|
||||||
|
// Result:=(current_settings.fputype in fpu_avx_instructionsets) {$ifndef i8086}or (CPUX86_HAS_AVXUNIT in cpu_capabilities[current_settings.cputype]){$endif i8086};
|
||||||
|
Result:=false;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user