summaryrefslogtreecommitdiff
path: root/assemble.c
diff options
context:
space:
mode:
Diffstat (limited to 'assemble.c')
-rw-r--r--assemble.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/assemble.c b/assemble.c
index 4f0cd9c..313ff8a 100644
--- a/assemble.c
+++ b/assemble.c
@@ -1159,6 +1159,8 @@ static int64_t calcsize(int32_t segment, int64_t offset, int bits,
rfield = nasm_regvals[opx->basereg];
/* find the last SIMD operand where ER decorator resides */
oplast = &ins->oprs[op1 > op2 ? op1 : op2];
+ while (oplast && is_class(REG_CLASS_GPR, oplast->type))
+ oplast--;
} else {
rflags = 0;
rfield = c & 7;