diff --git a/src/libtriton/arch/x86/x8664Cpu.cpp b/src/libtriton/arch/x86/x8664Cpu.cpp index ecabdbdc3..05b4f1b52 100644 --- a/src/libtriton/arch/x86/x8664Cpu.cpp +++ b/src/libtriton/arch/x86/x8664Cpu.cpp @@ -277,7 +277,7 @@ namespace triton { bool x8664Cpu::isFlag(triton::arch::register_e regId) const { - if (regId >= triton::arch::ID_REG_X86_AC && regId <= triton::arch::ID_REG_X86_FSW_B) { return true; } + if (regId >= triton::arch::ID_REG_X86_AC && regId <= triton::arch::ID_REG_X86_ZF) { return true; } if (regId >= triton::arch::ID_REG_X86_FTW && regId <= triton::arch::ID_REG_X86_FDP) { return true; } if (regId >= triton::arch::ID_REG_X86_SSE_IE && regId <= triton::arch::ID_REG_X86_SSE_FZ) { return true; } if (regId >= triton::arch::ID_REG_X86_FCW_IM && regId <= triton::arch::ID_REG_X86_FCW_X) { return true; } @@ -336,7 +336,7 @@ namespace triton { bool x8664Cpu::isEFER(triton::arch::register_e regId) const { - return ((regId >= triton::arch::ID_REG_X86_EFER && regId <= triton::arch::ID_REG_X86_EFER) ? true : false); + return ((regId == triton::arch::ID_REG_X86_EFER) ? true : false); } diff --git a/src/libtriton/arch/x86/x86Cpu.cpp b/src/libtriton/arch/x86/x86Cpu.cpp index d303fefc8..3b50fc587 100644 --- a/src/libtriton/arch/x86/x86Cpu.cpp +++ b/src/libtriton/arch/x86/x86Cpu.cpp @@ -213,7 +213,7 @@ namespace triton { bool x86Cpu::isFlag(triton::arch::register_e regId) const { - if (regId >= triton::arch::ID_REG_X86_AC && regId <= triton::arch::ID_REG_X86_FSW_B) { return true; } + if (regId >= triton::arch::ID_REG_X86_AC && regId <= triton::arch::ID_REG_X86_ZF) { return true; } if (regId >= triton::arch::ID_REG_X86_FTW && regId <= triton::arch::ID_REG_X86_FDP) { return true; } if (regId >= triton::arch::ID_REG_X86_SSE_IE && regId <= triton::arch::ID_REG_X86_SSE_FZ) { return true; } if (regId >= triton::arch::ID_REG_X86_FCW_IM && regId <= triton::arch::ID_REG_X86_FCW_X) { return true; } @@ -269,7 +269,7 @@ namespace triton { bool x86Cpu::isEFER(triton::arch::register_e regId) const { - return ((regId >= triton::arch::ID_REG_X86_EFER && regId <= triton::arch::ID_REG_X86_EFER) ? true : false); + return ((regId == triton::arch::ID_REG_X86_EFER) ? true : false); }