~ubuntu-branches/debian/sid/gcc-4.8/sid

« back to all changes in this revision

Viewing changes to .svn/pristine/2a/2a434909bc663e83ed1dc008a134e1e684d1eb7f.svn-base

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2014-12-19 19:48:34 UTC
  • Revision ID: package-import@ubuntu.com-20141219194834-4dz1q7rrn5pad823
Tags: 4.8.4-1
* GCC 4.8.4 release.
  - Fix PR target/61407 (darwin), PR middle-end/58624 (ice),
    PR sanitizer/64265 (wrong code).
* Require recent binutils to pass go test failures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# DP: Build libitm on AArch64, patch taken from the trunk.
 
2
--- /dev/null
 
3
+++ b/src/libitm/config/aarch64/sjlj.S
 
4
@@ -0,0 +1,93 @@
 
5
+/* Copyright (C) 2014 Free Software Foundation, Inc.
 
6
+   Contributed by Richard Henderson <rth@redhat.com>.
 
7
+
 
8
+   This file is part of the GNU Transactional Memory Library (libitm).
 
9
+
 
10
+   Libitm is free software; you can redistribute it and/or modify it
 
11
+   under the terms of the GNU General Public License as published by
 
12
+   the Free Software Foundation; either version 3 of the License, or
 
13
+   (at your option) any later version.
 
14
+
 
15
+   Libitm is distributed in the hope that it will be useful, but WITHOUT ANY
 
16
+   WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 
17
+   FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 
18
+   more details.
 
19
+
 
20
+   Under Section 7 of GPL version 3, you are granted additional
 
21
+   permissions described in the GCC Runtime Library Exception, version
 
22
+   3.1, as published by the Free Software Foundation.
 
23
+
 
24
+   You should have received a copy of the GNU General Public License and
 
25
+   a copy of the GCC Runtime Library Exception along with this program;
 
26
+   see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 
27
+   <http://www.gnu.org/licenses/>.  */
 
28
+
 
29
+#include "asmcfi.h"
 
30
+
 
31
+       .text
 
32
+       .align  2
 
33
+       .global _ITM_beginTransaction
 
34
+       .type   _ITM_beginTransaction, %function
 
35
+
 
36
+_ITM_beginTransaction:
 
37
+       cfi_startproc
 
38
+       mov     x1, sp
 
39
+       stp     x29, x30, [sp, -11*16]!
 
40
+       cfi_adjust_cfa_offset(11*16)
 
41
+       cfi_rel_offset(x29, 0)
 
42
+       cfi_rel_offset(x30, 8)
 
43
+       mov     x29, sp
 
44
+       stp     x19, x20, [sp, 1*16]
 
45
+       stp     x21, x22, [sp, 2*16]
 
46
+       stp     x23, x24, [sp, 3*16]
 
47
+       stp     x25, x26, [sp, 4*16]
 
48
+       stp     x27, x28, [sp, 5*16]
 
49
+       stp     d8, d9,   [sp, 6*16]
 
50
+       stp     d10, d11, [sp, 7*16]
 
51
+       stp     d12, d13, [sp, 8*16]
 
52
+       stp     d14, d15, [sp, 9*16]
 
53
+       str     x1, [sp, 10*16]
 
54
+
 
55
+       /* Invoke GTM_begin_transaction with the struct we just built.  */
 
56
+       mov     x1, sp
 
57
+       bl      GTM_begin_transaction
 
58
+
 
59
+       /* Return; we don't need to restore any of the call-saved regs.  */
 
60
+       ldp     x29, x30, [sp]
 
61
+       add     sp, sp, #11*16
 
62
+       cfi_adjust_cfa_offset(-11*16)
 
63
+       cfi_restore(x29)
 
64
+       cfi_restore(x30)
 
65
+       ret
 
66
+       cfi_endproc
 
67
+       .size   _ITM_beginTransaction, . - _ITM_beginTransaction
 
68
+
 
69
+       .align  2
 
70
+       .global GTM_longjmp
 
71
+       .hidden GTM_longjmp
 
