214 this->architecture = architecture;
216 this->symbolicEngine = symbolicEngine;
217 this->taintEngine = taintEngine;
219 if (architecture ==
nullptr)
222 if (this->symbolicEngine ==
nullptr)
225 if (this->taintEngine ==
nullptr)
239 case ID_INS_B: this->b_s(inst);
break;
372 return this->exception;
380 auto node = this->astCtxt->bv(inst.
getNextAddress(), pc.getBitSize());
403 auto node = this->astCtxt->ite(
404 this->astCtxt->equal(z, this->astCtxt->bvtrue()),
414 auto node = this->astCtxt->ite(
415 this->astCtxt->equal(n, v),
426 auto node = this->astCtxt->ite(
428 this->astCtxt->equal(z, this->astCtxt->bvfalse()),
429 this->astCtxt->equal(n, v)
440 auto node = this->astCtxt->ite(
442 this->astCtxt->equal(c, this->astCtxt->bvtrue()),
443 this->astCtxt->equal(z, this->astCtxt->bvfalse())
453 auto node = this->astCtxt->ite(
454 this->astCtxt->equal(c, this->astCtxt->bvtrue()),
465 auto node = this->astCtxt->ite(
467 this->astCtxt->equal(z, this->astCtxt->bvtrue()),
468 this->astCtxt->lnot(this->astCtxt->equal(n, v))
478 auto node = this->astCtxt->ite(
479 this->astCtxt->equal(c, this->astCtxt->bvfalse()),
489 auto node = this->astCtxt->ite(
491 this->astCtxt->equal(c, this->astCtxt->bvfalse()),
492 this->astCtxt->equal(z, this->astCtxt->bvtrue())
503 auto node = this->astCtxt->ite(
504 this->astCtxt->lnot(this->astCtxt->equal(n, v)),
513 auto node = this->astCtxt->ite(
514 this->astCtxt->equal(n, this->astCtxt->bvtrue()),
523 auto node = this->astCtxt->ite(
524 this->astCtxt->equal(z, this->astCtxt->bvfalse()),
533 auto node = this->astCtxt->ite(
534 this->astCtxt->equal(n, this->astCtxt->bvfalse()),
543 auto node = this->astCtxt->ite(
544 this->astCtxt->equal(v, this->astCtxt->bvfalse()),
553 auto node = this->astCtxt->ite(
554 this->astCtxt->equal(v, this->astCtxt->bvtrue()),
642 auto node = this->astCtxt->bv(0, 1);
654 auto node = this->astCtxt->bv(1, 1);
668 auto nf = this->architecture->
getRegister(ID_REG_AARCH64_N);
675 auto node = this->astCtxt->extract(high, high, this->astCtxt->reference(parent));
681 expr->isTainted = this->taintEngine->
setTaintRegister(nf, parent->isTainted);
690 auto nf = this->architecture->
getRegister(ID_REG_AARCH64_N);
697 auto node1 = this->astCtxt->extract(high, high, this->astCtxt->reference(parent));
698 auto node2 = this->astCtxt->extract(3, 3, nzcv);
699 auto node3 = this->getCodeConditionAst(inst, node1, node2);
705 expr->isTainted = this->taintEngine->
setTaintRegister(nf, parent->isTainted);
713 auto zf = this->architecture->
getRegister(ID_REG_AARCH64_Z);
722 auto node = this->astCtxt->ite(
723 this->astCtxt->equal(
724 this->astCtxt->extract(high, low, this->astCtxt->reference(parent)),
725 this->astCtxt->bv(0, bvSize)
727 this->astCtxt->bv(1, 1),
728 this->astCtxt->bv(0, 1)
735 expr->isTainted = this->taintEngine->
setTaintRegister(zf, parent->isTainted);
744 auto zf = this->architecture->
getRegister(ID_REG_AARCH64_Z);
753 auto node1 = this->astCtxt->ite(
754 this->astCtxt->equal(
755 this->astCtxt->extract(high, low, this->astCtxt->reference(parent)),
756 this->astCtxt->bv(0, bvSize)
758 this->astCtxt->bv(1, 1),
759 this->astCtxt->bv(0, 1)
761 auto node2 = this->astCtxt->extract(2, 2, nzcv);
762 auto node3 = this->getCodeConditionAst(inst, node1, node2);
768 expr->isTainted = this->taintEngine->
setTaintRegister(zf, parent->isTainted);
778 auto cf = this->architecture->
getRegister(ID_REG_AARCH64_C);
787 auto node = this->astCtxt->extract(bvSize-1, bvSize-1,
788 this->astCtxt->bvxor(
789 this->astCtxt->bvand(op1, op2),
790 this->astCtxt->bvand(
791 this->astCtxt->bvxor(
792 this->astCtxt->bvxor(op1, op2),
793 this->astCtxt->extract(high, low, this->astCtxt->reference(parent))
795 this->astCtxt->bvxor(op1, op2))
803 expr->isTainted = this->taintEngine->
setTaintRegister(cf, parent->isTainted);
813 auto cf = this->architecture->
getRegister(ID_REG_AARCH64_C);
822 auto node = this->astCtxt->bvxor(
823 this->astCtxt->extract(bvSize-1, bvSize-1,
824 this->astCtxt->bvxor(
825 this->astCtxt->bvxor(op1, this->astCtxt->bvxor(op2, this->astCtxt->extract(high, low, this->astCtxt->reference(parent)))),
826 this->astCtxt->bvand(
827 this->astCtxt->bvxor(op1, this->astCtxt->extract(high, low, this->astCtxt->reference(parent))),
828 this->astCtxt->bvxor(op1, op2)
832 this->astCtxt->bvtrue()
839 expr->isTainted = this->taintEngine->
setTaintRegister(cf, parent->isTainted);
850 auto cf = this->architecture->
getRegister(ID_REG_AARCH64_C);
862 auto node1 = this->astCtxt->bvxor(
863 this->astCtxt->extract(bvSize-1, bvSize-1,
864 this->astCtxt->bvxor(
865 this->astCtxt->bvxor(op1, this->astCtxt->bvxor(op2, this->astCtxt->extract(high, low, this->astCtxt->reference(parent)))),
866 this->astCtxt->bvand(
867 this->astCtxt->bvxor(op1, this->astCtxt->extract(high, low, this->astCtxt->reference(parent))),
868 this->astCtxt->bvxor(op1, op2)
872 this->astCtxt->bvtrue()
874 auto node2 = this->astCtxt->extract(1, 1, nzcv);
875 auto node3 = this->getCodeConditionAst(inst, node1, node2);
881 expr->isTainted = this->taintEngine->
setTaintRegister(cf, parent->isTainted);
891 auto vf = this->architecture->
getRegister(ID_REG_AARCH64_V);
900 auto node = this->astCtxt->extract(bvSize-1, bvSize-1,
901 this->astCtxt->bvand(
902 this->astCtxt->bvxor(op1, this->astCtxt->bvnot(op2)),
903 this->astCtxt->bvxor(op1, this->astCtxt->extract(high, low, this->astCtxt->reference(parent)))
911 expr->isTainted = this->taintEngine->
setTaintRegister(vf, parent->isTainted);
921 auto vf = this->architecture->
getRegister(ID_REG_AARCH64_V);
930 auto node = this->astCtxt->extract(bvSize-1, bvSize-1,
931 this->astCtxt->bvand(
932 this->astCtxt->bvxor(op1, op2),
933 this->astCtxt->bvxor(op1, this->astCtxt->extract(high, low, this->astCtxt->reference(parent)))
941 expr->isTainted = this->taintEngine->
setTaintRegister(vf, parent->isTainted);
952 auto vf = this->architecture->
getRegister(ID_REG_AARCH64_V);
964 auto node1 = this->astCtxt->extract(bvSize-1, bvSize-1,
965 this->astCtxt->bvand(
966 this->astCtxt->bvxor(op1, op2),
967 this->astCtxt->bvxor(op1, this->astCtxt->extract(high, low, this->astCtxt->reference(parent)))
970 auto node2 = this->astCtxt->extract(0, 0, nzcv);
971 auto node3 = this->getCodeConditionAst(inst, node1, node2);
977 expr->isTainted = this->taintEngine->
setTaintRegister(vf, parent->isTainted);
993 auto node = this->astCtxt->bvadd(this->astCtxt->bvadd(op1, op2), this->astCtxt->zx(dst.
getBitSize()-1, op3));
999 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2) | this->taintEngine->isTainted(cf));
1003 this->cfAdd_s(inst, expr, dst, op1, op2);
1004 this->nf_s(inst, expr, dst);
1005 this->vfAdd_s(inst, expr, dst, op1, op2);
1006 this->zf_s(inst, expr, dst);
1010 this->controlFlow_s(inst);
1024 auto node = this->astCtxt->bvadd(op1, op2);
1030 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
1034 this->cfAdd_s(inst, expr, dst, op1, op2);
1035 this->nf_s(inst, expr, dst);
1036 this->vfAdd_s(inst, expr, dst, op1, op2);
1037 this->zf_s(inst, expr, dst);
1041 this->controlFlow_s(inst);
1061 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src) | this->taintEngine->isTainted(pc));
1064 this->controlFlow_s(inst);
1084 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src) | this->taintEngine->isTainted(pc));
1087 this->controlFlow_s(inst);
1101 auto node = this->astCtxt->bvand(op1, op2);
1105 node = this->astCtxt->extract(63, 0, node);
1112 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
1116 this->clearFlag_s(inst, this->architecture->
getRegister(ID_REG_AARCH64_C),
"Clears carry flag");
1117 this->nf_s(inst, expr, dst);
1118 this->clearFlag_s(inst, this->architecture->
getRegister(ID_REG_AARCH64_V),
"Clears overflow flag");
1119 this->zf_s(inst, expr, dst);
1123 this->controlFlow_s(inst);
1131 auto size = src2.getBitSize();
1135 auto op2 = this->astCtxt->bvand(
1137 this->astCtxt->bv(size - 1, size)
1141 auto node = this->astCtxt->bvashr(op1, op2);
1147 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
1150 this->controlFlow_s(inst);
1163 auto node = this->getCodeConditionAst(inst, op1, op2);
1169 expr->isTainted = this->taintEngine->
setTaint(dst, this->getCodeConditionTainteSate(inst));
1173 if (!(node->getChildren()[0]->evaluate().is_zero())) {
1188 auto lsb =
static_cast<uint32>(src2.getImmediate().getValue());
1189 auto width =
static_cast<uint32>(src3.getImmediate().getValue());
1196 auto opDst = this->symbolicEngine->
getOperandAst(inst, dst);
1199 std::vector<triton::ast::SharedAbstractNode> chunks;
1203 chunks.push_back(this->astCtxt->extract(dst.
getBitSize() - 1, lsb + width, opDst));
1205 chunks.push_back(this->astCtxt->extract(width - 1, 0, op));
1206 chunks.push_back(this->astCtxt->extract(lsb - 1, 0, opDst));
1208 auto node = this->astCtxt->concat(chunks);
1214 expr->isTainted = this->taintEngine->
taintUnion(dst, src1);
1217 this->controlFlow_s(inst);
1226 auto lsb =
static_cast<uint32>(src2.getImmediate().getValue());
1227 auto width =
static_cast<uint32>(src3.getImmediate().getValue());
1233 auto opSrc = this->symbolicEngine->
getOperandAst(inst, src1);
1234 auto opDst = this->symbolicEngine->
getOperandAst(inst, dst);
1236 auto node = this->astCtxt->concat(
1237 this->astCtxt->extract(dst.
getBitSize() - 1, width, opDst),
1238 this->astCtxt->extract(lsb + width - 1, lsb, opSrc)
1245 expr->isTainted = this->taintEngine->
taintUnion(dst, src1);
1248 this->controlFlow_s(inst);
1262 auto node = this->astCtxt->bvand(op1, this->astCtxt->bvnot(op2));
1268 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
1272 this->clearFlag_s(inst, this->architecture->
getRegister(ID_REG_AARCH64_C),
"Clears carry flag");
1273 this->nf_s(inst, expr, src1);
1274 this->clearFlag_s(inst, this->architecture->
getRegister(ID_REG_AARCH64_V),
"Clears overflow flag");
1275 this->zf_s(inst, expr, src1);
1279 this->controlFlow_s(inst);
1290 auto node1 = this->astCtxt->bv(inst.
getNextAddress(), dst1.getBitSize());
1291 auto node2 = this->symbolicEngine->
getOperandAst(inst, src);
1315 auto node1 = this->astCtxt->bv(inst.
getNextAddress(), dst1.getBitSize());
1316 auto node2 = this->symbolicEngine->
getOperandAst(inst, src);
1360 this->controlFlow_s(inst);
1370 auto op1 = this->astCtxt->zx(dst.
getBitSize() - src1.getBitSize(), this->symbolicEngine->getOperandAst(inst, src1));
1371 auto op2 = this->astCtxt->zx(dst.
getBitSize() - src2.getBitSize(), this->symbolicEngine->getOperandAst(inst, src2));
1374 auto node = this->astCtxt->ite(
1375 this->astCtxt->lnot(this->astCtxt->equal(op1, this->astCtxt->bv(0, op1->getBitvectorSize()))),
1384 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
1387 if (op1->evaluate() != 0)
1401 auto op1 = this->astCtxt->zx(dst.
getBitSize() - src1.getBitSize(), this->symbolicEngine->getOperandAst(inst, src1));
1402 auto op2 = this->astCtxt->zx(dst.
getBitSize() - src2.getBitSize(), this->symbolicEngine->getOperandAst(inst, src2));
1405 auto node = this->astCtxt->ite(
1406 this->astCtxt->equal(op1, this->astCtxt->bv(0, op1->getBitvectorSize())),
1415 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
1418 if (op1->evaluate() == 0)
1437 auto node = this->astCtxt->bvsub(op1, op2);
1443 expr->isTainted = this->taintEngine->
isTainted(src1) | this->taintEngine->
isTainted(src2);
1446 this->cfCcmp_s(inst, expr, src1, op1, op2, op3);
1447 this->nfCcmp_s(inst, expr, src1, op3);
1448 this->vfCcmp_s(inst, expr, src1, op1, op2, op3);
1449 this->zfCcmp_s(inst, expr, src1, op3);
1452 this->controlFlow_s(inst);
1462 auto op2 = this->astCtxt->bvadd(op1, this->astCtxt->bv(1, src.getBitSize()));
1465 auto node = this->getCodeConditionAst(inst, op2, op1);
1471 expr->isTainted = this->taintEngine->
setTaint(dst, this->getCodeConditionTainteSate(inst));
1474 this->controlFlow_s(inst);
1488 switch (src.getSize()) {
1490 node = this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(31, 31, op), this->astCtxt->bvtrue()), this->astCtxt->bv(0, bvSize),
1491 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(30, 30, op), this->astCtxt->bvtrue()), this->astCtxt->bv(1, bvSize),
1492 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(29, 29, op), this->astCtxt->bvtrue()), this->astCtxt->bv(2, bvSize),
1493 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(28, 28, op), this->astCtxt->bvtrue()), this->astCtxt->bv(3, bvSize),
1494 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(27, 27, op), this->astCtxt->bvtrue()), this->astCtxt->bv(4, bvSize),
1495 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(26, 26, op), this->astCtxt->bvtrue()), this->astCtxt->bv(5, bvSize),
1496 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(25, 25, op), this->astCtxt->bvtrue()), this->astCtxt->bv(6, bvSize),
1497 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(24, 24, op), this->astCtxt->bvtrue()), this->astCtxt->bv(7, bvSize),
1498 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(23, 23, op), this->astCtxt->bvtrue()), this->astCtxt->bv(8, bvSize),
1499 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(22, 22, op), this->astCtxt->bvtrue()), this->astCtxt->bv(9, bvSize),
1500 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(21, 21, op), this->astCtxt->bvtrue()), this->astCtxt->bv(10, bvSize),
1501 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(20, 20, op), this->astCtxt->bvtrue()), this->astCtxt->bv(11, bvSize),
1502 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(19, 19, op), this->astCtxt->bvtrue()), this->astCtxt->bv(12, bvSize),
1503 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(18, 18, op), this->astCtxt->bvtrue()), this->astCtxt->bv(13, bvSize),
1504 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(17, 17, op), this->astCtxt->bvtrue()), this->astCtxt->bv(14, bvSize),
1505 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(16, 16, op), this->astCtxt->bvtrue()), this->astCtxt->bv(15, bvSize),
1506 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(15, 15, op), this->astCtxt->bvtrue()), this->astCtxt->bv(16, bvSize),
1507 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(14, 14, op), this->astCtxt->bvtrue()), this->astCtxt->bv(17, bvSize),
1508 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(13, 13, op), this->astCtxt->bvtrue()), this->astCtxt->bv(18, bvSize),
1509 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(12, 12, op), this->astCtxt->bvtrue()), this->astCtxt->bv(19, bvSize),
1510 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(11, 11, op), this->astCtxt->bvtrue()), this->astCtxt->bv(20, bvSize),
1511 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(10, 10, op), this->astCtxt->bvtrue()), this->astCtxt->bv(21, bvSize),
1512 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(9, 9, op), this->astCtxt->bvtrue()), this->astCtxt->bv(22, bvSize),
1513 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(8, 8, op), this->astCtxt->bvtrue()), this->astCtxt->bv(23, bvSize),
1514 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(7, 7, op), this->astCtxt->bvtrue()), this->astCtxt->bv(24, bvSize),
1515 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(6, 6, op), this->astCtxt->bvtrue()), this->astCtxt->bv(25, bvSize),
1516 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(5, 5, op), this->astCtxt->bvtrue()), this->astCtxt->bv(26, bvSize),
1517 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(4, 4, op), this->astCtxt->bvtrue()), this->astCtxt->bv(27, bvSize),
1518 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(3, 3, op), this->astCtxt->bvtrue()), this->astCtxt->bv(28, bvSize),
1519 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(2, 2, op), this->astCtxt->bvtrue()), this->astCtxt->bv(29, bvSize),
1520 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(1, 1, op), this->astCtxt->bvtrue()), this->astCtxt->bv(30, bvSize),
1521 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(0, 0, op), this->astCtxt->bvtrue()), this->astCtxt->bv(31, bvSize),
1522 this->astCtxt->bv(32, bvSize)
1523 ))))))))))))))))))))))))))))))));
1527 node = this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(63, 63, op), this->astCtxt->bvtrue()), this->astCtxt->bv(0, bvSize),
1528 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(62, 62, op), this->astCtxt->bvtrue()), this->astCtxt->bv(1, bvSize),
1529 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(61, 61, op), this->astCtxt->bvtrue()), this->astCtxt->bv(2, bvSize),
1530 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(60, 60, op), this->astCtxt->bvtrue()), this->astCtxt->bv(3, bvSize),
1531 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(59, 59, op), this->astCtxt->bvtrue()), this->astCtxt->bv(4, bvSize),
1532 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(58, 58, op), this->astCtxt->bvtrue()), this->astCtxt->bv(5, bvSize),
1533 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(57, 57, op), this->astCtxt->bvtrue()), this->astCtxt->bv(6, bvSize),
1534 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(56, 56, op), this->astCtxt->bvtrue()), this->astCtxt->bv(7, bvSize),
1535 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(55, 55, op), this->astCtxt->bvtrue()), this->astCtxt->bv(8, bvSize),
1536 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(54, 54, op), this->astCtxt->bvtrue()), this->astCtxt->bv(9, bvSize),
1537 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(53, 53, op), this->astCtxt->bvtrue()), this->astCtxt->bv(10, bvSize),
1538 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(52, 52, op), this->astCtxt->bvtrue()), this->astCtxt->bv(11, bvSize),
1539 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(51, 51, op), this->astCtxt->bvtrue()), this->astCtxt->bv(12, bvSize),
1540 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(50, 50, op), this->astCtxt->bvtrue()), this->astCtxt->bv(13, bvSize),
1541 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(49, 49, op), this->astCtxt->bvtrue()), this->astCtxt->bv(14, bvSize),
1542 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(48, 48, op), this->astCtxt->bvtrue()), this->astCtxt->bv(15, bvSize),
1543 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(47, 47, op), this->astCtxt->bvtrue()), this->astCtxt->bv(16, bvSize),
1544 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(46, 46, op), this->astCtxt->bvtrue()), this->astCtxt->bv(17, bvSize),
1545 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(45, 45, op), this->astCtxt->bvtrue()), this->astCtxt->bv(18, bvSize),
1546 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(44, 44, op), this->astCtxt->bvtrue()), this->astCtxt->bv(19, bvSize),
1547 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(43, 43, op), this->astCtxt->bvtrue()), this->astCtxt->bv(20, bvSize),
1548 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(42, 42, op), this->astCtxt->bvtrue()), this->astCtxt->bv(21, bvSize),
1549 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(41, 41, op), this->astCtxt->bvtrue()), this->astCtxt->bv(22, bvSize),
1550 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(40, 40, op), this->astCtxt->bvtrue()), this->astCtxt->bv(23, bvSize),
1551 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(39, 39, op), this->astCtxt->bvtrue()), this->astCtxt->bv(24, bvSize),
1552 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(38, 38, op), this->astCtxt->bvtrue()), this->astCtxt->bv(25, bvSize),
1553 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(37, 37, op), this->astCtxt->bvtrue()), this->astCtxt->bv(26, bvSize),
1554 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(36, 36, op), this->astCtxt->bvtrue()), this->astCtxt->bv(27, bvSize),
1555 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(35, 35, op), this->astCtxt->bvtrue()), this->astCtxt->bv(28, bvSize),
1556 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(34, 34, op), this->astCtxt->bvtrue()), this->astCtxt->bv(29, bvSize),
1557 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(33, 33, op), this->astCtxt->bvtrue()), this->astCtxt->bv(30, bvSize),
1558 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(32, 32, op), this->astCtxt->bvtrue()), this->astCtxt->bv(31, bvSize),
1559 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(31, 31, op), this->astCtxt->bvtrue()), this->astCtxt->bv(32, bvSize),
1560 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(30, 30, op), this->astCtxt->bvtrue()), this->astCtxt->bv(33, bvSize),
1561 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(29, 29, op), this->astCtxt->bvtrue()), this->astCtxt->bv(34, bvSize),
1562 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(28, 28, op), this->astCtxt->bvtrue()), this->astCtxt->bv(35, bvSize),
1563 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(27, 27, op), this->astCtxt->bvtrue()), this->astCtxt->bv(36, bvSize),
1564 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(26, 26, op), this->astCtxt->bvtrue()), this->astCtxt->bv(37, bvSize),
1565 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(25, 25, op), this->astCtxt->bvtrue()), this->astCtxt->bv(38, bvSize),
1566 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(24, 24, op), this->astCtxt->bvtrue()), this->astCtxt->bv(39, bvSize),
1567 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(23, 23, op), this->astCtxt->bvtrue()), this->astCtxt->bv(40, bvSize),
1568 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(22, 22, op), this->astCtxt->bvtrue()), this->astCtxt->bv(41, bvSize),
1569 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(21, 21, op), this->astCtxt->bvtrue()), this->astCtxt->bv(42, bvSize),
1570 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(20, 20, op), this->astCtxt->bvtrue()), this->astCtxt->bv(43, bvSize),
1571 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(19, 19, op), this->astCtxt->bvtrue()), this->astCtxt->bv(44, bvSize),
1572 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(18, 18, op), this->astCtxt->bvtrue()), this->astCtxt->bv(45, bvSize),
1573 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(17, 17, op), this->astCtxt->bvtrue()), this->astCtxt->bv(46, bvSize),
1574 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(16, 16, op), this->astCtxt->bvtrue()), this->astCtxt->bv(47, bvSize),
1575 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(15, 15, op), this->astCtxt->bvtrue()), this->astCtxt->bv(48, bvSize),
1576 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(14, 14, op), this->astCtxt->bvtrue()), this->astCtxt->bv(49, bvSize),
1577 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(13, 13, op), this->astCtxt->bvtrue()), this->astCtxt->bv(50, bvSize),
1578 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(12, 12, op), this->astCtxt->bvtrue()), this->astCtxt->bv(51, bvSize),
1579 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(11, 11, op), this->astCtxt->bvtrue()), this->astCtxt->bv(52, bvSize),
1580 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(10, 10, op), this->astCtxt->bvtrue()), this->astCtxt->bv(53, bvSize),
1581 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(9, 9, op), this->astCtxt->bvtrue()), this->astCtxt->bv(54, bvSize),
1582 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(8, 8, op), this->astCtxt->bvtrue()), this->astCtxt->bv(55, bvSize),
1583 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(7, 7, op), this->astCtxt->bvtrue()), this->astCtxt->bv(56, bvSize),
1584 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(6, 6, op), this->astCtxt->bvtrue()), this->astCtxt->bv(57, bvSize),
1585 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(5, 5, op), this->astCtxt->bvtrue()), this->astCtxt->bv(58, bvSize),
1586 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(4, 4, op), this->astCtxt->bvtrue()), this->astCtxt->bv(59, bvSize),
1587 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(3, 3, op), this->astCtxt->bvtrue()), this->astCtxt->bv(60, bvSize),
1588 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(2, 2, op), this->astCtxt->bvtrue()), this->astCtxt->bv(61, bvSize),
1589 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(1, 1, op), this->astCtxt->bvtrue()), this->astCtxt->bv(62, bvSize),
1590 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(0, 0, op), this->astCtxt->bvtrue()), this->astCtxt->bv(63, bvSize),
1591 this->astCtxt->bv(64, bvSize)
1592 ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))));
1606 this->controlFlow_s(inst);
1619 auto node = this->astCtxt->bvadd(op1, op2);
1625 expr->isTainted = this->taintEngine->
isTainted(src1) | this->taintEngine->
isTainted(src2);
1628 this->cfAdd_s(inst, expr, src1, op1, op2);
1629 this->nf_s(inst, expr, src1);
1630 this->vfAdd_s(inst, expr, src1, op1, op2);
1631 this->zf_s(inst, expr, src1);
1634 this->controlFlow_s(inst);
1647 auto node = this->astCtxt->bvsub(op1, op2);
1653 expr->isTainted = this->taintEngine->
isTainted(src1) | this->taintEngine->
isTainted(src2);
1656 this->cfSub_s(inst, expr, src1, op1, op2);
1657 this->nf_s(inst, expr, src1);
1658 this->vfSub_s(inst, expr, src1, op1, op2);
1659 this->zf_s(inst, expr, src1);
1662 this->controlFlow_s(inst);
1671 auto op1 = this->astCtxt->bvneg(this->symbolicEngine->
getOperandAst(inst, src));
1675 auto node = this->getCodeConditionAst(inst, op1, op2);
1681 expr->isTainted = this->taintEngine->
taintUnion(dst, src);
1684 this->controlFlow_s(inst);
1698 auto node = this->getCodeConditionAst(inst, op1, op2);
1704 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
1707 this->controlFlow_s(inst);
1715 auto op1 = this->astCtxt->bv(1, dst.
getBitSize());
1716 auto op2 = this->astCtxt->bv(0, dst.
getBitSize());
1719 auto node = this->getCodeConditionAst(inst, op1, op2);
1725 expr->isTainted = this->taintEngine->
setTaint(dst, this->getCodeConditionTainteSate(inst));
1728 this->controlFlow_s(inst);
1739 auto op2 = this->astCtxt->bvadd(
1741 this->astCtxt->bv(1, src2.getBitSize())
1745 auto node = this->getCodeConditionAst(inst, op1, op2);
1751 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
1754 this->controlFlow_s(inst);
1765 auto op2 = this->astCtxt->bvneg(this->symbolicEngine->
getOperandAst(inst, src2));
1768 auto node = this->getCodeConditionAst(inst, op1, op2);
1774 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
1777 this->controlFlow_s(inst);
1791 auto node = this->astCtxt->bvxnor(op1, op2);
1797 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
1800 this->controlFlow_s(inst);
1814 auto node = this->astCtxt->bvxor(op1, op2);
1818 node = this->astCtxt->extract(63, 0, node);
1825 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
1828 this->controlFlow_s(inst);
1837 auto lsb =
static_cast<uint32>(src3.getImmediate().getValue());
1844 auto node = this->astCtxt->extract(lsb + dst.
getBitSize() - 1, lsb, this->astCtxt->concat(op1, op2));
1853 this->controlFlow_s(inst);
1858 std::list<triton::ast::SharedAbstractNode> vec0;
1859 std::list<triton::ast::SharedAbstractNode> vec1;
1860 std::list<triton::ast::SharedAbstractNode> vec2;
1889 vec0.push_front(this->symbolicEngine->
getMemoryAst(inst, vt0_m));
1890 vec1.push_front(this->symbolicEngine->
getMemoryAst(inst, vt1_m));
1891 vec2.push_front(this->symbolicEngine->
getMemoryAst(inst, vt2_m));
1908 vec0.push_front(this->symbolicEngine->
getMemoryAst(inst, vt0_m));
1909 vec1.push_front(this->symbolicEngine->
getMemoryAst(inst, vt1_m));
1910 vec2.push_front(this->symbolicEngine->
getMemoryAst(inst, vt2_m));
1927 vec0.push_front(this->symbolicEngine->
getMemoryAst(inst, vt0_m));
1928 vec1.push_front(this->symbolicEngine->
getMemoryAst(inst, vt1_m));
1929 vec2.push_front(this->symbolicEngine->
getMemoryAst(inst, vt2_m));
1946 vec0.push_front(this->symbolicEngine->
getMemoryAst(inst, vt0_m));
1947 vec1.push_front(this->symbolicEngine->
getMemoryAst(inst, vt1_m));
1948 vec2.push_front(this->symbolicEngine->
getMemoryAst(inst, vt2_m));
1965 vec0.push_front(this->symbolicEngine->
getMemoryAst(inst, vt0_m));
1966 vec1.push_front(this->symbolicEngine->
getMemoryAst(inst, vt1_m));
1967 vec2.push_front(this->symbolicEngine->
getMemoryAst(inst, vt2_m));
1984 vec0.push_front(this->symbolicEngine->
getMemoryAst(inst, vt0_m));
1985 vec1.push_front(this->symbolicEngine->
getMemoryAst(inst, vt1_m));
1986 vec2.push_front(this->symbolicEngine->
getMemoryAst(inst, vt2_m));
2003 vec0.push_front(this->symbolicEngine->
getMemoryAst(inst, vt0_m));
2004 vec1.push_front(this->symbolicEngine->
getMemoryAst(inst, vt1_m));
2005 vec2.push_front(this->symbolicEngine->
getMemoryAst(inst, vt2_m));
2020 auto node0 = this->astCtxt->concat(vec0);
2021 auto node1 = this->astCtxt->concat(vec1);
2022 auto node2 = this->astCtxt->concat(vec2);
2030 expr0->isTainted = vt0_t;
2031 expr1->isTainted = vt1_t;
2032 expr2->isTainted = vt2_t;
2039 auto base = mem.getBaseRegister();
2040 auto offset = inst.
operands[4].getRegister();
2043 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
2044 auto offsetNode = this->symbolicEngine->
getOperandAst(inst, offset);
2047 auto node3 = this->astCtxt->bvadd(baseNode, offsetNode);
2053 expr3->isTainted = this->taintEngine->
isTainted(base) | this->taintEngine->
isTainted(offset);
2062 auto base = mem.getBaseRegister();
2063 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
2066 auto node3 = this->astCtxt->bvadd(baseNode, this->astCtxt->bv(postIndex, base.getBitSize()));
2072 expr3->isTainted = this->taintEngine->
isTainted(base);
2076 this->controlFlow_s(inst);
2081 std::list<triton::ast::SharedAbstractNode> vec0;
2082 std::list<triton::ast::SharedAbstractNode> vec1;
2083 std::list<triton::ast::SharedAbstractNode> vec2;
2113 vec0.push_front(this->symbolicEngine->
getMemoryAst(inst, vt0_m));
2114 vec1.push_front(this->symbolicEngine->
getMemoryAst(inst, vt1_m));
2115 vec2.push_front(this->symbolicEngine->
getMemoryAst(inst, vt2_m));
2132 vec0.push_front(this->symbolicEngine->
getMemoryAst(inst, vt0_m));
2133 vec1.push_front(this->symbolicEngine->
getMemoryAst(inst, vt1_m));
2134 vec2.push_front(this->symbolicEngine->
getMemoryAst(inst, vt2_m));
2151 vec0.push_front(this->symbolicEngine->
getMemoryAst(inst, vt0_m));
2152 vec1.push_front(this->symbolicEngine->
getMemoryAst(inst, vt1_m));
2153 vec2.push_front(this->symbolicEngine->
getMemoryAst(inst, vt2_m));
2170 vec0.push_front(this->symbolicEngine->
getMemoryAst(inst, vt0_m));
2171 vec1.push_front(this->symbolicEngine->
getMemoryAst(inst, vt1_m));
2172 vec2.push_front(this->symbolicEngine->
getMemoryAst(inst, vt2_m));
2189 vec0.push_front(this->symbolicEngine->
getMemoryAst(inst, vt0_m));
2190 vec1.push_front(this->symbolicEngine->
getMemoryAst(inst, vt1_m));
2191 vec2.push_front(this->symbolicEngine->
getMemoryAst(inst, vt2_m));
2208 vec0.push_front(this->symbolicEngine->
getMemoryAst(inst, vt0_m));
2209 vec1.push_front(this->symbolicEngine->
getMemoryAst(inst, vt1_m));
2210 vec2.push_front(this->symbolicEngine->
getMemoryAst(inst, vt2_m));
2227 vec0.push_front(this->symbolicEngine->
getMemoryAst(inst, vt0_m));
2228 vec1.push_front(this->symbolicEngine->
getMemoryAst(inst, vt1_m));
2229 vec2.push_front(this->symbolicEngine->
getMemoryAst(inst, vt2_m));
2246 vec0.push_front(this->symbolicEngine->
getMemoryAst(inst, vt0_m));
2247 vec1.push_front(this->symbolicEngine->
getMemoryAst(inst, vt1_m));
2248 vec2.push_front(this->symbolicEngine->
getMemoryAst(inst, vt2_m));
2264 auto node0 = this->astCtxt->concat(vec0);
2265 auto node1 = this->astCtxt->concat(vec1);
2266 auto node2 = this->astCtxt->concat(vec2);
2274 expr0->isTainted = vt0_t;
2275 expr1->isTainted = vt1_t;
2276 expr2->isTainted = vt2_t;
2283 auto base = mem.getBaseRegister();
2284 auto offset = inst.
operands[4].getRegister();
2287 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
2288 auto offsetNode = this->symbolicEngine->
getOperandAst(inst, offset);
2291 auto node3 = this->astCtxt->bvadd(baseNode, offsetNode);
2297 expr3->isTainted = this->taintEngine->
isTainted(base) | this->taintEngine->
isTainted(offset);
2306 auto base = mem.getBaseRegister();
2307 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
2310 auto node3 = this->astCtxt->bvadd(baseNode, this->astCtxt->bv(postIndex, base.getBitSize()));
2316 expr3->isTainted = this->taintEngine->
isTainted(base);
2320 this->controlFlow_s(inst);
2325 std::list<triton::ast::SharedAbstractNode> vec0;
2326 std::list<triton::ast::SharedAbstractNode> vec1;
2327 std::list<triton::ast::SharedAbstractNode> vec2;
2328 std::list<triton::ast::SharedAbstractNode> vec3;
2360 vec0.push_front(this->symbolicEngine->
getMemoryAst(inst, vt0_m));
2361 vec1.push_front(this->symbolicEngine->
getMemoryAst(inst, vt1_m));
2362 vec2.push_front(this->symbolicEngine->
getMemoryAst(inst, vt2_m));
2363 vec3.push_front(this->symbolicEngine->
getMemoryAst(inst, vt3_m));
2382 vec0.push_front(this->symbolicEngine->
getMemoryAst(inst, vt0_m));
2383 vec1.push_front(this->symbolicEngine->
getMemoryAst(inst, vt1_m));
2384 vec2.push_front(this->symbolicEngine->
getMemoryAst(inst, vt2_m));
2385 vec3.push_front(this->symbolicEngine->
getMemoryAst(inst, vt3_m));
2404 vec0.push_front(this->symbolicEngine->
getMemoryAst(inst, vt0_m));
2405 vec1.push_front(this->symbolicEngine->
getMemoryAst(inst, vt1_m));
2406 vec2.push_front(this->symbolicEngine->
getMemoryAst(inst, vt2_m));
2407 vec3.push_front(this->symbolicEngine->
getMemoryAst(inst, vt3_m));
2426 vec0.push_front(this->symbolicEngine->
getMemoryAst(inst, vt0_m));
2427 vec1.push_front(this->symbolicEngine->
getMemoryAst(inst, vt1_m));
2428 vec2.push_front(this->symbolicEngine->
getMemoryAst(inst, vt2_m));
2429 vec3.push_front(this->symbolicEngine->
getMemoryAst(inst, vt3_m));
2448 vec0.push_front(this->symbolicEngine->
getMemoryAst(inst, vt0_m));
2449 vec1.push_front(this->symbolicEngine->
getMemoryAst(inst, vt1_m));
2450 vec2.push_front(this->symbolicEngine->
getMemoryAst(inst, vt2_m));
2451 vec3.push_front(this->symbolicEngine->
getMemoryAst(inst, vt3_m));
2470 vec0.push_front(this->symbolicEngine->
getMemoryAst(inst, vt0_m));
2471 vec1.push_front(this->symbolicEngine->
getMemoryAst(inst, vt1_m));
2472 vec2.push_front(this->symbolicEngine->
getMemoryAst(inst, vt2_m));
2473 vec3.push_front(this->symbolicEngine->
getMemoryAst(inst, vt3_m));
2492 vec0.push_front(this->symbolicEngine->
getMemoryAst(inst, vt0_m));
2493 vec1.push_front(this->symbolicEngine->
getMemoryAst(inst, vt1_m));
2494 vec2.push_front(this->symbolicEngine->
getMemoryAst(inst, vt2_m));
2495 vec3.push_front(this->symbolicEngine->
getMemoryAst(inst, vt3_m));
2511 auto node0 = this->astCtxt->concat(vec0);
2512 auto node1 = this->astCtxt->concat(vec1);
2513 auto node2 = this->astCtxt->concat(vec2);
2514 auto node3 = this->astCtxt->concat(vec3);
2523 expr0->isTainted = vt0_t;
2524 expr1->isTainted = vt1_t;
2525 expr2->isTainted = vt2_t;
2526 expr3->isTainted = vt3_t;
2533 auto base = mem.getBaseRegister();
2534 auto offset = inst.
operands[5].getRegister();
2537 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
2538 auto offsetNode = this->symbolicEngine->
getOperandAst(inst, offset);
2541 auto node4 = this->astCtxt->bvadd(baseNode, offsetNode);
2547 expr4->isTainted = this->taintEngine->
isTainted(base) | this->taintEngine->
isTainted(offset);
2556 auto base = mem.getBaseRegister();
2557 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
2560 auto node4 = this->astCtxt->bvadd(baseNode, this->astCtxt->bv(postIndex, base.getBitSize()));
2566 expr4->isTainted = this->taintEngine->
isTainted(base);
2570 this->controlFlow_s(inst);
2575 std::list<triton::ast::SharedAbstractNode> vec0;
2576 std::list<triton::ast::SharedAbstractNode> vec1;
2577 std::list<triton::ast::SharedAbstractNode> vec2;
2578 std::list<triton::ast::SharedAbstractNode> vec3;
2611 vec0.push_front(this->symbolicEngine->
getMemoryAst(inst, vt0_m));
2612 vec1.push_front(this->symbolicEngine->
getMemoryAst(inst, vt1_m));
2613 vec2.push_front(this->symbolicEngine->
getMemoryAst(inst, vt2_m));
2614 vec3.push_front(this->symbolicEngine->
getMemoryAst(inst, vt3_m));
2633 vec0.push_front(this->symbolicEngine->
getMemoryAst(inst, vt0_m));
2634 vec1.push_front(this->symbolicEngine->
getMemoryAst(inst, vt1_m));
2635 vec2.push_front(this->symbolicEngine->
getMemoryAst(inst, vt2_m));
2636 vec3.push_front(this->symbolicEngine->
getMemoryAst(inst, vt3_m));
2655 vec0.push_front(this->symbolicEngine->
getMemoryAst(inst, vt0_m));
2656 vec1.push_front(this->symbolicEngine->
getMemoryAst(inst, vt1_m));
2657 vec2.push_front(this->symbolicEngine->
getMemoryAst(inst, vt2_m));
2658 vec3.push_front(this->symbolicEngine->
getMemoryAst(inst, vt3_m));
2677 vec0.push_front(this->symbolicEngine->
getMemoryAst(inst, vt0_m));
2678 vec1.push_front(this->symbolicEngine->
getMemoryAst(inst, vt1_m));
2679 vec2.push_front(this->symbolicEngine->
getMemoryAst(inst, vt2_m));
2680 vec3.push_front(this->symbolicEngine->
getMemoryAst(inst, vt3_m));
2699 vec0.push_front(this->symbolicEngine->
getMemoryAst(inst, vt0_m));
2700 vec1.push_front(this->symbolicEngine->
getMemoryAst(inst, vt1_m));
2701 vec2.push_front(this->symbolicEngine->
getMemoryAst(inst, vt2_m));
2702 vec3.push_front(this->symbolicEngine->
getMemoryAst(inst, vt3_m));
2721 vec0.push_front(this->symbolicEngine->
getMemoryAst(inst, vt0_m));
2722 vec1.push_front(this->symbolicEngine->
getMemoryAst(inst, vt1_m));
2723 vec2.push_front(this->symbolicEngine->
getMemoryAst(inst, vt2_m));
2724 vec3.push_front(this->symbolicEngine->
getMemoryAst(inst, vt3_m));
2743 vec0.push_front(this->symbolicEngine->
getMemoryAst(inst, vt0_m));
2744 vec1.push_front(this->symbolicEngine->
getMemoryAst(inst, vt1_m));
2745 vec2.push_front(this->symbolicEngine->
getMemoryAst(inst, vt2_m));
2746 vec3.push_front(this->symbolicEngine->
getMemoryAst(inst, vt3_m));
2765 vec0.push_front(this->symbolicEngine->
getMemoryAst(inst, vt0_m));
2766 vec1.push_front(this->symbolicEngine->
getMemoryAst(inst, vt1_m));
2767 vec2.push_front(this->symbolicEngine->
getMemoryAst(inst, vt2_m));
2768 vec3.push_front(this->symbolicEngine->
getMemoryAst(inst, vt3_m));
2785 auto node0 = this->astCtxt->concat(vec0);
2786 auto node1 = this->astCtxt->concat(vec1);
2787 auto node2 = this->astCtxt->concat(vec2);
2788 auto node3 = this->astCtxt->concat(vec3);
2797 expr0->isTainted = vt0_t;
2798 expr1->isTainted = vt1_t;
2799 expr2->isTainted = vt2_t;
2800 expr3->isTainted = vt3_t;
2807 auto base = mem.getBaseRegister();
2808 auto offset = inst.
operands[5].getRegister();
2811 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
2812 auto offsetNode = this->symbolicEngine->
getOperandAst(inst, offset);
2815 auto node4 = this->astCtxt->bvadd(baseNode, offsetNode);
2821 expr4->isTainted = this->taintEngine->
isTainted(base) | this->taintEngine->
isTainted(offset);
2830 auto base = mem.getBaseRegister();
2831 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
2834 auto node4 = this->astCtxt->bvadd(baseNode, this->astCtxt->bv(postIndex, base.getBitSize()));
2840 expr4->isTainted = this->taintEngine->
isTainted(base);
2844 this->controlFlow_s(inst);
2862 this->controlFlow_s(inst);
2880 this->controlFlow_s(inst);
2898 this->controlFlow_s(inst);
2919 this->controlFlow_s(inst);
2940 this->controlFlow_s(inst);
2961 this->controlFlow_s(inst);
2977 auto node1 = this->astCtxt->extract((dst1.
getBitSize() - 1), 0, op);
2989 this->controlFlow_s(inst);
3005 auto node1 = this->astCtxt->extract((dst1.
getBitSize() - 1), 0, op);
3023 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
3024 auto immNode = this->symbolicEngine->
getOperandAst(inst, imm);
3027 auto node2 = this->astCtxt->bvadd(baseNode, this->astCtxt->sx(base.
getBitSize() - imm.
getBitSize(), immNode));
3030 auto expr2 = this->symbolicEngine->
createSymbolicExpression(inst, node2, base,
"LDP operation - Base register computation");
3033 expr2->isTainted = this->taintEngine->
isTainted(base);
3044 auto expr3 = this->symbolicEngine->
createSymbolicExpression(inst, node3, base,
"LDP operation - Base register computation");
3047 expr3->isTainted = this->taintEngine->
isTainted(base);
3051 this->controlFlow_s(inst);
3064 auto node1 = this->astCtxt->sx(32, this->astCtxt->extract(31, 0, op));
3065 auto node2 = this->astCtxt->sx(32, this->astCtxt->extract(63, 32, op));
3082 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
3083 auto immNode = this->symbolicEngine->
getOperandAst(inst, imm);
3086 auto node2 = this->astCtxt->bvadd(baseNode, this->astCtxt->sx(base.
getBitSize() - imm.
getBitSize(), immNode));
3089 auto expr2 = this->symbolicEngine->
createSymbolicExpression(inst, node2, base,
"LDPSW operation - Base register computation");
3092 expr2->isTainted = this->taintEngine->
isTainted(base);
3103 auto expr3 = this->symbolicEngine->
createSymbolicExpression(inst, node3, base,
"LDPSW operation - Base register computation");
3106 expr3->isTainted = this->taintEngine->
isTainted(base);
3110 this->controlFlow_s(inst);
3124 auto node1 = this->symbolicEngine->
getOperandAst(inst, src);
3139 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
3140 auto immNode = this->symbolicEngine->
getOperandAst(inst, imm);
3143 auto node2 = this->astCtxt->bvadd(baseNode, this->astCtxt->sx(base.
getBitSize() - imm.
getBitSize(), immNode));
3146 auto expr2 = this->symbolicEngine->
createSymbolicExpression(inst, node2, base,
"LDR operation - Base register computation");
3149 expr2->isTainted = this->taintEngine->
isTainted(base);
3159 auto expr3 = this->symbolicEngine->
createSymbolicExpression(inst, node3, base,
"LDR operation - Base register computation");
3162 expr3->isTainted = this->taintEngine->
isTainted(base);
3166 this->controlFlow_s(inst);
3175 auto node1 = this->symbolicEngine->
getOperandAst(inst, src);
3190 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
3191 auto immNode = this->symbolicEngine->
getOperandAst(inst, imm);
3194 auto node2 = this->astCtxt->bvadd(baseNode, this->astCtxt->sx(base.
getBitSize() - imm.
getBitSize(), immNode));
3197 auto expr2 = this->symbolicEngine->
createSymbolicExpression(inst, node2, base,
"LDRB operation - Base register computation");
3200 expr2->isTainted = this->taintEngine->
isTainted(base);
3211 auto expr3 = this->symbolicEngine->
createSymbolicExpression(inst, node3, base,
"LDRB operation - Base register computation");
3214 expr3->isTainted = this->taintEngine->
isTainted(base);
3218 this->controlFlow_s(inst);
3227 auto node1 = this->symbolicEngine->
getOperandAst(inst, src);
3242 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
3243 auto immNode = this->symbolicEngine->
getOperandAst(inst, imm);
3246 auto node2 = this->astCtxt->bvadd(baseNode, this->astCtxt->sx(base.
getBitSize() - imm.
getBitSize(), immNode));
3249 auto expr2 = this->symbolicEngine->
createSymbolicExpression(inst, node2, base,
"LDRH operation - Base register computation");
3252 expr2->isTainted = this->taintEngine->
isTainted(base);
3263 auto expr3 = this->symbolicEngine->
createSymbolicExpression(inst, node3, base,
"LDRH operation - Base register computation");
3266 expr3->isTainted = this->taintEngine->
isTainted(base);
3270 this->controlFlow_s(inst);
3282 auto node1 = this->astCtxt->sx(dst.
getBitSize() - 8, op);
3297 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
3298 auto immNode = this->symbolicEngine->
getOperandAst(inst, imm);
3301 auto node2 = this->astCtxt->bvadd(baseNode, this->astCtxt->sx(base.
getBitSize() - imm.
getBitSize(), immNode));
3304 auto expr2 = this->symbolicEngine->
createSymbolicExpression(inst, node2, base,
"LDRSB operation - Base register computation");
3307 expr2->isTainted = this->taintEngine->
isTainted(base);
3318 auto expr3 = this->symbolicEngine->
createSymbolicExpression(inst, node3, base,
"LDRSB operation - Base register computation");
3321 expr3->isTainted = this->taintEngine->
isTainted(base);
3325 this->controlFlow_s(inst);
3337 auto node1 = this->astCtxt->sx(dst.
getBitSize() - 16, op);
3352 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
3353 auto immNode = this->symbolicEngine->
getOperandAst(inst, imm);
3356 auto node2 = this->astCtxt->bvadd(baseNode, this->astCtxt->sx(base.
getBitSize() - imm.
getBitSize(), immNode));
3359 auto expr2 = this->symbolicEngine->
createSymbolicExpression(inst, node2, base,
"LDRSH operation - Base register computation");
3362 expr2->isTainted = this->taintEngine->
isTainted(base);
3373 auto expr3 = this->symbolicEngine->
createSymbolicExpression(inst, node3, base,
"LDRSH operation - Base register computation");
3376 expr3->isTainted = this->taintEngine->
isTainted(base);
3380 this->controlFlow_s(inst);
3392 auto node1 = this->astCtxt->sx(dst.
getBitSize() - 32, op);
3407 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
3408 auto immNode = this->symbolicEngine->
getOperandAst(inst, imm);
3411 auto node2 = this->astCtxt->bvadd(baseNode, this->astCtxt->sx(base.
getBitSize() - imm.
getBitSize(), immNode));
3414 auto expr2 = this->symbolicEngine->
createSymbolicExpression(inst, node2, base,
"LDRSW operation - Base register computation");
3417 expr2->isTainted = this->taintEngine->
isTainted(base);
3428 auto expr3 = this->symbolicEngine->
createSymbolicExpression(inst, node3, base,
"LDRSW operation - Base register computation");
3431 expr3->isTainted = this->taintEngine->
isTainted(base);
3435 this->controlFlow_s(inst);
3453 this->controlFlow_s(inst);
3465 auto node = this->astCtxt->zx(dst.
getBitSize() - 8, op);
3474 this->controlFlow_s(inst);
3486 auto node = this->astCtxt->zx(dst.
getBitSize() - 16, op);
3495 this->controlFlow_s(inst);
3507 auto node = this->astCtxt->sx(dst.
getBitSize() - 8, op);
3516 this->controlFlow_s(inst);
3528 auto node = this->astCtxt->sx(dst.
getBitSize() - 16, op);
3537 this->controlFlow_s(inst);
3549 auto node = this->astCtxt->sx(dst.
getBitSize() - 32, op);
3558 this->controlFlow_s(inst);
3576 this->controlFlow_s(inst);
3588 auto node = this->astCtxt->zx(dst.
getBitSize() - 8, op);
3597 this->controlFlow_s(inst);
3609 auto node = this->astCtxt->zx(dst.
getBitSize() - 16, op);
3618 this->controlFlow_s(inst);
3630 auto node = this->astCtxt->sx(dst.
getBitSize() - 8, op);
3639 this->controlFlow_s(inst);
3651 auto node = this->astCtxt->sx(dst.
getBitSize() - 16, op);
3660 this->controlFlow_s(inst);
3672 auto node = this->astCtxt->sx(dst.
getBitSize() - 32, op);
3681 this->controlFlow_s(inst);
3697 auto node1 = this->astCtxt->extract((dst1.
getBitSize() - 1), 0, op);
3712 this->controlFlow_s(inst);
3733 this->controlFlow_s(inst);
3745 auto node = this->astCtxt->zx(dst.
getBitSize() - 8, op);
3757 this->controlFlow_s(inst);
3769 auto node = this->astCtxt->zx(dst.
getBitSize() - 16, op);
3781 this->controlFlow_s(inst);
3789 auto size = src2.getBitSize();
3793 auto op2 = this->astCtxt->bvand(
3795 this->astCtxt->bv(size - 1, size)
3799 auto node = this->astCtxt->bvshl(op1, op2);
3805 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
3808 this->controlFlow_s(inst);
3816 auto size = src2.getBitSize();
3820 auto op2 = this->astCtxt->bvand(
3822 this->astCtxt->bv(size - 1, size)
3826 auto node = this->astCtxt->bvlshr(op1, op2);
3832 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
3835 this->controlFlow_s(inst);
3851 auto node = this->astCtxt->bvadd(op3, this->astCtxt->bvmul(op1, op2));
3857 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2) | this->taintEngine->isTainted(src3));
3860 this->controlFlow_s(inst);
3874 auto node = this->astCtxt->bvneg(this->astCtxt->bvmul(op1, op2));
3880 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
3883 this->controlFlow_s(inst);
3901 this->controlFlow_s(inst);
3906 std::list<triton::ast::SharedAbstractNode> vec;
3918 vec.push_front(this->astCtxt->extract(7, 0, imm));
3925 vec.push_front(this->astCtxt->extract(7, 0, imm));
3932 vec.push_front(this->astCtxt->extract(15, 0, imm));
3939 vec.push_front(this->astCtxt->extract(15, 0, imm));
3946 vec.push_front(this->astCtxt->extract(31, 0, imm));
3953 vec.push_front(this->astCtxt->extract(31, 0, imm));
3960 vec.push_front(this->astCtxt->extract(63, 0, imm));
3967 vec.push_front(this->astCtxt->extract(63, 0, imm));
3977 auto node = this->astCtxt->concat(vec);
3986 this->controlFlow_s(inst);
4000 std::vector<triton::ast::SharedAbstractNode> bits;
4006 bits.push_back(this->astCtxt->extract(dst.
getHigh(), 16, op1));
4007 bits.push_back(this->astCtxt->extract(15, 0, op2));
4018 bits.push_back(this->astCtxt->extract(dst.
getHigh(), 32, op1));
4020 bits.push_back(this->astCtxt->extract(31, 16, op2));
4021 bits.push_back(this->astCtxt->extract(15, 0, op1));
4026 bits.push_back(this->astCtxt->extract(dst.
getHigh(), 48, op1));
4027 bits.push_back(this->astCtxt->extract(47, 32, op2));
4028 bits.push_back(this->astCtxt->extract(31, 0, op1));
4033 bits.push_back(this->astCtxt->extract(63, 48, op2));
4034 bits.push_back(this->astCtxt->extract(47, 0, op1));
4041 auto node = this->astCtxt->concat(bits);
4047 expr->isTainted = this->taintEngine->
taintUnion(dst, src);
4050 this->controlFlow_s(inst);
4062 auto node = this->astCtxt->bvnot(op);
4071 this->controlFlow_s(inst);
4089 this->controlFlow_s(inst);
4107 this->controlFlow_s(inst);
4125 this->controlFlow_s(inst);
4141 auto node = this->astCtxt->bvsub(op3, this->astCtxt->bvmul(op1, op2));
4147 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2) | this->taintEngine->isTainted(src3));
4150 this->controlFlow_s(inst);
4164 auto node = this->astCtxt->bvmul(op1, op2);
4170 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
4173 this->controlFlow_s(inst);
4185 auto node = this->astCtxt->bvnot(op);
4194 this->controlFlow_s(inst);
4206 auto node = this->astCtxt->bvneg(op);
4215 this->controlFlow_s(inst);
4221 this->controlFlow_s(inst);
4235 auto node = this->astCtxt->bvor(op1, this->astCtxt->bvnot(op2));
4241 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
4244 this->controlFlow_s(inst);
4258 auto node = this->astCtxt->bvor(op1, op2);
4262 node = this->astCtxt->extract(63, 0, node);
4269 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
4272 this->controlFlow_s(inst);
4284 std::vector<triton::ast::SharedAbstractNode> bits;
4288 bits.push_back(this->astCtxt->extract(index, index, op));
4291 auto node = this->astCtxt->concat(bits);
4300 this->controlFlow_s(inst);
4306 auto src = ((inst.
operands.size() == 1) ? inst.
operands[0] :
triton::arch::OperandWrapper(this->architecture->getRegister(ID_REG_AARCH64_X30)));
4327 std::list<triton::ast::SharedAbstractNode> bits;
4331 bits.push_front(this->astCtxt->extract(63, 56, op));
4332 bits.push_front(this->astCtxt->extract(55, 48, op));
4333 bits.push_front(this->astCtxt->extract(47, 40, op));
4334 bits.push_front(this->astCtxt->extract(39, 32, op));
4336 bits.push_front(this->astCtxt->extract(31, 24, op));
4337 bits.push_front(this->astCtxt->extract(23, 16, op));
4338 bits.push_front(this->astCtxt->extract(15, 8, op));
4339 bits.push_front(this->astCtxt->extract(7, 0, op));
4346 auto node = this->astCtxt->concat(bits);
4355 this->controlFlow_s(inst);
4367 std::vector<triton::ast::SharedAbstractNode> bits;
4372 bits.push_back(this->astCtxt->extract(55, 48, op));
4373 bits.push_back(this->astCtxt->extract(63, 56, op));
4374 bits.push_back(this->astCtxt->extract(39, 32, op));
4375 bits.push_back(this->astCtxt->extract(47, 40, op));
4377 bits.push_back(this->astCtxt->extract(23, 16, op));
4378 bits.push_back(this->astCtxt->extract(31, 24, op));
4379 bits.push_back(this->astCtxt->extract(7, 0, op));
4380 bits.push_back(this->astCtxt->extract(15, 8, op));
4387 auto node = this->astCtxt->concat(bits);
4396 this->controlFlow_s(inst);
4408 std::vector<triton::ast::SharedAbstractNode> bits;
4411 bits.push_back(this->astCtxt->extract(39, 32, op));
4412 bits.push_back(this->astCtxt->extract(47, 40, op));
4413 bits.push_back(this->astCtxt->extract(55, 48, op));
4414 bits.push_back(this->astCtxt->extract(63, 56, op));
4415 bits.push_back(this->astCtxt->extract(7, 0, op));
4416 bits.push_back(this->astCtxt->extract(15, 8, op));
4417 bits.push_back(this->astCtxt->extract(23, 16, op));
4418 bits.push_back(this->astCtxt->extract(31, 24, op));
4420 auto node = this->astCtxt->concat(bits);
4429 this->controlFlow_s(inst);
4443 auto node = this->astCtxt->bvror(op1, op2);
4449 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
4452 this->controlFlow_s(inst);
4468 auto node = this->astCtxt->bvadd(this->astCtxt->bvadd(op1, this->astCtxt->bvnot(op2)), this->astCtxt->zx(dst.
getBitSize()-1, op3));
4474 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2) | this->taintEngine->isTainted(cf));
4478 this->cfSub_s(inst, expr, src1, op1, op2);
4479 this->nf_s(inst, expr, src1);
4480 this->vfSub_s(inst, expr, src1, op1, op2);
4481 this->zf_s(inst, expr, src1);
4485 this->controlFlow_s(inst);
4494 auto lsb =
static_cast<uint32>(src2.getImmediate().getValue());
4495 auto width =
static_cast<uint32>(src3.getImmediate().getValue());
4504 auto node = this->astCtxt->sx(dst.
getBitSize() - width, this->astCtxt->extract(lsb+width-1, lsb, op));
4513 this->controlFlow_s(inst);
4527 auto node = this->astCtxt->ite(
4528 this->astCtxt->equal(op2, this->astCtxt->bv(0, op2->getBitvectorSize())),
4530 this->astCtxt->bvsdiv(op1, op2)
4537 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
4540 this->controlFlow_s(inst);
4556 auto node = this->astCtxt->bvadd(
4558 this->astCtxt->bvmul(
4568 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2) | this->taintEngine->isTainted(src3));
4571 this->controlFlow_s(inst);
4587 auto node = this->astCtxt->bvsub(
4589 this->astCtxt->bvmul(
4599 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2) | this->taintEngine->isTainted(src3));
4602 this->controlFlow_s(inst);
4616 auto node = this->astCtxt->extract(
4619 this->astCtxt->bvmul(
4629 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
4632 this->controlFlow_s(inst);
4646 auto node = this->astCtxt->bvmul(
4655 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
4658 this->controlFlow_s(inst);
4676 this->controlFlow_s(inst);
4688 auto node = this->astCtxt->extract(7, 0, op);
4697 this->controlFlow_s(inst);
4709 auto node = this->astCtxt->extract(15, 0, op);
4718 this->controlFlow_s(inst);
4731 auto node1 = this->astCtxt->bv(exclusive ? 0 : 1, dst1.getBitSize());
4732 auto node2 = this->symbolicEngine->
getOperandAst(inst, src);
4738 expr1->isTainted = this->taintEngine->
setTaint(dst1,
false);
4750 this->controlFlow_s(inst);
4766 auto node1 = this->astCtxt->bv(exclusive ? 0 : 1, dst1.getBitSize());
4767 auto node2 = this->astCtxt->extract(7, 0, op);
4773 expr1->isTainted = this->taintEngine->
setTaint(dst1,
false);
4785 this->controlFlow_s(inst);
4801 auto node1 = this->astCtxt->bv(exclusive ? 0 : 1, dst1.getBitSize());
4802 auto node2 = this->astCtxt->extract(15, 0, op);
4808 expr1->isTainted = this->taintEngine->
setTaint(dst1,
false);
4820 this->controlFlow_s(inst);
4834 auto node = this->astCtxt->concat(op2, op1);
4843 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
4846 this->controlFlow_s(inst);
4860 auto node = this->astCtxt->concat(op2, op1);
4869 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
4878 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
4879 auto immNode = this->symbolicEngine->
getOperandAst(inst, imm);
4882 auto node2 = this->astCtxt->bvadd(baseNode, this->astCtxt->sx(base.
getBitSize() - imm.
getBitSize(), immNode));
4885 auto expr2 = this->symbolicEngine->
createSymbolicExpression(inst, node2, base,
"STP operation - Base register computation");
4888 expr2->isTainted = this->taintEngine->
isTainted(base);
4899 auto expr3 = this->symbolicEngine->
createSymbolicExpression(inst, node3, base,
"STP operation - Base register computation");
4902 expr3->isTainted = this->taintEngine->
isTainted(base);
4906 this->controlFlow_s(inst);
4915 auto node1 = this->symbolicEngine->
getOperandAst(inst, src);
4930 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
4931 auto immNode = this->symbolicEngine->
getOperandAst(inst, imm);
4934 auto node2 = this->astCtxt->bvadd(baseNode, this->astCtxt->sx(base.
getBitSize() - imm.
getBitSize(), immNode));
4937 auto expr2 = this->symbolicEngine->
createSymbolicExpression(inst, node2, base,
"STR operation - Base register computation");
4940 expr2->isTainted = this->taintEngine->
isTainted(base);
4951 auto expr3 = this->symbolicEngine->
createSymbolicExpression(inst, node3, base,
"STR operation - Base register computation");
4954 expr3->isTainted = this->taintEngine->
isTainted(base);
4958 this->controlFlow_s(inst);
4970 auto node1 = this->astCtxt->extract(7, 0, op);
4985 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
4986 auto immNode = this->symbolicEngine->
getOperandAst(inst, imm);
4989 auto node2 = this->astCtxt->bvadd(baseNode, this->astCtxt->sx(base.
getBitSize() - imm.
getBitSize(), immNode));
4992 auto expr2 = this->symbolicEngine->
createSymbolicExpression(inst, node2, base,
"STRB operation - Base register computation");
4995 expr2->isTainted = this->taintEngine->
isTainted(base);
5006 auto expr3 = this->symbolicEngine->
createSymbolicExpression(inst, node3, base,
"STRB operation - Base register computation");
5009 expr3->isTainted = this->taintEngine->
isTainted(base);
5013 this->controlFlow_s(inst);
5025 auto node1 = this->astCtxt->extract(15, 0, op);
5040 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
5041 auto immNode = this->symbolicEngine->
getOperandAst(inst, imm);
5044 auto node2 = this->astCtxt->bvadd(baseNode, this->astCtxt->sx(base.
getBitSize() - imm.
getBitSize(), immNode));
5047 auto expr2 = this->symbolicEngine->
createSymbolicExpression(inst, node2, base,
"STRH operation - Base register computation");
5050 expr2->isTainted = this->taintEngine->
isTainted(base);
5061 auto expr3 = this->symbolicEngine->
createSymbolicExpression(inst, node3, base,
"STRH operation - Base register computation");
5064 expr3->isTainted = this->taintEngine->
isTainted(base);
5068 this->controlFlow_s(inst);
5086 this->controlFlow_s(inst);
5098 auto node = this->astCtxt->extract(7, 0, op);
5107 this->controlFlow_s(inst);
5119 auto node = this->astCtxt->extract(15, 0, op);
5128 this->controlFlow_s(inst);
5146 this->controlFlow_s(inst);
5158 auto node = this->astCtxt->extract(7, 0, op);
5167 this->controlFlow_s(inst);
5179 auto node = this->astCtxt->extract(15, 0, op);
5188 this->controlFlow_s(inst);
5209 auto node1 = this->astCtxt->bv(exclusive ? 0 : 1, dst1.getBitSize());
5210 auto node2 = this->astCtxt->concat(op2, op1);
5216 expr1->isTainted = this->taintEngine->
setTaint(dst1,
false);
5221 expr2->isTainted = this->taintEngine->
setTaint(dst2, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
5228 this->controlFlow_s(inst);
5241 auto node1 = this->astCtxt->bv(exclusive ? 0 : 1, dst1.getBitSize());
5242 auto node2 = this->symbolicEngine->
getOperandAst(inst, src);
5248 expr1->isTainted = this->taintEngine->
setTaint(dst1,
false);
5260 this->controlFlow_s(inst);
5276 auto node1 = this->astCtxt->bv(exclusive ? 0 : 1, dst1.getBitSize());
5277 auto node2 = this->astCtxt->extract(7, 0, op);
5283 expr1->isTainted = this->taintEngine->
setTaint(dst1,
false);
5295 this->controlFlow_s(inst);
5311 auto node1 = this->astCtxt->bv(exclusive ? 0 : 1, dst1.getBitSize());
5312 auto node2 = this->astCtxt->extract(15, 0, op);
5318 expr1->isTainted = this->taintEngine->
setTaint(dst1,
false);
5330 this->controlFlow_s(inst);
5344 auto node = this->astCtxt->bvsub(op1, op2);
5350 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
5354 this->cfSub_s(inst, expr, dst, op1, op2);
5355 this->nf_s(inst, expr, dst);
5356 this->vfSub_s(inst, expr, dst, op1, op2);
5357 this->zf_s(inst, expr, dst);
5361 this->controlFlow_s(inst);
5372 this->controlFlow_s(inst);
5384 auto node = this->astCtxt->sx(dst.
getBitSize() - 8, this->astCtxt->extract(7, 0, op));
5393 this->controlFlow_s(inst);
5405 auto node = this->astCtxt->sx(dst.
getBitSize() - 16, this->astCtxt->extract(15, 0, op));
5414 this->controlFlow_s(inst);
5426 auto node = this->astCtxt->sx(dst.
getBitSize() - 32, this->astCtxt->extract(31, 0, op));
5435 this->controlFlow_s(inst);
5451 auto node = this->astCtxt->ite(
5452 this->astCtxt->equal(
5453 this->astCtxt->extract(0, 0, this->astCtxt->bvlshr(op1, op2)),
5454 this->astCtxt->bvtrue()
5456 this->astCtxt->zx(dst.
getBitSize() - op3->getBitvectorSize(), op3),
5464 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
5467 if (this->astCtxt->extract(0, 0, this->astCtxt->bvlshr(op1, op2))->evaluate() != 0)
5482 auto op1 = this->astCtxt->zx(dst.
getBitSize() - src1.
getBitSize(), this->symbolicEngine->getOperandAst(inst, src1));
5483 auto op2 = this->astCtxt->zx(dst.
getBitSize() - src2.
getBitSize(), this->symbolicEngine->getOperandAst(inst, src2));
5484 auto op3 = this->astCtxt->zx(dst.
getBitSize() - src3.getBitSize(), this->symbolicEngine->getOperandAst(inst, src3));
5487 auto node = this->astCtxt->ite(
5488 this->astCtxt->equal(
5489 this->astCtxt->extract(0, 0, this->astCtxt->bvlshr(op1, op2)),
5490 this->astCtxt->bvfalse()
5492 this->astCtxt->zx(dst.
getBitSize() - op3->getBitvectorSize(), op3),
5500 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
5503 if (this->astCtxt->extract(0, 0, this->astCtxt->bvlshr(op1, op2))->evaluate() == 0)
5520 auto node = this->astCtxt->bvand(op1, op2);
5526 expr->isTainted = this->taintEngine->
isTainted(src1) | this->taintEngine->
isTainted(src2);
5530 this->clearFlag_s(inst, this->architecture->
getRegister(ID_REG_AARCH64_C),
"Clears carry flag");
5531 this->nf_s(inst, expr, src1);
5532 this->clearFlag_s(inst, this->architecture->
getRegister(ID_REG_AARCH64_V),
"Clears overflow flag");
5533 this->zf_s(inst, expr, src1);
5537 this->controlFlow_s(inst);
5547 auto width =
static_cast<uint32>(src3.getImmediate().getValue());
5556 std::vector<triton::ast::SharedAbstractNode> bits;
5560 bits.push_back(this->astCtxt->bv(0, dst.
getBitSize() - (lsb + width)));
5563 bits.push_back(this->astCtxt->extract(width - 1, 0, op));
5566 bits.push_back(this->astCtxt->bv(0, lsb));
5569 auto node = this->astCtxt->concat(bits);
5578 this->controlFlow_s(inst);
5588 auto width =
static_cast<uint32>(src3.getImmediate().getValue());
5597 auto node = this->astCtxt->zx(dst.
getBitSize() - width, this->astCtxt->extract(lsb+width-1, lsb, op));
5606 this->controlFlow_s(inst);
5620 auto node = this->astCtxt->ite(
5621 this->astCtxt->equal(op2, this->astCtxt->bv(0, op2->getBitvectorSize())),
5623 this->astCtxt->bvudiv(op1, op2)
5630 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
5633 this->controlFlow_s(inst);
5649 auto node = this->astCtxt->bvadd(
5651 this->astCtxt->bvmul(
5661 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2) | this->taintEngine->isTainted(src3));
5664 this->controlFlow_s(inst);
5678 auto node = this->astCtxt->bvneg(
5679 this->astCtxt->bvmul(
5689 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
5692 this->controlFlow_s(inst);
5708 auto node = this->astCtxt->bvsub(
5710 this->astCtxt->bvmul(
5720 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2) | this->taintEngine->isTainted(src3));
5723 this->controlFlow_s(inst);
5737 auto node = this->astCtxt->extract(
5740 this->astCtxt->bvmul(
5750 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
5753 this->controlFlow_s(inst);
5767 auto node = this->astCtxt->bvmul(
5776 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
5779 this->controlFlow_s(inst);
5791 auto node = this->astCtxt->zx(dst.
getBitSize() - 8, this->astCtxt->extract(7, 0, op));
5800 this->controlFlow_s(inst);
5812 auto node = this->astCtxt->zx(dst.
getBitSize() - 16, this->astCtxt->extract(15, 0, op));
5821 this->controlFlow_s(inst);
The abstract architecture class.
TRITON_EXPORT const triton::arch::Register & getRegister(triton::arch::register_e id) const
Returns register from id.
TRITON_EXPORT bool isMemoryExclusive(const triton::arch::MemoryAccess &mem) const
Returns true if the memory access is tagged as exclusive. Only valid for Arm32 and AArch64.
TRITON_EXPORT void setMemoryExclusiveTag(const triton::arch::MemoryAccess &mem, bool tag)
Sets exclusive memory access tag. Only valid for Arm32 and AArch64.
TRITON_EXPORT const triton::arch::Register & getParentRegister(triton::arch::register_e id) const
Returns parent register from id.
TRITON_EXPORT void setBits(triton::uint32 high, triton::uint32 low)
Sets the bits (high, low) position.
This class is used to represent an instruction.
TRITON_EXPORT bool isWriteBack(void) const
Returns true if the instruction performs a write back. Mainly used for AArch64 instructions like LDR.
TRITON_EXPORT void setConditionTaken(bool flag)
Sets flag to define if the condition is taken or not.
TRITON_EXPORT triton::uint32 getType(void) const
Returns the type of the instruction.
std::vector< triton::arch::OperandWrapper > operands
A list of operands.
TRITON_EXPORT bool isUpdateFlag(void) const
Returns true if the instruction updates flags. Mainly used for AArch64 instructions like ADDS.
TRITON_EXPORT triton::arch::arm::condition_e getCodeCondition(void) const
Returns the code codition of the instruction (mainly for AArch64).
TRITON_EXPORT triton::uint64 getNextAddress(void) const
Returns the next address of the instruction.
This class is used to represent a memory access.
TRITON_EXPORT triton::ast::SharedAbstractNode getLeaAst(void) const
Returns the AST of the memory access (LEA).
TRITON_EXPORT triton::arch::Register & getBaseRegister(void)
LEA - Returns the base register operand.
This class is used as operand wrapper.
TRITON_EXPORT triton::uint32 getLow(void) const
Returns the lower bit position of the abstract operand.
TRITON_EXPORT triton::arch::operand_e getType(void) const
Returns the abstract type of the operand.
TRITON_EXPORT triton::uint32 getSize(void) const
Returns the abstract size (in bytes) of the operand.
TRITON_EXPORT const triton::arch::MemoryAccess & getConstMemory(void) const
Returns the memory operand as const.
TRITON_EXPORT triton::arch::MemoryAccess & getMemory(void)
Returns the memory operand.
TRITON_EXPORT const triton::arch::Register & getConstRegister(void) const
Returns the register operand.
TRITON_EXPORT triton::uint32 getHigh(void) const
Returns the highest bit position of the abstract operand.
TRITON_EXPORT const triton::arch::Immediate & getConstImmediate(void) const
Returns the immediate operand.
TRITON_EXPORT triton::uint32 getBitSize(void) const
Returns the abstract size (in bits) of the operand.
TRITON_EXPORT triton::arch::Immediate & getImmediate(void)
Returns the immediate operand.
This class is used when an instruction has a register operand.
TRITON_EXPORT triton::uint32 getBitSize(void) const
Returns the size (in bits) of the register.
TRITON_EXPORT triton::uint32 getShiftImmediate(void) const
Returns the value of the shift immediate.
TRITON_EXPORT triton::arch::arm::vas_e getVASType(void) const
Returns the vector arrangement specifier.
TRITON_EXPORT triton::uint32 getVASSize(void) const
Returns the vector arrangement specifier size (64 or 128 bits).
TRITON_EXPORT triton::arch::exception_e buildSemantics(triton::arch::Instruction &inst)
Builds the semantics of the instruction. Returns triton::arch::NO_FAULT if succeed.
TRITON_EXPORT AArch64Semantics(triton::arch::Architecture *architecture, triton::engines::symbolic::SymbolicEngine *symbolicEngine, triton::engines::taint::TaintEngine *taintEngine, const triton::ast::SharedAstContext &astCtxt)
Constructor.
TRITON_EXPORT void pushPathConstraint(const triton::arch::Instruction &inst, const triton::engines::symbolic::SharedSymbolicExpression &expr)
Pushs constraints of a branch instruction to the path predicate.
The symbolic engine class.
TRITON_EXPORT const SharedSymbolicExpression & createSymbolicRegisterExpression(triton::arch::Instruction &inst, const triton::ast::SharedAbstractNode &node, const triton::arch::Register ®, const std::string &comment="")
Returns the new symbolic register expression expression and links this expression to the instruction.
TRITON_EXPORT const SharedSymbolicExpression & createSymbolicVolatileExpression(triton::arch::Instruction &inst, const triton::ast::SharedAbstractNode &node, const std::string &comment="")
Returns the new symbolic volatile expression expression and links this expression to the instruction.
TRITON_EXPORT triton::ast::SharedAbstractNode getMemoryAst(const triton::arch::MemoryAccess &mem)
Returns the AST corresponding to the memory.
TRITON_EXPORT const SharedSymbolicExpression & createSymbolicExpression(triton::arch::Instruction &inst, const triton::ast::SharedAbstractNode &node, const triton::arch::OperandWrapper &dst, const std::string &comment="")
Returns the new symbolic expression and links this expression to the instruction.
TRITON_EXPORT triton::ast::SharedAbstractNode getOperandAst(const triton::arch::OperandWrapper &op)
Returns the AST corresponding to the operand.
TRITON_EXPORT bool setTaint(const triton::arch::OperandWrapper &op, bool flag)
Sets the flag (taint or untaint) to an abstract operand (Register or Memory).
TRITON_EXPORT bool isTainted(const triton::arch::OperandWrapper &op) const
Abstract taint verification. Returns true if the operand is tainted.
TRITON_EXPORT bool isMemoryTainted(triton::uint64 addr, triton::uint32 size=1) const
Returns true if the addr is tainted.
TRITON_EXPORT bool taintUnion(const triton::arch::OperandWrapper &op1, const triton::arch::OperandWrapper &op2)
Abstract union tainting.
TRITON_EXPORT bool setTaintRegister(const triton::arch::Register ®, bool flag)
Sets the flag (taint or untaint) to a register.
TRITON_EXPORT bool taintAssignment(const triton::arch::OperandWrapper &op1, const triton::arch::OperandWrapper &op2)
Abstract assignment tainting.
The exception class used by all semantics.
vas_e
Vector arrangement specifier.
@ ID_VAS_4S
4 lanes, each containing a 32-bit element.
@ ID_VAS_2D
2 lanes, each containing a 64-bit element.
@ ID_VAS_1D
1 lane containing a 64-bit element.
@ ID_VAS_16B
16 lanes, each containing an 8-bit element.
@ ID_VAS_8B
8 lanes, each containing an 8-bit element.
@ ID_VAS_8H
8 lanes, each containing a 16-bit element.
@ ID_VAS_4H
4 lanes, each containing a 16-bit element.
@ ID_VAS_2S
2 lanes, each containing a 32-bit element.
@ ID_CONDITION_HS
Higher or same (unsigned >=). C set.
@ ID_CONDITION_PL
Positive or zero. N clear.
@ ID_CONDITION_VC
No overflow. V clear.
@ ID_CONDITION_LE
Signed <=. Z set, N and V differ.
@ ID_CONDITION_VS
Overflow. V set.
@ ID_CONDITION_MI
Negative. N set.
@ ID_CONDITION_GE
Signed >=. N and V the same.
@ ID_CONDITION_GT
Signed >. Z clear, N and V the same.
@ ID_CONDITION_HI
Higher (unsigned >). C set and Z clear.
@ ID_CONDITION_NE
Not equal. Z clear.
@ ID_CONDITION_AL
Always. Any flags. This suffix is normally omitted.
@ ID_CONDITION_LO
Lower (unsigned <). C clear.
@ ID_CONDITION_LT
Signed <. N and V differ.
@ ID_CONDITION_LS
Lower or same (unsigned <=). C clear or Z set.
@ ID_CONDITION_EQ
Equal. Z set.
std::shared_ptr< triton::ast::AbstractNode > SharedAbstractNode
Shared Abstract Node.
std::shared_ptr< triton::ast::AstContext > SharedAstContext
Shared AST context.
constexpr triton::uint32 dword
dword size in bit
constexpr triton::uint32 qword
qword size in bit
constexpr triton::uint32 dqword
dqword size in bit
constexpr triton::uint32 dword
dword size in byte
constexpr triton::uint32 word
word size in byte
constexpr triton::uint32 byte
byte size in byte
constexpr triton::uint32 qword
qword size in byte
std::shared_ptr< triton::engines::symbolic::SymbolicExpression > SharedSymbolicExpression
Shared Symbolic Expression.
const bool UNTAINTED
Defines an untainted item.
std::uint32_t uint32
unisgned 32-bits