The opcode must be emitted after the REX prefix, not before. Signed-off-by: Eduard - Gabriel Munteanu <eduard.munte...@linux360.ro> --- arch/x86/emit-code.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/emit-code.c b/arch/x86/emit-code.c index 26044f3..774402c 100644 --- a/arch/x86/emit-code.c +++ b/arch/x86/emit-code.c @@ -1831,8 +1831,6 @@ static void __emit_membase(struct buffer *buf, needs_sib = (base_reg == REG_RSP); - emit(buf, opc); - if (needs_sib) rm = 0x04; else @@ -1855,6 +1853,8 @@ static void __emit_membase(struct buffer *buf, if (rex_pfx) emit(buf, rex_pfx); + emit(buf, opc); + mod_rm = encode_modrm(mod, reg_opcode, rm); emit(buf, mod_rm); -- 1.6.0.6 ------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/blackberry _______________________________________________ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel