mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 12:59:24 +02:00
* process fma intrinsic parameters in an order which takes care of multiple x87 stack parameters, resolves #38295
(cherry picked from commit 9592c033e5
)
# Conflicts:
# .gitattributes
This commit is contained in:
parent
e683e6e912
commit
f6dee4c3e0
@ -1100,7 +1100,9 @@ implementation
|
||||
{ only one memory operand is allowed }
|
||||
gotmem:=false;
|
||||
memop:=0;
|
||||
for i:=1 to 3 do
|
||||
{ in case parameters come on the FPU stack, we have to pop them in reverse order as we
|
||||
called secondpass }
|
||||
for i:=3 downto 1 do
|
||||
begin
|
||||
if not(paraarray[i].location.loc in [LOC_MMREGISTER,LOC_CMMREGISTER]) then
|
||||
begin
|
||||
|
19
tests/webtbs/tw38295.pp
Normal file
19
tests/webtbs/tw38295.pp
Normal file
@ -0,0 +1,19 @@
|
||||
{ %cpu=i386 }
|
||||
{ %opt=-CfAVX -CpCOREAVX2 -OoFASTMATH }
|
||||
uses
|
||||
cpu;
|
||||
var
|
||||
a, b: uint32; // or (u)int64; int32 works
|
||||
r: single; // or double, or even extended
|
||||
begin
|
||||
if FMASupport then
|
||||
begin
|
||||
a := 1;
|
||||
b := 3;
|
||||
r := a + b / 10;
|
||||
writeln(r:0:3);
|
||||
if r>2.0 then
|
||||
halt(1);
|
||||
writeln('ok');
|
||||
end;
|
||||
end.
|
Loading…
Reference in New Issue
Block a user