mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 19:49:09 +02:00
m68k: simplification and cleanup of g_proc_entry. the generated code shouldn't change
git-svn-id: trunk@27922 -
This commit is contained in:
parent
0782f4f853
commit
1b11541c90
@ -1646,9 +1646,10 @@ unit cgcpu;
|
|||||||
r,rsp: TRegister;
|
r,rsp: TRegister;
|
||||||
ref : TReference;
|
ref : TReference;
|
||||||
begin
|
begin
|
||||||
|
{ Carl's original code used 2x MOVE instead of LINK when localsize = 0.
|
||||||
|
However, a LINK seems faster than two moves on everything from 68000
|
||||||
|
to '060, so the two move branch here was dropped. (KB) }
|
||||||
if not nostackframe then
|
if not nostackframe then
|
||||||
begin
|
|
||||||
if localsize<>0 then
|
|
||||||
begin
|
begin
|
||||||
{ size can't be negative }
|
{ size can't be negative }
|
||||||
if (localsize < 0) then
|
if (localsize < 0) then
|
||||||
@ -1661,29 +1662,6 @@ unit cgcpu;
|
|||||||
CGMessage(cg_e_localsize_too_big);
|
CGMessage(cg_e_localsize_too_big);
|
||||||
|
|
||||||
list.concat(taicpu.op_reg_const(A_LINK,S_W,NR_FRAME_POINTER_REG,-localsize));
|
list.concat(taicpu.op_reg_const(A_LINK,S_W,NR_FRAME_POINTER_REG,-localsize));
|
||||||
end
|
|
||||||
else
|
|
||||||
begin
|
|
||||||
list.concat(taicpu.op_reg_const(A_LINK,S_W,NR_FRAME_POINTER_REG,0));
|
|
||||||
(*
|
|
||||||
{ FIXME! - Carl's original code uses this method. However,
|
|
||||||
according to the 68060 users manual, a LINK is faster than
|
|
||||||
two moves. So, use a link in #0 case too, for now. I'm not
|
|
||||||
really sure tho', that LINK supports #0 disposition, but i
|
|
||||||
see no reason why it shouldn't support it. (KB) }
|
|
||||||
|
|
||||||
{ when localsize = 0, use two moves, instead of link }
|
|
||||||
r:=NR_FRAME_POINTER_REG;
|
|
||||||
rsp:=NR_STACK_POINTER_REG;
|
|
||||||
|
|
||||||
reference_reset_base(ref,NR_STACK_POINTER_REG,0);
|
|
||||||
ref.direction:=dir_dec;
|
|
||||||
list.concat(taicpu.op_reg_ref(A_MOVE,S_L,r,ref));
|
|
||||||
instr:=taicpu.op_reg_reg(A_MOVE,S_L,rsp,r);
|
|
||||||
add_move_instruction(instr); mwould also be needed
|
|
||||||
list.concat(instr);
|
|
||||||
*)
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user