From 6b8f452804ceb7acfb083afb4e855d8ff0e8090c Mon Sep 17 00:00:00 2001 From: florian Date: Sat, 5 May 2012 18:35:22 +0000 Subject: [PATCH] * get_frame_*/get_caller_* does not work yet on MIPS git-svn-id: trunk@21239 - --- rtl/mips/mips.inc | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/rtl/mips/mips.inc b/rtl/mips/mips.inc index 9e7fdc37c2..e6bce6d77d 100644 --- a/rtl/mips/mips.inc +++ b/rtl/mips/mips.inc @@ -57,21 +57,36 @@ var {$define FPC_SYSTEM_HAS_GET_FRAME} function get_frame:pointer;assembler;nostackframe; asm - lw $2,0($sp) + { we need to use the information of the .pdr section to do this properly: + 0 proc. start adress + 4 regmask + 8 reg. offset + 12 fmask + 16 foffset + 20 frame size + 24 stack reg + 28 link reg + + Further, we need to know the pc + } + // lw $2,0($sp) + lui $2,0 end; {$define FPC_SYSTEM_HAS_GET_CALLER_ADDR} function get_caller_addr(framebp:pointer):pointer;assembler;nostackframe; asm - lw $2,4($4) // #movl 4(%eax),%eax + // lw $2,4($4) // #movl 4(%eax),%eax + lui $2,0 end; {$define FPC_SYSTEM_HAS_GET_CALLER_FRAME} function get_caller_frame(framebp:pointer):pointer;assembler;nostackframe; asm - lw $2,0($4) // #movl (%eax),%eax + // lw $2,0($4) // #movl (%eax),%eax + lui $2,0 end;