Lines Matching refs:cs
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()
239 if (cs_insn_group(cs, insn, ARM64_GRP_JUMP) in zend_jit_disasm_branch_target()
308 csh cs; local
328 if (cs_open(CS_ARCH_X86, CS_MODE_64, &cs) != CS_ERR_OK)
331 if (cs_open(CS_ARCH_X86, CS_MODE_32, &cs) != CS_ERR_OK)
334 cs_option(cs, CS_OPT_DETAIL, CS_OPT_ON);
336 cs_option(cs, CS_OPT_SYNTAX, CS_OPT_SYNTAX_INTEL);
338 cs_option(cs, CS_OPT_SYNTAX, CS_OPT_SYNTAX_ATT);
341 if (cs_open(CS_ARCH_ARM64, CS_MODE_ARM, &cs) != CS_ERR_OK)
343 cs_option(cs, CS_OPT_DETAIL, CS_OPT_ON);
344 cs_option(cs, CS_OPT_SYNTAX, CS_OPT_SYNTAX_ATT);
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)) {
567 cs_close(&cs);