72
+       .type   GTM_longjmp, %function
 
73
+
 
74
+GTM_longjmp:
 
75
+       /* The first parameter becomes the return value (x0).
 
76
+          The third parameter is ignored for now.  */
 
77
+       cfi_startproc
 
78
+       ldp     x19, x20, [x1, 1*16]
 
79
+       ldp     x21, x22, [x1, 2*16]
 
80
+       ldp     x23, x24, [x1, 3*16]
 
81
+       ldp     x25, x26, [x1, 4*16]
 
82
+       ldp     x27, x28, [x1, 5*16]
 
83
+       ldp     d8, d9,   [x1, 6*16]
 
84
+       ldp     d10, d11, [x1, 7*16]
 
85
+       ldp     d12, d13, [x1, 8*16]
 
86
+       ldp     d14, d15, [x1, 9*16]
 
87
+       ldr     x3, [x1, 10*16]
 
88
+       ldp     x29, x30, [x1]
 
89
+       cfi_def_cfa(x1, 0)
 
90
+       mov     sp, x3
 
91
+       br      x30
 
92
+       cfi_endproc
 
93
+       .size   GTM_longjmp, . - GTM_longjmp
 
94
+
 
95
+#ifdef __linux__
 
96
+.section .note.GNU-stack, "", %progbits
 
97
+#endif
 
98
--- /dev/null
 
99
+++ b/src/libitm/config/aarch64/target.h
 
100
@@ -0,0 +1,45 @@
 
101
+/* Copyright (C) 2014 Free Software Foundation, Inc.
 
102
+   Contributed by Richard Henderson <rth@redhat.com>.
 
103
+
 
104
+   This file is part of the GNU Transactional Memory Library (libitm).
 
105
+
 
106
+   Libitm is free software; you can redistribute it and/or modify it
 
107
+   under the terms of the GNU General Public License as published by
 
108
+   the Free Software Foundation; either version 3 of the License, or
 
109
+   (at your option) any later version.
 
110
+
 
111
+   Libitm is distributed in the hope that it will be useful, but WITHOUT ANY
 
112
+   WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 
113
+   FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 
114
+   more details.
 
115
+
 
116
+   Under Section 7 of GPL version 3, you are granted additional
 
117
+   permissions described in the GCC Runtime Library Exception, version
 
118
+   3.1, as published by the Free Software Foundation.
 
119
+
 
120
+   You should have received a copy of the GNU General Public License and
 
121
+   a copy of the GCC Runtime Library Exception along with this program;
 
122
+   see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 
123
+   <http://www.gnu.org/licenses/>.  */
 
124
+
 
125
+namespace GTM HIDDEN {
 
126
+
 
127
+typedef struct gtm_jmpbuf
 
128
+{
 
129
+  unsigned long long fp;       /* x29 */
 
130
+  unsigned long long pc;       /* x30 */
 
131
+  unsigned long long gr[10];   /* x19-x28 */
 
132
+  unsigned long long vr[8];    /* d8-d15 */
 
133
+  void *cfa;
 
134
+} gtm_jmpbuf;
 
135
+
 
136
+/* ??? The size of one line in hardware caches (in bytes). */
 
137
+#define HW_CACHELINE_SIZE 128
 
138
+
 
139
+static inline void
 
140
+cpu_relax (void)
 
141
+{
 
142
+  __asm volatile ("" : : : "memory");
 
143
+}
 
144
+
 
145
+} // namespace GTM
 
146
--- a/src/libitm/configure.tgt
 
147
+++ b/src/libitm/configure.tgt
 
148
@@ -46,6 +46,7 @@ fi
 
149
 # Map the target cpu to an ARCH sub-directory.  At the same time,
 
150
 # work out any special compilation flags as necessary.
 
151
 case "${target_cpu}" in
 
152
+  aarch64*)            ARCH=aarch64 ;;
 
153
   alpha*)              ARCH=alpha ;;
 
154
   rs6000 | powerpc*)
 
155
        XCFLAGS="${XCFLAGS} -mhtm"