mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-29 15:22:08 +00:00
Fix inverted TEST
Remove sign extend when loading int32
This commit is contained in:
parent
5112f5ae80
commit
31a603bd56
2 changed files with 4 additions and 4 deletions
|
@ -6,7 +6,7 @@ void JitCompiler::EmitTEST()
|
|||
int i = (int)(ptrdiff_t)(pc - sfunc->Code);
|
||||
|
||||
auto continuebb = irfunc->createBasicBlock({});
|
||||
cc.CreateCondBr(cc.CreateICmpEQ(LoadD(A), ConstValueD(BC)), GetLabel(i + 2), continuebb);
|
||||
cc.CreateCondBr(cc.CreateICmpNE(LoadD(A), ConstValueD(BC)), GetLabel(i + 2), continuebb);
|
||||
cc.SetInsertPoint(continuebb);
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@ void JitCompiler::EmitTESTN()
|
|||
int i = (int)(ptrdiff_t)(pc - sfunc->Code);
|
||||
|
||||
auto continuebb = irfunc->createBasicBlock({});
|
||||
cc.CreateCondBr(cc.CreateICmpEQ(LoadD(A), ConstValueD(-bc)), GetLabel(i + 2), continuebb);
|
||||
cc.CreateCondBr(cc.CreateICmpNE(LoadD(A), ConstValueD(-bc)), GetLabel(i + 2), continuebb);
|
||||
cc.SetInsertPoint(continuebb);
|
||||
}
|
||||
|
||||
|
|
|
@ -114,13 +114,13 @@ void JitCompiler::EmitLH_R()
|
|||
void JitCompiler::EmitLW()
|
||||
{
|
||||
EmitNullPointerThrow(B, X_READ_NIL);
|
||||
StoreD(SExt(Load(ToInt32Ptr(LoadA(B), ConstD(C)))), A);
|
||||
StoreD(Load(ToInt32Ptr(LoadA(B), ConstD(C))), A);
|
||||
}
|
||||
|
||||
void JitCompiler::EmitLW_R()
|
||||
{
|
||||
EmitNullPointerThrow(B, X_READ_NIL);
|
||||
StoreD(SExt(Load(ToInt32Ptr(LoadA(B), LoadD(C)))), A);
|
||||
StoreD(Load(ToInt32Ptr(LoadA(B), LoadD(C))), A);
|
||||
}
|
||||
|
||||
void JitCompiler::EmitLBU()
|
||||
|
|
Loading…
Reference in a new issue