mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-02 15:32:52 +00:00
Set carry for S_ADDC_U32
This commit is contained in:
parent
aee53079ca
commit
5f6a9d07ac
@ -547,7 +547,11 @@ void Translator::S_ADDC_U32(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])};
|
const IR::U32 src1{GetSrc(inst.src[1])};
|
||||||
const IR::U32 carry{ir.Select(ir.GetScc(), ir.Imm32(1U), ir.Imm32(0U))};
|
const IR::U32 carry{ir.Select(ir.GetScc(), ir.Imm32(1U), ir.Imm32(0U))};
|
||||||
SetDst(inst.dst[0], ir.IAdd(ir.IAdd(src0, src1), carry));
|
const IR::U32 result{ir.IAdd(ir.IAdd(src0, src1), carry)};
|
||||||
|
SetDst(inst.dst[0], result);
|
||||||
|
const IR::U1 less_src0 = ir.ILessThan(result, src0, false);
|
||||||
|
const IR::U1 less_src1 = ir.ILessThan(result, src1, false);
|
||||||
|
ir.SetScc(ir.LogicalOr(less_src0, less_src1));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Translator::S_MAX_U32(const GcnInst& inst) {
|
void Translator::S_MAX_U32(const GcnInst& inst) {
|
||||||
|
Loading…
Reference in New Issue
Block a user