From 14f887fb4e44aae8bd36c19d8995a01036309fb7 Mon Sep 17 00:00:00 2001 From: Maciej Wieczor-Retman Date: Fri, 20 Feb 2026 15:14:57 +0100 Subject: [PATCH] insns.dat: Fix issue #171 - valid prefixes not allowed Instructions like IRET, POPF and PUSHF used to not have a operand size specifier but after applying macros they received the 'osm' one - meaning must be the same as the BITS mode. Which is not true for these instructions, using the operand size prefix doesn't change their encoding and their default 64-bit encoding is the 32-bit version. Align these with other similar instructions like RET, RETF and use the 'od#' keyword which returns their previous behavior. Signed-off-by: Maciej Wieczor-Retman --- x86/insns.dat | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x86/insns.dat b/x86/insns.dat index 017eba2a9..28ad0952f 100644 --- a/x86/insns.dat +++ b/x86/insns.dat @@ -356,7 +356,7 @@ SYSENTER void [ 0f 34] P6,NOAPX SYSEXIT void [ 0f 35] P6,PRIV,NOAPX SYSRET void [ 0f 07] P6,PRIV,AMD -$zwdq IRET% void [ o# cf] 8086 +$zwdq IRET% void [ od# cf] 8086 ERETS void [ f2 0f 01 ca ] FRED,PRIV,LONG ERETU void [ f3 0f 01 ca ] FRED,PRIV,LONG @@ -378,8 +378,8 @@ LAHF void [ 9f] 8086 SAHF void [ 9e] 8086 SALC void [ d6] 8086,UNDOC,NOLONG -$zwdq PUSHF% void [ nw o# 9c] 8086 -$zwdq POPF% void [ nw o# 9d] 8086 +$zwdq PUSHF% void [ nw od# 9c] 8086 +$zwdq POPF% void [ nw od# 9d] 8086 ;# String instructions $bwdq CMPS% void [ repe o# a6#] 8086,NOAPX