Browse Source

Fix fullcycle compilation error due to -Sew option

  Add 'else' branch to 'case' keyword construct
  for the setting of ABI in riscv32 assembler call.
  Do the same for riscv64 assembler call.
Pierre Muller 2 years ago
parent
commit
87e4931489
1 changed files with 11 additions and 8 deletions
  1. 11 8
      compiler/riscv/agrvgas.pas

+ 11 - 8
compiler/riscv/agrvgas.pas

@@ -247,19 +247,22 @@ unit agrvgas;
 {$ifdef RISCV32}
 {$ifdef RISCV32}
       case target_info.abi of
       case target_info.abi of
         abi_riscv_ilp32:
         abi_riscv_ilp32:
-           Replace(result,'$ABI','ilp32');
+          Replace(result,'$ABI','ilp32');
         abi_riscv_ilp32f:
         abi_riscv_ilp32f:
-           Replace(result,'$ABI','ilp32f');
-        abi_riscv_hf,
-        abi_riscv_ilp32d:
-           Replace(result,'$ABI','ilp32d');
+          Replace(result,'$ABI','ilp32f');
+	else
+          Replace(result,'$ABI','ilp32d');
       end;
       end;
 {$endif RISCV32}
 {$endif RISCV32}
 {$ifdef RISCV64}
 {$ifdef RISCV64}
-        if target_info.abi=abi_riscv_hf then
-          Replace(result,'$ABI','lp64d')
-        else
+      case target_info.abi of
+        abi_riscv_lp64:
           Replace(result,'$ABI','lp64');
           Replace(result,'$ABI','lp64');
+        abi_riscv_lp64f:
+          Replace(result,'$ABI','lp64f');
+	else
+          Replace(result,'$ABI','lp64d');
+      end;
 {$endif RISCV64}
 {$endif RISCV64}
       end;
       end;