mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-25 00:11:20 +02:00
+ extended test tasm20.pp with a function, which checks that a shortstring
parameter doesn't get copied to a local variable in a pure asm routine git-svn-id: trunk@38249 -
This commit is contained in:
parent
1a57391e55
commit
81044b4cff
@ -106,6 +106,11 @@ asm
|
|||||||
stosb
|
stosb
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure myfunc5(s: string); assembler;
|
||||||
|
asm
|
||||||
|
mov actual_sp, sp
|
||||||
|
end;
|
||||||
|
|
||||||
procedure Error;
|
procedure Error;
|
||||||
begin
|
begin
|
||||||
Writeln('Error!');
|
Writeln('Error!');
|
||||||
@ -128,5 +133,8 @@ begin
|
|||||||
res4 := myfunc4;
|
res4 := myfunc4;
|
||||||
if (res4 <> 'Tralala') and ((expect_sp - actual_sp) <> (2 + SizeOf(Pointer))) then
|
if (res4 <> 'Tralala') and ((expect_sp - actual_sp) <> (2 + SizeOf(Pointer))) then
|
||||||
Error;
|
Error;
|
||||||
|
myfunc5('Test');
|
||||||
|
if (expect_sp - actual_sp) <> (2 + SizeOf(Pointer)) then
|
||||||
|
Error;
|
||||||
Writeln('Ok!');
|
Writeln('Ok!');
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user