Skip to content

Commit

Permalink
fix lahf
Browse files Browse the repository at this point in the history
  • Loading branch information
NaC-L committed Oct 22, 2024
1 parent 9329be6 commit 38fea20
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lifter/Semantics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3437,11 +3437,13 @@ void lifterClass::lift_lahf() {
af = createShlFolder(createZExtFolder(af, Type::getInt8Ty(context)), FLAG_AF);
zf = createShlFolder(createZExtFolder(zf, Type::getInt8Ty(context)), FLAG_ZF);
sf = createShlFolder(createZExtFolder(sf, Type::getInt8Ty(context)), FLAG_SF);
Value* Rvalue = createOrFolder(
createOrFolder(createOrFolder(cf, pf), createOrFolder(af, sf)), sf);
Value* Rvalue = createAddFolder(
createOrFolder(
createOrFolder(createOrFolder(cf, pf), createOrFolder(af, sf)), zf),
ConstantInt::get(cf->getType(), 2));

printvalue(sf) printvalue(zf) printvalue(af) printvalue(pf) printvalue(cf);

printvalue(Rvalue);
SetRegisterValue(ZYDIS_REGISTER_AH, Rvalue);
}
void lifterClass::lift_sahf() {
Expand Down

0 comments on commit 38fea20

Please sign in to comment.