shader_recompiler: added MUL_HI VOP2 (896)

This commit is contained in:
psucien 2024-06-16 20:39:53 +02:00
parent 1fc86a6c9d
commit 54f8616d6a
10 changed files with 31 additions and 4 deletions

View file

@ -320,10 +320,11 @@ void Translator::V_LSHRREV_B32(const GcnInst& inst) {
SetDst(inst.dst[0], ir.ShiftRightLogical(src1, ir.BitwiseAnd(src0, ir.Imm32(0x1F))));
}
void Translator::V_MUL_LO_I32(const GcnInst& inst) {
void Translator::V_MUL_HI_U32(bool is_signed, const GcnInst& inst) {
const IR::U32 src0{GetSrc(inst.src[0])};
const IR::U32 src1{GetSrc(inst.src[1])};
SetDst(inst.dst[0], ir.IMul(src0, src1));
const IR::U32 hi{ir.CompositeExtract(ir.IMulExt(src0, src1, is_signed), 1)};
SetDst(inst.dst[0], hi);
}
void Translator::V_SAD_U32(const GcnInst& inst) {