StoreRelease should also set cr0 lt/gt.

This commit is contained in:
Ben Vanik 2014-10-26 15:44:12 -07:00
parent 5836a81abf
commit 6fd0fa9103
1 changed files with 2 additions and 0 deletions

View File

@ -407,6 +407,8 @@ Value* PPCHIRBuilder::StoreRelease(Value* address, Value* value,
LoadZero(INT32_TYPE)); LoadZero(INT32_TYPE));
Value* eq = CompareEQ(Truncate(address, INT32_TYPE), old_address); Value* eq = CompareEQ(Truncate(address, INT32_TYPE), old_address);
StoreContext(offsetof(PPCContext, cr0.cr0_eq), eq); StoreContext(offsetof(PPCContext, cr0.cr0_eq), eq);
StoreContext(offsetof(PPCContext, cr0.cr0_lt), LoadZero(INT8_TYPE));
StoreContext(offsetof(PPCContext, cr0.cr0_gt), LoadZero(INT8_TYPE));
auto skip_label = NewLabel(); auto skip_label = NewLabel();
BranchFalse(eq, skip_label, BRANCH_UNLIKELY); BranchFalse(eq, skip_label, BRANCH_UNLIKELY);
Store(address, value, store_flags); Store(address, value, store_flags);