mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 07:09:29 +02:00
* implement thunking for x86_64 SysV ABI targets
git-svn-id: trunk@42734 -
This commit is contained in:
parent
58ada1f547
commit
652e1985a9
@ -863,7 +863,7 @@ asm
|
||||
jmp %eax
|
||||
RawThunkEnd:
|
||||
end;
|
||||
{$elseif defined(cpux86_64) and defined(win64)}
|
||||
{$elseif defined(cpux86_64)}
|
||||
const
|
||||
RawThunkPlaceholderProc = PtrUInt($8765876587658765);
|
||||
RawThunkPlaceholderContext = PtrUInt($4321432143214321);
|
||||
@ -872,6 +872,7 @@ type
|
||||
TRawThunkProc = PtrUInt;
|
||||
TRawThunkContext = PtrUInt;
|
||||
|
||||
{$ifdef win64}
|
||||
procedure RawThunk; assembler; nostackframe;
|
||||
asm
|
||||
{ Self is always in register RCX }
|
||||
@ -880,6 +881,16 @@ asm
|
||||
jmp %rax
|
||||
RawThunkEnd:
|
||||
end;
|
||||
{$else}
|
||||
procedure RawThunk; assembler; nostackframe;
|
||||
asm
|
||||
{ Self is always in register RDI }
|
||||
movl RawThunkPlaceholderContext, %rdi
|
||||
movl RawThunkPlaceholderProc, %rax
|
||||
jmp %rax
|
||||
RawThunkEnd:
|
||||
end;
|
||||
{$endif}
|
||||
{$endif}
|
||||
|
||||
{$if declared(RawThunk)}
|
||||
|
Loading…
Reference in New Issue
Block a user