Recent

Author Topic: Lazarus for Windows on aarch64 (ARM64) - Native Compiler  (Read 44078 times)

Wallaby

  • Full Member
  • ***
  • Posts: 132
Re: Lazarus for Windows on aarch64 (ARM64) - Native Compiler
« Reply #195 on: February 11, 2026, 01:14:00 pm »
Updated set of patches. This resolves a few edge cases that the previous patches did not address:

This crashed:
Code: Pascal  [Select][+][-]
  1. program texcept;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. uses
  6.   SysUtils;
  7.  
  8. procedure Test(aArg: array of String);
  9. begin
  10.   raise Exception.Create('Blubb');
  11. end;
  12.  
  13. begin
  14.  
  15. end.
  16.  

This crashed as well:
Code: Pascal  [Select][+][-]
  1. program texcept;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. uses
  6.   SysUtils;
  7.  
  8. type
  9.   TTest = class
  10.     fName: String;
  11.     property Name: String read fName;
  12.   end;
  13.  
  14. procedure Bar(const aArg: array of const);
  15. begin
  16. end;
  17.  
  18. procedure Test(aArg: TTest);
  19. begin
  20.   try
  21.     raise Exception.Create('Test');
  22.   finally
  23.     Bar([aArg.Name]);
  24.   end;
  25. end;
  26.  
  27. begin
  28.  
  29. end.
  30.  

In standard generics test this would fail due to a mismatch in how parameters are passed:
Code: Pascal  [Select][+][-]
  1. TTestStdCollections.Test_MethodsList

Building is same as the above with win32 FpcupDeluxe, use trunk/main adding two diff files 1268.diff and 1289.diff then installing the cross-compiler and Lazarus.

msintle

  • Sr. Member
  • ****
  • Posts: 374
Re: Lazarus for Windows on aarch64 (ARM64) - Native Compiler
« Reply #196 on: February 11, 2026, 04:06:03 pm »
Updated set of patches. This resolves a few edge cases that the previous patches did not address:

This crashed:
Code: Pascal  [Select][+][-]
  1. program texcept;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. uses
  6.   SysUtils;
  7.  
  8. procedure Test(aArg: array of String);
  9. begin
  10.   raise Exception.Create('Blubb');
  11. end;
  12.  
  13. begin
  14.  
  15. end.
  16.  

This crashed as well:
Code: Pascal  [Select][+][-]
  1. program texcept;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. uses
  6.   SysUtils;
  7.  
  8. type
  9.   TTest = class
  10.     fName: String;
  11.     property Name: String read fName;
  12.   end;
  13.  
  14. procedure Bar(const aArg: array of const);
  15. begin
  16. end;
  17.  
  18. procedure Test(aArg: TTest);
  19. begin
  20.   try
  21.     raise Exception.Create('Test');
  22.   finally
  23.     Bar([aArg.Name]);
  24.   end;
  25. end;
  26.  
  27. begin
  28.  
  29. end.
  30.  

In standard generics test this would fail due to a mismatch in how parameters are passed:
Code: Pascal  [Select][+][-]
  1. TTestStdCollections.Test_MethodsList

Building is same as the above with win32 FpcupDeluxe, use trunk/main adding two diff files 1268.diff and 1289.diff then installing the cross-compiler and Lazarus.

Thanks for the update!

So do we need the previous 7 patches as well as in the earlier instructions?

This is for trunk only again, right?

AlexTP

  • Hero Member
  • *****
  • Posts: 2673
    • UVviewsoft
Re: Lazarus for Windows on aarch64 (ARM64) - Native Compiler
« Reply #197 on: February 11, 2026, 05:57:57 pm »
Wallaby,
is your works 'synced' with this merge request?
https://gitlab.com/freepascal.org/fpc/source/-/merge_requests/1268
(updated 1 day ago)

Wallaby

  • Full Member
  • ***
  • Posts: 132
Re: Lazarus for Windows on aarch64 (ARM64) - Native Compiler
« Reply #198 on: February 11, 2026, 10:21:41 pm »
These patches are for the trunk/main only and yes, they are actually the latest ones from the MR.

They supersede the old set, so only two files needed. One is from MR 1268 patches SEH on ARM64 (affects multiple files), the other patches code generation related to parameter passing MR 1289 (affects one file).

They are logically separate, so two patches. Currently I have a set of 2,507 tests, primarily taken from the compiler testing framework and other open-source projects - they all pass with the above patches.

 

TinyPortal © 2005-2018