Initialized disp8 to avoid a case that disp8 encoded
instead of the actual offset value.
Added a checking routine for basereg value before using it
as an index of array.
Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
*/
opsizemissing = true;
}
- } else if (nasm_regvals[instruction->oprs[i].basereg] >= 16 &&
+ } else if (is_register(instruction->oprs[i].basereg) &&
+ nasm_regvals[instruction->oprs[i].basereg] >= 16 &&
!(itemp->flags & IF_AVX512)) {
return MERR_ENCMISMATCH;
}
output->type = EA_SCALAR;
output->rip = false;
+ output->disp8 = 0;
/* REX flags for the rfield operand */
output->rex |= rexflags(rfield, rflags, REX_R | REX_P | REX_W | REX_H);