When bnd prefix is dropped as jmp is encoded as jmp short,
nasm shows a warning message, which can be suppressed with a new
command line option, -w-bnd.
Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
if (is_byte && c == 0371 && ins->prefixes[PPS_REP] == P_BND) {
/* jmp short (opcode eb) cannot be used with bnd prefix. */
ins->prefixes[PPS_REP] = P_none;
+ errfunc(ERR_WARNING | ERR_WARN_BND | ERR_PASS2 ,
+ "jmp short does not init bnd regs - bnd prefix dropped.");
}
return is_byte;
{"user", "%warning directives", true},
{"lock", "lock prefix on unlockable instructions", true},
{"hle", "invalid hle prefixes", true},
+ {"bnd", "invalid bnd prefixes", true},
};
static bool want_usage;
#define ERR_WARN_USER WARN(11) /* %warning directives */
#define ERR_WARN_LOCK WARN(12) /* bad LOCK prefixes */
#define ERR_WARN_HLE WARN(13) /* bad HLE prefixes */
-#define ERR_WARN_MAX 13 /* the highest numbered one */
+#define ERR_WARN_BND WARN(14) /* bad BND prefixes */
+#define ERR_WARN_MAX 14 /* the highest numbered one */
/*
* Wrappers around malloc, realloc and free. nasm_malloc will