* x86: Added BEXTR and BZHI to special spilling rules since they follow the same format as SHRX etc.

This commit is contained in:
J. Gareth "Curious Kit" Moreton 2022-09-07 17:03:19 +01:00 committed by FPK
parent e9c278b9f1
commit 83969d3ba3

View File

@ -192,7 +192,7 @@ implementation
begin
{ BMI shifting/rotating instructions have special requirements regarding spilling, only
the middle operand can be replaced }
if ((opcode=A_RORX) or (opcode=A_SHRX) or (opcode=A_SARX) or (opcode=A_SHLX)) then
if ((opcode=A_RORX) or (opcode=A_SHRX) or (opcode=A_SARX) or (opcode=A_SHLX) or (opcode=A_BEXTR) or (opcode=A_BZHI)) then
begin
if (oper[1]^.typ=top_reg) and (getregtype(oper[1]^.reg)=regtype) and (get_alias(getsupreg(oper[1]^.reg))=orgreg) then
replaceoper:=1;