diff options
Diffstat (limited to 'src/shader_recompiler/frontend')
| -rw-r--r-- | src/shader_recompiler/frontend/maxwell/translate/impl/logic_operation.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/shader_recompiler/frontend/maxwell/translate/impl/logic_operation.cpp b/src/shader_recompiler/frontend/maxwell/translate/impl/logic_operation.cpp index 89e5cd6de..92cd27ed4 100644 --- a/src/shader_recompiler/frontend/maxwell/translate/impl/logic_operation.cpp +++ b/src/shader_recompiler/frontend/maxwell/translate/impl/logic_operation.cpp | |||
| @@ -44,9 +44,6 @@ void LOP(TranslatorVisitor& v, u64 insn, IR::U32 op_b, bool x, bool cc, bool inv | |||
| 44 | if (x) { | 44 | if (x) { |
| 45 | throw NotImplementedException("X"); | 45 | throw NotImplementedException("X"); |
| 46 | } | 46 | } |
| 47 | if (cc) { | ||
| 48 | throw NotImplementedException("CC"); | ||
| 49 | } | ||
| 50 | IR::U32 op_a{v.X(lop.src_reg)}; | 47 | IR::U32 op_a{v.X(lop.src_reg)}; |
| 51 | if (inv_a != 0) { | 48 | if (inv_a != 0) { |
| 52 | op_a = v.ir.BitwiseNot(op_a); | 49 | op_a = v.ir.BitwiseNot(op_a); |
| @@ -60,6 +57,17 @@ void LOP(TranslatorVisitor& v, u64 insn, IR::U32 op_b, bool x, bool cc, bool inv | |||
| 60 | const IR::U1 pred_result{PredicateOperation(v.ir, result, *pred_op)}; | 57 | const IR::U1 pred_result{PredicateOperation(v.ir, result, *pred_op)}; |
| 61 | v.ir.SetPred(dest_pred, pred_result); | 58 | v.ir.SetPred(dest_pred, pred_result); |
| 62 | } | 59 | } |
| 60 | if (cc) { | ||
| 61 | if (bit_op == LogicalOp::PASS_B) { | ||
| 62 | v.SetZFlag(v.ir.IEqual(result, v.ir.Imm32(0))); | ||
| 63 | v.SetSFlag(v.ir.ILessThan(result, v.ir.Imm32(0), true)); | ||
| 64 | } else { | ||
| 65 | v.SetZFlag(v.ir.GetZeroFromOp(result)); | ||
| 66 | v.SetSFlag(v.ir.GetSignFromOp(result)); | ||
| 67 | } | ||
| 68 | v.ResetCFlag(); | ||
| 69 | v.ResetOFlag(); | ||
| 70 | } | ||
| 63 | v.X(lop.dest_reg, result); | 71 | v.X(lop.dest_reg, result); |
| 64 | } | 72 | } |
| 65 | 73 | ||