PowerPC: e_rlwinm fix remove unreachable block warning

This commit is contained in:
Alexey Esaulenko
2021-03-14 22:36:15 +03:00
committed by ghidra1
parent 62561121aa
commit cf373686d1

View File

@@ -817,36 +817,34 @@ IMM16B: val is IMM_0_10_VLE & IMM_16_20_VLE [ val = (IMM_16_20_VLE << 11) |
:e_rlwimi A,S,SHL,MBL,ME is $(ISVLE) & OP=29 & BIT_0=0 & MBL & ME & A & SHL & S {
tmpS:4 = S:4;
tmpA:4 = (tmpS << SHL) | (tmpS >> (32 - SHL));
tmpM:4 = ~0:4;
if (ME:1 < MBL:1) goto <invert>;
tmpM = tmpM << MBL;
tmpM = tmpM >> ((31-ME) + MBL);
tmpM = tmpM << (31-ME);
goto <finish>;
<invert>
tmpM = tmpM << ME;
tmpM = tmpM >> ((31-MBL) + ME);
tmpM = tmpM << (31-MBL);
tmpM = ~tmpM;
<finish>
tmpM1 = (~0:4) << MBL;
tmpM1 = tmpM1 >> ((31-ME) + MBL);
tmpM1 = tmpM1 << (31-ME);
tmpM2 = (~0:4) << ME;
tmpM2 = tmpM2 >> ((31-MBL) + ME);
tmpM2 = tmpM2 << (31-MBL);
tmpM2 = ~tmpM2;
tmpM = zext(ME:1 >= MBL:1)*tmpM1 + zext(ME:1 < MBL:1)*tmpM2;
A = zext(tmpA & tmpM) | (A & zext(~tmpM));
}
:e_rlwinm A,S,SHL,MBL,ME is $(ISVLE) & OP=29 & BIT_0=1 & MBL & ME & A & SHL & S {
tmpS:4 = S:4;
tmpA:4 = (tmpS << SHL) | (tmpS >> (32 - SHL));
tmpM:4 = ~0:4;
if (ME:1 < MBL:1) goto <invert>;
tmpM = tmpM << MBL;
tmpM = tmpM >> ((31-ME) + MBL);
tmpM = tmpM << (31-ME);
goto <finish>;
<invert>
tmpM = tmpM << ME;
tmpM = tmpM >> ((31-MBL) + ME);
tmpM = tmpM << (31-MBL);
tmpM = ~tmpM;
<finish>
tmpM1 = (~0:4) << MBL;
tmpM1 = tmpM1 >> ((31-ME) + MBL);
tmpM1 = tmpM1 << (31-ME);
tmpM2 = (~0:4) << ME;
tmpM2 = tmpM2 >> ((31-MBL) + ME);
tmpM2 = tmpM2 << (31-MBL);
tmpM2 = ~tmpM2;
tmpM = zext(ME:1 >= MBL:1)*tmpM1 + zext(ME:1 < MBL:1)*tmpM2;
A = zext(tmpA & tmpM);
}