mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 07:06:08 +02:00
* allocate registers properly before icall
* use emit_mov to load registers before icall git-svn-id: trunk@30758 -
This commit is contained in:
parent
7dd1d6aa77
commit
9a5b458d4e
@ -402,12 +402,12 @@ unit cgcpu;
|
|||||||
procedure tcgavr.a_call_reg(list : TAsmList;reg: tregister);
|
procedure tcgavr.a_call_reg(list : TAsmList;reg: tregister);
|
||||||
begin
|
begin
|
||||||
a_reg_alloc(list,NR_ZLO);
|
a_reg_alloc(list,NR_ZLO);
|
||||||
|
emit_mov(list,NR_ZLO,reg);
|
||||||
a_reg_alloc(list,NR_ZHI);
|
a_reg_alloc(list,NR_ZHI);
|
||||||
list.concat(taicpu.op_reg_reg(A_MOV,NR_ZLO,reg));
|
emit_mov(list,NR_ZHI,GetHigh(reg));
|
||||||
list.concat(taicpu.op_reg_reg(A_MOV,NR_ZHI,GetHigh(reg)));
|
|
||||||
list.concat(taicpu.op_none(A_ICALL));
|
list.concat(taicpu.op_none(A_ICALL));
|
||||||
a_reg_dealloc(list,NR_ZLO);
|
|
||||||
a_reg_dealloc(list,NR_ZHI);
|
a_reg_dealloc(list,NR_ZHI);
|
||||||
|
a_reg_dealloc(list,NR_ZLO);
|
||||||
|
|
||||||
include(current_procinfo.flags,pi_do_call);
|
include(current_procinfo.flags,pi_do_call);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user