mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-21 14:41:39 +00:00
x86jit: Implement BSwap16.
This commit is contained in:
parent
580c9a634b
commit
3a705d9470
@ -183,7 +183,20 @@ void X64JitBackend::CompIR_Bits(IRInst inst) {
|
||||
break;
|
||||
|
||||
case IROp::BSwap16:
|
||||
CompIR_Generic(inst);
|
||||
regs_.Map(inst);
|
||||
if (cpu_info.bBMI2) {
|
||||
// Rotate to put it into the correct register, then swap.
|
||||
if (inst.dest != inst.src1)
|
||||
RORX(32, regs_.RX(inst.dest), regs_.R(inst.src1), 16);
|
||||
else
|
||||
ROR(32, regs_.R(inst.dest), Imm8(16));
|
||||
BSWAP(32, regs_.RX(inst.dest));
|
||||
} else {
|
||||
if (inst.dest != inst.src1)
|
||||
MOV(32, regs_.R(inst.dest), regs_.R(inst.src1));
|
||||
BSWAP(32, regs_.RX(inst.dest));
|
||||
ROR(32, regs_.R(inst.dest), Imm8(16));
|
||||
}
|
||||
break;
|
||||
|
||||
case IROp::Clz:
|
||||
|
Loading…
x
Reference in New Issue
Block a user