Skip to content

Commit

Permalink
refactor set 8bit register
Browse files Browse the repository at this point in the history
  • Loading branch information
NaC-L committed Nov 25, 2024
1 parent 03d084e commit 51df7bd
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions lifter/OperandUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1407,16 +1407,7 @@ Value* lifterClass::SetValueToSubRegister_16b(const ZydisRegister reg,
}

void lifterClass::SetRegisterValue(const ZydisRegister key, Value* value) {
if ((key == ZYDIS_REGISTER_AH || key == ZYDIS_REGISTER_CH ||
key == ZYDIS_REGISTER_DH || key == ZYDIS_REGISTER_BH)) {

value = SetValueToSubRegister_8b(key, value);
}

if (((key >= ZYDIS_REGISTER_R8B) && (key <= ZYDIS_REGISTER_R15B)) ||
((key >= ZYDIS_REGISTER_AL) && (key <= ZYDIS_REGISTER_BL)) ||
((key >= ZYDIS_REGISTER_SPL) && (key <= ZYDIS_REGISTER_DIL))) {

if ((key >= ZYDIS_REGISTER_AL) && (key <= ZYDIS_REGISTER_R15B)) {
value = SetValueToSubRegister_8b(key, value);
}

Expand Down

0 comments on commit 51df7bd

Please sign in to comment.