Browse Source

* implement RawThunk for m68k (works for Coldfire, but I hope the real 68k will handle it as well)

git-svn-id: trunk@42801 -
svenbarth 6 years ago
parent
commit
3df9552444
1 changed files with 17 additions and 0 deletions
  1. 17 0
      packages/rtl-objpas/src/inc/rtti.pp

+ 17 - 0
packages/rtl-objpas/src/inc/rtti.pp

@@ -916,6 +916,23 @@ asm
   .long RawThunkPlaceholderContext
 RawThunkEnd:
 end;
+{$elseif defined(cpum68k)}
+const
+  RawThunkPlaceholderProc = $87658765;
+  RawThunkPlaceholderContext = $43214321;
+
+type
+  TRawThunkProc = PtrUInt;
+  TRawThunkContext = PtrUInt;
+
+procedure RawThunk; assembler; nostackframe;
+asm
+  lea 4(sp), a0
+  move.l #RawThunkPlaceholderContext, (a0)
+  move.l #RawThunkPlaceholderProc, a0
+  jmp (a0)
+RawThunkEnd:
+end;
 {$endif}
 
 {$if declared(RawThunk)}