summaryrefslogtreecommitdiff
path: root/assemble.c
diff options
context:
space:
mode:
authorJin Kyu Song <jin.kyu.song@intel.com>2013-11-08 13:31:58 -0800
committerJin Kyu Song <jin.kyu.song@intel.com>2013-11-20 11:29:42 -0800
commitb4e1ae18e2b1cf136b345f85535ddeffb9f52869 (patch)
tree1537a58b1fe05e3431e99a951a42185571b2fe4b /assemble.c
parent3b65323d800a04570e4364f9419d518a16bb9512 (diff)
downloadnasm-b4e1ae18e2b1cf136b345f85535ddeffb9f52869.tar.gz
nasm-b4e1ae18e2b1cf136b345f85535ddeffb9f52869.tar.bz2
nasm-b4e1ae18e2b1cf136b345f85535ddeffb9f52869.zip
MPX: Move BND prefix indication from bytecode to iflags
As BND prefix validity check conflicts with jcc8 prefix, IF_BND is added for the instruction templates which can have bnd prefix for preserving the content of bound register. Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
Diffstat (limited to 'assemble.c')
-rw-r--r--assemble.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/assemble.c b/assemble.c
index d62b930..e2e24c3 100644
--- a/assemble.c
+++ b/assemble.c
@@ -162,7 +162,6 @@
* \367 - address-size prefix (0x67) used as opcode extension
* \370,\371 - match only if operand 0 meets byte jump criteria.
* 370 is used for Jcc, 371 is used for JMP.
- * \372 - BND prefix (0xF2 byte) used for preserving bnd0..3
* \373 - assemble 0x03 if bits==16, 0x05 if bits==32;
* used for conditional jump over longer jump
* \374 - this instruction takes an XMM VSIB memory EA
@@ -1124,7 +1123,8 @@ static int64_t calcsize(int32_t segment, int64_t offset, int bits,
length++;
break;
- case3(0370):
+ case 0370:
+ case 0371:
break;
case 0373:
@@ -2244,7 +2244,7 @@ static enum match_result matches(const struct itemplate *itemp,
/*
* Check if BND prefix is allowed
*/
- if ((itemp->code[0] != 0372) &&
+ if ((IF_BND & ~itemp->flags) &&
has_prefix(instruction, PPS_REP, P_BND))
return MERR_BADBND;