mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-12 22:32:29 +02:00
+ sub routines with children with asm blocks need a real stack frame, fixes new failure of tw0848
git-svn-id: trunk@2177 -
This commit is contained in:
parent
7aa315c71a
commit
1024b80867
@ -56,6 +56,7 @@ interface
|
||||
procedure parse_body;
|
||||
|
||||
function stack_tainting_parameter : boolean;
|
||||
function has_assembler_child : boolean;
|
||||
end;
|
||||
|
||||
|
||||
@ -629,6 +630,24 @@ implementation
|
||||
end;
|
||||
|
||||
|
||||
function tcgprocinfo.has_assembler_child : boolean;
|
||||
var
|
||||
hp : tcgprocinfo;
|
||||
begin
|
||||
result:=false;
|
||||
hp:=tcgprocinfo(nestedprocs.first);
|
||||
while assigned(hp) do
|
||||
begin
|
||||
if (hp.flags*[pi_has_assembler_block,pi_is_assembler])<>[] then
|
||||
begin
|
||||
result:=true;
|
||||
exit;
|
||||
end;
|
||||
hp:=tcgprocinfo(hp.next);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
procedure tcgprocinfo.generate_code;
|
||||
var
|
||||
oldprocinfo : tprocinfo;
|
||||
@ -728,7 +747,8 @@ implementation
|
||||
calling generate_parameter_info doesn't hurt but it costs time
|
||||
}
|
||||
generate_parameter_info;
|
||||
if not(stack_tainting_parameter) then
|
||||
if not(stack_tainting_parameter) and
|
||||
not(has_assembler_child) then
|
||||
begin
|
||||
{ Only need to set the framepointer }
|
||||
framepointer:=NR_STACK_POINTER_REG;
|
||||
|
Loading…
Reference in New Issue
Block a user