More emitting bugs

This commit is contained in:
Magnus Norddahl 2020-06-10 14:34:45 +02:00
parent 31a603bd56
commit 97206a1196
2 changed files with 7 additions and 7 deletions

View file

@ -37,9 +37,9 @@ void JitCompiler::EmitVtbl(const VMOP *op)
cc.SetInsertPoint(continuebb);
IRValue* ptrObject = LoadA(b);
IRValue* ptrClass = Load(ToInt8PtrPtr(ptrObject, ConstValueD(myoffsetof(DObject, Class))));
IRValue* ptrArray = Load(ToInt8PtrPtr(ptrClass, ConstValueD(myoffsetof(PClass, Virtuals) + myoffsetof(FArray, Array))));
IRValue* ptrFunc = Load(ToInt8PtrPtr(ptrArray, ConstValueD(c * (int)sizeof(void*))));
IRValue* ptrClass = Load(ToInt8PtrPtr(ptrObject, myoffsetof(DObject, Class)));
IRValue* ptrArray = Load(ToInt8PtrPtr(ptrClass, myoffsetof(PClass, Virtuals) + myoffsetof(FArray, Array)));
IRValue* ptrFunc = Load(ToInt8PtrPtr(ptrArray, c * (int)sizeof(void*)));
StoreA(ptrFunc, a);
}

View file

@ -222,13 +222,13 @@ void JitCompiler::EmitLO_R()
void JitCompiler::EmitLO()
{
EmitNullPointerThrow(B, X_READ_NIL);
StoreA(cc.CreateCall(readBarrier, { OffsetPtr(LoadA(B), ConstD(C)) }), A);
StoreA(cc.CreateCall(readBarrier, { Load(ToInt8PtrPtr(LoadA(B), ConstD(C))) }), A);
}
void JitCompiler::EmitLO_R()
{
EmitNullPointerThrow(B, X_READ_NIL);
StoreA(cc.CreateCall(readBarrier, { OffsetPtr(LoadA(B), LoadD(C)) }), A);
StoreA(cc.CreateCall(readBarrier, { Load(ToInt8PtrPtr(LoadA(B), LoadD(C))) }), A);
}
#endif
@ -236,13 +236,13 @@ void JitCompiler::EmitLO_R()
void JitCompiler::EmitLP()
{
EmitNullPointerThrow(B, X_READ_NIL);
StoreA(OffsetPtr(LoadA(B), ConstD(C)), A);
StoreA(Load(ToInt8PtrPtr(LoadA(B), ConstD(C))), A);
}
void JitCompiler::EmitLP_R()
{
EmitNullPointerThrow(B, X_READ_NIL);
StoreA(OffsetPtr(LoadA(B), LoadD(C)), A);
StoreA(Load(ToInt8PtrPtr(LoadA(B), LoadD(C))), A);
}
void JitCompiler::EmitLV2()