mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-04-22 04:24:44 +00:00
Set overflow flag for V_SUBREV_I32
This commit is contained in:
parent
0d81774464
commit
616910f3ad
1 changed files with 7 additions and 2 deletions
|
@ -665,8 +665,13 @@ void Translator::V_SUBREV_F32(const GcnInst& inst) {
|
|||
void Translator::V_SUBREV_I32(const GcnInst& inst) {
|
||||
const IR::U32 src0{GetSrc(inst.src[0])};
|
||||
const IR::U32 src1{GetSrc(inst.src[1])};
|
||||
SetDst(inst.dst[0], ir.ISub(src1, src0));
|
||||
// TODO: Carry-out
|
||||
const IR::U32 result{ir.ISub(src1, src0)};
|
||||
SetDst(inst.dst[0], result);
|
||||
const IR::U32 sign_mask{ir.Imm32(1 << 31)};
|
||||
const IR::U32 sign0{ir.BitwiseAnd(src0, sign_mask)};
|
||||
const IR::U32 sign1{ir.BitwiseAnd(src1, sign_mask)};
|
||||
const IR::U32 signr{ir.BitwiseAnd(result, sign_mask)};
|
||||
ir.SetVcc(ir.LogicalAnd(ir.INotEqual(sign0, sign1), ir.INotEqual(sign0, signr)));
|
||||
}
|
||||
|
||||
void Translator::V_MAD_U64_U32(const GcnInst& inst) {
|
||||
|
|
Loading…
Add table
Reference in a new issue