mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-29 00:33:01 +00:00
SPU LLVM: fix AND instruction family (#9290)
Incorrect immediate test (looks like copypasta)
This commit is contained in:
parent
0e7a705254
commit
28cbba5a7d
@ -6949,19 +6949,19 @@ public:
|
|||||||
|
|
||||||
void ANDI(spu_opcode_t op)
|
void ANDI(spu_opcode_t op)
|
||||||
{
|
{
|
||||||
if (!m_interp_magn && !op.si10) return set_vr(op.rt, get_vr(op.ra));
|
if (!m_interp_magn && op.si10 == -1) return set_vr(op.rt, get_vr(op.ra));
|
||||||
set_vr(op.rt, get_vr<s32[4]>(op.ra) & get_imm<s32[4]>(op.si10));
|
set_vr(op.rt, get_vr<s32[4]>(op.ra) & get_imm<s32[4]>(op.si10));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ANDHI(spu_opcode_t op)
|
void ANDHI(spu_opcode_t op)
|
||||||
{
|
{
|
||||||
if (!m_interp_magn && !op.si10) return set_vr(op.rt, get_vr(op.ra));
|
if (!m_interp_magn && op.si10 == -1) return set_vr(op.rt, get_vr(op.ra));
|
||||||
set_vr(op.rt, get_vr<s16[8]>(op.ra) & get_imm<s16[8]>(op.si10));
|
set_vr(op.rt, get_vr<s16[8]>(op.ra) & get_imm<s16[8]>(op.si10));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ANDBI(spu_opcode_t op)
|
void ANDBI(spu_opcode_t op)
|
||||||
{
|
{
|
||||||
if (!m_interp_magn && !op.si10) return set_vr(op.rt, get_vr(op.ra));
|
if (!m_interp_magn && static_cast<s8>(op.si10) == -1) return set_vr(op.rt, get_vr(op.ra));
|
||||||
set_vr(op.rt, get_vr<s8[16]>(op.ra) & get_imm<s8[16]>(op.si10));
|
set_vr(op.rt, get_vr<s8[16]>(op.ra) & get_imm<s8[16]>(op.si10));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user