Browse Source

+ RiscV64: apply OptPass1OP also to addiw

florian 8 months ago
parent
commit
ccae78f97a
3 changed files with 5 additions and 2 deletions
  1. 3 0
      compiler/riscv/aoptcpurv.pas
  2. 1 1
      compiler/riscv/nrvset.pas
  3. 1 1
      rtl/x86_64/x86_64.inc

+ 3 - 0
compiler/riscv/aoptcpurv.pas

@@ -622,6 +622,9 @@ implementation
               A_LD,
               A_LD,
 {$endif riscv64}
 {$endif riscv64}
               A_ADD,
               A_ADD,
+{$ifdef riscv64}
+              A_ADDIW,
+{$endif riscv64}
               A_DIV,
               A_DIV,
               A_DIVU,
               A_DIVU,
 {$ifdef riscv64}
 {$ifdef riscv64}

+ 1 - 1
compiler/riscv/nrvset.pas

@@ -58,7 +58,7 @@ implementation
 
 
     procedure trvcasenode.optimizevalues(var max_linear_list : int64; var max_dist : qword);
     procedure trvcasenode.optimizevalues(var max_linear_list : int64; var max_dist : qword);
       begin
       begin
-        max_linear_list := 3;
+        max_linear_list:=3;
       end;
       end;
     
     
 
 

+ 1 - 1
rtl/x86_64/x86_64.inc

@@ -1597,7 +1597,7 @@ procedure fpc_cpuinit;
         fast_large_repmovstosb:=cpuid7_ebx and (1 shl 9)<>0;
         fast_large_repmovstosb:=cpuid7_ebx and (1 shl 9)<>0;
 {$endif}
 {$endif}
         { XGETBV support? }
         { XGETBV support? }
-        if (cpuid1_ecx and $8000000)<>0 then 
+        if (cpuid1_ecx and $8000000)<>0 then
           begin
           begin
             asm
             asm
               xorl %ecx,%ecx
               xorl %ecx,%ecx