mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 23:49:05 +02:00
+ patch by fanjinke: Hygon support for the mmx unit, resolves #37391
git-svn-id: trunk@45848 -
This commit is contained in:
parent
2839533776
commit
769a8fa248
@ -61,6 +61,7 @@ unit mmx;
|
|||||||
|
|
||||||
{ return base type of processor: 0 - is Unknown, 10 - is AMD (AuthenticAMD), }
|
{ return base type of processor: 0 - is Unknown, 10 - is AMD (AuthenticAMD), }
|
||||||
{ 20 - is Intel (GenuineIntel) }
|
{ 20 - is Intel (GenuineIntel) }
|
||||||
|
{ 30 - is Hygon (HygonGenuine) }
|
||||||
function getdevel:byte;
|
function getdevel:byte;
|
||||||
|
|
||||||
var
|
var
|
||||||
@ -80,6 +81,7 @@ unit mmx;
|
|||||||
end;
|
end;
|
||||||
if ((_ebx=$68747541) and (_ecx=$444D4163) and (_edx=$69746E65)) then getdevel:=10;
|
if ((_ebx=$68747541) and (_ecx=$444D4163) and (_edx=$69746E65)) then getdevel:=10;
|
||||||
if ((_ebx=$756E6547) and (_ecx=$6C65746E) and (_edx=$49656E69)) then getdevel:=20;
|
if ((_ebx=$756E6547) and (_ecx=$6C65746E) and (_edx=$49656E69)) then getdevel:=20;
|
||||||
|
if ((_ebx=$6f677948) and (_ecx=$656e6975) and (_edx=$6e65476e)) then getdevel:=30;
|
||||||
end
|
end
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -114,7 +116,7 @@ unit mmx;
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
{ are there third party cpus supporting amd 3d instructions? }
|
{ are there third party cpus supporting amd 3d instructions? }
|
||||||
if cpuid_support and (getdevel=10) then
|
if cpuid_support and ((getdevel=10) or (getdevel=30)) then
|
||||||
begin
|
begin
|
||||||
asm
|
asm
|
||||||
pushl %ebx
|
pushl %ebx
|
||||||
@ -137,7 +139,7 @@ unit mmx;
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
{ are there third party cpus supporting amd dsp instructions? }
|
{ are there third party cpus supporting amd dsp instructions? }
|
||||||
if cpuid_support and (getdevel=10) then
|
if cpuid_support and ((getdevel=10) or (getdevel=30)) then
|
||||||
begin
|
begin
|
||||||
asm
|
asm
|
||||||
pushl %ebx
|
pushl %ebx
|
||||||
@ -160,7 +162,7 @@ unit mmx;
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
{ are there third party cpus supporting amd mmx instructions? }
|
{ are there third party cpus supporting amd mmx instructions? }
|
||||||
if cpuid_support and (getdevel=10) then
|
if cpuid_support and ((getdevel=10) or (getdevel=30)) then
|
||||||
begin
|
begin
|
||||||
asm
|
asm
|
||||||
pushl %ebx
|
pushl %ebx
|
||||||
|
Loading…
Reference in New Issue
Block a user