diff --git a/src/alloy/backend/x64/x64_emitter.cc b/src/alloy/backend/x64/x64_emitter.cc index 204d614cc..2a7a933d3 100644 --- a/src/alloy/backend/x64/x64_emitter.cc +++ b/src/alloy/backend/x64/x64_emitter.cc @@ -790,6 +790,8 @@ Address X64Emitter::GetXmmConstPtr(XmmConst id) { /* XMMZero */ vec128f(0.0f), /* XMMOne */ vec128f(1.0f), /* XMMNegativeOne */ vec128f(-1.0f, -1.0f, -1.0f, -1.0f), + /* XMMFFFF */ vec128i(0xFFFFFFFFu, 0xFFFFFFFFu, + 0xFFFFFFFFu, 0xFFFFFFFFu), /* XMMMaskX16Y16 */ vec128i(0x0000FFFFu, 0xFFFF0000u, 0x00000000u, 0x00000000u), /* XMMFlipX16Y16 */ vec128i(0x00008000u, 0x00000000u, diff --git a/src/alloy/backend/x64/x64_emitter.h b/src/alloy/backend/x64/x64_emitter.h index 009f72e92..83b2bd4ff 100644 --- a/src/alloy/backend/x64/x64_emitter.h +++ b/src/alloy/backend/x64/x64_emitter.h @@ -42,6 +42,7 @@ enum XmmConst { XMMZero = 0, XMMOne, XMMNegativeOne, + XMMFFFF, XMMMaskX16Y16, XMMFlipX16Y16, XMMFixX16Y16, diff --git a/src/alloy/backend/x64/x64_sequences.cc b/src/alloy/backend/x64/x64_sequences.cc index 4bf74ead2..acc2242a8 100644 --- a/src/alloy/backend/x64/x64_sequences.cc +++ b/src/alloy/backend/x64/x64_sequences.cc @@ -4109,7 +4109,7 @@ EMITTER(NOT_I64, MATCH(I, I64<>>)) { EMITTER(NOT_V128, MATCH(I, V128<>>)) { static void Emit(X64Emitter& e, const EmitArgType& i) { // dest = src ^ 0xFFFF... - e.vpxor(i.dest, i.src1, e.GetXmmConstPtr(XMMAbsMaskPD /* FF... */)); + e.vpxor(i.dest, i.src1, e.GetXmmConstPtr(XMMFFFF /* FF... */)); } }; EMITTER_OPCODE_TABLE( diff --git a/src/alloy/frontend/ppc/ppc_hir_builder.cc b/src/alloy/frontend/ppc/ppc_hir_builder.cc index 4168d92a9..cb3722883 100644 --- a/src/alloy/frontend/ppc/ppc_hir_builder.cc +++ b/src/alloy/frontend/ppc/ppc_hir_builder.cc @@ -301,6 +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_all_equal), IsFalse(Not(src_value))); StoreContext(offsetof(PPCContext, cr6.cr6_none_equal), IsFalse(src_value));