* Fixed random AVs when targeting the AVX FPU.

This commit is contained in:
Yuriy Sydorov 2021-12-12 18:19:35 +02:00
parent 7b2cd0bcdc
commit e9acd759a4
2 changed files with 3 additions and 0 deletions

View File

@ -1211,6 +1211,8 @@ unit rgobj;
function trgobj.get_alias(n:Tsuperregister):Tsuperregister;
begin
if n>=maxreg then
internalerror(2021121201);
while ri_coalesced in reginfo[n].flags do
n:=reginfo[n].alias;
get_alias:=n;

View File

@ -200,6 +200,7 @@ implementation
{ avx instructions allow only the first operand (at&t counting) to be a register operand
all operands must be registers ... }
else if (oper[0]^.typ=top_reg) and
(getregtype(oper[0]^.reg)=regtype) and
(oper[1]^.typ=top_reg) and
(oper[2]^.typ=top_reg) and
{ but they must be different }