Browse Source

* patch by Pierre to fix spilling and jump handling of pseudo-instructions

florian 3 months ago
parent
commit
425ef662cc
2 changed files with 4 additions and 1 deletions
  1. 2 1
      compiler/riscv/aasmcpu.pas
  2. 2 0
      compiler/riscv/cpubase.pas

+ 2 - 1
compiler/riscv/aasmcpu.pas

@@ -507,7 +507,8 @@ uses cutils, cclasses;
               result:=operand_read;
 
           // SB type
-          A_Bxx:
+          A_BEQZ,A_BNEZ,A_BLEZ,A_BGEZ,A_BLTZ,A_BGTZ,A_BGT,A_BLE,
+          A_BGTU,A_BLEU,A_Bxx:
             result:=operand_read;
 
           // S type

+ 2 - 0
compiler/riscv/cpubase.pas

@@ -552,6 +552,8 @@ implementation
       begin
        is_calljmp:=false;
         case o of
+          A_BEQZ,A_BNEZ,A_BLEZ,A_BGEZ,A_BLTZ,A_BGTZ,A_BGT,A_BLE,
+          A_BGTU,A_BLEU,A_J,A_JR,
           A_JAL,A_JALR,A_Bxx,A_CALL:
             is_calljmp:=true;
           else