mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 08:49:25 +02:00
+ fix(?) stack return address with an ugly hack...
git-svn-id: trunk@9047 -
This commit is contained in:
parent
0a3591a2a5
commit
12bcb539e6
@ -1339,12 +1339,15 @@ unit cgcpu;
|
|||||||
begin
|
begin
|
||||||
if not nostackframe then
|
if not nostackframe then
|
||||||
begin
|
begin
|
||||||
writeln(current_procinfo.maxpushedparasize);
|
|
||||||
localsize := current_procinfo.calc_stackframe_size;
|
localsize := current_procinfo.calc_stackframe_size;
|
||||||
{$ifdef DEBUG_CHARLIE}
|
{$ifdef DEBUG_CHARLIE}
|
||||||
writeln('proc exit with stackframe, size:',localsize,' parasize:',parasize);
|
writeln('proc exit with stackframe, size:',localsize,' parasize:',parasize);
|
||||||
{$endif DEBUG_CHARLIE}
|
{$endif DEBUG_CHARLIE}
|
||||||
list.concat(taicpu.op_reg(A_UNLK,S_NO,NR_FRAME_POINTER_REG));
|
list.concat(taicpu.op_reg(A_UNLK,S_NO,NR_FRAME_POINTER_REG));
|
||||||
|
parasize := parasize - 8; { FIXME: ugly hack to correct the value...
|
||||||
|
but the real fun is, that works for now.
|
||||||
|
i wonder where the extra 8 size comes from.
|
||||||
|
... maybe return address + framepointer size? (KB) }
|
||||||
if (parasize<>0) then
|
if (parasize<>0) then
|
||||||
begin
|
begin
|
||||||
{ only 68020+ supports RTD, so this needs another code path
|
{ only 68020+ supports RTD, so this needs another code path
|
||||||
|
Loading…
Reference in New Issue
Block a user