| Summary: | MIPS mkFormVEC arguments swapped? | ||
|---|---|---|---|
| Product: | [Developer tools] valgrind | Reporter: | Mark Wielaard <mark> |
| Component: | vex | Assignee: | Julian Seward <jseward> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | mips32r2 |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
Well spotted. Fixed in: https://sourceware.org/git/?p=valgrind.git;a=commit;h=029f1196fcafb49183c87c53e3a7febc762a0dc8 |
The following function in VEX/priv/host_mips_defs.c static UChar *mkFormVEC(UChar *p, UInt op, UInt ws, UInt wt, UInt wd) { UInt theInstr; vassert(op < 0x20); vassert(wt < 0x20); vassert(ws < 0x20); vassert(wd < 0x20); theInstr = OPC_MSA | (op << 21) | (wt << 16) | (ws << 11) | (wd << 6) | 0x1E; return emit32(p, theInstr); } And the use in: case Msa_VEC: { UInt v_wt = qregEnc(i->Min.MsaVec.wt); UInt v_ws = qregEnc(i->Min.MsaVec.ws); UInt v_wd = qregEnc(i->Min.MsaVec.wd); p = mkFormVEC(p, i->Min.MsaVec.op, v_wt, v_ws, v_wd); goto done; } Looks like they swap the arguments wt and ws.