mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Fix wsbw
This commit is contained in:
parent
1a2edc67d0
commit
7d4774db4c
2 changed files with 5 additions and 2 deletions
|
@ -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);
|
||||
|
|
|
@ -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];
|
||||
|
|
Loading…
Add table
Reference in a new issue