mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-09 13:19:00 +00:00
Fix: V_MUL_I32_I24 | V_MUL_U32_U24 (#3632)
This commit is contained in:
@@ -153,7 +153,7 @@ public:
|
|||||||
void V_SUB_F32(const GcnInst& inst);
|
void V_SUB_F32(const GcnInst& inst);
|
||||||
void V_SUBREV_F32(const GcnInst& inst);
|
void V_SUBREV_F32(const GcnInst& inst);
|
||||||
void V_MUL_F32(const GcnInst& inst);
|
void V_MUL_F32(const GcnInst& inst);
|
||||||
void V_MUL_I32_I24(const GcnInst& inst);
|
void V_MUL_I32_I24(const GcnInst& inst, bool is_signed);
|
||||||
void V_MIN_F32(const GcnInst& inst, bool is_legacy = false);
|
void V_MIN_F32(const GcnInst& inst, bool is_legacy = false);
|
||||||
void V_MAX_F32(const GcnInst& inst, bool is_legacy = false);
|
void V_MAX_F32(const GcnInst& inst, bool is_legacy = false);
|
||||||
void V_MIN_I32(const GcnInst& inst);
|
void V_MIN_I32(const GcnInst& inst);
|
||||||
|
|||||||
@@ -29,9 +29,9 @@ void Translator::EmitVectorAlu(const GcnInst& inst) {
|
|||||||
case Opcode::V_MUL_F32:
|
case Opcode::V_MUL_F32:
|
||||||
return V_MUL_F32(inst);
|
return V_MUL_F32(inst);
|
||||||
case Opcode::V_MUL_I32_I24:
|
case Opcode::V_MUL_I32_I24:
|
||||||
return V_MUL_I32_I24(inst);
|
return V_MUL_I32_I24(inst, true);
|
||||||
case Opcode::V_MUL_U32_U24:
|
case Opcode::V_MUL_U32_U24:
|
||||||
return V_MUL_I32_I24(inst);
|
return V_MUL_I32_I24(inst, false);
|
||||||
case Opcode::V_MIN_LEGACY_F32:
|
case Opcode::V_MIN_LEGACY_F32:
|
||||||
return V_MIN_F32(inst, true);
|
return V_MIN_F32(inst, true);
|
||||||
case Opcode::V_MAX_LEGACY_F32:
|
case Opcode::V_MAX_LEGACY_F32:
|
||||||
@@ -459,9 +459,11 @@ void Translator::V_MUL_F32(const GcnInst& inst) {
|
|||||||
SetDst(inst.dst[0], ir.FPMul(GetSrc<IR::F32>(inst.src[0]), GetSrc<IR::F32>(inst.src[1])));
|
SetDst(inst.dst[0], ir.FPMul(GetSrc<IR::F32>(inst.src[0]), GetSrc<IR::F32>(inst.src[1])));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Translator::V_MUL_I32_I24(const GcnInst& inst) {
|
void Translator::V_MUL_I32_I24(const GcnInst& inst, bool is_signed) {
|
||||||
const IR::U32 src0{ir.BitFieldExtract(GetSrc(inst.src[0]), ir.Imm32(0), ir.Imm32(24), true)};
|
const IR::U32 src0{
|
||||||
const IR::U32 src1{ir.BitFieldExtract(GetSrc(inst.src[1]), ir.Imm32(0), ir.Imm32(24), true)};
|
ir.BitFieldExtract(GetSrc(inst.src[0]), ir.Imm32(0), ir.Imm32(24), is_signed)};
|
||||||
|
const IR::U32 src1{
|
||||||
|
ir.BitFieldExtract(GetSrc(inst.src[1]), ir.Imm32(0), ir.Imm32(24), is_signed)};
|
||||||
SetDst(inst.dst[0], ir.IMul(src0, src1));
|
SetDst(inst.dst[0], ir.IMul(src0, src1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user