Merge pull request #1445 from Garfield1002/master

fix: popcnt flags calculation
This commit is contained in:
Jonathan Salwan 2026-05-05 21:06:02 +02:00 committed by GitHub
commit 8183c68fd5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -12138,6 +12138,19 @@ namespace triton {
/* Spread taint */
expr->isTainted = this->taintEngine->taintAssignment(dst, src);
/* Update symbolic flags */
this->clearFlag_s(inst, this->architecture->getRegister(ID_REG_X86_OF),
"Clears overflow flag");
this->clearFlag_s(inst, this->architecture->getRegister(ID_REG_X86_SF),
"Clears sign flag");
this->clearFlag_s(inst, this->architecture->getRegister(ID_REG_X86_AF),
"Clears auxiliary flag");
this->clearFlag_s(inst, this->architecture->getRegister(ID_REG_X86_CF),
"Clears carry flag");
this->clearFlag_s(inst, this->architecture->getRegister(ID_REG_X86_PF),
"Clears parity flag");
this->zf_s(inst, expr, dst, true);
/* Update the symbolic control flow */
this->controlFlow_s(inst);
}