mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 12:39:09 +02:00
+ support for nostackframe directive
This commit is contained in:
parent
05429d4179
commit
513b687ce7
@ -1028,9 +1028,6 @@ const
|
|||||||
a_reg_alloc(list,NR_STACK_POINTER_REG);
|
a_reg_alloc(list,NR_STACK_POINTER_REG);
|
||||||
a_reg_alloc(list,NR_R0);
|
a_reg_alloc(list,NR_R0);
|
||||||
|
|
||||||
if current_procinfo.procdef.parast.symtablelevel>1 then
|
|
||||||
a_reg_alloc(list,NR_R11);
|
|
||||||
|
|
||||||
usesfpr:=false;
|
usesfpr:=false;
|
||||||
if not (po_assembler in current_procinfo.procdef.procoptions) then
|
if not (po_assembler in current_procinfo.procdef.procoptions) then
|
||||||
{ FIXME: has to be R_F14 instad of R_F8 for SYSV-64bit }
|
{ FIXME: has to be R_F14 instad of R_F8 for SYSV-64bit }
|
||||||
@ -1103,7 +1100,8 @@ const
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
if (localsize <> 0) then
|
if (not nostackframe) and
|
||||||
|
(localsize <> 0) then
|
||||||
begin
|
begin
|
||||||
if (localsize <= high(smallint)) then
|
if (localsize <= high(smallint)) then
|
||||||
begin
|
begin
|
||||||
@ -1223,6 +1221,7 @@ const
|
|||||||
internalerror(2004070910);
|
internalerror(2004070910);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
{
|
||||||
LOC_CREGISTER:
|
LOC_CREGISTER:
|
||||||
begin
|
begin
|
||||||
reference_reset_base(href2,NR_R12,hp.paraloc[callerside].location^.reference.offset);
|
reference_reset_base(href2,NR_R12,hp.paraloc[callerside].location^.reference.offset);
|
||||||
@ -1235,6 +1234,7 @@ const
|
|||||||
end;
|
end;
|
||||||
else
|
else
|
||||||
internalerror(2004070911);
|
internalerror(2004070911);
|
||||||
|
}
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
hp := tparaitem(hp.next);
|
hp := tparaitem(hp.next);
|
||||||
@ -1403,7 +1403,8 @@ const
|
|||||||
{ (register allocator is no longer valid at this time and an add of 0 }
|
{ (register allocator is no longer valid at this time and an add of 0 }
|
||||||
{ is translated into a move, which is then registered with the register }
|
{ is translated into a move, which is then registered with the register }
|
||||||
{ allocator, causing a crash }
|
{ allocator, causing a crash }
|
||||||
if (localsize <> 0) then
|
if (not nostackframe) and
|
||||||
|
(localsize <> 0) then
|
||||||
a_op_const_reg(list,OP_ADD,OS_ADDR,localsize,NR_R1);
|
a_op_const_reg(list,OP_ADD,OS_ADDR,localsize,NR_R1);
|
||||||
{ load link register? }
|
{ load link register? }
|
||||||
if not (po_assembler in current_procinfo.procdef.procoptions) then
|
if not (po_assembler in current_procinfo.procdef.procoptions) then
|
||||||
@ -2372,7 +2373,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.179 2004-10-11 07:13:14 jonas
|
Revision 1.180 2004-10-20 07:32:42 jonas
|
||||||
|
+ support for nostackframe directive
|
||||||
|
|
||||||
|
Revision 1.179 2004/10/11 07:13:14 jonas
|
||||||
* include pi_do_call if we generate a call instead of internalerroring
|
* include pi_do_call if we generate a call instead of internalerroring
|
||||||
(workaround)
|
(workaround)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user