- do not use instructions from too recent instruction set extensions.

andn is part of BMI1 which was introduced in 2012, which is far too recent to be used unchecked.
This commit is contained in:
Christoph Oelckers 2018-11-17 13:10:18 +01:00
parent adde0510fe
commit fcb5684607

View file

@ -257,7 +257,8 @@ void JitCompiler::EmitReadBarrier()
cc.mov(mask.r32(), asmjit::x86::dword_ptr(regA[A], offsetof(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.andn(regA[A], mask, regA[A]);
cc.not_(mask);
cc.and_(regA[A], mask);
cc.bind(isnull);
}