* implement interface thunk for RISC V 32- and 64-bit

git-svn-id: trunk@44071 -
This commit is contained in:
svenbarth 2020-01-30 21:46:11 +00:00
parent f1eccca3a6
commit 7bcdc2b37f

View File

@ -975,6 +975,46 @@ asm
jmp (a0)
RawThunkEnd:
end;
{$elseif defined(cpuriscv64)}
const
RawThunkPlaceholderProc = $8765876587658765;
RawThunkPlaceholderContext = $4321432143214321;
type
TRawThunkProc = PtrUInt;
TRawThunkContext = PtrUInt;
procedure RawThunk; assembler; nostackframe;
asm
ld x5, .LProc
ld x10, .LContext
jalr x0, x5, 0
.LProc:
.quad RawThunkPlaceholderProc
.LContext:
.quad RawThunkPlaceholderContext
RawThunkEnd:
end;
{$elseif defined(cpuriscv32)}
const
RawThunkPlaceholderProc = $87658765;
RawThunkPlaceholderContext = $43214321;
type
TRawThunkProc = PtrUInt;
TRawThunkContext = PtrUInt;
procedure RawThunk; assembler; nostackframe;
asm
lw x5, .LProc
lw x10, .LContext
jalr x0, x5, 0
.LProc:
.long RawThunkPlaceholderProc
.LContext:
.long RawThunkPlaceholderContext
RawThunkEnd:
end;
{$endif}
{$if declared(RawThunk)}