mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-29 23:40:14 +02:00
* fixed 64bit int results with -dnewra (you can't free both registers and
then allocate two new ones, because then the registers could be reversed afterwards -> you get something like "movl %eax, %edx; movl %edx,%eax")
This commit is contained in:
parent
7bc1557f5c
commit
d191387d5a
@ -508,9 +508,11 @@ implementation
|
|||||||
{ the FUNCTION_RESULT_LOW_REG/FUNCTION_RESULT_HIGH_REG
|
{ the FUNCTION_RESULT_LOW_REG/FUNCTION_RESULT_HIGH_REG
|
||||||
are already allocated }
|
are already allocated }
|
||||||
rg.ungetregisterint(exprasmlist,r);
|
rg.ungetregisterint(exprasmlist,r);
|
||||||
rg.ungetregisterint(exprasmlist,hregister);
|
|
||||||
location.registerlow:=rg.getregisterint(exprasmlist,OS_INT);
|
location.registerlow:=rg.getregisterint(exprasmlist,OS_INT);
|
||||||
|
cg.a_load_reg_reg(exprasmlist,OS_32,OS_32,r,location.registerlow);
|
||||||
|
rg.ungetregisterint(exprasmlist,hregister);
|
||||||
location.registerhigh:=rg.getregisterint(exprasmlist,OS_INT);
|
location.registerhigh:=rg.getregisterint(exprasmlist,OS_INT);
|
||||||
|
cg.a_load_reg_reg(exprasmlist,OS_32,OS_32,hregister,location.registerhigh);
|
||||||
{$else newra}
|
{$else newra}
|
||||||
if RS_FUNCTION_RESULT64_LOW_REG in rg.unusedregsint then
|
if RS_FUNCTION_RESULT64_LOW_REG in rg.unusedregsint then
|
||||||
location.registerlow:=rg.getexplicitregisterint(exprasmlist,NR_FUNCTION_RESULT64_LOW_REG)
|
location.registerlow:=rg.getexplicitregisterint(exprasmlist,NR_FUNCTION_RESULT64_LOW_REG)
|
||||||
@ -526,9 +528,9 @@ implementation
|
|||||||
location.registerlow:=rg.getregisterint(exprasmlist,OS_INT);
|
location.registerlow:=rg.getregisterint(exprasmlist,OS_INT);
|
||||||
if location.registerhigh.number=NR_NO then
|
if location.registerhigh.number=NR_NO then
|
||||||
location.registerhigh:=rg.getregisterint(exprasmlist,OS_INT);
|
location.registerhigh:=rg.getregisterint(exprasmlist,OS_INT);
|
||||||
{$endif newra}
|
|
||||||
cg64.a_load64_reg_reg(exprasmlist,joinreg64(r,hregister),
|
cg64.a_load64_reg_reg(exprasmlist,joinreg64(r,hregister),
|
||||||
location.register64{$ifdef newra},false{$endif});
|
location.register64{$ifdef newra},false{$endif});
|
||||||
|
{$endif newra}
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
{$endif cpu64bit}
|
{$endif cpu64bit}
|
||||||
@ -1529,7 +1531,12 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.101 2003-07-08 21:24:59 peter
|
Revision 1.102 2003-07-21 13:51:50 jonas
|
||||||
|
* fixed 64bit int results with -dnewra (you can't free both registers and
|
||||||
|
then allocate two new ones, because then the registers could be reversed
|
||||||
|
afterwards -> you get something like "movl %eax, %edx; movl %edx,%eax")
|
||||||
|
|
||||||
|
Revision 1.101 2003/07/08 21:24:59 peter
|
||||||
* sparc fixes
|
* sparc fixes
|
||||||
|
|
||||||
Revision 1.100 2003/07/06 21:50:33 jonas
|
Revision 1.100 2003/07/06 21:50:33 jonas
|
||||||
|
Loading…
Reference in New Issue
Block a user