Skip to content

Long overdue FPC 64bit Support #54

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 27, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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