From: David Schleef Date: Fri, 14 Oct 2011 06:02:00 +0000 (-0700) Subject: x86insn: quick fix for lack of nopl support X-Git-Tag: orc-0.4.17~112 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4f813175b93ba44ba3f91cec28f8393d996ff918;p=platform%2Fupstream%2Forc.git x86insn: quick fix for lack of nopl support Geode (as well as others) don't have nopl. So don't use it for alignment. --- diff --git a/orc/orcx86insn.c b/orc/orcx86insn.c index 659ebc5..78ca30d 100644 --- a/orc/orcx86insn.c +++ b/orc/orcx86insn.c @@ -520,12 +520,21 @@ orc_uint8 nop_codes[][16] = { { 0 /* MSVC wants something here */ }, { 0x90 }, { 0x66, 0x90 }, /* xchg %ax,%ax */ +#if 0 { 0x0f, 0x1f, 0x00 }, /* nopl (%rax) */ { 0x0f, 0x1f, 0x40, 0x00 }, /* nopl 0x0(%rax) */ { 0x0f, 0x1f, 0x44, 0x00, 0x00 }, /* nopl 0x0(%rax,%rax,1) */ { 0x66, 0x0f, 0x1f, 0x44, 0x00, 0x00 }, /* nopw 0x0(%rax,%rax,1) */ { 0x0f, 0x1f, 0x80, 0x00, 0x00, 0x00, 0x00 }, /* nopl 0x0(%rax) */ { 0x0f, 0x1f, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* nopl 0x0(%rax,%rax,1) */ +#else + { 0x90, 0x90, 0x90 }, + { 0x90, 0x90, 0x90, 0x90 }, + { 0x90, 0x90, 0x90, 0x90, 0x90 }, + { 0x66, 0x0f, 0x1f, 0x44, 0x00, 0x00 }, /* nopw 0x0(%rax,%rax,1) */ + { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }, + { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }, +#endif { 0x66, 0x0f, 0x1f, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* nopw 0x0(%rax,%rax,1) */ /* Forms of nopw %cs:0x0(%rax,%rax,1) */ { 0x66, 0x2e, 0x0f, 0x1f, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00 },