| 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) |