mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-06 14:07:49 +01:00
* fixed bug with large offsets in entrycode
This commit is contained in:
parent
7fc5c04a14
commit
7d5a2715f6
@ -1051,8 +1051,19 @@ const
|
|||||||
begin
|
begin
|
||||||
r.enum:=R_INTREGISTER;
|
r.enum:=R_INTREGISTER;
|
||||||
r.number:=NR_STACK_POINTER_REG;
|
r.number:=NR_STACK_POINTER_REG;
|
||||||
reference_reset_base(href,r,-localsize);
|
if (localsize <= high(smallint)) then
|
||||||
a_load_store(list,A_STWU,r,href);
|
begin
|
||||||
|
reference_reset_base(href,r,-localsize);
|
||||||
|
a_load_store(list,A_STWU,r,href);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
reference_reset_base(href,r,0);
|
||||||
|
href.index := get_scratch_reg_int(list,OS_32);
|
||||||
|
a_load_const_reg(list,OS_S32,-localsize,href.index);
|
||||||
|
a_load_store(list,A_STWUX,r,href);
|
||||||
|
free_scratch_reg(list,href.index);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ no GOT pointer loaded yet }
|
{ no GOT pointer loaded yet }
|
||||||
@ -1491,9 +1502,19 @@ const
|
|||||||
begin
|
begin
|
||||||
r.enum:=R_INTREGISTER;
|
r.enum:=R_INTREGISTER;
|
||||||
r.number:=NR_STACK_POINTER_REG;
|
r.number:=NR_STACK_POINTER_REG;
|
||||||
reference_reset_base(href,r,-localsize);
|
if (localsize <= high(smallint)) then
|
||||||
a_load_store(list,A_STWU,r,href);
|
begin
|
||||||
{ this also stores the old stack pointer in the new stack frame }
|
reference_reset_base(href,r,-localsize);
|
||||||
|
a_load_store(list,A_STWU,r,href);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
reference_reset_base(href,r,0);
|
||||||
|
href.index := get_scratch_reg_int(list,OS_32);
|
||||||
|
a_load_const_reg(list,OS_S32,-localsize,href.index);
|
||||||
|
a_load_store(list,A_STWUX,r,href);
|
||||||
|
free_scratch_reg(list,href.index);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2369,7 +2390,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.88 2003-05-11 11:45:08 jonas
|
Revision 1.89 2003-05-11 20:59:23 jonas
|
||||||
|
* fixed bug with large offsets in entrycode
|
||||||
|
|
||||||
|
Revision 1.88 2003/05/11 11:45:08 jonas
|
||||||
* fixed shifts
|
* fixed shifts
|
||||||
|
|
||||||
Revision 1.87 2003/05/11 11:07:33 jonas
|
Revision 1.87 2003/05/11 11:07:33 jonas
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user