mirror of
https://github.com/netwide-assembler/nasm
synced 2026-08-26 16:23:04 -04:00
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 <maciej.wieczor-retman@intel.com>
This commit is contained in:
parent
3f188d7222
commit
89682def9b
1 changed files with 6 additions and 0 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue