Update FPC.
I have just build a brand new FPC trunk compiler on windows arm64 itself !!
Used a cross-compiled bootstrapper.
Working flawless.
Update Lazarus.
Lazarus has many many things like this:
{$ifdef cpui386}
with TDbgWinThread(AThread).FCurrentContext^.def do DebugLn(Format('DS: 0x%x, ES: 0x%x, FS: 0x%x, GS: 0x%x', [SegDs, SegEs, SegFs, SegGs]));
{$else}
with TDbgWinThread(AThread).FCurrentContext^.def do DebugLn(Format('SegDS: 0x%4.4x, SegES: 0x%4.4x, SegFS: 0x%4.4x, SegGS: 0x%4.4x', [SegDs, SegEs, SegFs, SegGs]));
{$endif}
So, Lazarus assumes that anything other than win32 (i386) is x86_64 on Windows.
Now that FPC works well on Windows ARM64, this needs change.
Any Lazarus devs out there willing to assist ?
Its a lot of work.