summaryrefslogtreecommitdiff
path: root/arch/x86/arch_x86.cpp
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2026-03-13 16:30:02 -0400
committerPeter LaFosse <peter@vector35.com>2026-03-27 10:02:29 -0400
commitf860e52fe85837ba9e1a9df578b54ab12a983089 (patch)
tree459d6819f34ff6e380a64f6a23327fb3d60ba88e /arch/x86/arch_x86.cpp
parent339ce9d5b3a1b6e116c7cd43349a3d935959ee35 (diff)
Ensure rounding flag is properly emitted on some x86 floating point instructions
Diffstat (limited to 'arch/x86/arch_x86.cpp')
-rw-r--r--arch/x86/arch_x86.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/x86/arch_x86.cpp b/arch/x86/arch_x86.cpp
index af3f4901..aeeed4e7 100644
--- a/arch/x86/arch_x86.cpp
+++ b/arch/x86/arch_x86.cpp
@@ -2124,7 +2124,7 @@ size_t X86CommonArchitecture::GetFlagWriteLowLevelIL(BNLowLevelILOperation op, s
case IL_FLAG_O:
return il.Const(0, 0);
case IL_FLAG_A:
- return il.Undefined();
+ return il.Unimplemented();
}
break;
case LLIL_MULU_DP:
@@ -2152,6 +2152,10 @@ size_t X86CommonArchitecture::GetFlagWriteLowLevelIL(BNLowLevelILOperation op, s
break;
}
}
+
+ if (flagWriteType == IL_FLAGWRITE_X87RND && flag == IL_FLAG_C1)
+ return il.Unimplemented();
+
if (((flagWriteType == IL_FLAGWRITE_X87COM) || (flagWriteType == IL_FLAGWRITE_X87C1Z)) && (flag == IL_FLAG_C1))
return il.Const(0, 0);
return Architecture::GetFlagWriteLowLevelIL(op, size, flagWriteType, flag, operands, operandCount, il);