* fix tests for targets with fixed stack which must be 16 byte aligned

git-svn-id: trunk@43005 -
This commit is contained in:
florian 2019-09-15 17:17:26 +00:00
parent 9e7cf37cd6
commit 72391dc4b8
3 changed files with 14 additions and 5 deletions

View File

@ -90,7 +90,7 @@ const
);
procedure test1; assembler;
procedure test1; nostackframe; assembler;
asm
test [edi+foo2], cval { test word ptr [edi], 1 }
test byte ptr [edi+foo], cval { test byte ptr [edi], 1 }
@ -142,7 +142,7 @@ asm
test word ptr [edi+foo32_2.l], cval { test word ptr [edi+1], 1 }
end;
procedure test2; assembler;
procedure test2; nostackframe; assembler;
asm
test [edi+foo32], cval { test dword ptr [edi], 1 }
test [edi+foo32_2.l], cval { test dword ptr [edi+1], 1 }

View File

@ -7,14 +7,14 @@ program tasm23a;
const
t_size = 19;
procedure t; assembler;
procedure t; nostackframe; assembler;
asm
mov eax, [ebx[5]][edi][54][-17][45][4] { mov eax, [ebx+edi+5Bh] }
mov eax, [[ebx+5]+[edi+54]+[-17]+[45]+[4]] { mov eax, [ebx+edi+5Bh] }
mov eax, [5[7]] { mov eax, [000Ch] }
mov eax, [5+[7]] { mov eax, [000Ch] }
end;
procedure t_verify; assembler;
procedure t_verify; nostackframe; assembler;
asm
mov eax, [ebx+edi+5Bh] { mov eax, [ebx[5]][edi][54][-17][45][4] }
mov eax, [ebx+edi+5Bh] { mov eax, [[ebx+5]+[edi+54]+[-17]+[45]+[4]] }

View File

@ -2,6 +2,9 @@
{ %target=go32v2,linux,freebsd,win32,haiku}
{ %opt=-Sew -vw }
{ do not warn about the lea esp,[esp+16] }
{$WARN 7105 OFF}
{$mode delphi}
procedure test(l: longint); stdcall;
@ -12,8 +15,14 @@ end;
begin
asm
{$if FPC_STACKALIGNMENT=16}
lea esp,[esp-12]
{$endif FPC_STACKALIGNMENT=16}
push word $dead
push word $beef
call test
call test
{$if FPC_STACKALIGNMENT=16}
lea esp,[esp+16]
{$endif FPC_STACKALIGNMENT=16}
end;
end.