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

Method EmitComparisonOpcode

source/common/scripting/jit/jitintern.h:74–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72
73 template <typename Func>
74 void EmitComparisonOpcode(Func jmpFunc)
75 {
76 using namespace asmjit;
77
78 int i = (int)(ptrdiff_t)(pc - sfunc->Code);
79
80 auto successLabel = cc.newLabel();
81
82 auto failLabel = GetLabel(i + 2 + JMPOFS(pc + 1));
83
84 jmpFunc(static_cast<bool>(A & CMP_CHECK), failLabel, successLabel);
85
86 cc.bind(successLabel);
87 pc++; // This instruction uses two instruction slots - skip the next one
88 }
89
90 template<int N>
91 void EmitVectorComparison(bool check, asmjit::Label& fail, asmjit::Label& success)

Callers

nothing calls this directly

Calls 2

newLabelMethod · 0.45
bindMethod · 0.45

Tested by

no test coverage detected