mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-13 12:29:14 +02:00
* Ensure the number of operands is 2 for MOVXX instructions in OptPass1MOVXX. Otherwise the classic MOVSD/W/B no-operand instructions (REP MOVSX) cause AV during checks of operands. The AV is thrown when trying to compile ucomplex.pp with -Cfsse3.
* Also fixed generation of debug comments in OptPass1MOVXX. git-svn-id: trunk@36295 -
This commit is contained in:
parent
5eb0506be7
commit
884cb758e7
@ -1622,7 +1622,10 @@ unit aoptx86;
|
||||
hp1 : tai;
|
||||
begin
|
||||
Result:=false;
|
||||
if taicpu(p).opercnt <> 2 then
|
||||
exit;
|
||||
if GetNextInstruction(p,hp1) and
|
||||
(taicpu(hp1).opercnt = 2) and
|
||||
MatchInstruction(hp1,taicpu(p).opcode,[taicpu(p).opsize]) then
|
||||
begin
|
||||
if (taicpu(hp1).oper[0]^.typ = taicpu(p).oper[1]^.typ) and
|
||||
@ -1651,8 +1654,8 @@ unit aoptx86;
|
||||
begin
|
||||
asml.remove(p);
|
||||
p.free;
|
||||
DebugMsg('PeepHole Optimization MovXXMovXX2Nop 1 done',p);
|
||||
GetNextInstruction(hp1,p);
|
||||
DebugMsg('PeepHole Optimization MovXXMovXX2Nop 1 done',p);
|
||||
end
|
||||
else
|
||||
DebugMsg('PeepHole Optimization MovXXMovXX2MoVXX 1 done',p);
|
||||
|
Loading…
Reference in New Issue
Block a user