void Vgen::emit(cbcc i) { assertx(i.cc == vixl::ne || i.cc == vixl::eq); if (i.targets[1] != i.targets[0]) { if (next == i.targets[1]) { // the taken branch is the fall-through block, invert the branch. i = cbcc{i.cc == vixl::ne ? vixl::eq : vixl::ne, i.s, {i.targets[1], i.targets[0]}}; } bccs.push_back({a->frontier(), i.targets[1]}); // offset range +/- 1MB if (i.cc == vixl::ne) { a->cbnz(X(i.s), 0); } else { a->cbz(X(i.s), 0); } } emit(jmp{i.targets[0]}); }