Skip to content

Commit

Permalink
More emitting bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
dpjudas committed Jun 10, 2020
1 parent 31a603b commit 97206a1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/common/scripting/jit/jit_call.cpp
Expand Up @@ -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);
}

Expand Down
8 changes: 4 additions & 4 deletions src/common/scripting/jit/jit_load.cpp
Expand Up @@ -222,27 +222,27 @@ 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

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()
Expand Down

0 comments on commit 97206a1

Please sign in to comment.