summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0269-PR-target-48986.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0269-PR-target-48986.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0269-PR-target-48986.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0269-PR-target-48986.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0269-PR-target-48986.patch
new file mode 100644
index 0000000000..8e20e6eea8
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0269-PR-target-48986.patch
@@ -0,0 +1,40 @@
1From 56cf6a6c3274fd4af2ccfc2ca019904d873d30fe Mon Sep 17 00:00:00 2001
2From: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
3Date: Tue, 17 May 2011 07:42:30 +0000
4Subject: [PATCH] PR target/48986
5 * config/i386/sync.md (sync_old_add<mode>): Relax operand 2
6 predicate to allow CONST_INT.
7
8git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@173817 138bc75d-0d04-0410-961f-82ee72b054a4
9
10index 22f3648..3fdfee2 100644
11--- a/gcc/config/i386/sync.md
12+++ b/gcc/config/i386/sync.md
13@@ -1,5 +1,5 @@
14 ;; GCC machine description for i386 synchronization instructions.
15-;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010
16+;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011
17 ;; Free Software Foundation, Inc.
18 ;;
19 ;; This file is part of GCC.
20@@ -164,13 +164,16 @@
21 "!TARGET_64BIT && TARGET_CMPXCHG8B && flag_pic"
22 "xchg{l}\t%%ebx, %3\;lock{%;} cmpxchg8b\t%1\;xchg{l}\t%%ebx, %3")
23
24+;; For operand 2 nonmemory_operand predicate is used instead of
25+;; register_operand to allow combiner to better optimize atomic
26+;; additions of constants.
27 (define_insn "sync_old_add<mode>"
28 [(set (match_operand:SWI 0 "register_operand" "=<r>")
29 (unspec_volatile:SWI
30 [(match_operand:SWI 1 "memory_operand" "+m")] UNSPECV_XCHG))
31 (set (match_dup 1)
32 (plus:SWI (match_dup 1)
33- (match_operand:SWI 2 "register_operand" "0")))
34+ (match_operand:SWI 2 "nonmemory_operand" "0")))
35 (clobber (reg:CC FLAGS_REG))]
36 "TARGET_XADD"
37 "lock{%;} xadd{<imodesuffix>}\t{%0, %1|%1, %0}")
38--
391.7.0.4
40