mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 12:09:30 +02:00
* fixed several problems caused by Jonas' commit :)
This commit is contained in:
parent
c8a3171dc9
commit
391ce796ef
@ -244,7 +244,6 @@ const
|
|||||||
|
|
||||||
{ calling a code fragment by name }
|
{ calling a code fragment by name }
|
||||||
procedure tcgppc.a_call_name(list : taasmoutput;const s : string);
|
procedure tcgppc.a_call_name(list : taasmoutput;const s : string);
|
||||||
|
|
||||||
var
|
var
|
||||||
href : treference;
|
href : treference;
|
||||||
begin
|
begin
|
||||||
@ -258,19 +257,21 @@ const
|
|||||||
procinfo.flags:=procinfo.flags or pi_do_call;
|
procinfo.flags:=procinfo.flags or pi_do_call;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
{ calling a code fragment through a reference }
|
{ calling a code fragment through a reference }
|
||||||
procedure tcgppc.a_call_ref(list : taasmoutput;const ref : treference);
|
procedure tcgppc.a_call_ref(list : taasmoutput;const ref : treference);
|
||||||
|
|
||||||
var
|
var
|
||||||
href : treference;
|
href : treference;
|
||||||
|
tmpreg : tregister;
|
||||||
begin
|
begin
|
||||||
{ save our RTOC register value. Only necessary when doing pointer based }
|
{ save our RTOC register value. Only necessary when doing pointer based }
|
||||||
{ calls or cross TOC calls, but currently done always }
|
{ calls or cross TOC calls, but currently done always }
|
||||||
reference_reset_base(href,STACK_POINTER_REG,LA_RTOC);
|
reference_reset_base(href,STACK_POINTER_REG,LA_RTOC);
|
||||||
list.concat(taicpu.op_reg_ref(A_STW,R_TOC,href));
|
list.concat(taicpu.op_reg_ref(A_STW,R_TOC,href));
|
||||||
a_reg_alloc(list,R_0);
|
tmpreg := get_scratch_reg_int(list);
|
||||||
a_load_ref_reg(list,OS_ADDR,ref,R_0);
|
a_load_ref_reg(list,OS_ADDR,ref,tmpreg);
|
||||||
list.concat(taicpu.op_reg_reg(A_MTSPR,R_LR,R_0));
|
list.concat(taicpu.op_reg(A_MTLR,tmpreg));
|
||||||
|
free_scratch_reg(list,tmpreg);
|
||||||
a_reg_dealloc(list,R_0);
|
a_reg_dealloc(list,R_0);
|
||||||
list.concat(taicpu.op_none(A_BCCTRL));
|
list.concat(taicpu.op_none(A_BCCTRL));
|
||||||
list.concat(taicpu.op_reg_ref(A_LWZ,R_TOC,href));
|
list.concat(taicpu.op_reg_ref(A_LWZ,R_TOC,href));
|
||||||
@ -1687,7 +1688,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.46 2002-08-31 19:25:50 jonas
|
Revision 1.47 2002-08-31 21:30:45 florian
|
||||||
|
* fixed several problems caused by Jonas' commit :)
|
||||||
|
|
||||||
|
Revision 1.46 2002/08/31 19:25:50 jonas
|
||||||
+ implemented a_call_ref()
|
+ implemented a_call_ref()
|
||||||
|
|
||||||
Revision 1.45 2002/08/18 22:16:14 florian
|
Revision 1.45 2002/08/18 22:16:14 florian
|
||||||
|
@ -831,6 +831,9 @@ interface
|
|||||||
internalerror(2002072705);
|
internalerror(2002072705);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
if not cmpop then
|
||||||
|
location_reset(location,LOC_REGISTER,def_cgsize(resulttype.def));
|
||||||
|
|
||||||
load_left_right(cmpop,(cs_check_overflow in aktlocalswitches) and
|
load_left_right(cmpop,(cs_check_overflow in aktlocalswitches) and
|
||||||
(nodetype in [addn,subn]));
|
(nodetype in [addn,subn]));
|
||||||
|
|
||||||
@ -916,9 +919,7 @@ interface
|
|||||||
{ set result location }
|
{ set result location }
|
||||||
{ (emit_compare sets it to LOC_FLAGS for compares, so set the }
|
{ (emit_compare sets it to LOC_FLAGS for compares, so set the }
|
||||||
{ real location only now) (JM) }
|
{ real location only now) (JM) }
|
||||||
if not cmpop then
|
if cmpop then
|
||||||
location_reset(location,LOC_REGISTER,def_cgsize(resulttype.def))
|
|
||||||
else
|
|
||||||
location_reset(location,LOC_JUMP,OS_NO);
|
location_reset(location,LOC_JUMP,OS_NO);
|
||||||
|
|
||||||
clear_left_right(cmpop);
|
clear_left_right(cmpop);
|
||||||
@ -1303,7 +1304,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.14 2002-08-31 19:26:20 jonas
|
Revision 1.15 2002-08-31 21:30:46 florian
|
||||||
|
* fixed several problems caused by Jonas' commit :)
|
||||||
|
|
||||||
|
Revision 1.14 2002/08/31 19:26:20 jonas
|
||||||
* fixed 64bit comparisons
|
* fixed 64bit comparisons
|
||||||
|
|
||||||
Revision 1.13 2002/08/17 22:09:47 florian
|
Revision 1.13 2002/08/17 22:09:47 florian
|
||||||
|
Loading…
Reference in New Issue
Block a user