Skip to content

Commit

Permalink
Merge pull request #54 from MikeRohsoft/master
Browse files Browse the repository at this point in the history
Long overdue FPC 64bit Support
  • Loading branch information
MahdiSafsafi authored Jan 27, 2019
2 parents 69339b8 + 465f278 commit f56090a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Source/CPUID.pas
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,17 @@ procedure ___CallCPUID(const ID: NativeInt; var CPUIDStruct);
MOV RAX,RCX
MOV R9,RDX
CPUID
{$IFNDEF FPC}
MOV R9.TCPUIDStruct.rEAX,EAX
MOV R9.TCPUIDStruct.rEBX,EBX
MOV R9.TCPUIDStruct.rECX,ECX
MOV R9.TCPUIDStruct.rEDX,EDX
{$ELSE FPC}
MOV [R9].TCPUIDStruct.rEAX,EAX
MOV [R9].TCPUIDStruct.rEBX,EBX
MOV [R9].TCPUIDStruct.rECX,ECX
MOV [R9].TCPUIDStruct.rEDX,EDX
{$ENDIF !FPC}
POP RDX
POP RBX
POP R9
Expand All @@ -160,7 +167,7 @@ function ___IsAVXSupported: Boolean;
2) Detect CPUID.1:ECX.AVX[bit 28] = 1
=> AVX instructions supported.
3) Issue XGETBV and verify that XCR0[2:1] = ‘11b’
3) Issue XGETBV and verify that XCR0[2:1] = ‘11b’
=> XMM state and YMM state are enabled by OS.
}
Expand Down

0 comments on commit f56090a

Please sign in to comment.