diff --git a/src/alloy/frontend/ppc/ppc_context.h b/src/alloy/frontend/ppc/ppc_context.h index 8eb69ea6a..7fa490c96 100644 --- a/src/alloy/frontend/ppc/ppc_context.h +++ b/src/alloy/frontend/ppc/ppc_context.h @@ -102,10 +102,10 @@ typedef struct alignas(64) PPCContext_s { union { uint32_t value; struct { - uint8_t cr6_0; - uint8_t cr6_none_equal; - uint8_t cr6_2; uint8_t cr6_all_equal; + uint8_t cr6_1; + uint8_t cr6_none_equal; + uint8_t cr6_3; }; } cr6; union { diff --git a/src/alloy/frontend/ppc/ppc_hir_builder.cc b/src/alloy/frontend/ppc/ppc_hir_builder.cc index cb3722883..cdf6f0230 100644 --- a/src/alloy/frontend/ppc/ppc_hir_builder.cc +++ b/src/alloy/frontend/ppc/ppc_hir_builder.cc @@ -301,8 +301,8 @@ void PPCHIRBuilder::UpdateCR6(Value* src_value) { // Testing for all 1's and all 0's. // if (Rc) CR6 = all_equal | 0 | none_equal | 0 // TODO(benvanik): efficient instruction? - StoreContext(offsetof(PPCContext, cr6.cr6_0), LoadZero(INT8_TYPE)); - StoreContext(offsetof(PPCContext, cr6.cr6_2), LoadZero(INT8_TYPE)); + StoreContext(offsetof(PPCContext, cr6.cr6_1), LoadZero(INT8_TYPE)); + StoreContext(offsetof(PPCContext, cr6.cr6_3), LoadZero(INT8_TYPE)); StoreContext(offsetof(PPCContext, cr6.cr6_all_equal), IsFalse(Not(src_value))); StoreContext(offsetof(PPCContext, cr6.cr6_none_equal), IsFalse(src_value));