5 #include <capstone/capstone.h>
16 #define OPCOUNT OPCOUNT64
18 #define MEMDISP(x) insn->detail->arm64.operands[x].mem.disp
28 "x0",
"x1",
"x2",
"x3",
"x4",
"x5",
"x6",
"x7",
"x8",
"x9",
"x10",
"x11",
"x12",
"x13",
"x14",
"x15",
29 "x16",
"x17",
"x18",
"x19",
"x20",
"x21",
"x22",
"x23",
"x24",
"x25",
"x26",
"x27",
"x28",
"x29",
"x30",
"sp",
30 "nf",
"zf",
"cf",
"vf",
220 default:
return NULL;
263 v->op.cast.length =
bits;
271 bool is_signed =
false;
303 if (dst_bits == v_bits) {
330 #define REG(n) read_reg(REGID(n))
331 #define REGBITS(n) reg_bits(REGID(n))
332 #define MEMBASEID(x) insn->detail->arm64.operands[x].mem.base
333 #define MEMBASE(x) read_reg(MEMBASEID(x))
353 return base_plus_disp;
358 return ADD(base_plus_disp, index);
368 ut32 bits_requested = bits_inout ? *bits_inout : 0;
372 if (!bits_requested) {
374 if (!bits_requested) {
378 *bits_inout = bits_requested;
388 if (!bits_requested) {
393 val <<=
op->shift.value;
395 return UN(bits_requested,
val);
402 }
else if (disp < 0) {
413 #define ARG(n, bits) arg(insn, n, bits)
448 || insn->id == ARM64_INS_SUBS || insn->id == ARM64_INS_SBCS
463 bool with_carry =
false;
466 || insn->id == ARM64_INS_ADCS
473 || insn->id == ARM64_INS_SBCS
486 SETG(
"cf", (is_sub ? sub_carry : add_carry)(
VARL(
"a"),
VARL(
"b"), with_carry,
bits)),
487 SETG(
"vf", (is_sub ? sub_overflow : add_overflow)(
VARL(
"a"),
VARL(
"b"),
REG(0))),
545 if (insn->detail->arm64.update_flags) {
625 SETG(
"x30",
U64(insn->address + 4)),
688 if (insn->detail->arm64.update_flags) {
690 return eff ?
SEQ2(eff, eff1) : eff1;
715 case ARM64_INS_CASAB:
716 case ARM64_INS_CASALB:
717 case ARM64_INS_CASLB:
721 case ARM64_INS_CASAH:
722 case ARM64_INS_CASALH:
723 case ARM64_INS_CASLH:
733 if (!
addr || !cmpval || !newval || !write_old_eff) {
762 if (!
addr || !cmpval0 || !cmpval1 || !newval0 || !newval1 || !write_old0_eff || !write_old1_eff) {
819 SETG(
"cf", (is_neg ? add_carry : sub_carry)(
VARL(
"a"),
VARL(
"b"),
false,
bits)),
820 SETG(
"vf", (is_neg ? add_overflow : sub_overflow)(
VARL(
"a"),
VARL(
"b"),
VARL(
"r"))),
843 size_t src1_idx =
OPCOUNT() > 2 ? 2 : 1;
844 if (!
ISREG(dst_idx)) {
867 bool invert_cond =
false;
974 if (!
h || !l || !dist) {
1029 if (
ISIMM(addr_op + 1)) {
1033 wbaddr =
ADD(wbaddr,
U64(disp));
1034 }
else if (disp < 0) {
1035 wbaddr =
SUB(wbaddr,
U64(-disp));
1064 if (pair && !
ISREG(1)) {
1068 size_t addr_op = pair ? 2 : 1;
1075 bool is_signed =
false;
1080 #if CS_API_MAJOR > 4
1081 case ARM64_INS_LDAPURSB:
1091 #if CS_API_MAJOR > 4
1092 case ARM64_INS_LDLARB:
1093 case ARM64_INS_LDAPRB:
1094 case ARM64_INS_LDAPURB:
1101 #if CS_API_MAJOR > 4
1102 case ARM64_INS_LDAPURSH:
1112 #if CS_API_MAJOR > 4
1113 case ARM64_INS_LDAPRH:
1114 case ARM64_INS_LDAPURH:
1115 case ARM64_INS_LDLARH:
1123 #if CS_API_MAJOR > 4
1124 case ARM64_INS_LDAPURSW:
1132 loadsz =
is_wreg(dst_reg) ? 32 : 64;
1144 eff = eff ?
SEQ2(eff, eff1) : eff1;
1151 eff =
SEQ2(eff, eff1);
1155 eff =
SEQ2(eff, wb_eff);
1176 size_t src_op = result ? 1 : 0;
1177 size_t addr_op = (result ? 1 : 0) + 1 + (pair ? 1 : 0);
1178 ut32 addr_bits = 64;
1191 #if CS_API_MAJOR > 4
1192 case ARM64_INS_STLLRB:
1193 case ARM64_INS_STLURB:
1203 #if CS_API_MAJOR > 4
1204 case ARM64_INS_STLLRH:
1205 case ARM64_INS_STLURH:
1226 val2 =
ARG(src_op + 1, &
bits);
1240 eff =
SEQ2(eff, wb_eff);
1249 eff =
SEQ2(eff, res_eff);
1254 #if CS_API_MAJOR > 4
1300 size_t addr_op =
OPCOUNT() == 3 ? 2 : 1;
1301 if (!
ISMEM(addr_op)) {
1317 case ARM64_INS_LDCLRB:
1318 case ARM64_INS_LDCLRAB:
1319 case ARM64_INS_LDCLRALB:
1320 case ARM64_INS_LDCLRLB:
1321 case ARM64_INS_STCLRB:
1322 case ARM64_INS_STCLRLB:
1326 case ARM64_INS_LDEORB:
1327 case ARM64_INS_LDEORAB:
1328 case ARM64_INS_LDEORALB:
1329 case ARM64_INS_LDEORLB:
1330 case ARM64_INS_STEORB:
1331 case ARM64_INS_STEORLB:
1335 case ARM64_INS_LDSETB:
1336 case ARM64_INS_LDSETAB:
1337 case ARM64_INS_LDSETALB:
1338 case ARM64_INS_LDSETLB:
1339 case ARM64_INS_STSETB:
1340 case ARM64_INS_STSETLB:
1344 case ARM64_INS_LDSMAXB:
1345 case ARM64_INS_LDSMAXAB:
1346 case ARM64_INS_LDSMAXALB:
1347 case ARM64_INS_LDSMAXLB:
1348 case ARM64_INS_STSMAXB:
1349 case ARM64_INS_STSMAXLB:
1353 case ARM64_INS_LDSMINB:
1354 case ARM64_INS_LDSMINAB:
1355 case ARM64_INS_LDSMINALB:
1356 case ARM64_INS_LDSMINLB:
1357 case ARM64_INS_STSMINB:
1358 case ARM64_INS_STSMINLB:
1362 case ARM64_INS_LDUMAXB:
1363 case ARM64_INS_LDUMAXAB:
1364 case ARM64_INS_LDUMAXALB:
1365 case ARM64_INS_LDUMAXLB:
1366 case ARM64_INS_STUMAXB:
1367 case ARM64_INS_STUMAXLB:
1371 case ARM64_INS_LDUMINB:
1372 case ARM64_INS_LDUMINAB:
1373 case ARM64_INS_LDUMINALB:
1374 case ARM64_INS_LDUMINLB:
1375 case ARM64_INS_STUMINB:
1376 case ARM64_INS_STUMINLB:
1380 case ARM64_INS_LDADDB:
1381 case ARM64_INS_LDADDAB:
1382 case ARM64_INS_LDADDALB:
1383 case ARM64_INS_LDADDLB:
1384 case ARM64_INS_STADDB:
1385 case ARM64_INS_STADDLB:
1389 case ARM64_INS_LDCLRH:
1390 case ARM64_INS_LDCLRAH:
1391 case ARM64_INS_LDCLRALH:
1392 case ARM64_INS_LDCLRLH:
1393 case ARM64_INS_STCLRH:
1394 case ARM64_INS_STCLRLH:
1398 case ARM64_INS_LDEORH:
1399 case ARM64_INS_LDEORAH:
1400 case ARM64_INS_LDEORALH:
1401 case ARM64_INS_LDEORLH:
1402 case ARM64_INS_STEORH:
1403 case ARM64_INS_STEORLH:
1407 case ARM64_INS_LDSETH:
1408 case ARM64_INS_LDSETAH:
1409 case ARM64_INS_LDSETALH:
1410 case ARM64_INS_LDSETLH:
1411 case ARM64_INS_STSETH:
1412 case ARM64_INS_STSETLH:
1416 case ARM64_INS_LDSMAXH:
1417 case ARM64_INS_LDSMAXAH:
1418 case ARM64_INS_LDSMAXALH:
1419 case ARM64_INS_LDSMAXLH:
1420 case ARM64_INS_STSMAXH:
1421 case ARM64_INS_STSMAXLH:
1425 case ARM64_INS_LDSMINH:
1426 case ARM64_INS_LDSMINAH:
1427 case ARM64_INS_LDSMINALH:
1428 case ARM64_INS_LDSMINLH:
1429 case ARM64_INS_STSMINH:
1430 case ARM64_INS_STSMINLH:
1434 case ARM64_INS_LDUMAXH:
1435 case ARM64_INS_LDUMAXAH:
1436 case ARM64_INS_LDUMAXALH:
1437 case ARM64_INS_LDUMAXLH:
1438 case ARM64_INS_STUMAXH:
1439 case ARM64_INS_STUMAXLH:
1443 case ARM64_INS_LDUMINH:
1444 case ARM64_INS_LDUMINAH:
1445 case ARM64_INS_LDUMINALH:
1446 case ARM64_INS_LDUMINLH:
1447 case ARM64_INS_STUMINH:
1448 case ARM64_INS_STUMINLH:
1452 case ARM64_INS_LDADDH:
1453 case ARM64_INS_LDADDAH:
1454 case ARM64_INS_LDADDALH:
1455 case ARM64_INS_LDADDLH:
1456 case ARM64_INS_STADDH:
1457 case ARM64_INS_STADDLH:
1461 case ARM64_INS_LDCLR:
1462 case ARM64_INS_LDCLRA:
1463 case ARM64_INS_LDCLRAL:
1464 case ARM64_INS_LDCLRL:
1465 case ARM64_INS_STCLR:
1466 case ARM64_INS_STCLRL:
1469 case ARM64_INS_LDEOR:
1470 case ARM64_INS_LDEORA:
1471 case ARM64_INS_LDEORAL:
1472 case ARM64_INS_LDEORL:
1473 case ARM64_INS_STEOR:
1474 case ARM64_INS_STEORL:
1477 case ARM64_INS_LDSET:
1478 case ARM64_INS_LDSETA:
1479 case ARM64_INS_LDSETAL:
1480 case ARM64_INS_LDSETL:
1481 case ARM64_INS_STSET:
1482 case ARM64_INS_STSETL:
1485 case ARM64_INS_LDSMAX:
1486 case ARM64_INS_LDSMAXA:
1487 case ARM64_INS_LDSMAXAL:
1488 case ARM64_INS_LDSMAXL:
1489 case ARM64_INS_STSMAX:
1490 case ARM64_INS_STSMAXL:
1493 case ARM64_INS_LDSMIN:
1494 case ARM64_INS_LDSMINA:
1495 case ARM64_INS_LDSMINAL:
1496 case ARM64_INS_LDSMINL:
1497 case ARM64_INS_STSMIN:
1498 case ARM64_INS_STSMINL:
1501 case ARM64_INS_LDUMAX:
1502 case ARM64_INS_LDUMAXA:
1503 case ARM64_INS_LDUMAXAL:
1504 case ARM64_INS_LDUMAXL:
1505 case ARM64_INS_STUMAX:
1506 case ARM64_INS_STUMAXL:
1509 case ARM64_INS_LDUMIN:
1510 case ARM64_INS_LDUMINA:
1511 case ARM64_INS_LDUMINAL:
1512 case ARM64_INS_LDUMINL:
1513 case ARM64_INS_STUMIN:
1514 case ARM64_INS_STUMINL:
1519 loadsz =
is_wreg(addend_reg) ? 32 : 64;
1581 eff =
SEQ2(eff, ld_eff);
1602 if (!ma || !mb || !addend) {
1607 res =
SUB(addend,
MUL(ma, mb));
1609 res =
ADD(
MUL(ma, mb), addend);
1650 if (
ISIMM(1) &&
IMM(1) == 0 && !strcmp(insn->mnemonic,
"movn")) {
1710 #if CS_API_MAJOR > 4
1731 #if CS_API_MAJOR > 4
1748 const char *
flags[] = {
"vf",
"cf",
"zf",
"nf" };
1750 if (!(
mask & (1ull <<
i))) {
1757 eff = eff ?
SEQ2(set, eff) : set;
1762 return eff ? eff :
NOP();
1805 #if CS_API_MAJOR > 4
1841 #if CS_API_MAJOR > 3
1847 #if CS_API_MAJOR > 3
1860 if (insn->detail->arm64.update_flags) {
1913 ut32 container_bits = dst_bits;
1915 container_bits = 32;
1917 container_bits = 16;
1924 if (container_bits == 16) {
1941 if (dst_bits == 64) {
1942 if (container_bits == 16) {
1960 res = container_bits == 32 ?
APPEND(high, res) :
APPEND(res, high);
2015 #if CS_API_MAJOR > 4
2028 ut32 bits = insn->id == ARM64_INS_SETF16 ? 16 : 8;
2048 if (!
x || !y || !addend) {
2057 res =
SUB(addend, res);
2059 res =
ADD(addend, res);
2109 #if CS_API_MAJOR > 4
2122 case ARM64_INS_SWPB:
2123 case ARM64_INS_SWPAB:
2124 case ARM64_INS_SWPALB:
2125 case ARM64_INS_SWPLB:
2128 case ARM64_INS_SWPH:
2129 case ARM64_INS_SWPAH:
2130 case ARM64_INS_SWPALH:
2131 case ARM64_INS_SWPLH:
2141 ut32 addr_bits = 64;
2147 if (!
addr || !store_val) {
2178 bool is_signed =
true;
2332 #if CS_API_MAJOR > 4
2333 case ARM64_INS_ADDS:
2334 case ARM64_INS_SUBS:
2335 case ARM64_INS_ADCS:
2336 case ARM64_INS_SBCS:
2343 #if CS_API_MAJOR > 4
2344 case ARM64_INS_ANDS:
2359 #if CS_API_MAJOR > 4
2360 case ARM64_INS_BRAA:
2361 case ARM64_INS_BRAAZ:
2362 case ARM64_INS_BRAB:
2363 case ARM64_INS_BRABZ:
2364 case ARM64_INS_RETAA:
2365 case ARM64_INS_RETAB:
2370 #if CS_API_MAJOR > 4
2371 case ARM64_INS_BLRAA:
2372 case ARM64_INS_BLRAAZ:
2373 case ARM64_INS_BLRAB:
2374 case ARM64_INS_BLRABZ:
2382 #if CS_API_MAJOR > 4
2383 case ARM64_INS_BICS:
2386 #if CS_API_MAJOR > 4
2388 case ARM64_INS_CASA:
2389 case ARM64_INS_CASAL:
2390 case ARM64_INS_CASL:
2391 case ARM64_INS_CASB:
2392 case ARM64_INS_CASAB:
2393 case ARM64_INS_CASALB:
2394 case ARM64_INS_CASLB:
2395 case ARM64_INS_CASH:
2396 case ARM64_INS_CASAH:
2397 case ARM64_INS_CASALH:
2398 case ARM64_INS_CASLH:
2400 case ARM64_INS_CASP:
2401 case ARM64_INS_CASPA:
2402 case ARM64_INS_CASPAL:
2403 case ARM64_INS_CASPL:
2414 #if CS_API_MAJOR > 4
2415 case ARM64_INS_CFINV:
2471 #if CS_API_MAJOR > 4
2472 case ARM64_INS_LDAPR:
2473 case ARM64_INS_LDAPRB:
2474 case ARM64_INS_LDAPRH:
2475 case ARM64_INS_LDAPUR:
2476 case ARM64_INS_LDAPURB:
2477 case ARM64_INS_LDAPURH:
2478 case ARM64_INS_LDAPURSB:
2479 case ARM64_INS_LDAPURSH:
2480 case ARM64_INS_LDAPURSW:
2481 case ARM64_INS_LDLAR:
2482 case ARM64_INS_LDLARB:
2483 case ARM64_INS_LDLARH:
2484 case ARM64_INS_LDRAA:
2485 case ARM64_INS_LDRAB:
2488 #if CS_API_MAJOR > 4
2489 case ARM64_INS_LDADD:
2490 case ARM64_INS_LDADDA:
2491 case ARM64_INS_LDADDAL:
2492 case ARM64_INS_LDADDL:
2493 case ARM64_INS_LDADDB:
2494 case ARM64_INS_LDADDAB:
2495 case ARM64_INS_LDADDALB:
2496 case ARM64_INS_LDADDLB:
2497 case ARM64_INS_LDADDH:
2498 case ARM64_INS_LDADDAH:
2499 case ARM64_INS_LDADDALH:
2500 case ARM64_INS_LDADDLH:
2501 case ARM64_INS_STADD:
2502 case ARM64_INS_STADDL:
2503 case ARM64_INS_STADDB:
2504 case ARM64_INS_STADDLB:
2505 case ARM64_INS_STADDH:
2506 case ARM64_INS_STADDLH:
2507 case ARM64_INS_LDCLRB:
2508 case ARM64_INS_LDCLRAB:
2509 case ARM64_INS_LDCLRALB:
2510 case ARM64_INS_LDCLRLB:
2511 case ARM64_INS_LDCLRH:
2512 case ARM64_INS_LDCLRAH:
2513 case ARM64_INS_LDCLRALH:
2514 case ARM64_INS_LDCLRLH:
2515 case ARM64_INS_LDCLR:
2516 case ARM64_INS_LDCLRA:
2517 case ARM64_INS_LDCLRAL:
2518 case ARM64_INS_LDCLRL:
2519 case ARM64_INS_STCLR:
2520 case ARM64_INS_STCLRL:
2521 case ARM64_INS_STCLRB:
2522 case ARM64_INS_STCLRLB:
2523 case ARM64_INS_STCLRH:
2524 case ARM64_INS_STCLRLH:
2525 case ARM64_INS_LDEORB:
2526 case ARM64_INS_LDEORAB:
2527 case ARM64_INS_LDEORALB:
2528 case ARM64_INS_LDEORLB:
2529 case ARM64_INS_LDEORH:
2530 case ARM64_INS_LDEORAH:
2531 case ARM64_INS_LDEORALH:
2532 case ARM64_INS_LDEORLH:
2533 case ARM64_INS_LDEOR:
2534 case ARM64_INS_LDEORA:
2535 case ARM64_INS_LDEORAL:
2536 case ARM64_INS_LDEORL:
2537 case ARM64_INS_STEOR:
2538 case ARM64_INS_STEORL:
2539 case ARM64_INS_STEORB:
2540 case ARM64_INS_STEORLB:
2541 case ARM64_INS_STEORH:
2542 case ARM64_INS_STEORLH:
2543 case ARM64_INS_LDSETB:
2544 case ARM64_INS_LDSETAB:
2545 case ARM64_INS_LDSETALB:
2546 case ARM64_INS_LDSETLB:
2547 case ARM64_INS_LDSETH:
2548 case ARM64_INS_LDSETAH:
2549 case ARM64_INS_LDSETALH:
2550 case ARM64_INS_LDSETLH:
2551 case ARM64_INS_LDSET:
2552 case ARM64_INS_LDSETA:
2553 case ARM64_INS_LDSETAL:
2554 case ARM64_INS_LDSETL:
2555 case ARM64_INS_STSET:
2556 case ARM64_INS_STSETL:
2557 case ARM64_INS_STSETB:
2558 case ARM64_INS_STSETLB:
2559 case ARM64_INS_STSETH:
2560 case ARM64_INS_STSETLH:
2561 case ARM64_INS_LDSMAXB:
2562 case ARM64_INS_LDSMAXAB:
2563 case ARM64_INS_LDSMAXALB:
2564 case ARM64_INS_LDSMAXLB:
2565 case ARM64_INS_LDSMAXH:
2566 case ARM64_INS_LDSMAXAH:
2567 case ARM64_INS_LDSMAXALH:
2568 case ARM64_INS_LDSMAXLH:
2569 case ARM64_INS_LDSMAX:
2570 case ARM64_INS_LDSMAXA:
2571 case ARM64_INS_LDSMAXAL:
2572 case ARM64_INS_LDSMAXL:
2573 case ARM64_INS_STSMAX:
2574 case ARM64_INS_STSMAXL:
2575 case ARM64_INS_STSMAXB:
2576 case ARM64_INS_STSMAXLB:
2577 case ARM64_INS_STSMAXH:
2578 case ARM64_INS_STSMAXLH:
2579 case ARM64_INS_LDSMINB:
2580 case ARM64_INS_LDSMINAB:
2581 case ARM64_INS_LDSMINALB:
2582 case ARM64_INS_LDSMINLB:
2583 case ARM64_INS_LDSMINH:
2584 case ARM64_INS_LDSMINAH:
2585 case ARM64_INS_LDSMINALH:
2586 case ARM64_INS_LDSMINLH:
2587 case ARM64_INS_LDSMIN:
2588 case ARM64_INS_LDSMINA:
2589 case ARM64_INS_LDSMINAL:
2590 case ARM64_INS_LDSMINL:
2591 case ARM64_INS_STSMIN:
2592 case ARM64_INS_STSMINL:
2593 case ARM64_INS_STSMINB:
2594 case ARM64_INS_STSMINLB:
2595 case ARM64_INS_STSMINH:
2596 case ARM64_INS_STSMINLH:
2597 case ARM64_INS_LDUMAXB:
2598 case ARM64_INS_LDUMAXAB:
2599 case ARM64_INS_LDUMAXALB:
2600 case ARM64_INS_LDUMAXLB:
2601 case ARM64_INS_LDUMAXH:
2602 case ARM64_INS_LDUMAXAH:
2603 case ARM64_INS_LDUMAXALH:
2604 case ARM64_INS_LDUMAXLH:
2605 case ARM64_INS_LDUMAX:
2606 case ARM64_INS_LDUMAXA:
2607 case ARM64_INS_LDUMAXAL:
2608 case ARM64_INS_LDUMAXL:
2609 case ARM64_INS_STUMAX:
2610 case ARM64_INS_STUMAXL:
2611 case ARM64_INS_STUMAXB:
2612 case ARM64_INS_STUMAXLB:
2613 case ARM64_INS_STUMAXH:
2614 case ARM64_INS_STUMAXLH:
2615 case ARM64_INS_LDUMINB:
2616 case ARM64_INS_LDUMINAB:
2617 case ARM64_INS_LDUMINALB:
2618 case ARM64_INS_LDUMINLB:
2619 case ARM64_INS_LDUMINH:
2620 case ARM64_INS_LDUMINAH:
2621 case ARM64_INS_LDUMINALH:
2622 case ARM64_INS_LDUMINLH:
2623 case ARM64_INS_LDUMIN:
2624 case ARM64_INS_LDUMINA:
2625 case ARM64_INS_LDUMINAL:
2626 case ARM64_INS_LDUMINL:
2627 case ARM64_INS_STUMIN:
2628 case ARM64_INS_STUMINL:
2629 case ARM64_INS_STUMINB:
2630 case ARM64_INS_STUMINLB:
2631 case ARM64_INS_STUMINH:
2632 case ARM64_INS_STUMINLH:
2655 #if CS_API_MAJOR > 3
2666 #if CS_API_MAJOR > 4
2667 case ARM64_INS_RMIF:
2677 #if CS_API_MAJOR > 4
2678 case ARM64_INS_SETF8:
2679 case ARM64_INS_SETF16:
2717 #if CS_API_MAJOR > 4
2718 case ARM64_INS_STLLR:
2719 case ARM64_INS_STLLRB:
2720 case ARM64_INS_STLLRH:
2721 case ARM64_INS_STLUR:
2722 case ARM64_INS_STLURB:
2723 case ARM64_INS_STLURH:
2726 #if CS_API_MAJOR > 4
2728 case ARM64_INS_SWPA:
2729 case ARM64_INS_SWPAL:
2730 case ARM64_INS_SWPL:
2731 case ARM64_INS_SWPB:
2732 case ARM64_INS_SWPAB:
2733 case ARM64_INS_SWPALB:
2734 case ARM64_INS_SWPLB:
2735 case ARM64_INS_SWPH:
2736 case ARM64_INS_SWPAH:
2737 case ARM64_INS_SWPALH:
2738 case ARM64_INS_SWPLH:
RZ_API void rz_analysis_il_config_add_label(RZ_NONNULL RzAnalysisILConfig *cfg, RZ_NONNULL RZ_OWN RzILEffectLabel *label)
RZ_API RZ_OWN RzAnalysisILConfig * rz_analysis_il_config_new(ut32 pc_size, bool big_endian, ut32 mem_key_size)
static void update_flags(RzAnalysisOp *op, int flags)
static RzILOpEffect * msr(cs_insn *insn)
static RzILOpEffect * movk(cs_insn *insn)
static RzILOpEffect * cbz(cs_insn *insn)
static RzILOpEffect * update_flags_zn00(RzILOpBitVector *v)
static RzILOpEffect * writeback(cs_insn *insn, size_t addr_op, RZ_BORROW RzILOpBitVector *addr)
static RzILOpEffect * smull(cs_insn *insn)
static arm64_reg xreg(ut8 idx)
static RzILOpBitVector * adjust_unsigned(ut32 bits, RZ_OWN RzILOpBitVector *v)
static RzILOpEffect * bl(cs_insn *insn)
static RzILOpBitVector * apply_shift(arm64_shifter sft, ut32 dist, RZ_OWN RzILOpBitVector *v)
static RzILOpEffect * extr(cs_insn *insn)
static ut8 wreg_idx(arm64_reg reg)
static RzILOpEffect * tst(cs_insn *insn)
static RzILOpEffect * bfm(cs_insn *insn)
static RzILOpEffect * write_reg(arm64_reg reg, RZ_OWN RZ_NONNULL RzILOpBitVector *v)
static RzILOpEffect * sxt(cs_insn *insn)
static RzILOpBitVector * extend(ut32 dst_bits, arm64_extender ext, RZ_OWN RzILOpBitVector *v, ut32 v_bits)
static RzILOpEffect * load_effect(ut32 bits, bool is_signed, arm64_reg dst_reg, RZ_OWN RzILOpBitVector *addr)
static RzILOpEffect * str(cs_insn *insn)
static RzILOpEffect * mul(cs_insn *insn)
static arm64_reg xreg_of_reg(arm64_reg reg)
static bool is_wreg(arm64_reg reg)
static RzILOpEffect * madd(cs_insn *insn)
static RzILOpEffect * sdiv(cs_insn *insn)
static RzILOpBitVector * arg(cs_insn *insn, size_t n, ut32 *bits_inout)
static RzILOpEffect * ldr(cs_insn *insn)
static RzILOpEffect * cset(cs_insn *insn)
static RzILOpEffect * sbfx(cs_insn *insn)
static void label_hvc(RzILVM *vm, RzILOpEffect *op)
static RzILOpEffect * smulh(cs_insn *insn)
static const char * reg_var_name(arm64_reg reg)
static RzILOpEffect * smaddl(cs_insn *insn)
static RzILOpEffect * tbz(cs_insn *insn)
static RzILOpEffect * udiv(cs_insn *insn)
RZ_IPI RzAnalysisILConfig * rz_arm_cs_64_il_config(bool big_endian)
static RzILOpEffect * rev(cs_insn *insn)
static RzILOpEffect * bic(cs_insn *insn)
static void label_svc(RzILVM *vm, RzILOpEffect *op)
static ut32 reg_bits(arm64_reg reg)
static RzILOpEffect * hvc(cs_insn *insn)
static RzILOpEffect * adr(cs_insn *insn)
static RzILOpEffect * cls(cs_insn *insn)
static RzILOpBool * cond(arm64_cc c)
static RzILOpBitVector * read_reg(arm64_reg reg)
static RzILOpEffect * rbit(cs_insn *insn)
RZ_IPI RzILOpEffect * rz_arm_cs_64_il(csh *handle, cs_insn *insn)
static RzILOpEffect * shift(cs_insn *insn)
static RzILOpEffect * mrs(cs_insn *insn)
static RzILOpEffect * csinc(cs_insn *insn)
static RzILOpEffect * add_sub(cs_insn *insn)
static RzILOpEffect * clz(cs_insn *insn)
static RzILOpEffect * bitwise(cs_insn *insn)
static RzILOpBitVector * arg_mem(RzILOpBitVector *base_plus_disp, cs_arm64_op *op)
static bool is_xreg(arm64_reg reg)
static RzILOpEffect * svc(cs_insn *insn)
static RzILOpEffect * cmp(cs_insn *insn)
static RzILOpEffect * movn(cs_insn *insn)
static RzILOpEffect * branch(cs_insn *insn)
static RzILOpEffect * mvn(cs_insn *insn)
static RzILOpEffect * update_flags_zn(RzILOpBitVector *v)
static const char * regs_bound[]
static RzILOpEffect * mov(cs_insn *insn)
static mcore_handle handle
int bits(struct state *s, int need)
@ ARM64_OP_REG
= CS_OP_REG (Register operand).
@ ARM64_OP_MEM
= CS_OP_MEM (Memory operand).
@ ARM64_OP_SYS
SYS operand for IC/DC/AT/TLBI instructions.
@ ARM64_OP_REG_MRS
MRS register operand.
@ ARM64_OP_IMM
= CS_OP_IMM (Immediate operand).
@ ARM64_OP_REG_MSR
MSR register operand.
arm64_shifter
ARM64 shift type.
arm64_reg
ARM64 registers.
arm64_extender
ARM64 extender type.
arm64_cc
ARM64 condition code.
@ ARM64_CC_HS
Unsigned higher or same: >, ==, or unordered.
@ ARM64_CC_PL
Plus, positive or zero: >, ==, or unordered.
@ ARM64_CC_LT
Less than: Less than, or unordered.
@ ARM64_CC_VC
No overflow: Ordered.
@ ARM64_CC_LS
Unsigned lower or same: Less than or equal.
@ ARM64_CC_GE
Greater than or equal: Greater than or equal.
@ ARM64_CC_GT
Signed greater than: Greater than.
@ ARM64_CC_NE
Not equal: Not equal, or unordered.
@ ARM64_CC_LO
Unsigned lower or same: Less than.
@ ARM64_CC_VS
Overflow: Unordered.
@ ARM64_CC_HI
Unsigned higher: Greater than, or unordered.
@ ARM64_CC_LE
Signed less than or equal: <, ==, or unordered.
@ ARM64_CC_MI
Minus, negative: Less than.
RZ_API void rz_il_op_pure_free(RZ_NULLABLE RzILOpPure *op)
RZ_API void rz_il_op_effect_free(RZ_NULLABLE RzILOpEffect *op)
RZ_API RzILEffectLabel * rz_il_effect_label_new(RZ_NONNULL const char *name, RzILEffectLabelType type)
#define rz_warn_if_reached()
#define rz_return_val_if_fail(expr, val)
RZ_API ut32 rz_bv_len(RZ_NONNULL const RzBitVector *bv)
Syntax Macros for RzIL Lifting.
#define SHIFTL(f, v, dist)
#define APPEND(high, low)
#define LET(name, v, body)
#define STOREW(addr, val)
#define SEQ5(e0, e1, e2, e3, e4)
#define SEQ4(e0, e1, e2, e3)
#define SEQ6(e0, e1, e2, e3, e4, e5)
static ut64 rz_num_bitmask(ut8 width)
Get the 64-bit value that has exactly its width lowest bits set to 1. e.g. rz_num_bitmask(2) == 0b11 ...
static struct sockaddr static addrlen static backlog const void static flags void flags
Description of the global context of an RzAnalysisILVM.
void * hook
Function pointer if EFFECT_LABEL_SYSCALL / EFFECT_LABEL_HOOK.
An IL op performing a pure computation, 'a pure.
Low-level VM to execute raw IL code.
ut64(WINAPI *w32_GetEnabledXStateFeatures)()