This commit is contained in:
Henrik Rydgard 2016-05-08 02:08:25 +02:00
parent 1a2edc67d0
commit 7d4774db4c
2 changed files with 5 additions and 2 deletions

View file

@ -292,7 +292,7 @@ void IRJit::Comp_Allegrex2(MIPSOpcode op) {
ir.Write(IROp::BSwap16, rd, rt);
break;
case 0xE0: //wsbw
ir.Write(IROp::BSwap16, rd, rt);
ir.Write(IROp::BSwap32, rd, rt);
break;
default:
Comp_Generic(op);

View file

@ -307,8 +307,11 @@ u32 IRInterpret(MIPSState *mips, const IRInst *inst, const u32 *constPool, int c
break;
}
case IROp::BSwap32:
mips->r[inst->dest] = swap32(mips->r[inst->src1]);
{
u32 x = mips->r[inst->src1];
mips->r[inst->dest] = ((x & 0xFF000000) >> 24) | ((x & 0x00FF0000) >> 8) | ((x & 0x0000FF00) << 8) | ((x & 0x000000FF) << 24);
break;
}
case IROp::FAdd:
mips->f[inst->dest] = mips->f[inst->src1] + mips->f[inst->src2];