57 lines
2.2 KiB
Diff
57 lines
2.2 KiB
Diff
|
From 574ee1ee5025d9941e44238e846f6074fbdf2e87 Mon Sep 17 00:00:00 2001
|
||
|
From: David Schleef <ds@schleef.org>
|
||
|
Date: Sat, 15 Oct 2011 11:51:17 -0700
|
||
|
Subject: [PATCH] x86insn: switch to ultra-conservative nops
|
||
|
|
||
|
---
|
||
|
orc/orcx86insn.c | 26 ++++++++++++++++++--------
|
||
|
1 files changed, 18 insertions(+), 8 deletions(-)
|
||
|
|
||
|
diff --git a/orc/orcx86insn.c b/orc/orcx86insn.c
|
||
|
index 78ca30d..33982e2 100644
|
||
|
--- a/orc/orcx86insn.c
|
||
|
+++ b/orc/orcx86insn.c
|
||
|
@@ -527,14 +527,6 @@ orc_uint8 nop_codes[][16] = {
|
||
|
{ 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 },
|
||
|
@@ -546,6 +538,24 @@ orc_uint8 nop_codes[][16] = {
|
||
|
0x00, 0x00 },
|
||
|
{ 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x2e, 0x0f, 0x1f, 0x84, 0x00, 0x00,
|
||
|
0x00, 0x00, 0x00 },
|
||
|
+#else
|
||
|
+ { 0x90, 0x90, 0x90 },
|
||
|
+ { 0x90, 0x90, 0x90, 0x90 },
|
||
|
+ { 0x90, 0x90, 0x90, 0x90, 0x90 },
|
||
|
+ { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 },
|
||
|
+ { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 },
|
||
|
+ { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 },
|
||
|
+ { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 },
|
||
|
+ { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 },
|
||
|
+ { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 },
|
||
|
+ { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 },
|
||
|
+ { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
|
||
|
+ 0x90, },
|
||
|
+ { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
|
||
|
+ 0x90, 0x90, },
|
||
|
+ { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
|
||
|
+ 0x90, 0x90, 0x90, },
|
||
|
+#endif
|
||
|
};
|
||
|
|
||
|
void
|
||
|
--
|
||
|
1.7.0.4
|
||
|
|