aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.4.3/gcc/config/i386/i386.md
diff options
context:
space:
mode:
authorDoug Kwan <dougkwan@google.com>2011-06-10 16:02:39 -0700
committerDoug Kwan <dougkwan@google.com>2011-06-10 16:02:39 -0700
commitfe2afdf3f3701489c05d2a7509752d6f0c7616f7 (patch)
tree0f879781b400d82bd939cb03642fe57298875223 /gcc-4.4.3/gcc/config/i386/i386.md
parentfac2e2f3e863f49fc8a2feb2aa9fd8cfa315219c (diff)
downloadtoolchain_gcc-fe2afdf3f3701489c05d2a7509752d6f0c7616f7.tar.gz
toolchain_gcc-fe2afdf3f3701489c05d2a7509752d6f0c7616f7.tar.bz2
toolchain_gcc-fe2afdf3f3701489c05d2a7509752d6f0c7616f7.zip
Sync internal and external version:
Changes: -x86 security patch (for ChromeOS) -Fix bug in inlining. -Fix freestanding C++ library build: http://gcc.gnu.org/viewcvs?view=revision&revision=173220 -Fix out-of-range branches in Thumb-2 mode. -Fix gcda file corruption problem. -Hanlde LDFLAGS_FOR_TARGETS in configure. This is a backport of upstrem patch r173558. -Backport upstream fix for Atom performance at r164379. Change-Id: Id5a6cfb8949cbd390a0bb3546d55d83383ee4f8c
Diffstat (limited to 'gcc-4.4.3/gcc/config/i386/i386.md')
-rw-r--r--gcc-4.4.3/gcc/config/i386/i386.md34
1 files changed, 34 insertions, 0 deletions
diff --git a/gcc-4.4.3/gcc/config/i386/i386.md b/gcc-4.4.3/gcc/config/i386/i386.md
index bbe915112..7989c31db 100644
--- a/gcc-4.4.3/gcc/config/i386/i386.md
+++ b/gcc-4.4.3/gcc/config/i386/i386.md
@@ -77,6 +77,7 @@
(UNSPEC_TLSDESC 23)
; Other random patterns
+ (UNSPEC_NOPS 29)
(UNSPEC_SCAS 30)
(UNSPEC_FNSTSW 31)
(UNSPEC_SAHF 32)
@@ -15323,6 +15324,39 @@
(set_attr "length_immediate" "0")
(set_attr "modrm" "0")])
+;; Generate nops. Operand 0 is the number of nops, up to 8.
+(define_insn "nops"
+ [(unspec [(match_operand 0 "const_int_operand" "")]
+ UNSPEC_NOPS)]
+ "reload_completed"
+{
+ switch (INTVAL (operands[0]))
+ {
+ case 1:
+ return "nop";
+ case 2:
+ return "nop; nop";
+ case 3:
+ return "nop; nop; nop";
+ case 4:
+ return "nop; nop; nop; nop";
+ case 5:
+ return "nop; nop; nop; nop; nop";
+ case 6:
+ return "nop; nop; nop; nop; nop; nop";
+ case 7:
+ return "nop; nop; nop; nop; nop; nop; nop";
+ case 8:
+ return "nop; nop; nop; nop; nop; nop; nop; nop";
+ default:
+ gcc_unreachable ();
+ break;
+ }
+}
+ [(set (attr "length") (symbol_ref "INTVAL (operands[0])"))
+ (set_attr "length_immediate" "0")
+ (set_attr "modrm" "0")])
+
;; Align to 16-byte boundary, max skip in op0. Used to avoid
;; branch prediction penalty for the third jump in a 16-byte
;; block on K8.