mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 15:47:53 +02:00
* m68k: Fixed damage caused by r27573 and r28177:
* longjmp: restored loading of function result (d0) which got removed in r28177. * While at the point, added test for zero, because longjmp must never return zero values. * Assembler reader: 'fp' refers to frame pointer, not the stack pointer. git-svn-id: trunk@28183 -
This commit is contained in:
parent
3a7cde492e
commit
cfe13734e0
@ -220,7 +220,7 @@ const
|
||||
if lower(s)='sp' then
|
||||
actasmregister:=NR_STACK_POINTER_REG;
|
||||
if lower(s)='fp' then
|
||||
actasmregister:=NR_STACK_POINTER_REG;
|
||||
actasmregister:=NR_FRAME_POINTER_REG;
|
||||
if actasmregister<>NR_NO then
|
||||
begin
|
||||
result:=true;
|
||||
|
@ -56,7 +56,13 @@ Procedure fpc_longJmp (Var S : Jmp_buf; value : longint); assembler;nostackframe
|
||||
asm
|
||||
// load S to a0
|
||||
move.l 4(sp),a0
|
||||
|
||||
// load 'value' to d0
|
||||
move.l 8(sp),d0
|
||||
// don't return zero
|
||||
tst.l d0
|
||||
seq d1
|
||||
and.l #1,d1
|
||||
or d1,d0
|
||||
// restore FP
|
||||
move.l (a0),fp
|
||||
// restore SP
|
||||
|
Loading…
Reference in New Issue
Block a user