MCPcopy Create free account
hub / github.com/ZDoom/Raze / EmitReadBarrier

Method EmitReadBarrier

source/common/scripting/jit/jit_load.cpp:209–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207#if 1 // Inline read barrier impl
208
209void JitCompiler::EmitReadBarrier()
210{
211 auto isnull = cc.newLabel();
212 cc.test(regA[A], regA[A]);
213 cc.je(isnull);
214
215 auto mask = newTempIntPtr();
216 cc.mov(mask.r32(), asmjit::x86::dword_ptr(regA[A], myoffsetof(DObject, ObjectFlags)));
217 cc.shl(mask, 63 - 5); // put OF_EuthanizeMe (1 << 5) in the highest bit
218 cc.sar(mask, 63); // sign extend so all bits are set if OF_EuthanizeMe was set
219 cc.not_(mask);
220 cc.and_(regA[A], mask);
221
222 cc.bind(isnull);
223}
224
225void JitCompiler::EmitLO()
226{

Callers

nothing calls this directly

Calls 4

r32Method · 0.80
newLabelMethod · 0.45
and_Method · 0.45
bindMethod · 0.45

Tested by

no test coverage detected