summaryrefslogtreecommitdiff
path: root/compiler/riscv64/cpubase.pas
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/riscv64/cpubase.pas')
-rw-r--r--compiler/riscv64/cpubase.pas9
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/riscv64/cpubase.pas b/compiler/riscv64/cpubase.pas
index c506f09fb6..a93b3a2d1f 100644
--- a/compiler/riscv64/cpubase.pas
+++ b/compiler/riscv64/cpubase.pas
@@ -345,6 +345,7 @@ const
function inverse_cond(const c: TAsmCond): Tasmcond; {$ifdef USEINLINE}inline;{$endif USEINLINE}
function dwarf_reg(r:tregister):shortint;
function dwarf_reg_no_error(r:tregister):shortint;
+ function eh_return_data_regno(nr: longint): longint;
function conditions_equal(const c1,c2: TAsmCond): boolean;
@@ -461,6 +462,14 @@ implementation
result:=regdwarf_table[findreg_by_number(r)];
end;
+ function eh_return_data_regno(nr: longint): longint;
+ begin
+ if (nr>=0) and (nr<4) then
+ result:=nr+10
+ else
+ result:=-1;
+ end;
+
function conditions_equal(const c1, c2: TAsmCond): boolean;
begin
result:=c1=c2;