* fix for Mantis #34496: correctly align stack so that SSE operations work correctly

git-svn-id: trunk@40666 -
This commit is contained in:
svenbarth 2018-12-26 22:59:36 +00:00
parent 30f14cfcc0
commit 93e0cd9e1a
3 changed files with 32 additions and 2 deletions

1
.gitattributes vendored
View File

@ -16445,6 +16445,7 @@ tests/webtbs/tw3443.pp svneol=native#text/plain
tests/webtbs/tw34438.pp svneol=native#text/pascal
tests/webtbs/tw3444.pp svneol=native#text/plain
tests/webtbs/tw34442.pp svneol=native#text/plain
tests/webtbs/tw34496.pp svneol=native#text/pascal
tests/webtbs/tw3456.pp svneol=native#text/plain
tests/webtbs/tw3457.pp svneol=native#text/plain
tests/webtbs/tw3460.pp svneol=native#text/plain

View File

@ -36,9 +36,8 @@ asm
.seh_endprologue
{ align stack size to 16 Byte }
add $15, aArgsStackSize
and $-16, aArgsStackSize
sub aArgsStackSize, %rsp
and $-16, %rsp
movq aArgsStackSize, %rax

30
tests/webtbs/tw34496.pp Normal file
View File

@ -0,0 +1,30 @@
{ %TARGET = Win64 }
program tw34496;
{$MODE DELPHI}
{$WARN 5079 OFF}
uses
TypInfo,
Rtti;
procedure Test1(const d1, d2: Double);
begin
WriteLn(d1:0:2,' - ', d2:0:2);
end;
procedure Test2(const d1, d2: Extended);
begin
WriteLn(d1:0:2,' - ', d2:0:2);
end;
var
a, b: Double;
begin
a := 12.34;
b := 56.78;
Rtti.Invoke(@Test1, [a, b], ccReg, nil, True, False);
Rtti.Invoke(@Test2, [a, b], ccReg, nil, True, False);
//ReadLn;
end.