Browse Source

* do no generated debug comment in assembler output of RiscV if not requested

florian 1 year ago
parent
commit
39f7172ee8

+ 1 - 1
compiler/riscv/aoptcpurv.pas

@@ -27,7 +27,7 @@ interface
 
 {$I fpcdefs.inc}
 
-{$define DEBUG_AOPTCPU}
+{ $define DEBUG_AOPTCPU}
 
 uses
   cpubase,

+ 2 - 1
compiler/riscv32/cgcpu.pas

@@ -116,8 +116,9 @@ unit cgcpu;
       var
         ai: taicpu;
       begin
+{$ifdef EXTDEBUG}
         list.concat(tai_comment.Create(strpnew('Move '+tcgsize2str(fromsize)+'->'+tcgsize2str(tosize))));
-
+{$endif EXTDEBUG}
         if (tosize=OS_S32) and (fromsize=OS_32) then
           begin
             ai:=taicpu.op_reg_reg_const(A_ADDI,reg2,reg1,0);

+ 1 - 1
compiler/riscv64/aoptcpu.pas

@@ -27,7 +27,7 @@ interface
 
 {$I fpcdefs.inc}
 
-{$define DEBUG_AOPTCPU}
+{ $define DEBUG_AOPTCPU}
 
 uses
   cpubase,

+ 2 - 0
compiler/riscv64/cgcpu.pas

@@ -94,7 +94,9 @@ implementation
       var
         ai: taicpu;
       begin
+{$ifdef EXTDEBUG}
         list.concat(tai_comment.Create(strpnew('Move '+tcgsize2str(fromsize)+'->'+tcgsize2str(tosize))));
+{$endif EXTDEBUG}
 
         if (tcgsize2unsigned[tosize]=OS_64) and (fromsize=OS_S32) then
           list.Concat(taicpu.op_reg_reg_const(A_ADDIW,reg2,reg1,0))