mirror of
https://git.h3cjp.net/H3cJP/citra.git
synced 2024-12-28 06:06:55 +00:00
shader/arithmetic_integer: Fix edge case and mark IADD.X Rd.CC as unimplemented
IADD.X Rd.CC requires some extra logic that is not currently implemented. Abort when this is hit.
This commit is contained in:
parent
2a96bea6a7
commit
e895a4e2d7
|
@ -35,7 +35,8 @@ u32 ShaderIR::DecodeArithmeticInteger(NodeBlock& bb, u32 pc) {
|
|||
case OpCode::Id::IADD_C:
|
||||
case OpCode::Id::IADD_R:
|
||||
case OpCode::Id::IADD_IMM: {
|
||||
UNIMPLEMENTED_IF_MSG(instr.alu.saturate_d, "IADD saturation not implemented");
|
||||
UNIMPLEMENTED_IF_MSG(instr.alu.saturate_d, "IADD.SAT");
|
||||
UNIMPLEMENTED_IF_MSG(instr.iadd.x && instr.generates_cc, "IADD.X Rd.CC");
|
||||
|
||||
op_a = GetOperandAbsNegInteger(op_a, false, instr.alu_integer.negate_a, true);
|
||||
op_b = GetOperandAbsNegInteger(op_b, false, instr.alu_integer.negate_b, true);
|
||||
|
@ -49,6 +50,10 @@ u32 ShaderIR::DecodeArithmeticInteger(NodeBlock& bb, u32 pc) {
|
|||
}
|
||||
|
||||
if (instr.generates_cc) {
|
||||
// Avoid changing result's carry flag
|
||||
SetTemporary(bb, 0, std::move(value));
|
||||
value = GetTemporary(0);
|
||||
|
||||
const Node i0 = Immediate(0);
|
||||
|
||||
Node zero = Operation(OperationCode::LogicalIEqual, value, i0);
|
||||
|
|
Loading…
Reference in a new issue