mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-01 14:50:38 +02:00
* fixed crashes when procdef.funcretsym is not valid
This commit is contained in:
parent
21eb38dfc2
commit
64d60391bd
@ -78,7 +78,8 @@ begin
|
|||||||
((taicpu(hp2).opcode = A_LEAVE) or
|
((taicpu(hp2).opcode = A_LEAVE) or
|
||||||
(taicpu(hp2).opcode = A_RET)) and
|
(taicpu(hp2).opcode = A_RET)) and
|
||||||
(taicpu(p).oper[0]^.ref^.base = current_procinfo.FramePointer) and
|
(taicpu(p).oper[0]^.ref^.base = current_procinfo.FramePointer) and
|
||||||
(taicpu(p).oper[0]^.ref^.offset >= tvarsym(current_procinfo.procdef.funcretsym).localloc.reference.offset) and
|
not(assigned(current_procinfo.procdef.funcretsym) and
|
||||||
|
(taicpu(p).oper[0]^.ref^.offset < tvarsym(current_procinfo.procdef.funcretsym).localloc.reference.offset)) and
|
||||||
(taicpu(p).oper[0]^.ref^.index = NR_NO) then
|
(taicpu(p).oper[0]^.ref^.index = NR_NO) then
|
||||||
begin
|
begin
|
||||||
asml.remove(p);
|
asml.remove(p);
|
||||||
@ -978,7 +979,8 @@ begin
|
|||||||
(taicpu(hp1).opcode = A_RET)) and
|
(taicpu(hp1).opcode = A_RET)) and
|
||||||
(taicpu(p).oper[1]^.typ = top_ref) and
|
(taicpu(p).oper[1]^.typ = top_ref) and
|
||||||
(taicpu(p).oper[1]^.ref^.base = current_procinfo.FramePointer) and
|
(taicpu(p).oper[1]^.ref^.base = current_procinfo.FramePointer) and
|
||||||
(taicpu(p).oper[1]^.ref^.offset >= tvarsym(current_procinfo.procdef.funcretsym).localloc.reference.offset) and
|
not(assigned(current_procinfo.procdef.funcretsym) and
|
||||||
|
(taicpu(p).oper[1]^.ref^.offset < tvarsym(current_procinfo.procdef.funcretsym).localloc.reference.offset)) and
|
||||||
(taicpu(p).oper[1]^.ref^.index = NR_NO) and
|
(taicpu(p).oper[1]^.ref^.index = NR_NO) and
|
||||||
(taicpu(p).oper[0]^.typ = top_reg) then
|
(taicpu(p).oper[0]^.typ = top_reg) then
|
||||||
begin
|
begin
|
||||||
@ -1527,7 +1529,8 @@ begin
|
|||||||
(taicpu(hp2).opcode = A_RET)) and
|
(taicpu(hp2).opcode = A_RET)) and
|
||||||
(taicpu(p).oper[0]^.ref^.base = current_procinfo.FramePointer) and
|
(taicpu(p).oper[0]^.ref^.base = current_procinfo.FramePointer) and
|
||||||
(taicpu(p).oper[0]^.ref^.index = NR_NO) and
|
(taicpu(p).oper[0]^.ref^.index = NR_NO) and
|
||||||
(taicpu(p).oper[0]^.ref^.offset >= tvarsym(current_procinfo.procdef.funcretsym).localloc.reference.offset) and
|
not(assigned(current_procinfo.procdef.funcretsym) and
|
||||||
|
(taicpu(p).oper[0]^.ref^.offset < tvarsym(current_procinfo.procdef.funcretsym).localloc.reference.offset)) and
|
||||||
(hp1.typ = ait_instruction) and
|
(hp1.typ = ait_instruction) and
|
||||||
(taicpu(hp1).opcode = A_MOV) and
|
(taicpu(hp1).opcode = A_MOV) and
|
||||||
(taicpu(hp1).opsize = S_B) and
|
(taicpu(hp1).opsize = S_B) and
|
||||||
@ -1996,7 +1999,10 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.53 2003-12-15 21:25:49 peter
|
Revision 1.54 2004-01-22 16:14:17 peter
|
||||||
|
* fixed crashes when procdef.funcretsym is not valid
|
||||||
|
|
||||||
|
Revision 1.53 2003/12/15 21:25:49 peter
|
||||||
* reg allocations for imaginary register are now inserted just
|
* reg allocations for imaginary register are now inserted just
|
||||||
before reg allocation
|
before reg allocation
|
||||||
* tregister changed to enum to allow compile time check
|
* tregister changed to enum to allow compile time check
|
||||||
|
Loading…
Reference in New Issue
Block a user