keystone-engine / keystone

Keystone assembler framework: Core (Arm, Arm64, Hexagon, Mips, PowerPC, Sparc, SystemZ & X86) + bindings
http://www.keystone-engine.org
GNU General Public License v2.0
2.25k stars 450 forks source link

Support BND prefix on x86 #292

Open radare opened 7 years ago

radare commented 7 years ago
$ rasm2 -a x86.ks -b 64 "bnd jmp 0x22"
ks_asm: (bnd jmp 0x22) Invalid operand (KS_ERR_ASM_INVALIDOPERAND)
ks_asm: (bnd jmp 0x22) Invalid operand (KS_ERR_ASM_INVALIDOPERAND)
ks_asm: (bnd jmp 0x22) Invalid operand (KS_ERR_ASM_INVALIDOPERAND)
Cannot assemble 'bnd jmp 0x22' at line 3
invalid

$ rasm2 -a x86.ks -b 64 "jmp 0x22"
eb20

$ rasm2 -a x86 -b 64 -d f2eb1f
bnd jmp 0x22
koemeet commented 7 years ago

@radare Did you find a current workaround for this? I tried using KS_OPT_SYM_RESOLVER but it didnt get called when processing BND prefixed instructions.

radare commented 7 years ago

It's supported by the x86 assembler in r2

gurachan commented 3 years ago

me too have this error just now xD https://github.com/keystone-engine/keystone/issues/500