summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJin Kyu Song <jin.kyu.song@intel.com>2013-11-21 19:40:42 -0800
committerJin Kyu Song <jin.kyu.song@intel.com>2013-11-22 11:59:14 -0800
commit305f3cee04d1adf3f4e335c5645814f2b67e8a69 (patch)
treef303bc5873de869d5a1f05212033302b55c59d63 /test
parent5f3bfee708deba146302df4bb33d081f496399c0 (diff)
downloadnasm-305f3cee04d1adf3f4e335c5645814f2b67e8a69.tar.gz
nasm-305f3cee04d1adf3f4e335c5645814f2b67e8a69.tar.bz2
nasm-305f3cee04d1adf3f4e335c5645814f2b67e8a69.zip
bnd: Drop bnd prefix for relaxed short jmp instructions
Reverted the redundant branch instruction patterns for bnd prefix. And when a relaxed jmp instruction becomes a short (Jb) form, bnd prefix is not needed because it does not initialize bnd registers. So in that case, bnd prefix is silently dropped. BND JMP foo -> drops bnd prefix BND JMP short foo -> shows an explicit error Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
Diffstat (limited to 'test')
-rw-r--r--test/mpx-64.asm5
-rw-r--r--test/mpx.asm5
2 files changed, 8 insertions, 2 deletions
diff --git a/test/mpx-64.asm b/test/mpx-64.asm
index bc5e7d4..d177622 100644
--- a/test/mpx-64.asm
+++ b/test/mpx-64.asm
@@ -111,7 +111,10 @@ BITS 64
; bnd
bnd ret
bnd call foo
- bnd jmp foo
+ bnd jmp foo ; when it becomes a Jb form - short jmp (eb),
+ ; bnd prefix is silently dropped
+ bnd jmp near 0 ; near jmp (opcode e9)
+; bnd jmp short 0 ; explicit short jmp (opcode eb) : error
bnd jno foo
foo: bnd ret
diff --git a/test/mpx.asm b/test/mpx.asm
index 24ffcc8..1fd5b1d 100644
--- a/test/mpx.asm
+++ b/test/mpx.asm
@@ -79,7 +79,10 @@ BITS 32
; bnd
bnd ret
bnd call foo
- bnd jmp foo
+ bnd jmp foo ; when it becomes a Jb form - short jmp (eb),
+ ; bnd prefix is silently dropped
+ bnd jmp near 0 ; near jmp (opcode e9)
+; bnd jmp short 0 ; explicit short jmp (opcode eb) : error
bnd jno foo
foo: bnd ret