mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-05 06:26:02 +02:00
* Risc-V: return with mret from interrupt handlers, resolves #39737
This commit is contained in:
parent
b810afa193
commit
ca29df1aa9
@ -323,7 +323,12 @@ unit cgcpu;
|
||||
end;
|
||||
end;
|
||||
|
||||
list.concat(taicpu.op_reg_reg(A_JALR,NR_X0,NR_RETURN_ADDRESS_REG));
|
||||
if po_interrupt in current_procinfo.procdef.procoptions then
|
||||
begin
|
||||
list.concat(Taicpu.Op_none(A_MRET));
|
||||
end
|
||||
else
|
||||
list.concat(taicpu.op_reg_reg(A_JALR,NR_X0,NR_RETURN_ADDRESS_REG));
|
||||
end;
|
||||
|
||||
|
||||
|
@ -513,7 +513,12 @@ implementation
|
||||
end;
|
||||
end;
|
||||
|
||||
list.concat(taicpu.op_reg_reg(A_JALR,NR_X0,NR_RETURN_ADDRESS_REG));
|
||||
if po_interrupt in current_procinfo.procdef.procoptions then
|
||||
begin
|
||||
list.concat(Taicpu.Op_none(A_MRET));
|
||||
end
|
||||
else
|
||||
list.concat(taicpu.op_reg_reg(A_JALR,NR_X0,NR_RETURN_ADDRESS_REG));
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user