mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-25 22:17:07 +01:00
* cmov cannot use memory location as destination, fixed spiling code, resolves #19201
git-svn-id: trunk@17359 -
This commit is contained in:
parent
af32b57170
commit
66a8dd1e32
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -11453,6 +11453,7 @@ tests/webtbs/tw1910.pp svneol=native#text/plain
|
|||||||
tests/webtbs/tw1915.pp svneol=native#text/plain
|
tests/webtbs/tw1915.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw1917.pp svneol=native#text/plain
|
tests/webtbs/tw1917.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw1920.pp svneol=native#text/plain
|
tests/webtbs/tw1920.pp svneol=native#text/plain
|
||||||
|
tests/webtbs/tw19201.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw1923.pp svneol=native#text/plain
|
tests/webtbs/tw1923.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw1930.pp svneol=native#text/plain
|
tests/webtbs/tw1930.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw1931.pp svneol=native#text/plain
|
tests/webtbs/tw1931.pp svneol=native#text/plain
|
||||||
|
|||||||
@ -191,6 +191,7 @@ implementation
|
|||||||
{ Some instructions don't allow memory references
|
{ Some instructions don't allow memory references
|
||||||
for destination }
|
for destination }
|
||||||
case instr.opcode of
|
case instr.opcode of
|
||||||
|
A_CMOVcc,
|
||||||
A_MOVZX,
|
A_MOVZX,
|
||||||
A_MOVSX,
|
A_MOVSX,
|
||||||
A_MULSS,
|
A_MULSS,
|
||||||
|
|||||||
16
tests/webtbs/tw19201.pp
Normal file
16
tests/webtbs/tw19201.pp
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{ %cpu=i386 }
|
||||||
|
{ %opt=-Cppentium3 -Cr }
|
||||||
|
program testcmov;
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
uses
|
||||||
|
Classes, SysUtils;
|
||||||
|
var cur,i,resultid, lastNeighbour,firstNeighbour:integer;
|
||||||
|
OldPositions2: array of Integer;
|
||||||
|
begin
|
||||||
|
for cur:=lastNeighbour+1 to firstNeighbour do
|
||||||
|
if abs(OldPositions2[cur]-OldPositions2[i]) < abs(OldPositions2[resultId]-OldPositions2[i]) then
|
||||||
|
resultid:=cur;
|
||||||
|
end.
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user