117 this->architecture = architecture;
119 this->symbolicEngine = symbolicEngine;
120 this->taintEngine = taintEngine;
122 if (architecture ==
nullptr)
125 if (this->symbolicEngine ==
nullptr)
128 if (this->taintEngine ==
nullptr)
142 case ID_INS_B: this->b_s(inst);
break;
146 case ID_INS_BL: this->bl_s(inst,
false);
break;
147 case ID_INS_BLX: this->bl_s(inst,
true);
break;
218 return this->exception;
230 auto condNode = this->getCodeConditionAst(inst);
231 auto thenNode = opNode;
232 auto elseNode = this->symbolicEngine->
getOperandAst(inst, dst);
235 thenNode = this->clearISSB(opNode);
238 return this->astCtxt->ite(condNode, thenNode, elseNode);
247 this->exchangeInstructionSet(dst, node);
264 state = !this->architecture->
isThumb();
267 state = (node->evaluate() & 0x1) == 0x1;
273 this->architecture->
setThumb(state);
281 auto thumb = this->architecture->
isThumb();
282 return this->astCtxt->bvor(node, this->astCtxt->bv(thumb ? 1 : 0, node->getBitvectorSize()));
288 auto mask = this->astCtxt->bv(node->getBitvectorMask()-1, node->getBitvectorSize());
289 return this->astCtxt->bvand(node, mask);
297 return (value >> sr_count) | (value << sl_count);
326 auto thumb = this->architecture->
isThumb();
327 auto offset = thumb ? 4 : 8;
357 auto op2 = this->astCtxt->bv(delta, dst.
getBitSize());
360 auto node = this->astCtxt->ite(
362 this->astCtxt->bvadd(op1, op2),
370 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
taintUnion(dst, dst));
382 auto op2 = this->astCtxt->bv(delta, dst.
getBitSize());
385 auto node = this->astCtxt->ite(
387 this->astCtxt->bvsub(op1, op2),
395 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
taintUnion(dst, dst));
406 auto node = this->astCtxt->bv(inst.
getNextAddress(), pc.getBitSize());
429 if (cond->evaluate() ==
true && dst.
getRegister().
getId() == ID_REG_ARM32_PC) {
478 return this->astCtxt->equal(this->astCtxt->bvtrue(), this->astCtxt->bvtrue());
484 return this->astCtxt->equal(z, this->astCtxt->bvtrue());
491 return this->astCtxt->equal(n, v);
499 return this->astCtxt->land(
500 this->astCtxt->equal(z, this->astCtxt->bvfalse()),
501 this->astCtxt->equal(n, v)
509 return this->astCtxt->land(
510 this->astCtxt->equal(c, this->astCtxt->bvtrue()),
511 this->astCtxt->equal(z, this->astCtxt->bvfalse())
518 return this->astCtxt->equal(c, this->astCtxt->bvtrue());
526 return this->astCtxt->lor(
527 this->astCtxt->equal(z, this->astCtxt->bvtrue()),
528 this->astCtxt->lnot(this->astCtxt->equal(n, v))
535 return this->astCtxt->equal(c, this->astCtxt->bvfalse());
542 return this->astCtxt->lor(
543 this->astCtxt->equal(c, this->astCtxt->bvfalse()),
544 this->astCtxt->equal(z, this->astCtxt->bvtrue())
552 return this->astCtxt->lnot(this->astCtxt->equal(n, v));
558 return this->astCtxt->equal(n, this->astCtxt->bvtrue());
564 return this->astCtxt->equal(z, this->astCtxt->bvfalse());
570 return this->astCtxt->equal(n, this->astCtxt->bvfalse());
576 return this->astCtxt->equal(v, this->astCtxt->bvfalse());
582 return this->astCtxt->equal(v, this->astCtxt->bvtrue());
587 return this->astCtxt->equal(this->astCtxt->bvtrue(), this->astCtxt->bvtrue());
671 if (this->getCodeConditionTaintState(inst) ==
true) {
672 expr->isTainted = this->taintEngine->
setTaint(operand,
true);
674 else if (cond->evaluate() ==
true) {
675 expr->isTainted = this->taintEngine->
setTaint(operand, taint);
679 expr->isTainted = this->taintEngine->
isTainted(operand);
696 auto node1 = this->astCtxt->extract(high, high, this->astCtxt->reference(parent));
698 auto node3 = this->astCtxt->ite(cond, node1, node2);
704 this->spreadTaint(inst, cond, expr, nf, parent->isTainted);
722 auto node1 = 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)
731 auto node3 = this->astCtxt->ite(cond, node1, node2);
737 this->spreadTaint(inst, cond, expr, zf, parent->isTainted);
757 auto node1 = this->astCtxt->extract(bvSize-1, bvSize-1,
758 this->astCtxt->bvxor(
759 this->astCtxt->bvand(op1, op2),
760 this->astCtxt->bvand(
761 this->astCtxt->bvxor(
762 this->astCtxt->bvxor(op1, op2),
763 this->astCtxt->extract(high, low, this->astCtxt->reference(parent))
765 this->astCtxt->bvxor(op1, op2))
769 auto node3 = this->astCtxt->ite(cond, node1, node2);
775 this->spreadTaint(inst, cond, expr, cf, parent->isTainted);
795 auto node1 = this->astCtxt->bvxor(
796 this->astCtxt->extract(bvSize-1, bvSize-1,
797 this->astCtxt->bvxor(
798 this->astCtxt->bvxor(op1, this->astCtxt->bvxor(op2, this->astCtxt->extract(high, low, this->astCtxt->reference(parent)))),
799 this->astCtxt->bvand(
800 this->astCtxt->bvxor(op1, this->astCtxt->extract(high, low, this->astCtxt->reference(parent))),
801 this->astCtxt->bvxor(op1, op2)
805 this->astCtxt->bvtrue()
808 auto node3 = this->astCtxt->ite(cond, node1, node2);
814 this->spreadTaint(inst, cond, expr, cf, parent->isTainted);
832 auto node1 = this->astCtxt->extract(high, high, this->astCtxt->reference(parent2));
834 auto node3 = this->astCtxt->ite(cond, node1, node2);
840 this->spreadTaint(inst, cond, expr, nf, parent1->isTainted | parent2->isTainted);
860 auto node1 = this->astCtxt->ite(
862 this->astCtxt->equal(
863 this->astCtxt->extract(high, low, this->astCtxt->reference(parent1)),
864 this->astCtxt->bv(0, bvSize)
866 this->astCtxt->equal(
867 this->astCtxt->extract(high, low, this->astCtxt->reference(parent2)),
868 this->astCtxt->bv(0, bvSize)
871 this->astCtxt->bv(1, 1),
872 this->astCtxt->bv(0, 1)
875 auto node3 = this->astCtxt->ite(cond, node1, node2);
881 this->spreadTaint(inst, cond, expr, zf, parent1->isTainted | parent2->isTainted);
901 auto node1 = this->astCtxt->extract(bvSize-1, bvSize-1,
902 this->astCtxt->bvand(
903 this->astCtxt->bvxor(op1, this->astCtxt->bvnot(op2)),
904 this->astCtxt->bvxor(op1, this->astCtxt->extract(high, low, this->astCtxt->reference(parent)))
908 auto node3 = this->astCtxt->ite(cond, node1, node2);
914 this->spreadTaint(inst, cond, expr, vf, parent->isTainted);
934 auto node1 = this->astCtxt->extract(bvSize-1, bvSize-1,
935 this->astCtxt->bvand(
936 this->astCtxt->bvxor(op1, op2),
937 this->astCtxt->bvxor(op1, this->astCtxt->extract(high, low, this->astCtxt->reference(parent)))
941 auto node3 = this->astCtxt->ite(cond, node1, node2);
947 this->spreadTaint(inst, cond, expr, vf, parent->isTainted);
965 if (src2.getType() ==
OP_IMM && src3.getType() ==
OP_IMM) {
966 auto size = src2.getSize();
967 auto value =
static_cast<triton::uint32>(src2.getImmediate().getValue());
968 auto shift =
static_cast<triton::uint32>(src3.getImmediate().getValue());
978 auto op1 = this->getArm32SourceOperandAst(inst, src1);
979 auto op2 = this->getArm32SourceOperandAst(inst, src2);
980 auto op3 = this->getArm32SourceOperandAst(inst, cf);
983 auto node1 = this->astCtxt->bvadd(
984 this->astCtxt->bvadd(op1, op2),
987 auto node2 = this->buildConditionalSemantics(inst, dst, node1);
993 auto cond = this->getCodeConditionAst(inst);
996 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2) | this->taintEngine->isTainted(cf));
1000 this->cfAdd_s(inst, cond, expr, dst, op1, op2);
1001 this->nf_s(inst, cond, expr, dst);
1002 this->vfAdd_s(inst, cond, expr, dst, op1, op2);
1003 this->zf_s(inst, cond, expr, dst);
1007 if (cond->evaluate() ==
true) {
1011 this->updateExecutionState(dst, node1);
1015 this->controlFlow_s(inst, cond, dst);
1032 if (src2.getType() ==
OP_IMM && src3.getType() ==
OP_IMM) {
1033 auto size = src2.getSize();
1034 auto value =
static_cast<triton::uint32>(src2.getImmediate().getValue());
1035 auto shift =
static_cast<triton::uint32>(src3.getImmediate().getValue());
1045 auto op1 = this->getArm32SourceOperandAst(inst, src1);
1046 auto op2 = this->getArm32SourceOperandAst(inst, src2);
1049 auto node1 = this->astCtxt->bvadd(op1, op2);
1050 auto node2 = this->buildConditionalSemantics(inst, dst, node1);
1056 auto cond = this->getCodeConditionAst(inst);
1059 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
1063 this->cfAdd_s(inst, cond, expr, dst, op1, op2);
1064 this->nf_s(inst, cond, expr, dst);
1065 this->vfAdd_s(inst, cond, expr, dst, op1, op2);
1066 this->zf_s(inst, cond, expr, dst);
1070 if (cond->evaluate() ==
true) {
1074 this->updateExecutionState(dst, node1);
1078 this->controlFlow_s(inst, cond, dst);
1094 auto op1 = this->getArm32SourceOperandAst(inst, src);
1095 auto op2 = this->getArm32SourceOperandAst(inst, pc);
1098 auto node1 = this->astCtxt->bvadd(op1, op2);
1099 auto node2 = this->buildConditionalSemantics(inst, dst, node1);
1105 auto cond = this->getCodeConditionAst(inst);
1108 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src) | this->taintEngine->isTainted(pc));
1111 this->controlFlow_s(inst);
1128 if (src2.getType() ==
OP_IMM && src3.getType() ==
OP_IMM) {
1129 auto size = src2.getSize();
1130 auto value =
static_cast<triton::uint32>(src2.getImmediate().getValue());
1131 auto shift =
static_cast<triton::uint32>(src3.getImmediate().getValue());
1141 auto op1 = this->getArm32SourceOperandAst(inst, src1);
1142 auto op2 = this->getArm32SourceOperandAst(inst, src2);
1145 auto node1 = this->astCtxt->bvand(op1, op2);
1146 auto node2 = this->buildConditionalSemantics(inst, dst, node1);
1152 auto cond = this->getCodeConditionAst(inst);
1155 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
1159 this->cfBitwise_s(inst, cond, expr, src2);
1160 this->nf_s(inst, cond, expr, dst);
1161 this->zf_s(inst, cond, expr, dst);
1165 if (cond->evaluate() ==
true) {
1169 this->updateExecutionState(dst, node1);
1173 this->controlFlow_s(inst, cond, dst);
1182 auto op1base = this->getArm32SourceBaseOperandAst(inst, src1);
1183 auto op1 = this->getArm32SourceOperandAst(inst, src1);
1201 auto op2 = this->getArm32SourceOperandAst(inst, src2);
1203 node1 = this->astCtxt->bvashr(
1207 this->astCtxt->extract(7, 0, op2)
1212 auto node2 = this->buildConditionalSemantics(inst, dst, node1);
1218 auto cond = this->getCodeConditionAst(inst);
1221 auto taint = this->taintEngine->
isTainted(src1);
1226 taint |= this->taintEngine->
isTainted(src2);
1229 this->spreadTaint(inst, cond, expr, dst, taint);
1235 this->cfAsr_s(inst, cond, expr, op1base, src);
1236 this->nf_s(inst, cond, expr, dst);
1237 this->zf_s(inst, cond, expr, dst);
1241 if (cond->evaluate() ==
true) {
1245 this->updateExecutionState(dst, node2);
1249 this->controlFlow_s(inst, cond, dst);
1258 auto op1 = this->getArm32SourceOperandAst(inst, src);
1262 auto cond = this->getCodeConditionAst(inst);
1263 auto pcNode = this->astCtxt->ite(cond, op1, op2);
1269 this->spreadTaint(inst, cond, expr, dst, this->getCodeConditionTaintState(inst));
1272 if (cond->evaluate() ==
true) {
1285 auto lsb =
static_cast<uint32>(src1.getImmediate().getValue());
1286 auto width =
static_cast<uint32>(src2.getImmediate().getValue());
1292 auto opDst = this->symbolicEngine->
getOperandAst(inst, dst);
1295 std::vector<triton::ast::SharedAbstractNode> chunks;
1300 chunks.push_back(this->astCtxt->extract(dst.
getBitSize() - 1, lsb + width, opDst));
1304 chunks.push_back(this->astCtxt->bv(0, width));
1308 chunks.push_back(this->astCtxt->extract(lsb - 1, 0, opDst));
1311 auto node1 = chunks.size() == 1 ? chunks[0] : this->astCtxt->concat(chunks);
1312 auto node2 = this->buildConditionalSemantics(inst, dst, node1);
1318 auto cond = this->getCodeConditionAst(inst);
1321 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src1));
1324 this->controlFlow_s(inst);
1333 auto lsb =
static_cast<uint32>(src2.getImmediate().getValue());
1334 auto width =
static_cast<uint32>(src3.getImmediate().getValue());
1341 auto opDst = this->symbolicEngine->
getOperandAst(inst, dst);
1344 std::vector<triton::ast::SharedAbstractNode> chunks;
1349 chunks.push_back(this->astCtxt->extract(dst.
getBitSize() - 1, lsb + width, opDst));
1353 chunks.push_back(this->astCtxt->extract(width - 1, 0, op));
1357 chunks.push_back(this->astCtxt->extract(lsb - 1, 0, opDst));
1360 auto node1 = chunks.size() == 1 ? chunks[0] : this->astCtxt->concat(chunks);
1361 auto node2 = this->buildConditionalSemantics(inst, dst, node1);
1367 auto cond = this->getCodeConditionAst(inst);
1370 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src1));
1373 this->controlFlow_s(inst);
1390 if (src2.getType() ==
OP_IMM && src3.getType() ==
OP_IMM) {
1391 auto size = src2.getSize();
1392 auto value =
static_cast<triton::uint32>(src2.getImmediate().getValue());
1393 auto shift =
static_cast<triton::uint32>(src3.getImmediate().getValue());
1407 auto node1 = this->astCtxt->bvand(op1, this->astCtxt->bvnot(op2));
1408 auto node2 = this->buildConditionalSemantics(inst, dst, node1);
1414 auto cond = this->getCodeConditionAst(inst);
1417 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
1421 this->cfBitwise_s(inst, cond, expr, src2);
1422 this->nf_s(inst, cond, expr, dst);
1423 this->zf_s(inst, cond, expr, dst);
1427 if (cond->evaluate() ==
true) {
1431 this->updateExecutionState(dst, node1);
1435 this->controlFlow_s(inst, cond, dst);
1445 auto op1 = this->getArm32SourceOperandAst(inst, src);
1451 auto cond = this->getCodeConditionAst(inst);
1461 auto lrNode = this->astCtxt->ite(cond, this->adjustISSB(this->astCtxt->bvadd(op3, instSize)), op2);
1469 auto pcNode = this->astCtxt->ite(cond, this->clearISSB(op1), op4);
1472 auto expr1 = this->symbolicEngine->
createSymbolicExpression(inst, lrNode, dst1,
"BL(X) operation - Link Register");
1473 auto expr2 = this->symbolicEngine->
createSymbolicExpression(inst, pcNode, dst2,
"BL(X) operation - Program Counter");
1476 this->spreadTaint(inst, cond, expr1, dst1, this->getCodeConditionTaintState(inst));
1477 this->spreadTaint(inst, cond, expr2, dst2, this->getCodeConditionTaintState(inst));
1480 if (cond->evaluate() ==
true) {
1484 this->exchangeInstructionSet(src, op1);
1498 auto op1 = this->getArm32SourceOperandAst(inst, src);
1502 auto cond = this->getCodeConditionAst(inst);
1509 auto node = this->astCtxt->ite(cond, this->clearISSB(op1), op2);
1515 this->spreadTaint(inst, cond, expr, dst, this->getCodeConditionTaintState(inst));
1518 if (cond->evaluate() ==
true) {
1521 this->exchangeInstructionSet(src, op1);
1535 auto op1 = this->getArm32SourceOperandAst(inst, src1);
1536 auto op2 = this->getArm32SourceOperandAst(inst, src2);
1540 auto pcNode = this->astCtxt->ite(
1541 this->astCtxt->equal(
1543 this->astCtxt->bv(0, op1->getBitvectorSize())
1553 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
1556 if (op1->evaluate() == 0) {
1571 auto op1 = this->getArm32SourceOperandAst(inst, src1);
1572 auto op2 = this->getArm32SourceOperandAst(inst, src2);
1576 auto pcNode = this->astCtxt->ite(
1577 this->astCtxt->equal(
1579 this->astCtxt->bv(0, op1->getBitvectorSize())
1589 expr->isTainted = this->taintEngine->
setTaint(dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
1592 if (op1->evaluate() == 0) {
1607 auto op = this->getArm32SourceOperandAst(inst, src);
1610 auto node1 = this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(31, 31, op), this->astCtxt->bvtrue()), this->astCtxt->bv(0, bvSize),
1611 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(30, 30, op), this->astCtxt->bvtrue()), this->astCtxt->bv(1, bvSize),
1612 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(29, 29, op), this->astCtxt->bvtrue()), this->astCtxt->bv(2, bvSize),
1613 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(28, 28, op), this->astCtxt->bvtrue()), this->astCtxt->bv(3, bvSize),
1614 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(27, 27, op), this->astCtxt->bvtrue()), this->astCtxt->bv(4, bvSize),
1615 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(26, 26, op), this->astCtxt->bvtrue()), this->astCtxt->bv(5, bvSize),
1616 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(25, 25, op), this->astCtxt->bvtrue()), this->astCtxt->bv(6, bvSize),
1617 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(24, 24, op), this->astCtxt->bvtrue()), this->astCtxt->bv(7, bvSize),
1618 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(23, 23, op), this->astCtxt->bvtrue()), this->astCtxt->bv(8, bvSize),
1619 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(22, 22, op), this->astCtxt->bvtrue()), this->astCtxt->bv(9, bvSize),
1620 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(21, 21, op), this->astCtxt->bvtrue()), this->astCtxt->bv(10, bvSize),
1621 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(20, 20, op), this->astCtxt->bvtrue()), this->astCtxt->bv(11, bvSize),
1622 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(19, 19, op), this->astCtxt->bvtrue()), this->astCtxt->bv(12, bvSize),
1623 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(18, 18, op), this->astCtxt->bvtrue()), this->astCtxt->bv(13, bvSize),
1624 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(17, 17, op), this->astCtxt->bvtrue()), this->astCtxt->bv(14, bvSize),
1625 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(16, 16, op), this->astCtxt->bvtrue()), this->astCtxt->bv(15, bvSize),
1626 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(15, 15, op), this->astCtxt->bvtrue()), this->astCtxt->bv(16, bvSize),
1627 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(14, 14, op), this->astCtxt->bvtrue()), this->astCtxt->bv(17, bvSize),
1628 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(13, 13, op), this->astCtxt->bvtrue()), this->astCtxt->bv(18, bvSize),
1629 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(12, 12, op), this->astCtxt->bvtrue()), this->astCtxt->bv(19, bvSize),
1630 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(11, 11, op), this->astCtxt->bvtrue()), this->astCtxt->bv(20, bvSize),
1631 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(10, 10, op), this->astCtxt->bvtrue()), this->astCtxt->bv(21, bvSize),
1632 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(9, 9, op), this->astCtxt->bvtrue()), this->astCtxt->bv(22, bvSize),
1633 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(8, 8, op), this->astCtxt->bvtrue()), this->astCtxt->bv(23, bvSize),
1634 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(7, 7, op), this->astCtxt->bvtrue()), this->astCtxt->bv(24, bvSize),
1635 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(6, 6, op), this->astCtxt->bvtrue()), this->astCtxt->bv(25, bvSize),
1636 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(5, 5, op), this->astCtxt->bvtrue()), this->astCtxt->bv(26, bvSize),
1637 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(4, 4, op), this->astCtxt->bvtrue()), this->astCtxt->bv(27, bvSize),
1638 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(3, 3, op), this->astCtxt->bvtrue()), this->astCtxt->bv(28, bvSize),
1639 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(2, 2, op), this->astCtxt->bvtrue()), this->astCtxt->bv(29, bvSize),
1640 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(1, 1, op), this->astCtxt->bvtrue()), this->astCtxt->bv(30, bvSize),
1641 this->astCtxt->ite(this->astCtxt->equal(this->astCtxt->extract(0, 0, op), this->astCtxt->bvtrue()), this->astCtxt->bv(31, bvSize),
1642 this->astCtxt->bv(32, bvSize)
1643 ))))))))))))))))))))))))))))))));
1644 auto node2 = this->buildConditionalSemantics(inst, dst, node1);
1650 auto cond = this->getCodeConditionAst(inst);
1653 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src));
1656 if (cond->evaluate() ==
true) {
1661 this->controlFlow_s(inst, cond, dst);
1670 auto op1 = this->getArm32SourceOperandAst(inst, src1);
1671 auto op2 = this->getArm32SourceOperandAst(inst, src2);
1674 auto cond = this->getCodeConditionAst(inst);
1675 auto node1 = this->astCtxt->bvadd(op1, op2);
1681 if (cond->evaluate() ==
true) {
1682 expr->isTainted = this->taintEngine->
isTainted(src1) | this->taintEngine->
isTainted(src2);
1686 this->cfAdd_s(inst, cond, expr, src1, op1, op2);
1687 this->nf_s(inst, cond, expr, src1);
1688 this->vfAdd_s(inst, cond, expr, src1, op1, op2);
1689 this->zf_s(inst, cond, expr, src1);
1692 if (cond->evaluate() ==
true) {
1697 this->controlFlow_s(inst);
1706 auto op1 = this->getArm32SourceOperandAst(inst, src1);
1707 auto op2 = this->getArm32SourceOperandAst(inst, src2);
1710 auto cond = this->getCodeConditionAst(inst);
1711 auto node1 = this->astCtxt->bvsub(op1, op2);
1717 if (cond->evaluate() ==
true) {
1718 expr->isTainted = this->taintEngine->
isTainted(src1) | this->taintEngine->
isTainted(src2);
1722 this->cfSub_s(inst, cond, expr, src1, op1, op2);
1723 this->nf_s(inst, cond, expr, src1);
1724 this->vfSub_s(inst, cond, expr, src1, op1, op2);
1725 this->zf_s(inst, cond, expr, src1);
1728 if (cond->evaluate() ==
true) {
1733 this->controlFlow_s(inst);
1750 if (src2.getType() ==
OP_IMM && src3.getType() ==
OP_IMM) {
1751 auto size = src2.getSize();
1752 auto value =
static_cast<triton::uint32>(src2.getImmediate().getValue());
1753 auto shift =
static_cast<triton::uint32>(src3.getImmediate().getValue());
1763 auto op1 = this->getArm32SourceOperandAst(inst, src1);
1764 auto op2 = this->getArm32SourceOperandAst(inst, src2);
1767 auto node1 = this->astCtxt->bvxor(op1, op2);
1768 auto node2 = this->buildConditionalSemantics(inst, dst, node1);
1774 auto cond = this->getCodeConditionAst(inst);
1777 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
1781 this->cfBitwise_s(inst, cond, expr, src2);
1782 this->nf_s(inst, cond, expr, dst);
1783 this->zf_s(inst, cond, expr, dst);
1787 if (cond->evaluate() ==
true) {
1791 this->updateExecutionState(dst, node1);
1795 this->controlFlow_s(inst, cond, dst);
1806 this->controlFlow_s(inst);
1815 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
1818 auto cond = this->getCodeConditionAst(inst);
1820 bool updateControlFlow =
true;
1822 for (
unsigned int i = 1; i < inst.
operands.size(); i++) {
1826 auto addr =
static_cast<triton::uint64>(baseNode->evaluate()) + size * (i - 1);
1830 auto op2 = this->getArm32SourceOperandAst(inst, src);
1831 auto op3 = this->getArm32SourceOperandAst(inst, dst);
1841 node1 = this->clearISSB(op2);
1844 auto node2 = this->astCtxt->ite(cond, node1, op3);
1850 this->spreadTaint(inst, cond, expr1, dst, this->taintEngine->
isTainted(base) | this->taintEngine->isTainted(src));
1855 if (cond->evaluate() ==
true && dst.
getRegister().
getId() == ID_REG_ARM32_PC) {
1856 updateControlFlow =
false;
1859 this->updateExecutionState(dst, op2);
1865 auto node1 = this->astCtxt->ite(
1867 this->astCtxt->bvadd(
1869 this->astCtxt->bv((inst.
operands.size() - 1) * size, base.getBitSize())
1875 auto expr2 = this->symbolicEngine->
createSymbolicExpression(inst, node1, base,
"LDM operation - Base register computation");
1878 this->spreadTaint(inst, cond, expr2, base, this->taintEngine->
isTainted(base));
1882 if (cond->evaluate() ==
true) {
1887 if (updateControlFlow) {
1888 this->controlFlow_s(inst);
1898 auto op = this->getArm32SourceOperandAst(inst, src);
1901 auto node1 = this->buildConditionalSemantics(inst, dst, op);
1907 auto cond = this->getCodeConditionAst(inst);
1910 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src));
1919 auto& imm = inst.
operands[2].getImmediate();
1920 auto& base = src.getMemory().getBaseRegister();
1923 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
1924 auto immNode = this->symbolicEngine->
getOperandAst(inst, imm);
1927 auto thenNode = this->astCtxt->bvadd(baseNode, this->astCtxt->sx(base.getBitSize() - imm.getBitSize(), immNode));
1929 if (imm.isSubtracted() ==
true) {
1930 thenNode = this->astCtxt->bvsub(baseNode, this->astCtxt->sx(base.getBitSize() - imm.getBitSize(), immNode));
1933 auto node2 = this->astCtxt->ite(cond, thenNode, baseNode);
1936 auto expr2 = this->symbolicEngine->
createSymbolicExpression(inst, node2, base,
"LDR operation - Post-indexed base register computation");
1939 this->spreadTaint(inst, cond, expr2, base, this->taintEngine->
isTainted(base));
1941 auto& reg = inst.
operands[2].getRegister();
1942 auto& base = src.getMemory().getBaseRegister();
1945 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
1946 auto regNode = this->symbolicEngine->
getOperandAst(inst, reg);
1949 auto thenNode = this->astCtxt->bvadd(baseNode, regNode);
1951 if (reg.isSubtracted() ==
true) {
1952 thenNode = this->astCtxt->bvsub(baseNode, regNode);
1955 auto node2 = this->astCtxt->ite(cond, thenNode, baseNode);
1958 auto expr2 = this->symbolicEngine->
createSymbolicExpression(inst, node2, base,
"LDR operation - Post-indexed base register computation");
1961 this->spreadTaint(inst, cond, expr2, base, this->taintEngine->
isTainted(base));
1968 auto& base = src.getMemory().getBaseRegister();
1971 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
1974 auto node3 = this->astCtxt->ite(cond, src.getMemory().getLeaAst(), baseNode);
1977 auto expr3 = this->symbolicEngine->
createSymbolicExpression(inst, node3, base,
"LDR operation - Pre-indexed base register computation");
1980 this->spreadTaint(inst, cond, expr3, base, this->taintEngine->
isTainted(base));
1984 if (cond->evaluate() ==
true) {
1988 this->updateExecutionState(dst, op);
1992 this->controlFlow_s(inst, cond, dst);
2004 auto node1 = this->astCtxt->zx(dst.
getBitSize() - src.getBitSize(), op);
2005 auto node2 = this->buildConditionalSemantics(inst, dst, node1);
2011 auto cond = this->getCodeConditionAst(inst);
2014 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src));
2023 auto& imm = inst.
operands[2].getImmediate();
2024 auto& base = src.getMemory().getBaseRegister();
2027 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
2028 auto immNode = this->symbolicEngine->
getOperandAst(inst, imm);
2031 auto thenNode = this->astCtxt->bvadd(baseNode, this->astCtxt->sx(base.getBitSize() - imm.getBitSize(), immNode));
2033 if (imm.isSubtracted() ==
true) {
2034 thenNode = this->astCtxt->bvsub(baseNode, this->astCtxt->sx(base.getBitSize() - imm.getBitSize(), immNode));
2037 auto node2 = this->astCtxt->ite(cond, thenNode, baseNode);
2040 auto expr2 = this->symbolicEngine->
createSymbolicExpression(inst, node2, base,
"LDRB operation - Post-indexed base register computation");
2043 this->spreadTaint(inst, cond, expr2, base, this->taintEngine->
isTainted(base));
2045 auto& reg = inst.
operands[2].getRegister();
2046 auto& base = src.getMemory().getBaseRegister();
2049 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
2050 auto regNode = this->symbolicEngine->
getOperandAst(inst, reg);
2053 auto thenNode = this->astCtxt->bvadd(baseNode, regNode);
2055 if (reg.isSubtracted() ==
true) {
2056 thenNode = this->astCtxt->bvsub(baseNode, regNode);
2059 auto node2 = this->astCtxt->ite(cond, thenNode, baseNode);
2062 auto expr2 = this->symbolicEngine->
createSymbolicExpression(inst, node2, base,
"LDRB operation - Post-indexed base register computation");
2065 this->spreadTaint(inst, cond, expr2, base, this->taintEngine->
isTainted(base));
2072 auto& base = src.getMemory().getBaseRegister();
2075 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
2078 auto node3 = this->astCtxt->ite(cond, src.getMemory().getLeaAst(), baseNode);
2081 auto expr3 = this->symbolicEngine->
createSymbolicExpression(inst, node3, base,
"LDRB operation - Pre-indexed base register computation");
2084 this->spreadTaint(inst, cond, expr3, base, this->taintEngine->
isTainted(base));
2088 if (cond->evaluate() ==
true) {
2092 this->updateExecutionState(dst, node1);
2096 this->controlFlow_s(inst, cond, dst);
2108 auto node1 = this->astCtxt->zx(dst.
getBitSize() - src.getBitSize(), op);
2109 auto node2 = this->buildConditionalSemantics(inst, dst, node1);
2115 auto cond = this->getCodeConditionAst(inst);
2118 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src));
2127 auto& imm = inst.
operands[2].getImmediate();
2128 auto& base = src.getMemory().getBaseRegister();
2131 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
2132 auto immNode = this->symbolicEngine->
getOperandAst(inst, imm);
2135 auto thenNode = this->astCtxt->bvadd(baseNode, this->astCtxt->sx(base.getBitSize() - imm.getBitSize(), immNode));
2137 if (imm.isSubtracted() ==
true) {
2138 thenNode = this->astCtxt->bvsub(baseNode, this->astCtxt->sx(base.getBitSize() - imm.getBitSize(), immNode));
2141 auto node2 = this->astCtxt->ite(cond, thenNode, baseNode);
2144 auto expr2 = this->symbolicEngine->
createSymbolicExpression(inst, node2, base,
"LDRH operation - Post-indexed base register computation");
2147 this->spreadTaint(inst, cond, expr2, base, this->taintEngine->
isTainted(base));
2149 auto& reg = inst.
operands[2].getRegister();
2150 auto& base = src.getMemory().getBaseRegister();
2153 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
2154 auto regNode = this->symbolicEngine->
getOperandAst(inst, reg);
2157 auto thenNode = this->astCtxt->bvadd(baseNode, regNode);
2159 if (reg.isSubtracted() ==
true) {
2160 thenNode = this->astCtxt->bvsub(baseNode, regNode);
2163 auto node2 = this->astCtxt->ite(cond, thenNode, baseNode);
2166 auto expr2 = this->symbolicEngine->
createSymbolicExpression(inst, node2, base,
"LDRH operation - Post-indexed base register computation");
2169 this->spreadTaint(inst, cond, expr2, base, this->taintEngine->
isTainted(base));
2176 auto& base = src.getMemory().getBaseRegister();
2179 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
2182 auto node3 = this->astCtxt->ite(cond, src.getMemory().getLeaAst(), baseNode);
2185 auto expr3 = this->symbolicEngine->
createSymbolicExpression(inst, node3, base,
"LDRH operation - Pre-indexed base register computation");
2188 this->spreadTaint(inst, cond, expr3, base, this->taintEngine->
isTainted(base));
2192 if (cond->evaluate() ==
true) {
2196 this->updateExecutionState(dst, node1);
2200 this->controlFlow_s(inst, cond, dst);
2212 auto node1 = this->astCtxt->sx(dst.
getBitSize() - src.getBitSize(), op);
2213 auto node2 = this->buildConditionalSemantics(inst, dst, node1);
2219 auto cond = this->getCodeConditionAst(inst);
2222 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src));
2231 auto& imm = inst.
operands[2].getImmediate();
2232 auto& base = src.getMemory().getBaseRegister();
2235 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
2236 auto immNode = this->symbolicEngine->
getOperandAst(inst, imm);
2239 auto thenNode = this->astCtxt->bvadd(baseNode, this->astCtxt->sx(base.getBitSize() - imm.getBitSize(), immNode));
2241 if (imm.isSubtracted() ==
true) {
2242 thenNode = this->astCtxt->bvsub(baseNode, this->astCtxt->sx(base.getBitSize() - imm.getBitSize(), immNode));
2245 auto node2 = this->astCtxt->ite(cond, thenNode, baseNode);
2248 auto expr2 = this->symbolicEngine->
createSymbolicExpression(inst, node2, base,
"LDRSB operation - Post-indexed base register computation");
2251 this->spreadTaint(inst, cond, expr2, base, this->taintEngine->
isTainted(base));
2253 auto& reg = inst.
operands[2].getRegister();
2254 auto& base = src.getMemory().getBaseRegister();
2257 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
2258 auto regNode = this->symbolicEngine->
getOperandAst(inst, reg);
2261 auto thenNode = this->astCtxt->bvadd(baseNode, regNode);
2263 if (reg.isSubtracted() ==
true) {
2264 thenNode = this->astCtxt->bvsub(baseNode, regNode);
2267 auto node2 = this->astCtxt->ite(cond, thenNode, baseNode);
2270 auto expr2 = this->symbolicEngine->
createSymbolicExpression(inst, node2, base,
"LDRSB operation - Post-indexed base register computation");
2273 this->spreadTaint(inst, cond, expr2, base, this->taintEngine->
isTainted(base));
2280 auto& base = src.getMemory().getBaseRegister();
2283 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
2286 auto node3 = this->astCtxt->ite(cond, src.getMemory().getLeaAst(), baseNode);
2289 auto expr3 = this->symbolicEngine->
createSymbolicExpression(inst, node3, base,
"LDRB operation - Pre-indexed base register computation");
2292 this->spreadTaint(inst, cond, expr3, base, this->taintEngine->
isTainted(base));
2296 if (cond->evaluate() ==
true) {
2300 this->updateExecutionState(dst, node1);
2304 this->controlFlow_s(inst, cond, dst);
2315 auto addr1 = base.getMemory().getAddress() + size * 0;
2318 auto addr2 = base.getMemory().getAddress() + size * 1;
2322 auto op1 = this->getArm32SourceOperandAst(inst, src1);
2323 auto op2 = this->getArm32SourceOperandAst(inst, dst1);
2324 auto op3 = this->getArm32SourceOperandAst(inst, src2);
2325 auto op4 = this->getArm32SourceOperandAst(inst, dst2);
2328 auto cond = this->getCodeConditionAst(inst);
2329 auto node1 = this->astCtxt->ite(cond, op1, op2);
2330 auto node2 = this->astCtxt->ite(cond, op3, op4);
2337 this->spreadTaint(inst, cond, expr1, dst1, this->taintEngine->
isTainted(base) | this->taintEngine->isTainted(src1));
2338 this->spreadTaint(inst, cond, expr2, dst2, this->taintEngine->
isTainted(base) | this->taintEngine->isTainted(src2));
2343 auto& imm = inst.
operands[3].getImmediate();
2344 auto& base = inst.
operands[2].getMemory().getBaseRegister();
2347 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
2348 auto immNode = this->symbolicEngine->
getOperandAst(inst, imm);
2353 if(imm.isSubtracted()) {
2354 node2 = this->astCtxt->ite(
2356 this->astCtxt->bvsub(baseNode, this->astCtxt->sx(base.getBitSize() - imm.getBitSize(), immNode)),
2360 node2 = this->astCtxt->ite(
2362 this->astCtxt->bvadd(baseNode, this->astCtxt->sx(base.getBitSize() - imm.getBitSize(), immNode)),
2368 auto expr2 = this->symbolicEngine->
createSymbolicExpression(inst, node2, base,
"LDRD operation - Post-indexed base register computation");
2371 this->spreadTaint(inst, cond, expr2, base, this->taintEngine->
isTainted(base));
2377 auto& base = inst.
operands[2].getMemory().getBaseRegister();
2380 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
2383 auto node3 = this->astCtxt->ite(cond, inst.
operands[2].getMemory().getLeaAst(), baseNode);
2386 auto expr3 = this->symbolicEngine->
createSymbolicExpression(inst, node3, base,
"LDRD operation - Pre-indexed base register computation");
2389 this->spreadTaint(inst, cond, expr3, base, this->taintEngine->
isTainted(base));
2393 if (cond->evaluate() ==
true) {
2397 this->updateExecutionState(dst1, op1);
2398 this->updateExecutionState(dst2, op2);
2402 this->controlFlow_s(inst, cond, dst1, dst2);
2415 auto op = this->getArm32SourceOperandAst(inst, src);
2418 auto node1 = this->buildConditionalSemantics(inst, dst, op);
2424 auto cond = this->getCodeConditionAst(inst);
2427 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src));
2433 if (cond->evaluate() ==
true) {
2437 this->updateExecutionState(dst, op);
2441 this->controlFlow_s(inst, cond, dst);
2453 auto node1 = this->astCtxt->sx(dst.
getBitSize() - src.getBitSize(), op);
2454 auto node2 = this->buildConditionalSemantics(inst, dst, node1);
2460 auto cond = this->getCodeConditionAst(inst);
2463 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src));
2472 auto& imm = inst.
operands[2].getImmediate();
2473 auto& base = src.getMemory().getBaseRegister();
2476 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
2477 auto immNode = this->symbolicEngine->
getOperandAst(inst, imm);
2480 auto thenNode = this->astCtxt->bvadd(baseNode, this->astCtxt->sx(base.getBitSize() - imm.getBitSize(), immNode));
2482 if (imm.isSubtracted() ==
true) {
2483 thenNode = this->astCtxt->bvsub(baseNode, this->astCtxt->sx(base.getBitSize() - imm.getBitSize(), immNode));
2486 auto node2 = this->astCtxt->ite(cond, thenNode, baseNode);
2489 auto expr2 = this->symbolicEngine->
createSymbolicExpression(inst, node2, base,
"LDRSH operation - Post-indexed base register computation");
2492 this->spreadTaint(inst, cond, expr2, base, this->taintEngine->
isTainted(base));
2494 auto& reg = inst.
operands[2].getRegister();
2495 auto& base = src.getMemory().getBaseRegister();
2498 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
2499 auto regNode = this->symbolicEngine->
getOperandAst(inst, reg);
2502 auto thenNode = this->astCtxt->bvadd(baseNode, regNode);
2504 if (reg.isSubtracted() ==
true) {
2505 thenNode = this->astCtxt->bvsub(baseNode, regNode);
2508 auto node2 = this->astCtxt->ite(cond, thenNode, baseNode);
2511 auto expr2 = this->symbolicEngine->
createSymbolicExpression(inst, node2, base,
"LDRSH operation - Post-indexed base register computation");
2514 this->spreadTaint(inst, cond, expr2, base, this->taintEngine->
isTainted(base));
2521 auto& base = src.getMemory().getBaseRegister();
2524 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
2527 auto node3 = this->astCtxt->ite(cond, src.getMemory().getLeaAst(), baseNode);
2530 auto expr3 = this->symbolicEngine->
createSymbolicExpression(inst, node3, base,
"LDRB operation - Pre-indexed base register computation");
2533 this->spreadTaint(inst, cond, expr3, base, this->taintEngine->
isTainted(base));
2537 if (cond->evaluate() ==
true) {
2541 this->updateExecutionState(dst, node1);
2545 this->controlFlow_s(inst, cond, dst);
2554 auto op1base = this->getArm32SourceBaseOperandAst(inst, src1);
2555 auto op1 = this->getArm32SourceOperandAst(inst, src1);
2573 auto op2 = this->getArm32SourceOperandAst(inst, src2);
2575 node1 = this->astCtxt->bvshl(
2579 this->astCtxt->extract(7, 0, op2)
2584 auto node2 = this->buildConditionalSemantics(inst, dst, node1);
2590 auto cond = this->getCodeConditionAst(inst);
2593 auto taint = this->taintEngine->
isTainted(src1);
2598 taint |= this->taintEngine->
isTainted(src2);
2601 this->spreadTaint(inst, cond, expr, dst, taint);
2607 this->cfLsl_s(inst, cond, expr, op1base, src);
2608 this->nf_s(inst, cond, expr, dst);
2609 this->zf_s(inst, cond, expr, dst);
2613 if (cond->evaluate() ==
true) {
2617 this->updateExecutionState(dst, node2);
2621 this->controlFlow_s(inst, cond, dst);
2630 auto op1base = this->getArm32SourceBaseOperandAst(inst, src1);
2631 auto op1 = this->getArm32SourceOperandAst(inst, src1);
2649 auto op2 = this->getArm32SourceOperandAst(inst, src2);
2651 node1 = this->astCtxt->bvlshr(
2655 this->astCtxt->extract(7, 0, op2)
2660 auto node2 = this->buildConditionalSemantics(inst, dst, node1);
2666 auto cond = this->getCodeConditionAst(inst);
2669 auto taint = this->taintEngine->
isTainted(src1);
2674 taint |= this->taintEngine->
isTainted(src2);
2677 this->spreadTaint(inst, cond, expr, dst, taint);
2683 this->cfLsr_s(inst, cond, expr, op1base, src);
2684 this->nf_s(inst, cond, expr, dst);
2685 this->zf_s(inst, cond, expr, dst);
2689 if (cond->evaluate() ==
true) {
2693 this->updateExecutionState(dst, node2);
2697 this->controlFlow_s(inst, cond, dst);
2709 auto op1 = this->getArm32SourceOperandAst(inst, src1);
2710 auto op2 = this->getArm32SourceOperandAst(inst, src2);
2711 auto op3 = this->getArm32SourceOperandAst(inst, src3);
2714 auto mla = this->astCtxt->bvadd(
2715 this->astCtxt->bvmul(
2716 this->astCtxt->sx(2*bvSize, op1),
2717 this->astCtxt->sx(2*bvSize, op2)
2719 this->astCtxt->sx(2*bvSize, op3)
2721 auto lower = this->astCtxt->extract(bvSize-1, 0, mla);
2722 auto node1 = this->buildConditionalSemantics(inst, dst, lower);
2728 auto cond = node1->getChildren()[0];
2731 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
2735 this->nf_s(inst, cond, expr, dst);
2736 this->zf_s(inst, cond, expr, dst);
2740 if (cond->evaluate() ==
true) {
2745 this->controlFlow_s(inst, cond, dst);
2757 auto op1 = this->getArm32SourceOperandAst(inst, src1);
2758 auto op2 = this->getArm32SourceOperandAst(inst, src2);
2759 auto op3 = this->getArm32SourceOperandAst(inst, src3);
2762 auto mls = this->astCtxt->bvsub(
2763 this->astCtxt->sx(2*bvSize, op3),
2764 this->astCtxt->bvmul(
2765 this->astCtxt->sx(2*bvSize, op1),
2766 this->astCtxt->sx(2*bvSize, op2)
2769 auto lower = this->astCtxt->extract(bvSize-1, 0, mls);
2770 auto node1 = this->buildConditionalSemantics(inst, dst, lower);
2776 auto cond = node1->getChildren()[0];
2779 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
2782 if (cond->evaluate() ==
true) {
2787 this->controlFlow_s(inst, cond, dst);
2796 auto op1 = this->getArm32SourceOperandAst(inst, dst);
2797 auto op2 = this->getArm32SourceOperandAst(inst, src);
2800 auto node = this->buildConditionalSemantics(inst, dst, op2);
2806 auto cond = this->getCodeConditionAst(inst);
2809 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src));
2813 this->nf_s(inst, cond, expr, dst);
2814 this->zf_s(inst, cond, expr, dst);
2823 this->cfAdd_s(inst, cond, expr, dst, op1, op2);
2824 this->vfAdd_s(inst, cond, expr, dst, op1, op2);
2829 if (cond->evaluate() ==
true) {
2833 this->updateExecutionState(dst, op2);
2837 this->controlFlow_s(inst, cond, dst);
2846 src.getImmediate().setBits(15, 0);
2849 auto dstOp = this->getArm32SourceOperandAst(inst, dst);
2850 auto srcOp = this->getArm32SourceOperandAst(inst, src);
2853 auto node1 = this->astCtxt->concat(srcOp, this->astCtxt->extract(15, 0, dstOp));
2854 auto node2 = this->buildConditionalSemantics(inst, dst, node1);
2860 auto cond = this->getCodeConditionAst(inst);
2863 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src));
2867 this->nf_s(inst, cond, expr, dst);
2868 this->zf_s(inst, cond, expr, dst);
2872 if (cond->evaluate() ==
true) {
2877 this->controlFlow_s(inst, cond, dst);
2888 auto op1 = this->getArm32SourceOperandAst(inst, src1);
2889 auto op2 = this->getArm32SourceOperandAst(inst, src2);
2892 auto mul = this->astCtxt->bvmul(
2893 this->astCtxt->sx(2*bvSize, op1),
2894 this->astCtxt->sx(2*bvSize, op2)
2896 auto lower = this->astCtxt->extract(bvSize-1, 0, mul);
2897 auto node1 = this->buildConditionalSemantics(inst, dst, lower);
2903 auto cond = this->getCodeConditionAst(inst);
2906 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
2910 this->nf_s(inst, cond, expr, dst);
2911 this->zf_s(inst, cond, expr, dst);
2915 if (cond->evaluate() ==
true) {
2920 this->controlFlow_s(inst, cond, dst);
2929 auto op = this->getArm32SourceOperandAst(inst, src);
2932 auto node1 = this->astCtxt->bvnot(op);
2933 auto node2 = this->buildConditionalSemantics(inst, dst, node1);
2939 auto cond = this->getCodeConditionAst(inst);
2942 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src));
2946 this->cfBitwise_s(inst, cond, expr, src);
2947 this->nf_s(inst, cond, expr, dst);
2948 this->zf_s(inst, cond, expr, dst);
2952 if (cond->evaluate() ==
true) {
2956 this->updateExecutionState(dst, node1);
2960 this->controlFlow_s(inst, cond, dst);
2966 this->controlFlow_s(inst);
2980 auto node1 = this->astCtxt->bvor(op1, this->astCtxt->bvnot(op2));
2981 auto node2 = this->buildConditionalSemantics(inst, dst, node1);
2984 auto cond = this->getCodeConditionAst(inst);
2990 this->spreadTaint(inst,cond ,expr, dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
2993 this->controlFlow_s(inst);
3010 if (src2.getType() ==
OP_IMM && src3.getType() ==
OP_IMM) {
3011 auto size = src2.getSize();
3012 auto value =
static_cast<triton::uint32>(src2.getImmediate().getValue());
3013 auto shift =
static_cast<triton::uint32>(src3.getImmediate().getValue());
3023 auto op1 = this->getArm32SourceOperandAst(inst, src1);
3024 auto op2 = this->getArm32SourceOperandAst(inst, src2);
3027 auto node1 = this->astCtxt->bvor(op1, op2);
3028 auto node2 = this->buildConditionalSemantics(inst, dst, node1);
3034 auto cond = this->getCodeConditionAst(inst);
3037 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
3041 this->cfBitwise_s(inst, cond, expr, src2);
3042 this->nf_s(inst, cond, expr, dst);
3043 this->zf_s(inst, cond, expr, dst);
3047 if (cond->evaluate() ==
true) {
3051 this->updateExecutionState(dst, node1);
3055 this->controlFlow_s(inst, cond, dst);
3064 auto cond = this->getCodeConditionAst(inst);
3066 bool updateControlFlow =
true;
3068 for (uint8_t i = 0; i < inst.
operands.size(); i++) {
3075 auto op1 = this->getArm32SourceOperandAst(inst, dst);
3076 auto op2 = this->getArm32SourceOperandAst(inst, src);
3086 node1 = this->clearISSB(op2);
3089 auto node2 = this->astCtxt->ite(cond, node1, op1);
3095 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src));
3098 alignAddStack_s(inst, cond, size);
3103 if (cond->evaluate() ==
true && dst.
getRegister().
getId() == ID_REG_ARM32_PC) {
3104 updateControlFlow =
false;
3107 this->updateExecutionState(dst, op2);
3112 if (updateControlFlow) {
3113 this->controlFlow_s(inst);
3124 auto cond = this->getCodeConditionAst(inst);
3127 auto& src = inst.
operands[nuop - i];
3130 auto op = this->getArm32SourceOperandAst(inst, src);
3133 auto stackValue = alignSubStack_s(inst, cond, size);
3137 auto node = this->astCtxt->ite(cond, op, this->astCtxt->bv(stackValue, op->getBitvectorSize()));
3143 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src));
3147 this->controlFlow_s(inst);
3159 std::vector<triton::ast::SharedAbstractNode> bits;
3160 bits.reserve(src.getBitSize());
3162 for (
triton::uint32 index = 0; index < src.getBitSize(); index++) {
3163 bits.push_back(this->astCtxt->extract(index, index, op));
3166 auto node1 = this->astCtxt->concat(bits);
3167 auto node2 = this->buildConditionalSemantics(inst, dst, node1);
3170 auto cond = this->getCodeConditionAst(inst);
3176 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src));
3179 this->controlFlow_s(inst);
3191 std::vector<triton::ast::SharedAbstractNode> bits;
3194 switch(src.getSize()) {
3196 bits.push_back(this->astCtxt->extract(23, 16, op));
3197 bits.push_back(this->astCtxt->extract(31, 24, op));
3198 bits.push_back(this->astCtxt->extract(7, 0, op));
3199 bits.push_back(this->astCtxt->extract(15, 8, op));
3206 auto node1 = this->astCtxt->concat(bits);
3207 auto node2 = this->buildConditionalSemantics(inst, dst, node1);
3210 auto cond = this->getCodeConditionAst(inst);
3216 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src));
3219 this->controlFlow_s(inst);
3228 auto op = this->getArm32SourceOperandAst(inst, src);
3231 std::list<triton::ast::SharedAbstractNode> bits;
3233 bits.push_front(this->astCtxt->extract(31, 24, op));
3234 bits.push_front(this->astCtxt->extract(23, 16, op));
3235 bits.push_front(this->astCtxt->extract(15, 8, op));
3236 bits.push_front(this->astCtxt->extract(7, 0, op));
3238 auto node1 = this->astCtxt->concat(bits);
3239 auto node2 = this->buildConditionalSemantics(inst, dst, node1);
3245 auto cond = this->getCodeConditionAst(inst);
3248 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src));
3251 if (cond->evaluate() ==
true) {
3255 this->updateExecutionState(dst, node1);
3259 this->controlFlow_s(inst, cond, dst);
3268 auto op1base = this->getArm32SourceBaseOperandAst(inst, src1);
3269 auto op1 = this->getArm32SourceOperandAst(inst, src1);
3287 auto op2 = this->getArm32SourceOperandAst(inst, src2);
3289 node1 = this->astCtxt->bvror(
3293 this->astCtxt->extract(7, 0, op2)
3298 auto node2 = this->buildConditionalSemantics(inst, dst, node1);
3304 auto cond = this->getCodeConditionAst(inst);
3307 auto taint = this->taintEngine->
isTainted(src1);
3312 taint |= this->taintEngine->
isTainted(src2);
3315 this->spreadTaint(inst, cond, expr, dst, taint);
3321 this->cfRor_s(inst, cond, expr, op1base, src);
3322 this->nf_s(inst, cond, expr, dst);
3323 this->zf_s(inst, cond, expr, dst);
3327 if (cond->evaluate() ==
true) {
3331 this->updateExecutionState(dst, node2);
3335 this->controlFlow_s(inst, cond, dst);
3345 auto op1base = this->getArm32SourceBaseOperandAst(inst, src);
3346 auto op1 = this->getArm32SourceOperandAst(inst, src);
3347 auto op2 = this->getArm32SourceOperandAst(inst, cf);
3350 auto node1 = this->astCtxt->extract(
3351 op1->getBitvectorSize(),
3353 this->astCtxt->bvror(
3354 this->astCtxt->concat(op1, op2),
3358 auto node2 = this->buildConditionalSemantics(inst, dst, node1);
3364 auto cond = this->getCodeConditionAst(inst);
3367 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src));
3371 this->cfRrx_s(inst, cond, expr, op1base, src);
3372 this->nf_s(inst, cond, expr, dst);
3373 this->zf_s(inst, cond, expr, dst);
3377 if (cond->evaluate() ==
true) {
3381 this->updateExecutionState(dst, node2);
3385 this->controlFlow_s(inst, cond, dst);
3402 if (src2.getType() ==
OP_IMM && src3.getType() ==
OP_IMM) {
3403 auto size = src2.getSize();
3404 auto value =
static_cast<triton::uint32>(src2.getImmediate().getValue());
3405 auto shift =
static_cast<triton::uint32>(src3.getImmediate().getValue());
3415 auto op1 = this->getArm32SourceOperandAst(inst, src1);
3416 auto op2 = this->getArm32SourceOperandAst(inst, src2);
3419 auto node1 = this->astCtxt->bvsub(op2, op1);
3420 auto node2 = this->buildConditionalSemantics(inst, dst, node1);
3426 auto cond = this->getCodeConditionAst(inst);
3429 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
3433 this->cfSub_s(inst, cond, expr, dst, op2, op1);
3434 this->nf_s(inst, cond, expr, dst);
3435 this->vfSub_s(inst, cond, expr, dst, op2, op1);
3436 this->zf_s(inst, cond, expr, dst);
3440 if (cond->evaluate() ==
true) {
3444 this->updateExecutionState(dst, node1);
3448 this->controlFlow_s(inst, cond, dst);
3466 if (src2.getType() ==
OP_IMM && src3.getType() ==
OP_IMM) {
3467 auto size = src2.getSize();
3468 auto value =
static_cast<triton::uint32>(src2.getImmediate().getValue());
3469 auto shift =
static_cast<triton::uint32>(src3.getImmediate().getValue());
3479 auto op1 = this->getArm32SourceOperandAst(inst, src1);
3480 auto op2 = this->getArm32SourceOperandAst(inst, src2);
3481 auto op3 = this->getArm32SourceOperandAst(inst, cf);
3484 auto node1 = this->astCtxt->bvadd(
3485 this->astCtxt->bvadd(op2, this->astCtxt->bvnot(op1)),
3488 auto node2 = this->buildConditionalSemantics(inst, dst, node1);
3494 auto cond = this->getCodeConditionAst(inst);
3497 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2) | this->taintEngine->isTainted(cf));
3501 this->cfSub_s(inst, cond, expr, dst, op2, op1);
3502 this->nf_s(inst, cond, expr, dst);
3503 this->vfSub_s(inst, cond, expr, dst, op2, op1);
3504 this->zf_s(inst, cond, expr, dst);
3508 if (cond->evaluate() ==
true) {
3512 this->updateExecutionState(dst, node1);
3516 this->controlFlow_s(inst, cond, dst);
3534 if (src2.getType() ==
OP_IMM && src3.getType() ==
OP_IMM) {
3535 auto size = src2.getSize();
3536 auto value =
static_cast<triton::uint32>(src2.getImmediate().getValue());
3537 auto shift =
static_cast<triton::uint32>(src3.getImmediate().getValue());
3547 auto op1 = this->getArm32SourceOperandAst(inst, src1);
3548 auto op2 = this->getArm32SourceOperandAst(inst, src2);
3549 auto op3 = this->getArm32SourceOperandAst(inst, cf);
3552 auto node1 = this->astCtxt->bvadd(
3553 this->astCtxt->bvadd(op1, this->astCtxt->bvnot(op2)),
3556 auto node2 = this->buildConditionalSemantics(inst, dst, node1);
3562 auto cond = this->getCodeConditionAst(inst);
3565 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2) | this->taintEngine->isTainted(cf));
3576 this->cfSub_s(inst, cond, expr, dst, op1, op2);
3578 this->nf_s(inst, cond, expr, dst);
3579 this->vfSub_s(inst, cond, expr, dst, op1, op2);
3580 this->zf_s(inst, cond, expr, dst);
3584 if (cond->evaluate() ==
true) {
3588 this->updateExecutionState(dst, node1);
3592 this->controlFlow_s(inst, cond, dst);
3601 auto lsb =
static_cast<uint32>(src2.getImmediate().getValue());
3602 auto width =
static_cast<uint32>(src3.getImmediate().getValue());
3611 auto node1 = this->astCtxt->sx(dst.
getBitSize() - width, this->astCtxt->extract(lsb+width-1, lsb, op));
3612 auto node2 = this->buildConditionalSemantics(inst, dst, node1);
3618 auto cond = this->getCodeConditionAst(inst);
3621 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src1));
3624 this->controlFlow_s(inst);
3638 auto node1 = this->astCtxt->ite(
3639 this->astCtxt->equal(op2, this->astCtxt->bv(0, op2->getBitvectorSize())),
3641 this->astCtxt->bvsdiv(op1, op2)
3643 auto node2 = this->buildConditionalSemantics(inst, dst, node1);
3649 auto cond = this->getCodeConditionAst(inst);
3652 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
3655 this->controlFlow_s(inst);
3667 auto op1 = this->getArm32SourceOperandAst(inst, src1);
3668 auto op2 = this->getArm32SourceOperandAst(inst, src2);
3669 auto op3 = this->getArm32SourceOperandAst(inst, src3);
3672 auto smla = this->astCtxt->bvadd(
3673 this->astCtxt->bvmul(
3674 this->astCtxt->sx(2*bvSize + 16, this->astCtxt->extract(15, 0, op1)),
3675 this->astCtxt->sx(2*bvSize + 16, this->astCtxt->extract(15, 0, op2))
3677 this->astCtxt->sx(2*bvSize, op3)
3679 auto lower = this->astCtxt->extract(bvSize-1, 0, smla);
3680 auto node1 = this->buildConditionalSemantics(inst, dst, lower);
3686 auto cond = node1->getChildren()[0];
3689 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
3692 if (cond->evaluate() ==
true) {
3697 this->controlFlow_s(inst, cond, dst);
3709 auto op1 = this->getArm32SourceOperandAst(inst, src1);
3710 auto op2 = this->getArm32SourceOperandAst(inst, src2);
3711 auto op3 = this->getArm32SourceOperandAst(inst, src3);
3714 auto smla = this->astCtxt->bvadd(
3715 this->astCtxt->bvmul(
3716 this->astCtxt->sx(2*bvSize + 16, this->astCtxt->extract(15, 0, op1)),
3717 this->astCtxt->sx(2*bvSize + 16, this->astCtxt->extract(31, 16, op2))
3719 this->astCtxt->sx(2*bvSize, op3)
3721 auto lower = this->astCtxt->extract(bvSize-1, 0, smla);
3722 auto node1 = this->buildConditionalSemantics(inst, dst, lower);
3728 auto cond = node1->getChildren()[0];
3731 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
3734 if (cond->evaluate() ==
true) {
3739 this->controlFlow_s(inst, cond, dst);
3751 auto op1 = this->getArm32SourceOperandAst(inst, src1);
3752 auto op2 = this->getArm32SourceOperandAst(inst, src2);
3753 auto op3 = this->getArm32SourceOperandAst(inst, src3);
3756 auto smla = this->astCtxt->bvadd(
3757 this->astCtxt->bvmul(
3758 this->astCtxt->sx(2*bvSize + 16, this->astCtxt->extract(31, 16, op1)),
3759 this->astCtxt->sx(2*bvSize + 16, this->astCtxt->extract(15, 0, op2))
3761 this->astCtxt->sx(2*bvSize, op3)
3763 auto lower = this->astCtxt->extract(bvSize-1, 0, smla);
3764 auto node1 = this->buildConditionalSemantics(inst, dst, lower);
3770 auto cond = node1->getChildren()[0];
3773 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
3776 if (cond->evaluate() ==
true) {
3781 this->controlFlow_s(inst, cond, dst);
3793 auto op1 = this->getArm32SourceOperandAst(inst, src1);
3794 auto op2 = this->getArm32SourceOperandAst(inst, src2);
3795 auto op3 = this->getArm32SourceOperandAst(inst, src3);
3798 auto smla = this->astCtxt->bvadd(
3799 this->astCtxt->bvmul(
3800 this->astCtxt->sx(2*bvSize + 16, this->astCtxt->extract(31, 16, op1)),
3801 this->astCtxt->sx(2*bvSize + 16, this->astCtxt->extract(31, 16, op2))
3803 this->astCtxt->sx(2*bvSize, op3)
3805 auto lower = this->astCtxt->extract(bvSize-1, 0, smla);
3806 auto node1 = this->buildConditionalSemantics(inst, dst, lower);
3812 auto cond = node1->getChildren()[0];
3815 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
3818 if (cond->evaluate() ==
true) {
3823 this->controlFlow_s(inst, cond, dst);
3834 auto op1 = this->getArm32SourceOperandAst(inst, src1);
3835 auto op2 = this->getArm32SourceOperandAst(inst, src2);
3838 auto cond = this->getCodeConditionAst(inst);
3839 auto mul = this->astCtxt->bvmul(
3845 auto node1 = this->astCtxt->ite(cond, lower, this->symbolicEngine->
getOperandAst(inst, dst1));
3846 auto node2 = this->astCtxt->ite(cond, upper, this->symbolicEngine->
getOperandAst(inst, dst2));
3849 auto expr1 = this->symbolicEngine->
createSymbolicExpression(inst, node1, dst1,
"SMULL(S) operation - Lower 32 bits of the result.");
3850 auto expr2 = this->symbolicEngine->
createSymbolicExpression(inst, node2, dst2,
"SMULL(S) operation - Upper 32 bits of the result.");
3853 this->spreadTaint(inst, cond, expr1, dst1, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
3854 this->spreadTaint(inst, cond, expr2, dst2, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
3858 this->nfSmull_s(inst, cond, expr1, expr2, dst1, dst2);
3859 this->zfSmull_s(inst, cond, expr1, expr2, dst1, dst2);
3863 if (cond->evaluate() ==
true) {
3873 this->updateExecutionState(dst2, upper);
3874 this->updateExecutionState(dst1, lower);
3878 this->controlFlow_s(inst, cond, dst1, dst2);
3887 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
3890 auto cond = this->getCodeConditionAst(inst);
3892 for (
unsigned int i = 1; i < inst.
operands.size(); i++) {
3896 auto addr =
static_cast<triton::uint64>(baseNode->evaluate()) + size * (i-1);
3904 auto node = this->astCtxt->ite(cond, op2, op3);
3910 this->spreadTaint(inst, cond, expr1, dst, this->taintEngine->
isTainted(base) | this->taintEngine->isTainted(src));
3915 auto node = this->astCtxt->ite(
3917 this->astCtxt->bvadd(
3919 this->astCtxt->bv((inst.
operands.size() - 1) * size, base.getBitSize())
3925 auto expr2 = this->symbolicEngine->
createSymbolicExpression(inst, node, base,
"STM operation - Base register computation");
3928 this->spreadTaint(inst, cond, expr2, base, this->taintEngine->
isTainted(base));
3932 if (cond->evaluate() ==
true) {
3937 this->controlFlow_s(inst);
3946 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
3949 auto cond = this->getCodeConditionAst(inst);
3951 for (
unsigned int i = 1; i < inst.
operands.size(); i++) {
3955 auto addr =
static_cast<triton::uint64>(baseNode->evaluate()) + size * i;
3963 auto node = this->astCtxt->ite(cond, op2, op3);
3969 this->spreadTaint(inst, cond, expr1, dst, this->taintEngine->
isTainted(base) | this->taintEngine->isTainted(src));
3974 auto node1 = this->astCtxt->ite(
3976 this->astCtxt->bvadd(
3978 this->astCtxt->bv((inst.
operands.size() - 1) * size, base.getBitSize())
3984 auto expr2 = this->symbolicEngine->
createSymbolicExpression(inst, node1, base,
"STMIB operation - Base register computation");
3987 this->spreadTaint(inst, cond, expr2, base, this->taintEngine->
isTainted(base));
3991 if (cond->evaluate() ==
true) {
3996 this->controlFlow_s(inst);
4005 auto op = this->getArm32SourceOperandAst(inst, src);
4008 auto node1 = this->buildConditionalSemantics(inst, dst, op);
4014 auto cond = this->getCodeConditionAst(inst);
4017 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src));
4022 auto& imm = inst.
operands[2].getImmediate();
4026 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
4027 auto immNode = this->symbolicEngine->
getOperandAst(inst, imm);
4030 auto thenNode = this->astCtxt->bvadd(baseNode, this->astCtxt->sx(base.getBitSize() - imm.getBitSize(), immNode));
4032 if (imm.isSubtracted() ==
true) {
4033 thenNode = this->astCtxt->bvsub(baseNode, this->astCtxt->sx(base.getBitSize() - imm.getBitSize(), immNode));
4036 auto node2 = this->astCtxt->ite(cond, thenNode, baseNode);
4039 auto expr2 = this->symbolicEngine->
createSymbolicExpression(inst, node2, base,
"STR operation - Base register computation");
4042 this->spreadTaint(inst, cond, expr2, base, this->taintEngine->
isTainted(base));
4051 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
4057 auto expr3 = this->symbolicEngine->
createSymbolicExpression(inst, node3, base,
"STR operation - Base register computation");
4060 this->spreadTaint(inst, cond, expr3, base, this->taintEngine->
isTainted(base));
4064 if (cond->evaluate() ==
true) {
4069 this->controlFlow_s(inst);
4078 auto op = this->getArm32SourceOperandAst(inst, src);
4081 auto node = this->astCtxt->extract(7, 0, op);
4082 auto node1 = this->buildConditionalSemantics(inst, dst, node);
4088 auto cond = this->getCodeConditionAst(inst);
4091 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src));
4096 auto& imm = inst.
operands[2].getImmediate();
4100 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
4101 auto immNode = this->symbolicEngine->
getOperandAst(inst, imm);
4104 auto thenNode = this->astCtxt->bvadd(baseNode, this->astCtxt->sx(base.getBitSize() - imm.getBitSize(), immNode));
4106 if (imm.isSubtracted() ==
true) {
4107 thenNode = this->astCtxt->bvsub(baseNode, this->astCtxt->sx(base.getBitSize() - imm.getBitSize(), immNode));
4110 auto node2 = this->astCtxt->ite(cond, thenNode, baseNode);
4113 auto expr2 = this->symbolicEngine->
createSymbolicExpression(inst, node2, base,
"STRB operation - Base register computation");
4116 this->spreadTaint(inst, cond, expr2, base, this->taintEngine->
isTainted(base));
4125 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
4131 auto expr3 = this->symbolicEngine->
createSymbolicExpression(inst, node3, base,
"STRB operation - Base register computation");
4134 this->spreadTaint(inst, cond, expr3, base, this->taintEngine->
isTainted(base));
4138 if (cond->evaluate() ==
true) {
4143 this->controlFlow_s(inst);
4152 auto cond = this->getCodeConditionAst(inst);
4154 for (
unsigned int i = 0; i < 2; i++) {
4158 auto addr = base.getMemory().getAddress() + size * i;
4166 auto node = this->astCtxt->ite(cond, op2, op3);
4172 this->spreadTaint(inst, cond, expr1, dst, this->taintEngine->
isTainted(base) | this->taintEngine->isTainted(src));
4182 auto& imm = inst.
operands[3].getImmediate();
4183 auto& base = inst.
operands[2].getMemory().getBaseRegister();
4186 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
4187 auto immNode = this->symbolicEngine->
getOperandAst(inst, imm);
4190 auto thenNode = this->astCtxt->bvadd(baseNode, this->astCtxt->sx(base.getBitSize() - imm.getBitSize(), immNode));
4192 if (imm.isSubtracted() ==
true) {
4193 thenNode = this->astCtxt->bvsub(baseNode, this->astCtxt->sx(base.getBitSize() - imm.getBitSize(), immNode));
4196 auto node2 = this->astCtxt->ite(cond, thenNode, baseNode);
4199 auto expr2 = this->symbolicEngine->
createSymbolicExpression(inst, node2, base,
"STRD operation - Base register computation");
4202 this->spreadTaint(inst, cond, expr2, base, this->taintEngine->
isTainted(base));
4204 auto& reg = inst.
operands[3].getRegister();
4205 auto& base = inst.
operands[2].getMemory().getBaseRegister();
4208 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
4209 auto regNode = this->symbolicEngine->
getOperandAst(inst, reg);
4212 auto thenNode = this->astCtxt->bvadd(baseNode, regNode);
4214 if (reg.isSubtracted() ==
true) {
4215 thenNode = this->astCtxt->bvsub(baseNode, regNode);
4218 auto node2 = this->astCtxt->ite(cond, thenNode, baseNode);
4221 auto expr2 = this->symbolicEngine->
createSymbolicExpression(inst, node2, base,
"STRD operation - Base register computation");
4224 this->spreadTaint(inst, cond, expr2, base, this->taintEngine->
isTainted(base) | this->taintEngine->isTainted(reg));
4231 auto& base = inst.
operands[2].getMemory().getBaseRegister();
4234 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
4237 auto node3 = this->astCtxt->ite(cond, inst.
operands[2].getMemory().getLeaAst(), baseNode);
4240 auto expr3 = this->symbolicEngine->
createSymbolicExpression(inst, node3, base,
"STRD operation - Base register computation");
4243 this->spreadTaint(inst, cond, expr3, base, this->taintEngine->
isTainted(base));
4247 if (cond->evaluate() ==
true) {
4252 this->controlFlow_s(inst);
4266 auto op1 = this->getArm32SourceOperandAst(inst, src);
4273 auto cond = this->getCodeConditionAst(inst);
4274 auto node1 = this->astCtxt->ite(cond, status, this->symbolicEngine->
getOperandAst(inst, dst1));
4276 this->astCtxt->ite(cond, op1, op2) :
4277 this->astCtxt->ite(cond, op2, op2);
4284 this->spreadTaint(inst, cond, expr2, dst2, this->taintEngine->
isTainted(src));
4290 if (cond->evaluate() ==
true) {
4295 this->controlFlow_s(inst);
4304 auto op = this->getArm32SourceOperandAst(inst, src);
4307 auto node1 = this->astCtxt->extract(15, 0, op);
4308 auto node2 = this->buildConditionalSemantics(inst, dst, node1);
4314 auto cond = this->getCodeConditionAst(inst);
4317 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src));
4323 auto& imm = inst.
operands[2].getImmediate();
4327 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
4328 auto immNode = this->symbolicEngine->
getOperandAst(inst, imm);
4331 auto thenNode = this->astCtxt->bvadd(baseNode, this->astCtxt->sx(base.getBitSize() - imm.getBitSize(), immNode));
4333 if (imm.isSubtracted() ==
true) {
4334 thenNode = this->astCtxt->bvsub(baseNode, this->astCtxt->sx(base.getBitSize() - imm.getBitSize(), immNode));
4337 auto node2 = this->astCtxt->ite(cond, thenNode, baseNode);
4340 auto expr2 = this->symbolicEngine->
createSymbolicExpression(inst, node2, base,
"STRH operation - Base register computation");
4343 this->spreadTaint(inst, cond, expr2, base, this->taintEngine->
isTainted(base));
4345 auto& reg = inst.
operands[2].getRegister();
4349 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
4350 auto regNode = this->symbolicEngine->
getOperandAst(inst, reg);
4353 auto thenNode = this->astCtxt->bvadd(baseNode, regNode);
4355 if (reg.isSubtracted() ==
true) {
4356 thenNode = this->astCtxt->bvsub(baseNode, regNode);
4359 auto node2 = this->astCtxt->ite(cond, thenNode, baseNode);
4362 auto expr2 = this->symbolicEngine->
createSymbolicExpression(inst, node2, base,
"STRH operation - Base register computation");
4365 this->spreadTaint(inst, cond, expr2, base, this->taintEngine->
isTainted(base) | this->taintEngine->isTainted(reg));
4375 auto baseNode = this->symbolicEngine->
getOperandAst(inst, base);
4381 auto expr3 = this->symbolicEngine->
createSymbolicExpression(inst, node3, base,
"STRH operation - Base register computation");
4384 this->spreadTaint(inst, cond, expr3, base, this->taintEngine->
isTainted(base));
4388 if (cond->evaluate() ==
true) {
4393 this->controlFlow_s(inst, cond, dst);
4410 if (src2.getType() ==
OP_IMM && src3.getType() ==
OP_IMM) {
4411 auto size = src2.getSize();
4412 auto value =
static_cast<triton::uint32>(src2.getImmediate().getValue());
4413 auto shift =
static_cast<triton::uint32>(src3.getImmediate().getValue());
4423 auto op1 = this->getArm32SourceOperandAst(inst, src1);
4424 auto op2 = this->getArm32SourceOperandAst(inst, src2);
4427 auto node1 = this->astCtxt->bvsub(op1, op2);
4428 auto node2 = this->buildConditionalSemantics(inst, dst, node1);
4434 auto cond = this->getCodeConditionAst(inst);
4437 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
4448 this->cfSub_s(inst, cond, expr, dst, op1, op2);
4450 this->nf_s(inst, cond, expr, dst);
4451 this->vfSub_s(inst, cond, expr, dst, op1, op2);
4452 this->zf_s(inst, cond, expr, dst);
4456 if (cond->evaluate() ==
true) {
4460 this->updateExecutionState(dst, node1);
4464 this->controlFlow_s(inst, cond, dst);
4476 auto node1 = this->astCtxt->sx(dst.
getBitSize() - 8, this->astCtxt->extract(7, 0, op));
4477 auto node2 = this->buildConditionalSemantics(inst, dst, node1);
4483 auto cond = this->getCodeConditionAst(inst);
4486 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src));
4489 this->controlFlow_s(inst);
4501 auto node1 = this->astCtxt->sx(dst.
getBitSize() - 16, this->astCtxt->extract(15, 0, op));
4502 auto node2 = this->buildConditionalSemantics(inst, dst, node1);
4508 auto cond = this->getCodeConditionAst(inst);
4511 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src));
4514 this->controlFlow_s(inst);
4523 auto op1 = this->getArm32SourceOperandAst(inst, src1);
4524 auto op2 = this->getArm32SourceOperandAst(inst, src2);
4527 auto cond = this->getCodeConditionAst(inst);
4528 auto node1 = this->astCtxt->bvand(op1, op2);
4534 if (cond->evaluate() ==
true) {
4535 expr->isTainted = this->taintEngine->
isTainted(src1) | this->taintEngine->
isTainted(src2);
4539 this->cfBitwise_s(inst, cond, expr, src2);
4540 this->nf_s(inst, cond, expr, src1);
4541 this->zf_s(inst, cond, expr, src1);
4544 if (cond->evaluate() ==
true) {
4549 this->controlFlow_s(inst);
4560 auto opNode = this->getArm32SourceOperandAst(inst, src);
4563 auto node1 = this->astCtxt->bvadd(
4565 this->astCtxt->bvmul(
4566 this->astCtxt->bv(2, bvSize),
4567 this->astCtxt->zx(bvSize - src.getMemory().getBitSize(), opNode)
4592 auto opNode = this->getArm32SourceOperandAst(inst, src);
4595 auto node1 = this->astCtxt->bvadd(
4597 this->astCtxt->bvmul(
4598 this->astCtxt->bv(2, bvSize),
4599 this->astCtxt->zx(bvSize - src.getMemory().getBitSize(), opNode)
4622 auto op1 = this->getArm32SourceOperandAst(inst, src1);
4623 auto op2 = this->getArm32SourceOperandAst(inst, src2);
4626 auto cond = this->getCodeConditionAst(inst);
4627 auto node1 = this->astCtxt->bvxor(op1, op2);
4633 if (cond->evaluate() ==
true) {
4634 expr->isTainted = this->taintEngine->
isTainted(src1) | this->taintEngine->
isTainted(src2);
4638 this->cfBitwise_s(inst, cond, expr, src2);
4639 this->nf_s(inst, cond, expr, src1);
4640 this->zf_s(inst, cond, expr, src1);
4643 if (cond->evaluate() ==
true) {
4648 this->controlFlow_s(inst);
4657 auto lsb =
static_cast<uint32>(src2.getImmediate().getValue());
4658 auto width =
static_cast<uint32>(src3.getImmediate().getValue());
4667 auto node1 = this->astCtxt->zx(dst.
getBitSize() - width, this->astCtxt->extract(lsb+width-1, lsb, op));
4668 auto node2 = this->buildConditionalSemantics(inst, dst, node1);
4674 auto cond = this->getCodeConditionAst(inst);
4677 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src1));
4680 this->controlFlow_s(inst);
4694 auto node1 = this->astCtxt->ite(
4695 this->astCtxt->equal(op2, this->astCtxt->bv(0, op2->getBitvectorSize())),
4697 this->astCtxt->bvudiv(op1, op2)
4699 auto node2 = this->buildConditionalSemantics(inst, dst, node1);
4705 auto cond = this->getCodeConditionAst(inst);
4708 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
4711 this->controlFlow_s(inst);
4722 auto op1 = this->getArm32SourceOperandAst(inst, src1);
4723 auto op2 = this->getArm32SourceOperandAst(inst, src2);
4726 auto cond = this->getCodeConditionAst(inst);
4727 auto mul = this->astCtxt->bvmul(
4733 auto node1 = this->astCtxt->ite(cond, lower, this->symbolicEngine->
getOperandAst(inst, dst1));
4734 auto node2 = this->astCtxt->ite(cond, upper, this->symbolicEngine->
getOperandAst(inst, dst2));
4737 auto expr1 = this->symbolicEngine->
createSymbolicExpression(inst, node1, dst1,
"UMULL(S) operation - Lower 32 bits of the result.");
4738 auto expr2 = this->symbolicEngine->
createSymbolicExpression(inst, node2, dst2,
"UMULL(S) operation - Upper 32 bits of the result.");
4741 this->spreadTaint(inst, cond, expr1, dst1, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
4742 this->spreadTaint(inst, cond, expr2, dst2, this->taintEngine->
isTainted(src1) | this->taintEngine->isTainted(src2));
4746 this->nfSmull_s(inst, cond, expr1, expr2, dst1, dst2);
4747 this->zfSmull_s(inst, cond, expr1, expr2, dst1, dst2);
4751 if (cond->evaluate() ==
true) {
4761 this->updateExecutionState(dst2, upper);
4762 this->updateExecutionState(dst1, lower);
4766 this->controlFlow_s(inst, cond, dst1, dst2);
4778 auto node1 = this->astCtxt->zx(dst.
getBitSize() - 8, this->astCtxt->extract(7, 0, op));
4779 auto node2 = this->buildConditionalSemantics(inst, dst, node1);
4785 auto cond = this->getCodeConditionAst(inst);
4788 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src));
4791 this->controlFlow_s(inst);
4803 auto node1 = this->astCtxt->zx(dst.
getBitSize() - 16, this->astCtxt->extract(15, 0, op));
4804 auto node2 = this->buildConditionalSemantics(inst, dst, node1);
4810 auto cond = this->getCodeConditionAst(inst);
4813 this->spreadTaint(inst, cond, expr, dst, this->taintEngine->
isTainted(src));
4816 this->controlFlow_s(inst);
4836 auto op = this->getArm32SourceOperandAst(inst, src);
4857 shiftAmount = this->astCtxt->bv(
4859 node->getBitvectorSize()
4874 node = this->getArm32SourceBaseOperandAst(inst, src);
4875 shiftAmount = this->getShiftCAmountAst(shift);
4876 shiftType = this->getShiftCBaseType(shift);
4888 shiftAmount = this->astCtxt->bv(0, op->getBitvectorSize());
4898 auto node1 = this->getShiftCAst(node, shiftType, shiftAmount);
4900 auto node3 = this->astCtxt->ite(cond, node1, node2);
4906 this->spreadTaint(inst, cond, expr, cf, parent->isTainted);
4960 shiftAmount = this->getShiftCAmountAst(shift);
4961 shiftType = this->getShiftCBaseType(shift);
4967 auto op2 = this->getArm32SourceOperandAst(inst, src);
4974 shiftAmount = this->astCtxt->bv(1, op1->getBitvectorSize());
4985 auto node1 = this->getShiftCAst(op1, shiftType, shiftAmount);
4987 auto node3 = this->astCtxt->ite(cond, node1, node2);
4993 this->spreadTaint(inst, cond, expr, cf, parent->isTainted);
5067 if (shiftAmount->evaluate() == 0)
5068 return carryOutNode;
5072 carryOutNode = this->astCtxt->extract(
5075 this->astCtxt->bvashr(
5077 this->astCtxt->bvsub(
5079 this->astCtxt->bv(1, shiftAmount->getBitvectorSize())
5087 carryOutNode = this->astCtxt->extract(
5090 this->astCtxt->bvshl(
5091 this->astCtxt->zx(node->getBitvectorSize()+1, node),
5092 this->astCtxt->zx(node->getBitvectorSize()+1, shiftAmount)
5099 carryOutNode = this->astCtxt->extract(
5102 this->astCtxt->bvlshr(
5104 this->astCtxt->bvsub(
5106 this->astCtxt->bv(1, shiftAmount->getBitvectorSize())
5114 carryOutNode = this->astCtxt->extract(
5117 this->astCtxt->bvror(
5119 this->astCtxt->bvurem(
5129 carryOutNode = this->astCtxt->extract(0, 0, node);
5137 return carryOutNode;
5193 regShiftAmount = this->astCtxt->zx(
5195 this->astCtxt->extract(7, 0, op)
5205 amount = immShiftAmount;
5212 amount = regShiftAmount;
The abstract architecture class.
TRITON_EXPORT const triton::arch::Register & getRegister(triton::arch::register_e id) const
Returns register from id.
TRITON_EXPORT void setThumb(bool state)
Sets CPU state to Thumb mode. Only valid for Arm32.
TRITON_EXPORT const triton::arch::Register & getStackPointer(void) const
Returns the stack pointer register.
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 triton::uint512 getConcreteRegisterValue(const triton::arch::Register ®, bool execCallbacks=true) const
Returns the concrete value of a register.
TRITON_EXPORT bool isThumb(void) const
Returns true if the execution mode is Thumb. Only valid for Arm32.
TRITON_EXPORT const triton::arch::Register & getParentRegister(triton::arch::register_e id) const
Returns parent register from id.
This class is used to represent an instruction.
TRITON_EXPORT triton::uint32 getSize(void) const
Returns the size of the 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.
TRITON_EXPORT triton::uint64 getAddress(void) const
Returns the address 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::arch::Register & getRegister(void)
Returns the register operand.
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 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 triton::uint32 getHigh(void) const
Returns the highest bit position of the abstract 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.
TRITON_EXPORT triton::uint32 getBitSize(void) const
Returns the size (in bits) of the register.
TRITON_EXPORT triton::arch::register_e getId(void) const
Returns the id of the register.
TRITON_EXPORT triton::uint32 getSize(void) const
Returns the size (in bytes) of the register.
This class is used to represent specific properties of an Arm operand.
TRITON_EXPORT triton::arch::arm::shift_e getShiftType(void) const
Returns the type of the shift.
TRITON_EXPORT triton::arch::register_e getShiftRegister(void) const
Returns the value of the shift register.
TRITON_EXPORT triton::uint32 getShiftImmediate(void) const
Returns the value of the shift immediate.
TRITON_EXPORT Arm32Semantics(triton::arch::Architecture *architecture, triton::engines::symbolic::SymbolicEngine *symbolicEngine, triton::engines::taint::TaintEngine *taintEngine, const triton::ast::SharedAstContext &astCtxt)
Constructor.
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 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::ast::SharedAbstractNode getShiftAst(const triton::arch::arm::ArmOperandProperties &shift, const triton::ast::SharedAbstractNode &node)
Returns the AST corresponding to the shift operation. Mainly used for Arm32 operands.
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 getRegisterAst(const triton::arch::Register ®)
Returns the AST corresponding to the register.
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 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.
@ ID_REG_INVALID
invalid = 0
@ ID_SHIFT_LSR
Logical Shift Right (immediate)
@ ID_SHIFT_LSR_REG
Logical Shift Right (register)
@ ID_SHIFT_ASR
Arithmetic Shift Right (immediate)
@ ID_SHIFT_ROR_REG
Rotate Right (register)
@ ID_SHIFT_ROR
Rotate Right (immediate)
@ ID_SHIFT_ASR_REG
Arithmetic Shift Right (register)
@ ID_SHIFT_RRX
Rotate Right with Extend (immediate)
@ ID_SHIFT_RRX_REG
Rotate Right with Extend (register)
@ ID_SHIFT_LSL_REG
Logical Shift Left (register)
@ ID_SHIFT_INVALID
invalid
@ ID_SHIFT_LSL
Logical Shift Left (immediate)
@ 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 dword
dword size in byte
std::shared_ptr< triton::engines::symbolic::SymbolicExpression > SharedSymbolicExpression
Shared Symbolic Expression.
const bool UNTAINTED
Defines an untainted item.
std::size_t usize
unsigned MAX_INT 32 or 64 bits according to the CPU.
std::uint64_t uint64
unisgned 64-bits
std::uint32_t uint32
unisgned 32-bits