浏览代码

* RiscV: generate mret only for FreeRTOS and Embedded

florian 3 年之前
父节点
当前提交
e66378ee59
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      compiler/riscv/cgrv.pas

+ 1 - 1
compiler/riscv/cgrv.pas

@@ -690,7 +690,7 @@ unit cgrv;
               list.concat(taicpu.op_reg_reg_const(A_ADDI,NR_STACK_POINTER_REG,NR_STACK_POINTER_REG,postcompensation));
           end;
 
-        if po_interrupt in current_procinfo.procdef.procoptions then
+        if (target_info.system in (systems_freertos+systems_embedded)) and (po_interrupt in current_procinfo.procdef.procoptions) then
           begin
             list.concat(Taicpu.Op_none(A_MRET));
           end