diff options
author | H. Peter Anvin <hpa@zytor.com> | 2010-11-16 09:36:58 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2010-11-16 09:39:32 -0800 |
commit | 3cb0e8c052a672424eaf59a021f0dbfb6ef205b8 (patch) | |
tree | 5c826406fbab248d2bed92c94179c95e11d5b5bd /assemble.c | |
parent | 4794de2f5b1850d5b456d903bead541fee351566 (diff) | |
download | nasm-3cb0e8c052a672424eaf59a021f0dbfb6ef205b8.tar.gz |
BR 3109604: Fix C4 vs C5 VEX form selection in calcsize()
calcsize() had the wrong criterion for when C5 prefixes are permitted
(REX.R is permitted, REX.X is forbidden.) assemble() had the right
test already. This caused symbol value errors.
Diffstat (limited to 'assemble.c')
-rw-r--r-- | assemble.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1152,7 +1152,7 @@ static int64_t calcsize(int32_t segment, int64_t offset, int bits, errfunc(ERR_NONFATAL, "invalid operands in non-64-bit mode"); return -1; } - if (ins->vex_cm != 1 || (ins->rex & (REX_W|REX_R|REX_B))) + if (ins->vex_cm != 1 || (ins->rex & (REX_W|REX_X|REX_B))) length += 3; else length += 2; |