IR_X86: Prefer static_cast to C-style casts

This commit is contained in:
MerryMage 2017-04-15 10:35:40 +01:00
parent 860ac52a79
commit cb900106c6
1 changed files with 4 additions and 4 deletions

View File

@ -2101,10 +2101,10 @@ static void DoWriteCode(IRBuilder* ibuild, JitIL* Jit, u32 exitAddress)
X64Reg reg = regFindFreeReg(RI);
u64 val = ibuild->GetImmValue64(I);
if ((u32)val == val)
Jit->MOV(32, R(reg), Imm32((u32)val));
else if ((s32)val == (s64)val)
Jit->MOV(64, R(reg), Imm32((s32)val));
if (static_cast<u32>(val) == val)
Jit->MOV(32, R(reg), Imm32(static_cast<u32>(val)));
else if (static_cast<s32>(val) == static_cast<s64>(val))
Jit->MOV(64, R(reg), Imm32(static_cast<s32>(val)));
else
Jit->MOV(64, R(reg), Imm64(val));
RI.regs[reg] = I;