Merge branch 'master' into d3d12

This commit is contained in:
Triang3l 2019-01-08 01:40:08 +03:00
commit 0e9428f1bc
1 changed files with 4 additions and 4 deletions

View File

@ -1077,8 +1077,8 @@ int InstrEmit_srdx(PPCHIRBuilder& f, const InstrData& i) {
// else // else
// m <- i64.0 // m <- i64.0
// RA <- r & m // RA <- r & m
// TODO(benvanik): if >3F, zero out the result. Value* sh =
Value* sh = f.Truncate(f.LoadGPR(i.X.RB), INT8_TYPE); f.And(f.Truncate(f.LoadGPR(i.X.RB), INT8_TYPE), f.LoadConstantInt8(0x7F));
Value* v = f.Select(f.IsTrue(f.And(sh, f.LoadConstantInt8(0x40))), Value* v = f.Select(f.IsTrue(f.And(sh, f.LoadConstantInt8(0x40))),
f.LoadZeroInt64(), f.Shr(f.LoadGPR(i.X.RT), sh)); f.LoadZeroInt64(), f.Shr(f.LoadGPR(i.X.RT), sh));
f.StoreGPR(i.X.RA, v); f.StoreGPR(i.X.RA, v);
@ -1096,8 +1096,8 @@ int InstrEmit_srwx(PPCHIRBuilder& f, const InstrData& i) {
// else // else
// m <- i64.0 // m <- i64.0
// RA <- r & m // RA <- r & m
// TODO(benvanik): if >1F, zero out the result. Value* sh =
Value* sh = f.Truncate(f.LoadGPR(i.X.RB), INT8_TYPE); f.And(f.Truncate(f.LoadGPR(i.X.RB), INT8_TYPE), f.LoadConstantInt8(0x3F));
Value* v = Value* v =
f.Select(f.IsTrue(f.And(sh, f.LoadConstantInt8(0x20))), f.LoadZeroInt32(), f.Select(f.IsTrue(f.And(sh, f.LoadConstantInt8(0x20))), f.LoadZeroInt32(),
f.Shr(f.Truncate(f.LoadGPR(i.X.RT), INT32_TYPE), sh)); f.Shr(f.Truncate(f.LoadGPR(i.X.RT), INT32_TYPE), sh));