Skip to content

Commit

Permalink
Fix JonathanSalwan#1350: zero extend issue with LDRS<x> instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Triton Library committed Aug 13, 2024
1 parent 0648bb9 commit 0c0a7d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .build_number
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1595
1596
6 changes: 3 additions & 3 deletions src/libtriton/arch/arm/aarch64/aarch64Semantics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3298,7 +3298,7 @@ namespace triton {
auto op = this->symbolicEngine->getOperandAst(inst, src);

/* Create the semantics of the LOAD */
auto node1 = this->astCtxt->sx(dst.getBitSize() - 8, op);
auto node1 = this->astCtxt->sx(dst.getBitSize() - 8, this->astCtxt->extract(7, 0, op));

/* Create symbolic expression */
auto expr1 = this->symbolicEngine->createSymbolicExpression(inst, node1, dst, "LDRSB operation - LOAD access");
Expand Down Expand Up @@ -3353,7 +3353,7 @@ namespace triton {
auto op = this->symbolicEngine->getOperandAst(inst, src);

/* Create the semantics of the LOAD */
auto node1 = this->astCtxt->sx(dst.getBitSize() - 16, op);
auto node1 = this->astCtxt->sx(dst.getBitSize() - 16, this->astCtxt->extract(15, 0, op));

/* Create symbolic expression */
auto expr1 = this->symbolicEngine->createSymbolicExpression(inst, node1, dst, "LDRSH operation - LOAD access");
Expand Down Expand Up @@ -3413,7 +3413,7 @@ namespace triton {
auto op = this->symbolicEngine->getOperandAst(inst, src);

/* Create the semantics of the LOAD */
auto node1 = this->astCtxt->sx(dst.getBitSize() - 32, op);
auto node1 = this->astCtxt->sx(dst.getBitSize() - 32, this->astCtxt->extract(31, 0, op));

/* Create symbolic expression */
auto expr1 = this->symbolicEngine->createSymbolicExpression(inst, node1, dst, "LDRSW operation - LOAD access");
Expand Down

0 comments on commit 0c0a7d5

Please sign in to comment.