瀏覽代碼

* fixed compilation of loongarch compiler
* proper declaration of ABIs

florian 1 周之前
父節點
當前提交
466f50d173
共有 3 個文件被更改,包括 14 次插入2 次删除
  1. 1 1
      compiler/options.pas
  2. 6 0
      compiler/systems.inc
  3. 7 1
      compiler/systems.pas

+ 1 - 1
compiler/options.pas

@@ -5752,7 +5752,7 @@ begin
 
 {$if defined(loongarch64)}
   { LoongArch defaults }
-  if (target_info.abi = abi_default) then
+  if (target_info.abi = abi_loongarch_lp64d) then
     begin
       init_settings.cputype:=cpu_3a;
       init_settings.fputype:=fpu_fd;

+ 6 - 0
compiler/systems.inc

@@ -404,6 +404,12 @@
             ,abi_mips_n32
             ,abi_mips_o64
             ,abi_mips_n64
+            ,abi_loongarch_lp64s
+            ,abi_loongarch_lp64f
+            ,abi_loongarch_lp64d
+            ,abi_loongarch_lp32s
+            ,abi_loongarch_lp32f
+            ,abi_loongarch_lp32d
        );
 
        tcgbackend = (

+ 7 - 1
compiler/systems.pas

@@ -518,7 +518,13 @@ interface
          (name: 'O32'; supported:{$if defined(mips)}true{$else}false{$endif}),
          (name: 'N32'; supported:{$if defined(mips)}true{$else}false{$endif}),
          (name: 'O64'; supported:{$if defined(mips)}true{$else}false{$endif}),
-         (name: 'N64'; supported:{$if defined(mips)}true{$else}false{$endif})
+         (name: 'N64'; supported:{$if defined(mips)}true{$else}false{$endif}),
+         (name: 'LP64S'; supported:{$if defined(loongarch64)}true{$else}false{$endif}),
+         (name: 'LP64F'; supported:{$if defined(loongarch64)}true{$else}false{$endif}),
+         (name: 'LP64D'; supported:{$if defined(loongarch64)}true{$else}false{$endif}),
+         (name: 'LP32S'; supported:{$if defined(loongarch32)}true{$else}false{$endif}),
+         (name: 'LP32F'; supported:{$if defined(loongarch32)}true{$else}false{$endif}),
+         (name: 'LP32D'; supported:{$if defined(loongarch32)}true{$else}false{$endif})
        );
 
        cgbackend2str: array[tcgbackend] of ansistring = (