Fixing vector compare.

This commit is contained in:
Ben Vanik 2014-10-26 23:05:38 -07:00
parent c13adeb9cf
commit fe38598489
2 changed files with 5 additions and 5 deletions

View File

@ -102,10 +102,10 @@ typedef struct alignas(64) PPCContext_s {
union { union {
uint32_t value; uint32_t value;
struct { struct {
uint8_t cr6_0;
uint8_t cr6_none_equal;
uint8_t cr6_2;
uint8_t cr6_all_equal; uint8_t cr6_all_equal;
uint8_t cr6_1;
uint8_t cr6_none_equal;
uint8_t cr6_3;
}; };
} cr6; } cr6;
union { union {

View File

@ -301,8 +301,8 @@ void PPCHIRBuilder::UpdateCR6(Value* src_value) {
// Testing for all 1's and all 0's. // Testing for all 1's and all 0's.
// if (Rc) CR6 = all_equal | 0 | none_equal | 0 // if (Rc) CR6 = all_equal | 0 | none_equal | 0
// TODO(benvanik): efficient instruction? // TODO(benvanik): efficient instruction?
StoreContext(offsetof(PPCContext, cr6.cr6_0), LoadZero(INT8_TYPE)); StoreContext(offsetof(PPCContext, cr6.cr6_1), LoadZero(INT8_TYPE));
StoreContext(offsetof(PPCContext, cr6.cr6_2), LoadZero(INT8_TYPE)); StoreContext(offsetof(PPCContext, cr6.cr6_3), LoadZero(INT8_TYPE));
StoreContext(offsetof(PPCContext, cr6.cr6_all_equal), StoreContext(offsetof(PPCContext, cr6.cr6_all_equal),
IsFalse(Not(src_value))); IsFalse(Not(src_value)));
StoreContext(offsetof(PPCContext, cr6.cr6_none_equal), IsFalse(src_value)); StoreContext(offsetof(PPCContext, cr6.cr6_none_equal), IsFalse(src_value));