mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-03 07:52:31 +00:00
Added S_ANDN2_B32 and S_NAND_B32 opcodes
This commit is contained in:
parent
fda5689ddb
commit
8fed281c13
@ -46,7 +46,11 @@ void Translator::EmitScalarAlu(const GcnInst& inst) {
|
|||||||
case Opcode::S_ADD_I32:
|
case Opcode::S_ADD_I32:
|
||||||
return S_ADD_I32(inst);
|
return S_ADD_I32(inst);
|
||||||
case Opcode::S_AND_B32:
|
case Opcode::S_AND_B32:
|
||||||
return S_AND_B32(inst);
|
return S_AND_B32(NegateMode::None, inst);
|
||||||
|
case Opcode::S_NAND_B32:
|
||||||
|
return S_AND_B32(NegateMode::Result, inst);
|
||||||
|
case Opcode::S_ANDN2_B32:
|
||||||
|
return S_AND_B32(NegateMode::Src1, inst);
|
||||||
case Opcode::S_ASHR_I32:
|
case Opcode::S_ASHR_I32:
|
||||||
return S_ASHR_I32(inst);
|
return S_ASHR_I32(inst);
|
||||||
case Opcode::S_OR_B32:
|
case Opcode::S_OR_B32:
|
||||||
@ -381,10 +385,16 @@ void Translator::S_ADD_I32(const GcnInst& inst) {
|
|||||||
// TODO: Overflow flag
|
// TODO: Overflow flag
|
||||||
}
|
}
|
||||||
|
|
||||||
void Translator::S_AND_B32(const GcnInst& inst) {
|
void Translator::S_AND_B32(NegateMode negate, const GcnInst& inst) {
|
||||||
const IR::U32 src0{GetSrc(inst.src[0])};
|
const IR::U32 src0{GetSrc(inst.src[0])};
|
||||||
const IR::U32 src1{GetSrc(inst.src[1])};
|
IR::U32 src1{GetSrc(inst.src[1])};
|
||||||
const IR::U32 result{ir.BitwiseAnd(src0, src1)};
|
if (negate == NegateMode::Src1) {
|
||||||
|
IR::U32 src1{ir.BitwiseNot(GetSrc(inst.src[1]))};
|
||||||
|
}
|
||||||
|
IR::U32 result{ir.BitwiseAnd(src0, src1)};
|
||||||
|
if (negate == NegateMode::Result) {
|
||||||
|
IR::U32 result{ir.BitwiseNot(ir.BitwiseAnd(src0, src1))};
|
||||||
|
}
|
||||||
SetDst(inst.dst[0], result);
|
SetDst(inst.dst[0], result);
|
||||||
ir.SetScc(ir.INotEqual(result, ir.Imm32(0)));
|
ir.SetScc(ir.INotEqual(result, ir.Imm32(0)));
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,7 @@ public:
|
|||||||
void S_OR_B64(NegateMode negate, bool is_xor, const GcnInst& inst);
|
void S_OR_B64(NegateMode negate, bool is_xor, const GcnInst& inst);
|
||||||
void S_AND_B64(NegateMode negate, const GcnInst& inst);
|
void S_AND_B64(NegateMode negate, const GcnInst& inst);
|
||||||
void S_ADD_I32(const GcnInst& inst);
|
void S_ADD_I32(const GcnInst& inst);
|
||||||
void S_AND_B32(const GcnInst& inst);
|
void S_AND_B32(NegateMode negate, const GcnInst& inst);
|
||||||
void S_ASHR_I32(const GcnInst& inst);
|
void S_ASHR_I32(const GcnInst& inst);
|
||||||
void S_OR_B32(const GcnInst& inst);
|
void S_OR_B32(const GcnInst& inst);
|
||||||
void S_LSHR_B32(const GcnInst& inst);
|
void S_LSHR_B32(const GcnInst& inst);
|
||||||
|
Loading…
Reference in New Issue
Block a user