|
@@ -863,7 +863,7 @@ asm
|
|
jmp %eax
|
|
jmp %eax
|
|
RawThunkEnd:
|
|
RawThunkEnd:
|
|
end;
|
|
end;
|
|
-{$elseif defined(cpux86_64) and defined(win64)}
|
|
|
|
|
|
+{$elseif defined(cpux86_64)}
|
|
const
|
|
const
|
|
RawThunkPlaceholderProc = PtrUInt($8765876587658765);
|
|
RawThunkPlaceholderProc = PtrUInt($8765876587658765);
|
|
RawThunkPlaceholderContext = PtrUInt($4321432143214321);
|
|
RawThunkPlaceholderContext = PtrUInt($4321432143214321);
|
|
@@ -872,6 +872,7 @@ type
|
|
TRawThunkProc = PtrUInt;
|
|
TRawThunkProc = PtrUInt;
|
|
TRawThunkContext = PtrUInt;
|
|
TRawThunkContext = PtrUInt;
|
|
|
|
|
|
|
|
+{$ifdef win64}
|
|
procedure RawThunk; assembler; nostackframe;
|
|
procedure RawThunk; assembler; nostackframe;
|
|
asm
|
|
asm
|
|
{ Self is always in register RCX }
|
|
{ Self is always in register RCX }
|
|
@@ -880,6 +881,16 @@ asm
|
|
jmp %rax
|
|
jmp %rax
|
|
RawThunkEnd:
|
|
RawThunkEnd:
|
|
end;
|
|
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}
|
|
{$endif}
|
|
|
|
|
|
{$if declared(RawThunk)}
|
|
{$if declared(RawThunk)}
|