mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 09:59:17 +02:00
* fixed ppc compilation problems and changed VOLATILE_REGISTERS for x86
so that it doesn't include ebp and esp anymore
This commit is contained in:
parent
cd02a8ecca
commit
f909d6a620
@ -776,7 +776,7 @@ implementation
|
|||||||
begin
|
begin
|
||||||
{No procedure is allowed to destroy ebp.}
|
{No procedure is allowed to destroy ebp.}
|
||||||
{$ifdef newra}
|
{$ifdef newra}
|
||||||
regs_to_alloc:=VOLATILE_INTREGISTERS-[RS_FRAME_POINTER_REG,RS_STACK_POINTER_REG];
|
regs_to_alloc:=VOLATILE_INTREGISTERS;
|
||||||
if (not is_void(resulttype.def)) and
|
if (not is_void(resulttype.def)) and
|
||||||
not(paramanager.ret_in_param(resulttype.def,procdefinition.proccalloption)) then
|
not(paramanager.ret_in_param(resulttype.def,procdefinition.proccalloption)) then
|
||||||
begin
|
begin
|
||||||
@ -797,7 +797,7 @@ implementation
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
{$else}
|
{$else}
|
||||||
regs_to_push_int := VOLATILE_INTREGISTERS-[RS_FRAME_POINTER_REG];
|
regs_to_push_int := VOLATILE_INTREGISTERS;
|
||||||
rg.saveusedintregisters(exprasmlist,pushedint,regs_to_push_int);
|
rg.saveusedintregisters(exprasmlist,pushedint,regs_to_push_int);
|
||||||
{$endif}
|
{$endif}
|
||||||
{$ifdef i386}
|
{$ifdef i386}
|
||||||
@ -1017,10 +1017,8 @@ implementation
|
|||||||
else
|
else
|
||||||
cg.a_call_reg(exprasmlist,right.location.register);
|
cg.a_call_reg(exprasmlist,right.location.register);
|
||||||
{ cg.a_call_loc(exprasmlist,right.location);}
|
{ cg.a_call_loc(exprasmlist,right.location);}
|
||||||
{$ifndef newra}
|
|
||||||
location_release(exprasmlist,right.location);
|
location_release(exprasmlist,right.location);
|
||||||
location_freetemp(exprasmlist,right.location);
|
location_freetemp(exprasmlist,right.location);
|
||||||
{$endif newra}
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ Need to remove the parameters from the stack? }
|
{ Need to remove the parameters from the stack? }
|
||||||
@ -1520,7 +1518,11 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.99 2003-07-06 17:58:22 peter
|
Revision 1.100 2003-07-06 21:50:33 jonas
|
||||||
|
* fixed ppc compilation problems and changed VOLATILE_REGISTERS for x86
|
||||||
|
so that it doesn't include ebp and esp anymore
|
||||||
|
|
||||||
|
Revision 1.99 2003/07/06 17:58:22 peter
|
||||||
* framepointer fixes for sparc
|
* framepointer fixes for sparc
|
||||||
* parent framepointer code more generic
|
* parent framepointer code more generic
|
||||||
|
|
||||||
|
@ -521,7 +521,7 @@ implementation
|
|||||||
cg.a_param_loc(exprasmlist,right.location,paramanager.getintparaloc(exprasmlist,2));
|
cg.a_param_loc(exprasmlist,right.location,paramanager.getintparaloc(exprasmlist,2));
|
||||||
cg.a_param_loc(exprasmlist,left.location,paramanager.getintparaloc(exprasmlist,1));
|
cg.a_param_loc(exprasmlist,left.location,paramanager.getintparaloc(exprasmlist,1));
|
||||||
{$ifdef newra}
|
{$ifdef newra}
|
||||||
rg.allocexplicitregistersint(exprasmlist,[first_supreg..last_supreg]-[RS_FRAME_POINTER_REG,RS_STACK_POINTER_REG]);
|
rg.allocexplicitregistersint(exprasmlist,VOLATILE_INTREGISTERS);
|
||||||
|
|
||||||
{$else}
|
{$else}
|
||||||
rg.saveintregvars(exprasmlist,VOLATILE_INTREGISTERS);
|
rg.saveintregvars(exprasmlist,VOLATILE_INTREGISTERS);
|
||||||
@ -530,7 +530,7 @@ implementation
|
|||||||
paramanager.freeintparaloc(exprasmlist,2);
|
paramanager.freeintparaloc(exprasmlist,2);
|
||||||
paramanager.freeintparaloc(exprasmlist,1);
|
paramanager.freeintparaloc(exprasmlist,1);
|
||||||
{$ifdef newra}
|
{$ifdef newra}
|
||||||
rg.deallocexplicitregistersint(exprasmlist,[first_supreg..last_supreg]-[RS_FRAME_POINTER_REG,RS_STACK_POINTER_REG]);
|
rg.deallocexplicitregistersint(exprasmlist,VOLATILE_INTREGISTERS);
|
||||||
{$else}
|
{$else}
|
||||||
rg.restoreusedintregisters(exprasmlist,pushed);
|
rg.restoreusedintregisters(exprasmlist,pushed);
|
||||||
{$endif}
|
{$endif}
|
||||||
@ -598,14 +598,14 @@ implementation
|
|||||||
{$endif}
|
{$endif}
|
||||||
cg.a_param_reg(exprasmlist,OS_ADDR,location.reference.base,paramanager.getintparaloc(exprasmlist,1));
|
cg.a_param_reg(exprasmlist,OS_ADDR,location.reference.base,paramanager.getintparaloc(exprasmlist,1));
|
||||||
{$ifdef newra}
|
{$ifdef newra}
|
||||||
rg.allocexplicitregistersint(exprasmlist,[first_supreg..last_supreg]-[RS_FRAME_POINTER_REG,RS_STACK_POINTER_REG]);
|
rg.allocexplicitregistersint(exprasmlist,VOLATILE_INTREGISTERS);
|
||||||
{$else}
|
{$else}
|
||||||
rg.saveintregvars(exprasmlist,VOLATILE_INTREGISTERS);
|
rg.saveintregvars(exprasmlist,VOLATILE_INTREGISTERS);
|
||||||
{$endif}
|
{$endif}
|
||||||
cg.a_call_name(exprasmlist,'FPC_'+upper(tstringdef(left.resulttype.def).stringtypname)+'_CHECKZERO');
|
cg.a_call_name(exprasmlist,'FPC_'+upper(tstringdef(left.resulttype.def).stringtypname)+'_CHECKZERO');
|
||||||
paramanager.freeintparaloc(exprasmlist,1);
|
paramanager.freeintparaloc(exprasmlist,1);
|
||||||
{$ifdef newra}
|
{$ifdef newra}
|
||||||
rg.deallocexplicitregistersint(exprasmlist,[first_supreg..last_supreg]-[RS_FRAME_POINTER_REG,RS_STACK_POINTER_REG]);
|
rg.deallocexplicitregistersint(exprasmlist,VOLATILE_INTREGISTERS);
|
||||||
{$else}
|
{$else}
|
||||||
rg.restoreusedintregisters(exprasmlist,pushed);
|
rg.restoreusedintregisters(exprasmlist,pushed);
|
||||||
{$endif}
|
{$endif}
|
||||||
@ -689,7 +689,7 @@ implementation
|
|||||||
dec(href.offset,7);
|
dec(href.offset,7);
|
||||||
cg.a_param_ref(exprasmlist,OS_INT,href,paramanager.getintparaloc(exprasmlist,1));
|
cg.a_param_ref(exprasmlist,OS_INT,href,paramanager.getintparaloc(exprasmlist,1));
|
||||||
{$ifdef newra}
|
{$ifdef newra}
|
||||||
rg.allocexplicitregistersint(exprasmlist,[first_supreg..last_supreg]-[RS_FRAME_POINTER_REG,RS_STACK_POINTER_REG]);
|
rg.allocexplicitregistersint(exprasmlist,VOLATILE_INTREGISTERS);
|
||||||
{$else}
|
{$else}
|
||||||
rg.saveintregvars(exprasmlist,VOLATILE_INTREGISTERS);
|
rg.saveintregvars(exprasmlist,VOLATILE_INTREGISTERS);
|
||||||
{$endif}
|
{$endif}
|
||||||
@ -697,7 +697,7 @@ implementation
|
|||||||
paramanager.freeintparaloc(exprasmlist,2);
|
paramanager.freeintparaloc(exprasmlist,2);
|
||||||
paramanager.freeintparaloc(exprasmlist,1);
|
paramanager.freeintparaloc(exprasmlist,1);
|
||||||
{$ifdef newra}
|
{$ifdef newra}
|
||||||
rg.deallocexplicitregistersint(exprasmlist,[first_supreg..last_supreg]-[RS_FRAME_POINTER_REG,RS_STACK_POINTER_REG]);
|
rg.deallocexplicitregistersint(exprasmlist,VOLATILE_INTREGISTERS);
|
||||||
{$else}
|
{$else}
|
||||||
rg.restoreusedintregisters(exprasmlist,pushed);
|
rg.restoreusedintregisters(exprasmlist,pushed);
|
||||||
{$endif}
|
{$endif}
|
||||||
@ -836,7 +836,7 @@ implementation
|
|||||||
dec(href.offset,7);
|
dec(href.offset,7);
|
||||||
cg.a_param_ref(exprasmlist,OS_INT,href,paramanager.getintparaloc(exprasmlist,1));
|
cg.a_param_ref(exprasmlist,OS_INT,href,paramanager.getintparaloc(exprasmlist,1));
|
||||||
{$ifdef newra}
|
{$ifdef newra}
|
||||||
rg.allocexplicitregistersint(exprasmlist,[first_supreg..last_supreg]-[RS_FRAME_POINTER_REG,RS_STACK_POINTER_REG]);
|
rg.allocexplicitregistersint(exprasmlist,VOLATILE_INTREGISTERS);
|
||||||
{$else}
|
{$else}
|
||||||
rg.saveintregvars(exprasmlist,VOLATILE_INTREGISTERS);
|
rg.saveintregvars(exprasmlist,VOLATILE_INTREGISTERS);
|
||||||
{$endif}
|
{$endif}
|
||||||
@ -844,7 +844,7 @@ implementation
|
|||||||
paramanager.freeintparaloc(exprasmlist,2);
|
paramanager.freeintparaloc(exprasmlist,2);
|
||||||
paramanager.freeintparaloc(exprasmlist,1);
|
paramanager.freeintparaloc(exprasmlist,1);
|
||||||
{$ifdef newra}
|
{$ifdef newra}
|
||||||
rg.deallocexplicitregistersint(exprasmlist,[first_supreg..last_supreg]-[RS_FRAME_POINTER_REG,RS_STACK_POINTER_REG]);
|
rg.deallocexplicitregistersint(exprasmlist,VOLATILE_INTREGISTERS);
|
||||||
{$else}
|
{$else}
|
||||||
rg.restoreusedintregisters(exprasmlist,pushed);
|
rg.restoreusedintregisters(exprasmlist,pushed);
|
||||||
{$endif}
|
{$endif}
|
||||||
@ -881,7 +881,11 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.65 2003-07-06 15:31:20 daniel
|
Revision 1.66 2003-07-06 21:50:33 jonas
|
||||||
|
* fixed ppc compilation problems and changed VOLATILE_REGISTERS for x86
|
||||||
|
so that it doesn't include ebp and esp anymore
|
||||||
|
|
||||||
|
Revision 1.65 2003/07/06 15:31:20 daniel
|
||||||
* Fixed register allocator. *Lots* of fixes.
|
* Fixed register allocator. *Lots* of fixes.
|
||||||
|
|
||||||
Revision 1.64 2003/06/17 19:24:08 jonas
|
Revision 1.64 2003/06/17 19:24:08 jonas
|
||||||
|
@ -3415,7 +3415,7 @@ implementation
|
|||||||
end;
|
end;
|
||||||
lastref:=defref;
|
lastref:=defref;
|
||||||
{ first, we assume that all registers are used }
|
{ first, we assume that all registers are used }
|
||||||
usedintregisters:=VOLATILE_INTREGISTERS-[RS_FRAME_POINTER_REG,RS_STACK_POINTER_REG];
|
usedintregisters:=VOLATILE_INTREGISTERS;
|
||||||
usedotherregisters:=ALL_REGISTERS;
|
usedotherregisters:=ALL_REGISTERS;
|
||||||
forwarddef:=true;
|
forwarddef:=true;
|
||||||
interfacedef:=false;
|
interfacedef:=false;
|
||||||
@ -3557,7 +3557,7 @@ implementation
|
|||||||
{ set all registers to used for simplified compilation PM }
|
{ set all registers to used for simplified compilation PM }
|
||||||
if simplify_ppu then
|
if simplify_ppu then
|
||||||
begin
|
begin
|
||||||
usedintregisters:=VOLATILE_INTREGISTERS-[RS_FRAME_POINTER_REG,RS_STACK_POINTER_REG];
|
usedintregisters:=VOLATILE_INTREGISTERS;
|
||||||
usedotherregisters:=ALL_REGISTERS;
|
usedotherregisters:=ALL_REGISTERS;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -5838,7 +5838,11 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.155 2003-07-06 15:31:21 daniel
|
Revision 1.156 2003-07-06 21:50:33 jonas
|
||||||
|
* fixed ppc compilation problems and changed VOLATILE_REGISTERS for x86
|
||||||
|
so that it doesn't include ebp and esp anymore
|
||||||
|
|
||||||
|
Revision 1.155 2003/07/06 15:31:21 daniel
|
||||||
* Fixed register allocator. *Lots* of fixes.
|
* Fixed register allocator. *Lots* of fixes.
|
||||||
|
|
||||||
Revision 1.154 2003/07/02 22:18:04 peter
|
Revision 1.154 2003/07/02 22:18:04 peter
|
||||||
|
@ -177,7 +177,7 @@ uses
|
|||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
{ registers which may be destroyed by calls }
|
{ registers which may be destroyed by calls }
|
||||||
VOLATILE_INTREGISTERS = [first_supreg..last_supreg];
|
VOLATILE_INTREGISTERS = [first_supreg..last_supreg]-[RS_EBP,RS_ESP];
|
||||||
|
|
||||||
{Number of first and last imaginary register.}
|
{Number of first and last imaginary register.}
|
||||||
first_imreg = $12;
|
first_imreg = $12;
|
||||||
@ -732,7 +732,11 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.10 2003-06-17 16:34:45 jonas
|
Revision 1.11 2003-07-06 21:50:33 jonas
|
||||||
|
* fixed ppc compilation problems and changed VOLATILE_REGISTERS for x86
|
||||||
|
so that it doesn't include ebp and esp anymore
|
||||||
|
|
||||||
|
Revision 1.10 2003/06/17 16:34:45 jonas
|
||||||
* lots of newra fixes (need getfuncretparaloc implementation for i386)!
|
* lots of newra fixes (need getfuncretparaloc implementation for i386)!
|
||||||
* renamed all_intregisters to volatile_intregisters and made it
|
* renamed all_intregisters to volatile_intregisters and made it
|
||||||
processor dependent
|
processor dependent
|
||||||
|
Loading…
Reference in New Issue
Block a user