View Issue Details

IDProjectCategoryView StatusLast Update
0037391FPCCompilerpublic2020-07-24 22:54
Reporterfanjinke Assigned ToFlorian  
PrioritynormalSeverityminorReproducibilityN/A
Status resolvedResolutionfixed 
Fixed in Version3.3.1 
Summary0037391: Add Hygon Dhyana support to ThreeDNow
DescriptionAdd Hygon vendor checking to reuse AMD 3D feature support code on AMD.
Tagscompiler, i386, patch, x86, x86_64
Fixed in Revision45848
FPCOldBugId
FPCTarget-
Attached Files

Activities

fanjinke

2020-07-20 14:06

reporter  

fpc.patch (1,678 bytes)   
Index: rtl/i386/mmx.pp
===================================================================
--- rtl/i386/mmx.pp	(revision 45812)
+++ rtl/i386/mmx.pp	(working copy)
@@ -61,6 +61,7 @@
 
     { return base type of processor: 0 - is Unknown, 10 - is AMD (AuthenticAMD), }
     {                                20 - is Intel (GenuineIntel) }
+    {                                30 - is Hygon (HygonGenuine) }
     function getdevel:byte;
 
       var
@@ -80,6 +81,7 @@
             end;
             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=$6f677948) and (_ecx=$656e6975) and (_edx=$6e65476e)) then getdevel:=30;	
         end
     end;
 
@@ -114,7 +116,7 @@
 
       begin
          { 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
               asm
                  pushl %ebx
@@ -137,7 +139,7 @@
 
       begin
          { 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
               asm
                  pushl %ebx
@@ -160,7 +162,7 @@
 
       begin
          { 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
               asm
                  pushl %ebx
fpc.patch (1,678 bytes)   

Florian

2020-07-24 22:54

administrator   ~0124312

Thanks, applied.

Issue History

Date Modified Username Field Change
2020-07-20 14:06 fanjinke New Issue
2020-07-20 14:06 fanjinke File Added: fpc.patch
2020-07-21 03:56 fanjinke Tag Attached: i386
2020-07-21 03:56 fanjinke Tag Attached: compiler
2020-07-21 03:56 fanjinke Tag Attached: x86_64
2020-07-21 03:56 fanjinke Tag Attached: x86
2020-07-21 03:56 fanjinke Tag Attached: patch
2020-07-24 22:54 Florian Assigned To => Florian
2020-07-24 22:54 Florian Status new => resolved
2020-07-24 22:54 Florian Resolution open => fixed
2020-07-24 22:54 Florian Fixed in Version => 3.3.1
2020-07-24 22:54 Florian Fixed in Revision => 45848
2020-07-24 22:54 Florian FPCTarget => -
2020-07-24 22:54 Florian Note Added: 0124312