Lines Matching refs:insn

226 static uint64_t zend_jit_disasm_branch_target(csh cs, const cs_insn *insn)  in zend_jit_disasm_branch_target()  argument
231 if (cs_insn_group(cs, insn, X86_GRP_JUMP)) { in zend_jit_disasm_branch_target()
232 for (i = 0; i < insn->detail->x86.op_count; i++) { in zend_jit_disasm_branch_target()
233 if (insn->detail->x86.operands[i].type == X86_OP_IMM) { in zend_jit_disasm_branch_target()
234 return insn->detail->x86.operands[i].imm; in zend_jit_disasm_branch_target()
239 if (cs_insn_group(cs, insn, ARM64_GRP_JUMP) in zend_jit_disasm_branch_target()
240 || insn->id == ARM64_INS_BL in zend_jit_disasm_branch_target()
241 || insn->id == ARM64_INS_ADR) { in zend_jit_disasm_branch_target()
242 for (i = 0; i < insn->detail->arm64.op_count; i++) { in zend_jit_disasm_branch_target()
243 if (insn->detail->arm64.operands[i].type == ARM64_OP_IMM) in zend_jit_disasm_branch_target()
244 return insn->detail->arm64.operands[i].imm; in zend_jit_disasm_branch_target()
309 cs_insn *insn; local
388 insn = cs_malloc(cs);
389 while (cs_disasm_iter(cs, &cs_code, &cs_size, &cs_addr, insn)) {
390 if ((addr = zend_jit_disasm_branch_target(cs, insn))) {
392 count = cs_disasm(cs, start, (uint8_t*)end - (uint8_t*)start, (uintptr_t)start, 0, &insn);
394 if ((addr = zend_jit_disasm_branch_target(cs, &(insn[i])))) {
433 while (cs_disasm_iter(cs, &cs_code, &cs_size, &cs_addr, insn)) {
434 z = zend_hash_index_find(&labels, insn->address);
437 z = zend_hash_index_find(&labels, insn[i].address);
449 fprintf(stderr, " %" PRIx64 ":", insn->address);
451 fprintf(stderr, "\t%s ", insn->mnemonic);
452 p = insn->op_str;
455 fprintf(stderr, " %" PRIx64 ":", insn[i].address);
457 fprintf(stderr, "\t%s ", insn[i].mnemonic);
458 p = insn[i].op_str;
511 cs_free(insn, 1);
513 cs_free(insn, count);