mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-28 10:39:23 +02:00
* unpcklp* require aligned memory, so do not spill replace their first operand by a memory location, resolves #31332
git-svn-id: trunk@35400 -
This commit is contained in:
parent
8e123e7b37
commit
41b028ffc0
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -15364,6 +15364,7 @@ tests/webtbs/tw31201.pp svneol=native#text/pascal
|
|||||||
tests/webtbs/tw3124.pp svneol=native#text/plain
|
tests/webtbs/tw3124.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw31305.pp svneol=native#text/pascal
|
tests/webtbs/tw31305.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw3131.pp svneol=native#text/plain
|
tests/webtbs/tw3131.pp svneol=native#text/plain
|
||||||
|
tests/webtbs/tw31332.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw3137.pp svneol=native#text/plain
|
tests/webtbs/tw3137.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw3143.pp svneol=native#text/plain
|
tests/webtbs/tw3143.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw3144.pp svneol=native#text/plain
|
tests/webtbs/tw3144.pp svneol=native#text/plain
|
||||||
|
@ -274,10 +274,12 @@ implementation
|
|||||||
A_BTC,
|
A_BTC,
|
||||||
A_BTR,
|
A_BTR,
|
||||||
|
|
||||||
{ shufp* would require 16 byte alignment for memory locations so we force the source
|
{ shufp*/unpcklp* would require 16 byte alignment for memory locations so we force the source
|
||||||
operand into a register }
|
operand into a register }
|
||||||
A_SHUFPD,
|
A_SHUFPD,
|
||||||
A_SHUFPS :
|
A_SHUFPS,
|
||||||
|
A_UNPCKLPD,
|
||||||
|
A_UNPCKLPS :
|
||||||
replaceoper:=-1;
|
replaceoper:=-1;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
40
tests/webtbs/tw31332.pp
Normal file
40
tests/webtbs/tw31332.pp
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
{ %CPU=i388,x86_64 }
|
||||||
|
{$OPTIMIZATION ON}
|
||||||
|
{$FPUTYPE SSE3}
|
||||||
|
|
||||||
|
uses
|
||||||
|
cpu;
|
||||||
|
|
||||||
|
var map : array [0..63,0..63,0..63] of smallint;
|
||||||
|
|
||||||
|
procedure makeMap( ) ;
|
||||||
|
var x,y,z,i : longword;
|
||||||
|
yd,zd,th : single;
|
||||||
|
begin
|
||||||
|
// add random blocks to the map
|
||||||
|
for x := 0 to 63 do begin
|
||||||
|
for y := 0 to 63 do begin
|
||||||
|
for z := 0 to 63 do begin
|
||||||
|
yd := (y - 32.5) * 0.4;
|
||||||
|
zd := (z - 32.5) * 0.4;
|
||||||
|
map[z,y,x] := random( 16 );
|
||||||
|
th := random;
|
||||||
|
if th > sqrt( sqrt( yd * yd + zd * zd ) ) - 0.8 then
|
||||||
|
map[z,y,x] := 0;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure init( );
|
||||||
|
begin
|
||||||
|
makeMap( );
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
begin
|
||||||
|
if is_sse3_cpu then
|
||||||
|
init ();
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user