From 89682def9b518ae52092885a67a0612579b92679 Mon Sep 17 00:00:00 2001 From: Maciej Wieczor-Retman Date: Tue, 27 Jan 2026 22:16:14 +0100 Subject: [PATCH] disp8: Fix issue #185 - EVEX compressed shift for MOVDDUP tuple type MOVDDUP tuple type uses a compression shift for the disp8 addressing scheme. The shift depends on the vector lenght and is defined as 8 for 128 bits, 32 for 256 bits and 64 for 512 bits. Current implementation doesn't work for the 128 bit vector case since the expression used evaluates to 16 instead of 8. Fix it with a special if check before the current expression is returned. Signed-off-by: Maciej Wieczor-Retman --- include/disp8.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/disp8.h b/include/disp8.h index 00fa31858..46797adc0 100644 --- a/include/disp8.h +++ b/include/disp8.h @@ -73,6 +73,12 @@ static inline unsigned int get_disp8_shift(const insn *ins) /* MOVDDUP */ case DUP: + /* + * 128-bit vector case doesn't follow the same formula as 256- and + * 512-bit vectors. + */ + if (!vectlen) + return 3; return vectlen + 4; default: