From f1ea74dcff0dc2026b337197e9656dbcf6057324 Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Sun, 3 Feb 2013 21:45:44 -0800 Subject: [PATCH] Setting the condition bit in stwcx. --- src/cpu/codegen/emit_memory.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cpu/codegen/emit_memory.cc b/src/cpu/codegen/emit_memory.cc index 386ea54fc..c4ef4a820 100644 --- a/src/cpu/codegen/emit_memory.cc +++ b/src/cpu/codegen/emit_memory.cc @@ -1084,7 +1084,9 @@ XEEMITTER(stwcx, 0x7C00012D, X )(FunctionGenerator& g, IRBuilder<>& b, I } Value* v = g.gpr_value(i.D.RT); g.WriteMemory(i.address, ea, 4, v, /* release */ true); - // TODO(benvanik): update CR0 + + // We always succeed. + g.update_cr_value(0, b.getInt64(1 << 2)); return 0; }