BR 3392363: clear the operands when making an artificial I_RESB

When we make an artificial RESB instructions (due to isolated
prefixes) we need to make sure there isn't any crap left in the
operands structure.  The easiest way to guarantee that is to force it
to zero.

Reported-by: Henrik <henrik@gramner.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
This commit is contained in:
H. Peter Anvin 2017-03-31 14:52:03 -07:00
parent c33d95fde9
commit 1980abfb7a
2 changed files with 5 additions and 0 deletions

View File

@ -550,6 +550,7 @@ restart_parse:
*/
result->opcode = I_RESB;
result->operands = 1;
nasm_zero(result->oprs);
result->oprs[0].type = IMMEDIATE;
result->oprs[0].offset = 0L;
result->oprs[0].segment = result->oprs[0].wrt = NO_SEG;

4
test/br3392363.asm Normal file
View File

@ -0,0 +1,4 @@
vaddps zmm0 {k1}, zmm0, zmm0
rep
vaddps zmm0 {k1}, zmm0, zmm0
rep movsd