mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +00:00
- use custom offsetof() macro
src/scripting/vm/jit_call.cpp:164:38: warning: offset of on non-standard-layout type 'VMScriptFunction' [-Winvalid-offsetof] src/scripting/vm/jit_load.cpp:87:50: warning: offset of on non-standard-layout type 'DObject' [-Winvalid-offsetof] src/scripting/vm/jit_load.cpp:96:50: warning: offset of on non-standard-layout type 'DObject' [-Winvalid-offsetof] src/scripting/vm/jit_load.cpp:257:53: warning: offset of on non-standard-layout type 'DObject' [-Winvalid-offsetof]
This commit is contained in:
parent
e4c238b6c7
commit
4624c6e6a3
2 changed files with 5 additions and 5 deletions
|
@ -161,7 +161,7 @@ void JitCompiler::EmitScriptCall(asmjit::X86Gp vmfunc, asmjit::X86Gp paramsptr)
|
|||
using namespace asmjit;
|
||||
|
||||
auto scriptcall = newTempIntPtr();
|
||||
cc.mov(scriptcall, x86::ptr(vmfunc, offsetof(VMScriptFunction, ScriptCall)));
|
||||
cc.mov(scriptcall, x86::ptr(vmfunc, myoffsetof(VMScriptFunction, ScriptCall)));
|
||||
|
||||
auto result = newResultInt32();
|
||||
auto call = cc.call(scriptcall, FuncSignature5<int, VMFunction *, VMValue*, int, VMReturn*, int>());
|
||||
|
|
|
@ -84,8 +84,8 @@ void JitCompiler::EmitMETA()
|
|||
cc.test(regA[B], regA[B]);
|
||||
cc.je(label);
|
||||
|
||||
cc.mov(regA[A], asmjit::x86::qword_ptr(regA[B], offsetof(DObject, Class)));
|
||||
cc.mov(regA[A], asmjit::x86::qword_ptr(regA[A], offsetof(PClass, Meta)));
|
||||
cc.mov(regA[A], asmjit::x86::qword_ptr(regA[B], myoffsetof(DObject, Class)));
|
||||
cc.mov(regA[A], asmjit::x86::qword_ptr(regA[A], myoffsetof(PClass, Meta)));
|
||||
}
|
||||
|
||||
void JitCompiler::EmitCLSS()
|
||||
|
@ -93,7 +93,7 @@ void JitCompiler::EmitCLSS()
|
|||
auto label = EmitThrowExceptionLabel(X_READ_NIL);
|
||||
cc.test(regA[B], regA[B]);
|
||||
cc.je(label);
|
||||
cc.mov(regA[A], asmjit::x86::qword_ptr(regA[B], offsetof(DObject, Class)));
|
||||
cc.mov(regA[A], asmjit::x86::qword_ptr(regA[B], myoffsetof(DObject, Class)));
|
||||
}
|
||||
|
||||
#else
|
||||
|
@ -254,7 +254,7 @@ void JitCompiler::EmitReadBarrier()
|
|||
cc.je(isnull);
|
||||
|
||||
auto mask = newTempIntPtr();
|
||||
cc.mov(mask.r32(), asmjit::x86::dword_ptr(regA[A], offsetof(DObject, ObjectFlags)));
|
||||
cc.mov(mask.r32(), asmjit::x86::dword_ptr(regA[A], myoffsetof(DObject, ObjectFlags)));
|
||||
cc.shl(mask, 63 - 5); // put OF_EuthanizeMe (1 << 5) in the highest bit
|
||||
cc.sar(mask, 63); // sign extend so all bits are set if OF_EuthanizeMe was set
|
||||
cc.not_(mask);
|
||||
|
|
Loading…
Reference in a new issue