From 305f3cee04d1adf3f4e335c5645814f2b67e8a69 Mon Sep 17 00:00:00 2001 From: Jin Kyu Song Date: Thu, 21 Nov 2013 19:40:42 -0800 Subject: 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 --- test/mpx-64.asm | 5 ++++- test/mpx.asm | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'test') 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 -- cgit v1.2.3