[06b2d12] | 1 | Submitted By: Jim Gifford (jim at cross-lfs dot org)
|
---|
| 2 | Date: 08-25-2012
|
---|
| 3 | Initial Package Version: 4.6.3
|
---|
| 4 | Origin: Upstream
|
---|
| 5 | Upstream Status: Applied
|
---|
| 6 | Description: This is a branch update for gcc-4.6.3, and should be
|
---|
| 7 | rechecked periodically.
|
---|
| 8 |
|
---|
| 9 | This patch was made from Revision # 190659.
|
---|
| 10 |
|
---|
| 11 | diff -Naur gcc-4.6.3.orig/boehm-gc/configure gcc-4.6.3/boehm-gc/configure
|
---|
| 12 | --- gcc-4.6.3.orig/boehm-gc/configure 2012-03-01 12:03:46.000000000 +0000
|
---|
| 13 | +++ gcc-4.6.3/boehm-gc/configure 2012-03-02 18:21:41.598223000 +0000
|
---|
| 14 | @@ -15246,6 +15246,17 @@
|
---|
| 15 | fi
|
---|
| 16 | done
|
---|
| 17 |
|
---|
| 18 | +for ac_func in pthread_get_stackaddr_np
|
---|
| 19 | +do :
|
---|
| 20 | + ac_fn_c_check_func "$LINENO" "pthread_get_stackaddr_np" "ac_cv_func_pthread_get_stackaddr_np"
|
---|
| 21 | +if test "x$ac_cv_func_pthread_get_stackaddr_np" = x""yes; then :
|
---|
| 22 | + cat >>confdefs.h <<_ACEOF
|
---|
| 23 | +#define HAVE_PTHREAD_GET_STACKADDR_NP 1
|
---|
| 24 | +_ACEOF
|
---|
| 25 | +
|
---|
| 26 | +fi
|
---|
| 27 | +done
|
---|
| 28 | +
|
---|
| 29 | LIBS="$oldLIBS"
|
---|
| 30 |
|
---|
| 31 | # Configuration of machine-dependent code
|
---|
| 32 | diff -Naur gcc-4.6.3.orig/boehm-gc/configure.ac gcc-4.6.3/boehm-gc/configure.ac
|
---|
| 33 | --- gcc-4.6.3.orig/boehm-gc/configure.ac 2011-02-02 13:53:56.000000000 +0000
|
---|
| 34 | +++ gcc-4.6.3/boehm-gc/configure.ac 2012-03-02 18:21:41.598223000 +0000
|
---|
| 35 | @@ -392,6 +392,7 @@
|
---|
| 36 | oldLIBS="$LIBS"
|
---|
| 37 | LIBS="$LIBS $THREADLIBS"
|
---|
| 38 | AC_CHECK_FUNCS([pthread_getattr_np])
|
---|
| 39 | +AC_CHECK_FUNCS([pthread_get_stackaddr_np])
|
---|
| 40 | LIBS="$oldLIBS"
|
---|
| 41 |
|
---|
| 42 | # Configuration of machine-dependent code
|
---|
| 43 | diff -Naur gcc-4.6.3.orig/boehm-gc/include/gc_config.h.in gcc-4.6.3/boehm-gc/include/gc_config.h.in
|
---|
| 44 | --- gcc-4.6.3.orig/boehm-gc/include/gc_config.h.in 2009-08-22 13:22:20.000000000 +0000
|
---|
| 45 | +++ gcc-4.6.3/boehm-gc/include/gc_config.h.in 2012-03-02 18:21:41.598223000 +0000
|
---|
| 46 | @@ -87,6 +87,9 @@
|
---|
| 47 | /* Define to 1 if you have the `pthread_getattr_np' function. */
|
---|
| 48 | #undef HAVE_PTHREAD_GETATTR_NP
|
---|
| 49 |
|
---|
| 50 | +/* Define to 1 if you have the `pthread_get_stackaddr_np_np' function. */
|
---|
| 51 | +#undef HAVE_PTHREAD_GET_STACKADDR_NP
|
---|
| 52 | +
|
---|
| 53 | /* Define to 1 if you have the <stdint.h> header file. */
|
---|
| 54 | #undef HAVE_STDINT_H
|
---|
| 55 |
|
---|
| 56 | diff -Naur gcc-4.6.3.orig/boehm-gc/include/private/gcconfig.h gcc-4.6.3/boehm-gc/include/private/gcconfig.h
|
---|
| 57 | --- gcc-4.6.3.orig/boehm-gc/include/private/gcconfig.h 2010-03-21 19:34:19.000000000 +0000
|
---|
| 58 | +++ gcc-4.6.3/boehm-gc/include/private/gcconfig.h 2012-03-02 18:21:41.598223000 +0000
|
---|
| 59 | @@ -1331,7 +1331,11 @@
|
---|
| 60 | These aren't used when dyld support is enabled (it is by default) */
|
---|
| 61 | # define DATASTART ((ptr_t) get_etext())
|
---|
| 62 | # define DATAEND ((ptr_t) get_end())
|
---|
| 63 | -# define STACKBOTTOM ((ptr_t) 0xc0000000)
|
---|
| 64 | +# ifdef HAVE_PTHREAD_GET_STACKADDR_NP
|
---|
| 65 | +# define STACKBOTTOM (ptr_t)pthread_get_stackaddr_np(pthread_self())
|
---|
| 66 | +# else
|
---|
| 67 | +# define STACKBOTTOM ((ptr_t) 0xc0000000)
|
---|
| 68 | +# endif
|
---|
| 69 | # define USE_MMAP
|
---|
| 70 | # define USE_MMAP_ANON
|
---|
| 71 | # define USE_ASM_PUSH_REGS
|
---|
| 72 | @@ -2011,7 +2015,11 @@
|
---|
| 73 | These aren't used when dyld support is enabled (it is by default) */
|
---|
| 74 | # define DATASTART ((ptr_t) get_etext())
|
---|
| 75 | # define DATAEND ((ptr_t) get_end())
|
---|
| 76 | -# define STACKBOTTOM ((ptr_t) 0x7fff5fc00000)
|
---|
| 77 | +# ifdef HAVE_PTHREAD_GET_STACKADDR_NP
|
---|
| 78 | +# define STACKBOTTOM (ptr_t)pthread_get_stackaddr_np(pthread_self())
|
---|
| 79 | +# else
|
---|
| 80 | +# define STACKBOTTOM ((ptr_t) 0x7fff5fc00000)
|
---|
| 81 | +# endif
|
---|
| 82 | # define USE_MMAP
|
---|
| 83 | # define USE_MMAP_ANON
|
---|
| 84 | # ifdef GC_DARWIN_THREADS
|
---|
| 85 | diff -Naur gcc-4.6.3.orig/gcc/DATESTAMP gcc-4.6.3/gcc/DATESTAMP
|
---|
| 86 | --- gcc-4.6.3.orig/gcc/DATESTAMP 2012-03-01 00:17:53.000000000 +0000
|
---|
| 87 | +++ gcc-4.6.3/gcc/DATESTAMP 2012-08-25 00:16:37.466340000 +0000
|
---|
| 88 | @@ -1 +1 @@
|
---|
| 89 | -20120301
|
---|
| 90 | +20120825
|
---|
| 91 | diff -Naur gcc-4.6.3.orig/gcc/ada/gcc-interface/decl.c gcc-4.6.3/gcc/ada/gcc-interface/decl.c
|
---|
| 92 | --- gcc-4.6.3.orig/gcc/ada/gcc-interface/decl.c 2012-01-21 15:01:48.000000000 +0000
|
---|
| 93 | +++ gcc-4.6.3/gcc/ada/gcc-interface/decl.c 2012-05-26 10:44:06.390872000 +0000
|
---|
| 94 | @@ -120,8 +120,8 @@
|
---|
| 95 | /* The value of the qualifier. */
|
---|
| 96 | tree qual;
|
---|
| 97 |
|
---|
| 98 | - /* The record associated with this variant. */
|
---|
| 99 | - tree record;
|
---|
| 100 | + /* The type of the variant after transformation. */
|
---|
| 101 | + tree new_type;
|
---|
| 102 | } variant_desc;
|
---|
| 103 |
|
---|
| 104 | DEF_VEC_O(variant_desc);
|
---|
| 105 | @@ -3157,11 +3157,16 @@
|
---|
| 106 | {
|
---|
| 107 | tree old_variant = v->type;
|
---|
| 108 | tree new_variant = make_node (RECORD_TYPE);
|
---|
| 109 | + tree suffix
|
---|
| 110 | + = concat_name (DECL_NAME (gnu_variant_part),
|
---|
| 111 | + IDENTIFIER_POINTER
|
---|
| 112 | + (DECL_NAME (v->field)));
|
---|
| 113 | TYPE_NAME (new_variant)
|
---|
| 114 | - = DECL_NAME (TYPE_NAME (old_variant));
|
---|
| 115 | + = concat_name (TYPE_NAME (gnu_type),
|
---|
| 116 | + IDENTIFIER_POINTER (suffix));
|
---|
| 117 | copy_and_substitute_in_size (new_variant, old_variant,
|
---|
| 118 | gnu_subst_list);
|
---|
| 119 | - v->record = new_variant;
|
---|
| 120 | + v->new_type = new_variant;
|
---|
| 121 | }
|
---|
| 122 | }
|
---|
| 123 | else
|
---|
| 124 | @@ -3265,7 +3270,7 @@
|
---|
| 125 | if (selected_variant)
|
---|
| 126 | gnu_cont_type = gnu_type;
|
---|
| 127 | else
|
---|
| 128 | - gnu_cont_type = v->record;
|
---|
| 129 | + gnu_cont_type = v->new_type;
|
---|
| 130 | }
|
---|
| 131 | else
|
---|
| 132 | /* The front-end may pass us "ghost" components if
|
---|
| 133 | @@ -7704,7 +7709,7 @@
|
---|
| 134 | v->type = variant_type;
|
---|
| 135 | v->field = gnu_field;
|
---|
| 136 | v->qual = qual;
|
---|
| 137 | - v->record = NULL_TREE;
|
---|
| 138 | + v->new_type = NULL_TREE;
|
---|
| 139 |
|
---|
| 140 | /* Recurse on the variant subpart of the variant, if any. */
|
---|
| 141 | variant_subpart = get_variant_part (variant_type);
|
---|
| 142 | @@ -8457,7 +8462,9 @@
|
---|
| 143 |
|
---|
| 144 | /* First create the type of the variant part from that of the old one. */
|
---|
| 145 | new_union_type = make_node (QUAL_UNION_TYPE);
|
---|
| 146 | - TYPE_NAME (new_union_type) = DECL_NAME (TYPE_NAME (old_union_type));
|
---|
| 147 | + TYPE_NAME (new_union_type)
|
---|
| 148 | + = concat_name (TYPE_NAME (record_type),
|
---|
| 149 | + IDENTIFIER_POINTER (DECL_NAME (old_variant_part)));
|
---|
| 150 |
|
---|
| 151 | /* If the position of the variant part is constant, subtract it from the
|
---|
| 152 | size of the type of the parent to get the new size. This manual CSE
|
---|
| 153 | @@ -8491,7 +8498,7 @@
|
---|
| 154 | continue;
|
---|
| 155 |
|
---|
| 156 | /* Retrieve the list of fields already added to the new variant. */
|
---|
| 157 | - new_variant = v->record;
|
---|
| 158 | + new_variant = v->new_type;
|
---|
| 159 | field_list = TYPE_FIELDS (new_variant);
|
---|
| 160 |
|
---|
| 161 | /* If the old variant had a variant subpart, we need to create a new
|
---|
| 162 | diff -Naur gcc-4.6.3.orig/gcc/c-typeck.c gcc-4.6.3/gcc/c-typeck.c
|
---|
| 163 | --- gcc-4.6.3.orig/gcc/c-typeck.c 2011-11-04 21:49:49.000000000 +0000
|
---|
| 164 | +++ gcc-4.6.3/gcc/c-typeck.c 2012-05-21 20:12:05.729358000 +0000
|
---|
| 165 | @@ -4315,6 +4315,11 @@
|
---|
| 166 | ret = fold_build3_loc (colon_loc, COND_EXPR, result_type, ifexp, op1, op2);
|
---|
| 167 | else
|
---|
| 168 | {
|
---|
| 169 | + if (int_operands)
|
---|
| 170 | + {
|
---|
| 171 | + op1 = remove_c_maybe_const_expr (op1);
|
---|
| 172 | + op2 = remove_c_maybe_const_expr (op2);
|
---|
| 173 | + }
|
---|
| 174 | ret = build3 (COND_EXPR, result_type, ifexp, op1, op2);
|
---|
| 175 | if (int_operands)
|
---|
| 176 | ret = note_integer_operands (ret);
|
---|
| 177 | diff -Naur gcc-4.6.3.orig/gcc/cgraph.c gcc-4.6.3/gcc/cgraph.c
|
---|
| 178 | --- gcc-4.6.3.orig/gcc/cgraph.c 2011-06-06 17:16:35.000000000 +0000
|
---|
| 179 | +++ gcc-4.6.3/gcc/cgraph.c 2012-03-25 09:39:32.217767000 +0000
|
---|
| 180 | @@ -1700,19 +1700,27 @@
|
---|
| 181 | free_nodes = node;
|
---|
| 182 | }
|
---|
| 183 |
|
---|
| 184 | -/* Remove the node from cgraph. */
|
---|
| 185 | +/* Remove the node from cgraph and all inline clones inlined into it.
|
---|
| 186 | + Skip however removal of FORBIDDEN_NODE and return true if it needs to be
|
---|
| 187 | + removed. This allows to call the function from outer loop walking clone
|
---|
| 188 | + tree. */
|
---|
| 189 |
|
---|
| 190 | -void
|
---|
| 191 | -cgraph_remove_node_and_inline_clones (struct cgraph_node *node)
|
---|
| 192 | +bool
|
---|
| 193 | +cgraph_remove_node_and_inline_clones (struct cgraph_node *node, struct cgraph_node *forbidden_node)
|
---|
| 194 | {
|
---|
| 195 | struct cgraph_edge *e, *next;
|
---|
| 196 | + bool found = false;
|
---|
| 197 | +
|
---|
| 198 | + if (node == forbidden_node)
|
---|
| 199 | + return true;
|
---|
| 200 | for (e = node->callees; e; e = next)
|
---|
| 201 | {
|
---|
| 202 | next = e->next_callee;
|
---|
| 203 | if (!e->inline_failed)
|
---|
| 204 | - cgraph_remove_node_and_inline_clones (e->callee);
|
---|
| 205 | + found |= cgraph_remove_node_and_inline_clones (e->callee, forbidden_node);
|
---|
| 206 | }
|
---|
| 207 | cgraph_remove_node (node);
|
---|
| 208 | + return found;
|
---|
| 209 | }
|
---|
| 210 |
|
---|
| 211 | /* Notify finalize_compilation_unit that given node is reachable. */
|
---|
| 212 | diff -Naur gcc-4.6.3.orig/gcc/cgraph.h gcc-4.6.3/gcc/cgraph.h
|
---|
| 213 | --- gcc-4.6.3.orig/gcc/cgraph.h 2011-03-04 18:49:23.000000000 +0000
|
---|
| 214 | +++ gcc-4.6.3/gcc/cgraph.h 2012-03-25 09:39:32.217767000 +0000
|
---|
| 215 | @@ -547,7 +547,7 @@
|
---|
| 216 | void cgraph_insert_node_to_hashtable (struct cgraph_node *node);
|
---|
| 217 | void cgraph_remove_edge (struct cgraph_edge *);
|
---|
| 218 | void cgraph_remove_node (struct cgraph_node *);
|
---|
| 219 | -void cgraph_remove_node_and_inline_clones (struct cgraph_node *);
|
---|
| 220 | +bool cgraph_remove_node_and_inline_clones (struct cgraph_node *, struct cgraph_node *);
|
---|
| 221 | void cgraph_release_function_body (struct cgraph_node *);
|
---|
| 222 | void cgraph_node_remove_callees (struct cgraph_node *node);
|
---|
| 223 | struct cgraph_edge *cgraph_create_edge (struct cgraph_node *,
|
---|
| 224 | diff -Naur gcc-4.6.3.orig/gcc/cgraphunit.c gcc-4.6.3/gcc/cgraphunit.c
|
---|
| 225 | --- gcc-4.6.3.orig/gcc/cgraphunit.c 2011-03-11 13:27:26.000000000 +0000
|
---|
| 226 | +++ gcc-4.6.3/gcc/cgraphunit.c 2012-03-25 09:39:32.217767000 +0000
|
---|
| 227 | @@ -2157,8 +2157,19 @@
|
---|
| 228 | first_clone->ipa_transforms_to_apply);
|
---|
| 229 | first_clone->ipa_transforms_to_apply = NULL;
|
---|
| 230 |
|
---|
| 231 | + /* When doing recursive inlining, the clone may become unnecessary.
|
---|
| 232 | + This is possible i.e. in the case when the recursive function is proved to be
|
---|
| 233 | + non-throwing and the recursion happens only in the EH landing pad.
|
---|
| 234 | + We can not remove the clone until we are done with saving the body.
|
---|
| 235 | + Remove it now. */
|
---|
| 236 | + if (!first_clone->callers)
|
---|
| 237 | + {
|
---|
| 238 | + cgraph_remove_node_and_inline_clones (first_clone, NULL);
|
---|
| 239 | + first_clone = NULL;
|
---|
| 240 | + }
|
---|
| 241 | #ifdef ENABLE_CHECKING
|
---|
| 242 | - verify_cgraph_node (first_clone);
|
---|
| 243 | + else
|
---|
| 244 | + verify_cgraph_node (first_clone);
|
---|
| 245 | #endif
|
---|
| 246 | return first_clone;
|
---|
| 247 | }
|
---|
| 248 | diff -Naur gcc-4.6.3.orig/gcc/combine.c gcc-4.6.3/gcc/combine.c
|
---|
| 249 | --- gcc-4.6.3.orig/gcc/combine.c 2012-02-09 17:29:38.000000000 +0000
|
---|
| 250 | +++ gcc-4.6.3/gcc/combine.c 2012-03-15 10:04:12.913641000 +0000
|
---|
| 251 | @@ -1788,6 +1788,10 @@
|
---|
| 252 | if (set == 0)
|
---|
| 253 | return 0;
|
---|
| 254 |
|
---|
| 255 | + /* The simplification in expand_field_assignment may call back to
|
---|
| 256 | + get_last_value, so set safe guard here. */
|
---|
| 257 | + subst_low_luid = DF_INSN_LUID (insn);
|
---|
| 258 | +
|
---|
| 259 | set = expand_field_assignment (set);
|
---|
| 260 | src = SET_SRC (set), dest = SET_DEST (set);
|
---|
| 261 |
|
---|
| 262 | diff -Naur gcc-4.6.3.orig/gcc/config/alpha/alpha.c gcc-4.6.3/gcc/config/alpha/alpha.c
|
---|
| 263 | --- gcc-4.6.3.orig/gcc/config/alpha/alpha.c 2011-08-06 18:41:14.000000000 +0000
|
---|
| 264 | +++ gcc-4.6.3/gcc/config/alpha/alpha.c 2012-08-09 21:49:40.880473000 +0000
|
---|
| 265 | @@ -2469,7 +2469,7 @@
|
---|
| 266 | {
|
---|
| 267 | case EQ: case LE: case LT: case LEU: case LTU:
|
---|
| 268 | case UNORDERED:
|
---|
| 269 | - /* We have these compares: */
|
---|
| 270 | + /* We have these compares. */
|
---|
| 271 | cmp_code = code, branch_code = NE;
|
---|
| 272 | break;
|
---|
| 273 |
|
---|
| 274 | @@ -2706,13 +2706,15 @@
|
---|
| 275 | switch (code)
|
---|
| 276 | {
|
---|
| 277 | case EQ: case LE: case LT: case LEU: case LTU:
|
---|
| 278 | + case UNORDERED:
|
---|
| 279 | /* We have these compares. */
|
---|
| 280 | cmp_code = code, code = NE;
|
---|
| 281 | break;
|
---|
| 282 |
|
---|
| 283 | case NE:
|
---|
| 284 | - /* This must be reversed. */
|
---|
| 285 | - cmp_code = EQ, code = EQ;
|
---|
| 286 | + case ORDERED:
|
---|
| 287 | + /* These must be reversed. */
|
---|
| 288 | + cmp_code = reverse_condition (code), code = EQ;
|
---|
| 289 | break;
|
---|
| 290 |
|
---|
| 291 | case GE: case GT: case GEU: case GTU:
|
---|
| 292 | @@ -2732,6 +2734,14 @@
|
---|
| 293 | gcc_unreachable ();
|
---|
| 294 | }
|
---|
| 295 |
|
---|
| 296 | + if (cmp_mode == DImode)
|
---|
| 297 | + {
|
---|
| 298 | + if (!reg_or_0_operand (op0, DImode))
|
---|
| 299 | + op0 = force_reg (DImode, op0);
|
---|
| 300 | + if (!reg_or_8bit_operand (op1, DImode))
|
---|
| 301 | + op1 = force_reg (DImode, op1);
|
---|
| 302 | + }
|
---|
| 303 | +
|
---|
| 304 | tem = gen_reg_rtx (cmp_mode);
|
---|
| 305 | emit_insn (gen_rtx_SET (VOIDmode, tem,
|
---|
| 306 | gen_rtx_fmt_ee (cmp_code, cmp_mode,
|
---|
| 307 | @@ -2743,6 +2753,14 @@
|
---|
| 308 | local_fast_math = 1;
|
---|
| 309 | }
|
---|
| 310 |
|
---|
| 311 | + if (cmp_mode == DImode)
|
---|
| 312 | + {
|
---|
| 313 | + if (!reg_or_0_operand (op0, DImode))
|
---|
| 314 | + op0 = force_reg (DImode, op0);
|
---|
| 315 | + if (!reg_or_8bit_operand (op1, DImode))
|
---|
| 316 | + op1 = force_reg (DImode, op1);
|
---|
| 317 | + }
|
---|
| 318 | +
|
---|
| 319 | /* We may be able to use a conditional move directly.
|
---|
| 320 | This avoids emitting spurious compares. */
|
---|
| 321 | if (signed_comparison_operator (cmp, VOIDmode)
|
---|
| 322 | @@ -2761,11 +2779,13 @@
|
---|
| 323 | switch (code)
|
---|
| 324 | {
|
---|
| 325 | case EQ: case LE: case LT: case LEU: case LTU:
|
---|
| 326 | + case UNORDERED:
|
---|
| 327 | /* We have these compares: */
|
---|
| 328 | break;
|
---|
| 329 |
|
---|
| 330 | case NE:
|
---|
| 331 | - /* This must be reversed. */
|
---|
| 332 | + case ORDERED:
|
---|
| 333 | + /* These must be reversed. */
|
---|
| 334 | code = reverse_condition (code);
|
---|
| 335 | cmov_code = EQ;
|
---|
| 336 | break;
|
---|
| 337 | @@ -9628,18 +9648,19 @@
|
---|
| 338 | }
|
---|
| 339 | }
|
---|
| 340 |
|
---|
| 341 | -/* Insert an unop between a noreturn function call and GP load. */
|
---|
| 342 | +/* Insert an unop between sibcall or noreturn function call and GP load. */
|
---|
| 343 |
|
---|
| 344 | static void
|
---|
| 345 | -alpha_pad_noreturn (void)
|
---|
| 346 | +alpha_pad_function_end (void)
|
---|
| 347 | {
|
---|
| 348 | rtx insn, next;
|
---|
| 349 |
|
---|
| 350 | for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
|
---|
| 351 | {
|
---|
| 352 | - if (!CALL_P (insn)
|
---|
| 353 | - || !find_reg_note (insn, REG_NORETURN, NULL_RTX))
|
---|
| 354 | - continue;
|
---|
| 355 | + if (! (CALL_P (insn)
|
---|
| 356 | + && (SIBLING_CALL_P (insn)
|
---|
| 357 | + || find_reg_note (insn, REG_NORETURN, NULL_RTX))))
|
---|
| 358 | + continue;
|
---|
| 359 |
|
---|
| 360 | next = next_active_insn (insn);
|
---|
| 361 |
|
---|
| 362 | @@ -9660,8 +9681,28 @@
|
---|
| 363 | static void
|
---|
| 364 | alpha_reorg (void)
|
---|
| 365 | {
|
---|
| 366 | - /* Workaround for a linker error that triggers when an
|
---|
| 367 | - exception handler immediatelly follows a noreturn function.
|
---|
| 368 | + /* Workaround for a linker error that triggers when an exception
|
---|
| 369 | + handler immediatelly follows a sibcall or a noreturn function.
|
---|
| 370 | +
|
---|
| 371 | +In the sibcall case:
|
---|
| 372 | +
|
---|
| 373 | + The instruction stream from an object file:
|
---|
| 374 | +
|
---|
| 375 | + 1d8: 00 00 fb 6b jmp (t12)
|
---|
| 376 | + 1dc: 00 00 ba 27 ldah gp,0(ra)
|
---|
| 377 | + 1e0: 00 00 bd 23 lda gp,0(gp)
|
---|
| 378 | + 1e4: 00 00 7d a7 ldq t12,0(gp)
|
---|
| 379 | + 1e8: 00 40 5b 6b jsr ra,(t12),1ec <__funcZ+0x1ec>
|
---|
| 380 | +
|
---|
| 381 | + was converted in the final link pass to:
|
---|
| 382 | +
|
---|
| 383 | + 12003aa88: 67 fa ff c3 br 120039428 <...>
|
---|
| 384 | + 12003aa8c: 00 00 fe 2f unop
|
---|
| 385 | + 12003aa90: 00 00 fe 2f unop
|
---|
| 386 | + 12003aa94: 48 83 7d a7 ldq t12,-31928(gp)
|
---|
| 387 | + 12003aa98: 00 40 5b 6b jsr ra,(t12),12003aa9c <__func+0x1ec>
|
---|
| 388 | +
|
---|
| 389 | +And in the noreturn case:
|
---|
| 390 |
|
---|
| 391 | The instruction stream from an object file:
|
---|
| 392 |
|
---|
| 393 | @@ -9681,11 +9722,11 @@
|
---|
| 394 |
|
---|
| 395 | GP load instructions were wrongly cleared by the linker relaxation
|
---|
| 396 | pass. This workaround prevents removal of GP loads by inserting
|
---|
| 397 | - an unop instruction between a noreturn function call and
|
---|
| 398 | + an unop instruction between a sibcall or noreturn function call and
|
---|
| 399 | exception handler prologue. */
|
---|
| 400 |
|
---|
| 401 | if (current_function_has_exception_handlers ())
|
---|
| 402 | - alpha_pad_noreturn ();
|
---|
| 403 | + alpha_pad_function_end ();
|
---|
| 404 |
|
---|
| 405 | if (alpha_tp != ALPHA_TP_PROG || flag_exceptions)
|
---|
| 406 | alpha_handle_trap_shadows ();
|
---|
| 407 | diff -Naur gcc-4.6.3.orig/gcc/config/alpha/linux-unwind.h gcc-4.6.3/gcc/config/alpha/linux-unwind.h
|
---|
| 408 | --- gcc-4.6.3.orig/gcc/config/alpha/linux-unwind.h 2011-12-21 12:22:48.000000000 +0000
|
---|
| 409 | +++ gcc-4.6.3/gcc/config/alpha/linux-unwind.h 2012-04-20 08:08:13.688436000 +0000
|
---|
| 410 | @@ -1,5 +1,5 @@
|
---|
| 411 | /* DWARF2 EH unwinding support for Alpha Linux.
|
---|
| 412 | - Copyright (C) 2004, 2005, 2009, 2011 Free Software Foundation, Inc.
|
---|
| 413 | + Copyright (C) 2004, 2005, 2009, 2011, 2012 Free Software Foundation, Inc.
|
---|
| 414 |
|
---|
| 415 | This file is part of GCC.
|
---|
| 416 |
|
---|
| 417 | @@ -49,7 +49,7 @@
|
---|
| 418 | else if (pc[1] == 0x201f015f) /* lda $0,NR_rt_sigreturn */
|
---|
| 419 | {
|
---|
| 420 | struct rt_sigframe {
|
---|
| 421 | - struct siginfo info;
|
---|
| 422 | + siginfo_t info;
|
---|
| 423 | struct ucontext uc;
|
---|
| 424 | } *rt_ = context->cfa;
|
---|
| 425 | sc = &rt_->uc.uc_mcontext;
|
---|
| 426 | diff -Naur gcc-4.6.3.orig/gcc/config/arm/arm.c gcc-4.6.3/gcc/config/arm/arm.c
|
---|
| 427 | --- gcc-4.6.3.orig/gcc/config/arm/arm.c 2012-02-14 06:57:17.000000000 +0000
|
---|
| 428 | +++ gcc-4.6.3/gcc/config/arm/arm.c 2012-08-10 13:26:44.694722000 +0000
|
---|
| 429 | @@ -243,6 +243,7 @@
|
---|
| 430 | static bool fa726te_sched_adjust_cost (rtx, rtx, rtx, int *);
|
---|
| 431 | static enum machine_mode arm_preferred_simd_mode (enum machine_mode);
|
---|
| 432 | static bool arm_class_likely_spilled_p (reg_class_t);
|
---|
| 433 | +static HOST_WIDE_INT arm_vector_alignment (const_tree type);
|
---|
| 434 | static bool arm_vector_alignment_reachable (const_tree type, bool is_packed);
|
---|
| 435 | static bool arm_builtin_support_vector_misalignment (enum machine_mode mode,
|
---|
| 436 | const_tree type,
|
---|
| 437 | @@ -579,6 +580,9 @@
|
---|
| 438 | #undef TARGET_CLASS_LIKELY_SPILLED_P
|
---|
| 439 | #define TARGET_CLASS_LIKELY_SPILLED_P arm_class_likely_spilled_p
|
---|
| 440 |
|
---|
| 441 | +#undef TARGET_VECTOR_ALIGNMENT
|
---|
| 442 | +#define TARGET_VECTOR_ALIGNMENT arm_vector_alignment
|
---|
| 443 | +
|
---|
| 444 | #undef TARGET_VECTORIZE_VECTOR_ALIGNMENT_REACHABLE
|
---|
| 445 | #define TARGET_VECTORIZE_VECTOR_ALIGNMENT_REACHABLE \
|
---|
| 446 | arm_vector_alignment_reachable
|
---|
| 447 | @@ -2005,7 +2009,8 @@
|
---|
| 448 | global_options_set.x_param_values);
|
---|
| 449 |
|
---|
| 450 | /* ARM EABI defaults to strict volatile bitfields. */
|
---|
| 451 | - if (TARGET_AAPCS_BASED && flag_strict_volatile_bitfields < 0)
|
---|
| 452 | + if (TARGET_AAPCS_BASED && flag_strict_volatile_bitfields < 0
|
---|
| 453 | + && abi_version_at_least(2))
|
---|
| 454 | flag_strict_volatile_bitfields = 1;
|
---|
| 455 |
|
---|
| 456 | /* Enable sw prefetching at -O3 for CPUS that have prefetch, and we have deemed
|
---|
| 457 | @@ -4692,6 +4697,18 @@
|
---|
| 458 | return gen_rtx_REG (mode, pcum->nregs);
|
---|
| 459 | }
|
---|
| 460 |
|
---|
| 461 | +/* The AAPCS sets the maximum alignment of a vector to 64 bits. */
|
---|
| 462 | +static HOST_WIDE_INT
|
---|
| 463 | +arm_vector_alignment (const_tree type)
|
---|
| 464 | +{
|
---|
| 465 | + HOST_WIDE_INT align = tree_low_cst (TYPE_SIZE (type), 0);
|
---|
| 466 | +
|
---|
| 467 | + if (TARGET_AAPCS_BASED)
|
---|
| 468 | + align = MIN (align, 64);
|
---|
| 469 | +
|
---|
| 470 | + return align;
|
---|
| 471 | +}
|
---|
| 472 | +
|
---|
| 473 | static unsigned int
|
---|
| 474 | arm_function_arg_boundary (enum machine_mode mode, const_tree type)
|
---|
| 475 | {
|
---|
| 476 | @@ -23422,8 +23439,11 @@
|
---|
| 477 | }
|
---|
| 478 | }
|
---|
| 479 |
|
---|
| 480 | - arm_process_output_memory_barrier (emit, NULL);
|
---|
| 481 | + /* Note: label is before barrier so that in cmp failure case we still get
|
---|
| 482 | + a barrier to stop subsequent loads floating upwards past the ldrex
|
---|
| 483 | + PR target/48126. */
|
---|
| 484 | arm_output_asm_insn (emit, 1, operands, "%sLSYB%%=:", LOCAL_LABEL_PREFIX);
|
---|
| 485 | + arm_process_output_memory_barrier (emit, NULL);
|
---|
| 486 | }
|
---|
| 487 |
|
---|
| 488 | static rtx
|
---|
| 489 | diff -Naur gcc-4.6.3.orig/gcc/config/arm/arm.h gcc-4.6.3/gcc/config/arm/arm.h
|
---|
| 490 | --- gcc-4.6.3.orig/gcc/config/arm/arm.h 2011-07-14 21:26:01.000000000 +0000
|
---|
| 491 | +++ gcc-4.6.3/gcc/config/arm/arm.h 2012-06-19 12:30:17.615240000 +0000
|
---|
| 492 | @@ -294,7 +294,8 @@
|
---|
| 493 | #define TARGET_HAVE_DMB (arm_arch7)
|
---|
| 494 |
|
---|
| 495 | /* Nonzero if this chip implements a memory barrier via CP15. */
|
---|
| 496 | -#define TARGET_HAVE_DMB_MCR (arm_arch6k && ! TARGET_HAVE_DMB)
|
---|
| 497 | +#define TARGET_HAVE_DMB_MCR (arm_arch6 && ! TARGET_HAVE_DMB \
|
---|
| 498 | + && ! TARGET_THUMB1)
|
---|
| 499 |
|
---|
| 500 | /* Nonzero if this chip implements a memory barrier instruction. */
|
---|
| 501 | #define TARGET_HAVE_MEMORY_BARRIER (TARGET_HAVE_DMB || TARGET_HAVE_DMB_MCR)
|
---|
| 502 | diff -Naur gcc-4.6.3.orig/gcc/config/avr/avr-stdint.h gcc-4.6.3/gcc/config/avr/avr-stdint.h
|
---|
| 503 | --- gcc-4.6.3.orig/gcc/config/avr/avr-stdint.h 1970-01-01 00:00:00.000000000 +0000
|
---|
| 504 | +++ gcc-4.6.3/gcc/config/avr/avr-stdint.h 2012-06-04 09:53:04.873173000 +0000
|
---|
| 505 | @@ -0,0 +1,66 @@
|
---|
| 506 | +/* Definitions for <stdint.h> types on systems using newlib.
|
---|
| 507 | + Copyright (C) 2012 Free Software Foundation, Inc.
|
---|
| 508 | +
|
---|
| 509 | +This file is part of GCC.
|
---|
| 510 | +
|
---|
| 511 | +GCC is free software; you can redistribute it and/or modify
|
---|
| 512 | +it under the terms of the GNU General Public License as published by
|
---|
| 513 | +the Free Software Foundation; either version 3, or (at your option)
|
---|
| 514 | +any later version.
|
---|
| 515 | +
|
---|
| 516 | +GCC is distributed in the hope that it will be useful,
|
---|
| 517 | +but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 518 | +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 519 | +GNU General Public License for more details.
|
---|
| 520 | +
|
---|
| 521 | +You should have received a copy of the GNU General Public License
|
---|
| 522 | +along with GCC; see the file COPYING3. If not see
|
---|
| 523 | +<http://www.gnu.org/licenses/>. */
|
---|
| 524 | +
|
---|
| 525 | +/*
|
---|
| 526 | + The intention of this file is to supply definitions that work with
|
---|
| 527 | + avr-gcc's -mint8 that sets int to an 8-bit type.
|
---|
| 528 | +
|
---|
| 529 | + This file is intended to yield the same results as newlib-stdint.h,
|
---|
| 530 | + but there are some differences to newlib-stdint.h:
|
---|
| 531 | +
|
---|
| 532 | + - AVR is an 8-bit architecture that cannot access 16-bit values
|
---|
| 533 | + atomically, this SIG_ATOMIC_TYPE is "char".
|
---|
| 534 | +
|
---|
| 535 | + - For the same reason, [u]int_fast8_t is defined as 8-bit type.
|
---|
| 536 | +
|
---|
| 537 | +*/
|
---|
| 538 | +
|
---|
| 539 | +#define SIG_ATOMIC_TYPE "char"
|
---|
| 540 | +
|
---|
| 541 | +#define INT8_TYPE "signed char"
|
---|
| 542 | +#define INT16_TYPE (INT_TYPE_SIZE == 16 ? "short int" : "long int")
|
---|
| 543 | +#define INT32_TYPE (INT_TYPE_SIZE == 16 ? "long int" : "long long int")
|
---|
| 544 | +#define INT64_TYPE (INT_TYPE_SIZE == 16 ? "long long int" : 0)
|
---|
| 545 | +#define UINT8_TYPE "unsigned char"
|
---|
| 546 | +#define UINT16_TYPE (INT_TYPE_SIZE == 16 ? "short unsigned int" : "long unsigned int")
|
---|
| 547 | +#define UINT32_TYPE (INT_TYPE_SIZE == 16 ? "long unsigned int" : "long long unsigned int")
|
---|
| 548 | +#define UINT64_TYPE (INT_TYPE_SIZE == 16 ? "long long unsigned int" : 0)
|
---|
| 549 | +
|
---|
| 550 | +#define INT_LEAST8_TYPE INT8_TYPE
|
---|
| 551 | +#define INT_LEAST16_TYPE INT16_TYPE
|
---|
| 552 | +#define INT_LEAST32_TYPE INT32_TYPE
|
---|
| 553 | +#define INT_LEAST64_TYPE INT64_TYPE
|
---|
| 554 | +#define UINT_LEAST8_TYPE UINT8_TYPE
|
---|
| 555 | +#define UINT_LEAST16_TYPE UINT16_TYPE
|
---|
| 556 | +#define UINT_LEAST32_TYPE UINT32_TYPE
|
---|
| 557 | +#define UINT_LEAST64_TYPE UINT64_TYPE
|
---|
| 558 | +
|
---|
| 559 | +#define INT_FAST8_TYPE INT8_TYPE
|
---|
| 560 | +#define INT_FAST16_TYPE (INT_TYPE_SIZE == 16 ? "int" : INT16_TYPE)
|
---|
| 561 | +#define INT_FAST32_TYPE INT32_TYPE
|
---|
| 562 | +#define INT_FAST64_TYPE INT64_TYPE
|
---|
| 563 | +#define UINT_FAST8_TYPE UINT8_TYPE
|
---|
| 564 | +#define UINT_FAST16_TYPE (INT_TYPE_SIZE == 16 ? "unsigned int" : UINT16_TYPE)
|
---|
| 565 | +#define UINT_FAST32_TYPE UINT32_TYPE
|
---|
| 566 | +#define UINT_FAST64_TYPE UINT64_TYPE
|
---|
| 567 | +
|
---|
| 568 | +#define INTPTR_TYPE PTRDIFF_TYPE
|
---|
| 569 | +#ifndef UINTPTR_TYPE
|
---|
| 570 | +#define UINTPTR_TYPE SIZE_TYPE
|
---|
| 571 | +#endif
|
---|
| 572 | diff -Naur gcc-4.6.3.orig/gcc/config/avr/avr.c gcc-4.6.3/gcc/config/avr/avr.c
|
---|
| 573 | --- gcc-4.6.3.orig/gcc/config/avr/avr.c 2012-01-12 17:23:32.000000000 +0000
|
---|
| 574 | +++ gcc-4.6.3/gcc/config/avr/avr.c 2012-03-28 10:06:51.859458000 +0000
|
---|
| 575 | @@ -1879,12 +1879,9 @@
|
---|
| 576 | }
|
---|
| 577 | else if (test_hard_reg_class (STACK_REG, src))
|
---|
| 578 | {
|
---|
| 579 | - *l = 2;
|
---|
| 580 | - return AVR_HAVE_8BIT_SP
|
---|
| 581 | - ? (AS2 (in,%A0,__SP_L__) CR_TAB
|
---|
| 582 | - AS1 (clr,%B0))
|
---|
| 583 | - : (AS2 (in,%A0,__SP_L__) CR_TAB
|
---|
| 584 | - AS2 (in,%B0,__SP_H__));
|
---|
| 585 | + *l = 2;
|
---|
| 586 | + return (AS2 (in,%A0,__SP_L__) CR_TAB
|
---|
| 587 | + AS2 (in,%B0,__SP_H__));
|
---|
| 588 | }
|
---|
| 589 |
|
---|
| 590 | if (AVR_HAVE_MOVW)
|
---|
| 591 | @@ -5177,10 +5174,9 @@
|
---|
| 592 |
|
---|
| 593 | default_file_start ();
|
---|
| 594 |
|
---|
| 595 | - fputs ("__SREG__ = 0x3f\n", asm_out_file);
|
---|
| 596 | - if (!AVR_HAVE_8BIT_SP)
|
---|
| 597 | - fputs ("__SP_H__ = 0x3e\n", asm_out_file);
|
---|
| 598 | - fputs ("__SP_L__ = 0x3d\n", asm_out_file);
|
---|
| 599 | + fputs ("__SREG__ = 0x3f\n"
|
---|
| 600 | + "__SP_H__ = 0x3e\n"
|
---|
| 601 | + "__SP_L__ = 0x3d\n", asm_out_file);
|
---|
| 602 |
|
---|
| 603 | fputs ("__tmp_reg__ = 0\n"
|
---|
| 604 | "__zero_reg__ = 1\n", asm_out_file);
|
---|
| 605 | diff -Naur gcc-4.6.3.orig/gcc/config/avr/avr.md gcc-4.6.3/gcc/config/avr/avr.md
|
---|
| 606 | --- gcc-4.6.3.orig/gcc/config/avr/avr.md 2011-12-02 19:14:15.000000000 +0000
|
---|
| 607 | +++ gcc-4.6.3/gcc/config/avr/avr.md 2012-03-28 10:06:51.859458000 +0000
|
---|
| 608 | @@ -299,7 +299,7 @@
|
---|
| 609 | [(set (match_operand:HI 0 "stack_register_operand" "=q")
|
---|
| 610 | (unspec_volatile:HI [(match_operand:HI 1 "register_operand" "r")]
|
---|
| 611 | UNSPECV_WRITE_SP_IRQ_OFF))]
|
---|
| 612 | - "!AVR_HAVE_8BIT_SP"
|
---|
| 613 | + ""
|
---|
| 614 | "out __SP_H__, %B1
|
---|
| 615 | out __SP_L__, %A1"
|
---|
| 616 | [(set_attr "length" "2")
|
---|
| 617 | @@ -309,7 +309,7 @@
|
---|
| 618 | [(set (match_operand:HI 0 "stack_register_operand" "=q")
|
---|
| 619 | (unspec_volatile:HI [(match_operand:HI 1 "register_operand" "r")]
|
---|
| 620 | UNSPECV_WRITE_SP_IRQ_ON))]
|
---|
| 621 | - "!AVR_HAVE_8BIT_SP"
|
---|
| 622 | + ""
|
---|
| 623 | "cli
|
---|
| 624 | out __SP_H__, %B1
|
---|
| 625 | sei
|
---|
| 626 | diff -Naur gcc-4.6.3.orig/gcc/config/avr/libgcc.S gcc-4.6.3/gcc/config/avr/libgcc.S
|
---|
| 627 | --- gcc-4.6.3.orig/gcc/config/avr/libgcc.S 2011-12-02 19:14:15.000000000 +0000
|
---|
| 628 | +++ gcc-4.6.3/gcc/config/avr/libgcc.S 2012-03-28 10:06:51.859458000 +0000
|
---|
| 629 | @@ -582,15 +582,6 @@
|
---|
| 630 | push r17
|
---|
| 631 | push r28
|
---|
| 632 | push r29
|
---|
| 633 | -#if defined (__AVR_HAVE_8BIT_SP__)
|
---|
| 634 | -;; FIXME: __AVR_HAVE_8BIT_SP__ is set on device level, not on core level
|
---|
| 635 | -;; so this lines are dead code. To make it work, devices without
|
---|
| 636 | -;; SP_H must get their own multilib(s), see PR51345.
|
---|
| 637 | - in r28,__SP_L__
|
---|
| 638 | - sub r28,r26
|
---|
| 639 | - clr r29
|
---|
| 640 | - out __SP_L__,r28
|
---|
| 641 | -#else
|
---|
| 642 | in r28,__SP_L__
|
---|
| 643 | in r29,__SP_H__
|
---|
| 644 | sub r28,r26
|
---|
| 645 | @@ -600,7 +591,6 @@
|
---|
| 646 | out __SP_H__,r29
|
---|
| 647 | out __SREG__,__tmp_reg__
|
---|
| 648 | out __SP_L__,r28
|
---|
| 649 | -#endif
|
---|
| 650 | #if defined (__AVR_HAVE_EIJMP_EICALL__)
|
---|
| 651 | eijmp
|
---|
| 652 | #else
|
---|
| 653 | @@ -635,15 +625,6 @@
|
---|
| 654 | ldd r16,Y+4
|
---|
| 655 | ldd r17,Y+3
|
---|
| 656 | ldd r26,Y+2
|
---|
| 657 | -#if defined (__AVR_HAVE_8BIT_SP__)
|
---|
| 658 | -;; FIXME: __AVR_HAVE_8BIT_SP__ is set on device level, not on core level
|
---|
| 659 | -;; so this lines are dead code. To make it work, devices without
|
---|
| 660 | -;; SP_H must get their own multilib(s).
|
---|
| 661 | - ldd r29,Y+1
|
---|
| 662 | - add r28,r30
|
---|
| 663 | - out __SP_L__,r28
|
---|
| 664 | - mov r28, r26
|
---|
| 665 | -#else
|
---|
| 666 | ldd r27,Y+1
|
---|
| 667 | add r28,r30
|
---|
| 668 | adc r29,__zero_reg__
|
---|
| 669 | @@ -654,7 +635,6 @@
|
---|
| 670 | out __SP_L__,r28
|
---|
| 671 | mov_l r28, r26
|
---|
| 672 | mov_h r29, r27
|
---|
| 673 | -#endif
|
---|
| 674 | ret
|
---|
| 675 | .endfunc
|
---|
| 676 | #endif /* defined (L_epilogue) */
|
---|
| 677 | diff -Naur gcc-4.6.3.orig/gcc/config/bfin/linux-unwind.h gcc-4.6.3/gcc/config/bfin/linux-unwind.h
|
---|
| 678 | --- gcc-4.6.3.orig/gcc/config/bfin/linux-unwind.h 2009-04-09 15:00:19.000000000 +0000
|
---|
| 679 | +++ gcc-4.6.3/gcc/config/bfin/linux-unwind.h 2012-04-20 08:08:13.688436000 +0000
|
---|
| 680 | @@ -1,5 +1,5 @@
|
---|
| 681 | /* DWARF2 EH unwinding support for Blackfin.
|
---|
| 682 | - Copyright (C) 2007, 2009 Free Software Foundation, Inc.
|
---|
| 683 | + Copyright (C) 2007, 2009, 2012 Free Software Foundation, Inc.
|
---|
| 684 |
|
---|
| 685 | This file is part of GCC.
|
---|
| 686 |
|
---|
| 687 | @@ -48,10 +48,10 @@
|
---|
| 688 | {
|
---|
| 689 | struct rt_sigframe {
|
---|
| 690 | int sig;
|
---|
| 691 | - struct siginfo *pinfo;
|
---|
| 692 | + siginfo_t *pinfo;
|
---|
| 693 | void *puc;
|
---|
| 694 | char retcode[8];
|
---|
| 695 | - struct siginfo info;
|
---|
| 696 | + siginfo_t info;
|
---|
| 697 | struct ucontext uc;
|
---|
| 698 | } *rt_ = context->cfa;
|
---|
| 699 |
|
---|
| 700 | diff -Naur gcc-4.6.3.orig/gcc/config/h8300/h8300.c gcc-4.6.3/gcc/config/h8300/h8300.c
|
---|
| 701 | --- gcc-4.6.3.orig/gcc/config/h8300/h8300.c 2010-12-01 13:46:36.000000000 +0000
|
---|
| 702 | +++ gcc-4.6.3/gcc/config/h8300/h8300.c 2012-03-29 02:15:29.973365000 +0000
|
---|
| 703 | @@ -416,7 +416,7 @@
|
---|
| 704 | }
|
---|
| 705 |
|
---|
| 706 | /* This target defaults to strict volatile bitfields. */
|
---|
| 707 | - if (flag_strict_volatile_bitfields < 0)
|
---|
| 708 | + if (flag_strict_volatile_bitfields < 0 && abi_version_at_least(2))
|
---|
| 709 | flag_strict_volatile_bitfields = 1;
|
---|
| 710 | }
|
---|
| 711 |
|
---|
| 712 | diff -Naur gcc-4.6.3.orig/gcc/config/host-linux.c gcc-4.6.3/gcc/config/host-linux.c
|
---|
| 713 | --- gcc-4.6.3.orig/gcc/config/host-linux.c 2010-11-29 14:09:41.000000000 +0000
|
---|
| 714 | +++ gcc-4.6.3/gcc/config/host-linux.c 2012-03-23 02:19:46.206744000 +0000
|
---|
| 715 | @@ -84,6 +84,8 @@
|
---|
| 716 | # define TRY_EMPTY_VM_SPACE 0x60000000
|
---|
| 717 | #elif defined(__mc68000__)
|
---|
| 718 | # define TRY_EMPTY_VM_SPACE 0x40000000
|
---|
| 719 | +#elif defined(__ARM_EABI__)
|
---|
| 720 | +# define TRY_EMPTY_VM_SPACE 0x60000000
|
---|
| 721 | #else
|
---|
| 722 | # define TRY_EMPTY_VM_SPACE 0
|
---|
| 723 | #endif
|
---|
| 724 | diff -Naur gcc-4.6.3.orig/gcc/config/i386/driver-i386.c gcc-4.6.3/gcc/config/i386/driver-i386.c
|
---|
| 725 | --- gcc-4.6.3.orig/gcc/config/i386/driver-i386.c 2012-01-19 20:15:29.000000000 +0000
|
---|
| 726 | +++ gcc-4.6.3/gcc/config/i386/driver-i386.c 2012-05-20 23:19:40.928753000 +0000
|
---|
| 727 | @@ -397,6 +397,7 @@
|
---|
| 728 | unsigned int has_pclmul = 0, has_abm = 0, has_lwp = 0;
|
---|
| 729 | unsigned int has_fma = 0, has_fma4 = 0, has_xop = 0;
|
---|
| 730 | unsigned int has_bmi = 0, has_tbm = 0;
|
---|
| 731 | + unsigned int has_rdrnd = 0, has_f16c = 0, has_fsgsbase = 0;
|
---|
| 732 |
|
---|
| 733 | bool arch;
|
---|
| 734 |
|
---|
| 735 | @@ -444,6 +445,8 @@
|
---|
| 736 | has_aes = ecx & bit_AES;
|
---|
| 737 | has_pclmul = ecx & bit_PCLMUL;
|
---|
| 738 | has_fma = ecx & bit_FMA;
|
---|
| 739 | + has_f16c = ecx & bit_F16C;
|
---|
| 740 | + has_rdrnd = ecx & bit_RDRND;
|
---|
| 741 |
|
---|
| 742 | has_cmpxchg8b = edx & bit_CMPXCHG8B;
|
---|
| 743 | has_cmov = edx & bit_CMOV;
|
---|
| 744 | @@ -451,6 +454,13 @@
|
---|
| 745 | has_sse = edx & bit_SSE;
|
---|
| 746 | has_sse2 = edx & bit_SSE2;
|
---|
| 747 |
|
---|
| 748 | + if (max_level >= 7)
|
---|
| 749 | + {
|
---|
| 750 | + __cpuid_count (7, 0, eax, ebx, ecx, edx);
|
---|
| 751 | +
|
---|
| 752 | + has_fsgsbase = ebx & bit_FSGSBASE;
|
---|
| 753 | + }
|
---|
| 754 | +
|
---|
| 755 | /* Check cpuid level of extended features. */
|
---|
| 756 | __cpuid (0x80000000, ext_level, ebx, ecx, edx);
|
---|
| 757 |
|
---|
| 758 | @@ -711,10 +721,13 @@
|
---|
| 759 | const char *avx = has_avx ? " -mavx" : " -mno-avx";
|
---|
| 760 | const char *sse4_2 = has_sse4_2 ? " -msse4.2" : " -mno-sse4.2";
|
---|
| 761 | const char *sse4_1 = has_sse4_1 ? " -msse4.1" : " -mno-sse4.1";
|
---|
| 762 | + const char *rdrnd = has_rdrnd ? " -mrdrnd" : " -mno-rdrnd";
|
---|
| 763 | + const char *f16c = has_f16c ? " -mf16c" : " -mno-f16c";
|
---|
| 764 | + const char *fsgsbase = has_fsgsbase ? " -mfsgsbase" : " -mno-fsgsbase";
|
---|
| 765 |
|
---|
| 766 | options = concat (options, cx16, sahf, movbe, ase, pclmul,
|
---|
| 767 | popcnt, abm, lwp, fma, fma4, xop, bmi, tbm,
|
---|
| 768 | - avx, sse4_2, sse4_1, NULL);
|
---|
| 769 | + avx, sse4_2, sse4_1, rdrnd, f16c, fsgsbase, NULL);
|
---|
| 770 | }
|
---|
| 771 |
|
---|
| 772 | done:
|
---|
| 773 | diff -Naur gcc-4.6.3.orig/gcc/config/i386/i386-protos.h gcc-4.6.3/gcc/config/i386/i386-protos.h
|
---|
| 774 | --- gcc-4.6.3.orig/gcc/config/i386/i386-protos.h 2011-01-13 20:01:57.000000000 +0000
|
---|
| 775 | +++ gcc-4.6.3/gcc/config/i386/i386-protos.h 2012-03-29 19:19:26.420040000 +0000
|
---|
| 776 | @@ -59,7 +59,8 @@
|
---|
| 777 | extern bool constant_address_p (rtx);
|
---|
| 778 | extern bool legitimate_pic_operand_p (rtx);
|
---|
| 779 | extern bool legitimate_pic_address_disp_p (rtx);
|
---|
| 780 | -
|
---|
| 781 | +extern bool ix86_legitimize_reload_address (rtx, enum machine_mode,
|
---|
| 782 | + int, int, int);
|
---|
| 783 | extern void print_reg (rtx, int, FILE*);
|
---|
| 784 | extern void ix86_print_operand (FILE *, rtx, int);
|
---|
| 785 |
|
---|
| 786 | diff -Naur gcc-4.6.3.orig/gcc/config/i386/i386.c gcc-4.6.3/gcc/config/i386/i386.c
|
---|
| 787 | --- gcc-4.6.3.orig/gcc/config/i386/i386.c 2012-02-22 19:17:42.000000000 +0000
|
---|
| 788 | +++ gcc-4.6.3/gcc/config/i386/i386.c 2012-05-22 09:20:15.992160000 +0000
|
---|
| 789 | @@ -46,6 +46,7 @@
|
---|
| 790 | #include "target.h"
|
---|
| 791 | #include "target-def.h"
|
---|
| 792 | #include "langhooks.h"
|
---|
| 793 | +#include "reload.h"
|
---|
| 794 | #include "cgraph.h"
|
---|
| 795 | #include "gimple.h"
|
---|
| 796 | #include "dwarf2.h"
|
---|
| 797 | @@ -2094,7 +2095,7 @@
|
---|
| 798 | /* Feature tests against the various architecture variations, used to create
|
---|
| 799 | ix86_arch_features based on the processor mask. */
|
---|
| 800 | static unsigned int initial_ix86_arch_features[X86_ARCH_LAST] = {
|
---|
| 801 | - /* X86_ARCH_CMOVE: Conditional move was added for pentiumpro. */
|
---|
| 802 | + /* X86_ARCH_CMOV: Conditional move was added for pentiumpro. */
|
---|
| 803 | ~(m_386 | m_486 | m_PENT | m_K6),
|
---|
| 804 |
|
---|
| 805 | /* X86_ARCH_CMPXCHG: Compare and exchange was added for 80486. */
|
---|
| 806 | @@ -3811,7 +3812,7 @@
|
---|
| 807 | -mtune (rather than -march) points us to a processor that has them.
|
---|
| 808 | However, the VIA C3 gives a SIGILL, so we only do that for i686 and
|
---|
| 809 | higher processors. */
|
---|
| 810 | - if (TARGET_CMOVE
|
---|
| 811 | + if (TARGET_CMOV
|
---|
| 812 | && (processor_alias_table[i].flags & (PTA_PREFETCH_SSE | PTA_SSE)))
|
---|
| 813 | x86_prefetch_sse = true;
|
---|
| 814 | break;
|
---|
| 815 | @@ -4181,12 +4182,6 @@
|
---|
| 816 | target_flags |= MASK_ACCUMULATE_OUTGOING_ARGS;
|
---|
| 817 | }
|
---|
| 818 |
|
---|
| 819 | - /* For sane SSE instruction set generation we need fcomi instruction.
|
---|
| 820 | - It is safe to enable all CMOVE instructions. Also, RDRAND intrinsic
|
---|
| 821 | - expands to a sequence that includes conditional move. */
|
---|
| 822 | - if (TARGET_SSE || TARGET_RDRND)
|
---|
| 823 | - TARGET_CMOVE = 1;
|
---|
| 824 | -
|
---|
| 825 | /* Figure out what ASM_GENERATE_INTERNAL_LABEL builds as a prefix. */
|
---|
| 826 | {
|
---|
| 827 | char *p;
|
---|
| 828 | @@ -12168,6 +12163,64 @@
|
---|
| 829 | return false;
|
---|
| 830 | }
|
---|
| 831 |
|
---|
| 832 | +/* Our implementation of LEGITIMIZE_RELOAD_ADDRESS. Returns a value to
|
---|
| 833 | + replace the input X, or the original X if no replacement is called for.
|
---|
| 834 | + The output parameter *WIN is 1 if the calling macro should goto WIN,
|
---|
| 835 | + 0 if it should not. */
|
---|
| 836 | +
|
---|
| 837 | +bool
|
---|
| 838 | +ix86_legitimize_reload_address (rtx x,
|
---|
| 839 | + enum machine_mode mode ATTRIBUTE_UNUSED,
|
---|
| 840 | + int opnum, int type,
|
---|
| 841 | + int ind_levels ATTRIBUTE_UNUSED)
|
---|
| 842 | +{
|
---|
| 843 | + /* Reload can generate:
|
---|
| 844 | +
|
---|
| 845 | + (plus:DI (plus:DI (unspec:DI [(const_int 0 [0])] UNSPEC_TP)
|
---|
| 846 | + (reg:DI 97))
|
---|
| 847 | + (reg:DI 2 cx))
|
---|
| 848 | +
|
---|
| 849 | + This RTX is rejected from ix86_legitimate_address_p due to
|
---|
| 850 | + non-strictness of base register 97. Following this rejection,
|
---|
| 851 | + reload pushes all three components into separate registers,
|
---|
| 852 | + creating invalid memory address RTX.
|
---|
| 853 | +
|
---|
| 854 | + Following code reloads only the invalid part of the
|
---|
| 855 | + memory address RTX. */
|
---|
| 856 | +
|
---|
| 857 | + if (GET_CODE (x) == PLUS
|
---|
| 858 | + && REG_P (XEXP (x, 1))
|
---|
| 859 | + && GET_CODE (XEXP (x, 0)) == PLUS
|
---|
| 860 | + && REG_P (XEXP (XEXP (x, 0), 1)))
|
---|
| 861 | + {
|
---|
| 862 | + rtx base, index;
|
---|
| 863 | + bool something_reloaded = false;
|
---|
| 864 | +
|
---|
| 865 | + base = XEXP (XEXP (x, 0), 1);
|
---|
| 866 | + if (!REG_OK_FOR_BASE_STRICT_P (base))
|
---|
| 867 | + {
|
---|
| 868 | + push_reload (base, NULL_RTX, &XEXP (XEXP (x, 0), 1), NULL,
|
---|
| 869 | + BASE_REG_CLASS, GET_MODE (x), VOIDmode, 0, 0,
|
---|
| 870 | + opnum, (enum reload_type)type);
|
---|
| 871 | + something_reloaded = true;
|
---|
| 872 | + }
|
---|
| 873 | +
|
---|
| 874 | + index = XEXP (x, 1);
|
---|
| 875 | + if (!REG_OK_FOR_INDEX_STRICT_P (index))
|
---|
| 876 | + {
|
---|
| 877 | + push_reload (index, NULL_RTX, &XEXP (x, 1), NULL,
|
---|
| 878 | + INDEX_REG_CLASS, GET_MODE (x), VOIDmode, 0, 0,
|
---|
| 879 | + opnum, (enum reload_type)type);
|
---|
| 880 | + something_reloaded = true;
|
---|
| 881 | + }
|
---|
| 882 | +
|
---|
| 883 | + gcc_assert (something_reloaded);
|
---|
| 884 | + return true;
|
---|
| 885 | + }
|
---|
| 886 | +
|
---|
| 887 | + return false;
|
---|
| 888 | +}
|
---|
| 889 | +
|
---|
| 890 | /* Recognizes RTL expressions that are valid memory addresses for an
|
---|
| 891 | instruction. The MODE argument is the machine mode for the MEM
|
---|
| 892 | expression that wants to use this address.
|
---|
| 893 | @@ -27177,8 +27230,8 @@
|
---|
| 894 | arg_adjust = 0;
|
---|
| 895 | if (optimize
|
---|
| 896 | || target == 0
|
---|
| 897 | - || GET_MODE (target) != tmode
|
---|
| 898 | - || !insn_p->operand[0].predicate (target, tmode))
|
---|
| 899 | + || !register_operand (target, tmode)
|
---|
| 900 | + || GET_MODE (target) != tmode)
|
---|
| 901 | target = gen_reg_rtx (tmode);
|
---|
| 902 | }
|
---|
| 903 |
|
---|
| 904 | @@ -31377,9 +31430,9 @@
|
---|
| 905 | tmp = gen_reg_rtx (GET_MODE_INNER (mode));
|
---|
| 906 | ix86_expand_vector_extract (true, tmp, target, 1 - elt);
|
---|
| 907 | if (elt == 0)
|
---|
| 908 | - tmp = gen_rtx_VEC_CONCAT (mode, tmp, val);
|
---|
| 909 | - else
|
---|
| 910 | tmp = gen_rtx_VEC_CONCAT (mode, val, tmp);
|
---|
| 911 | + else
|
---|
| 912 | + tmp = gen_rtx_VEC_CONCAT (mode, tmp, val);
|
---|
| 913 | emit_insn (gen_rtx_SET (VOIDmode, target, tmp));
|
---|
| 914 | return;
|
---|
| 915 | }
|
---|
| 916 | @@ -31393,9 +31446,9 @@
|
---|
| 917 | tmp = gen_reg_rtx (GET_MODE_INNER (mode));
|
---|
| 918 | ix86_expand_vector_extract (false, tmp, target, 1 - elt);
|
---|
| 919 | if (elt == 0)
|
---|
| 920 | - tmp = gen_rtx_VEC_CONCAT (mode, tmp, val);
|
---|
| 921 | - else
|
---|
| 922 | tmp = gen_rtx_VEC_CONCAT (mode, val, tmp);
|
---|
| 923 | + else
|
---|
| 924 | + tmp = gen_rtx_VEC_CONCAT (mode, tmp, val);
|
---|
| 925 | emit_insn (gen_rtx_SET (VOIDmode, target, tmp));
|
---|
| 926 | return;
|
---|
| 927 |
|
---|
| 928 | @@ -32823,7 +32876,8 @@
|
---|
| 929 | return ix86_cost->cond_not_taken_branch_cost;
|
---|
| 930 |
|
---|
| 931 | case vec_perm:
|
---|
| 932 | - return 1;
|
---|
| 933 | + case vec_promote_demote:
|
---|
| 934 | + return ix86_cost->vec_stmt_cost;
|
---|
| 935 |
|
---|
| 936 | default:
|
---|
| 937 | gcc_unreachable ();
|
---|
| 938 | diff -Naur gcc-4.6.3.orig/gcc/config/i386/i386.h gcc-4.6.3/gcc/config/i386/i386.h
|
---|
| 939 | --- gcc-4.6.3.orig/gcc/config/i386/i386.h 2011-06-29 20:15:32.000000000 +0000
|
---|
| 940 | +++ gcc-4.6.3/gcc/config/i386/i386.h 2012-05-04 17:48:56.810029000 +0000
|
---|
| 941 | @@ -424,7 +424,7 @@
|
---|
| 942 |
|
---|
| 943 | /* Feature tests against the various architecture variations. */
|
---|
| 944 | enum ix86_arch_indices {
|
---|
| 945 | - X86_ARCH_CMOVE, /* || TARGET_SSE */
|
---|
| 946 | + X86_ARCH_CMOV,
|
---|
| 947 | X86_ARCH_CMPXCHG,
|
---|
| 948 | X86_ARCH_CMPXCHG8B,
|
---|
| 949 | X86_ARCH_XADD,
|
---|
| 950 | @@ -435,12 +435,17 @@
|
---|
| 951 |
|
---|
| 952 | extern unsigned char ix86_arch_features[X86_ARCH_LAST];
|
---|
| 953 |
|
---|
| 954 | -#define TARGET_CMOVE ix86_arch_features[X86_ARCH_CMOVE]
|
---|
| 955 | +#define TARGET_CMOV ix86_arch_features[X86_ARCH_CMOV]
|
---|
| 956 | #define TARGET_CMPXCHG ix86_arch_features[X86_ARCH_CMPXCHG]
|
---|
| 957 | #define TARGET_CMPXCHG8B ix86_arch_features[X86_ARCH_CMPXCHG8B]
|
---|
| 958 | #define TARGET_XADD ix86_arch_features[X86_ARCH_XADD]
|
---|
| 959 | #define TARGET_BSWAP ix86_arch_features[X86_ARCH_BSWAP]
|
---|
| 960 |
|
---|
| 961 | +/* For sane SSE instruction set generation we need fcomi instruction.
|
---|
| 962 | + It is safe to enable all CMOVE instructions. Also, RDRAND intrinsic
|
---|
| 963 | + expands to a sequence that includes conditional move. */
|
---|
| 964 | +#define TARGET_CMOVE (TARGET_CMOV || TARGET_SSE || TARGET_RDRND)
|
---|
| 965 | +
|
---|
| 966 | #define TARGET_FISTTP (TARGET_SSE3 && TARGET_80387)
|
---|
| 967 |
|
---|
| 968 | extern int x86_prefetch_sse;
|
---|
| 969 | @@ -1668,6 +1673,17 @@
|
---|
| 970 |
|
---|
| 971 | #define LEGITIMATE_CONSTANT_P(X) legitimate_constant_p (X)
|
---|
| 972 |
|
---|
| 973 | +/* Try a machine-dependent way of reloading an illegitimate address
|
---|
| 974 | + operand. If we find one, push the reload and jump to WIN. This
|
---|
| 975 | + macro is used in only one place: `find_reloads_address' in reload.c. */
|
---|
| 976 | +
|
---|
| 977 | +#define LEGITIMIZE_RELOAD_ADDRESS(X, MODE, OPNUM, TYPE, INDL, WIN) \
|
---|
| 978 | +do { \
|
---|
| 979 | + if (ix86_legitimize_reload_address ((X), (MODE), (OPNUM), \
|
---|
| 980 | + (int)(TYPE), (INDL))) \
|
---|
| 981 | + goto WIN; \
|
---|
| 982 | +} while (0)
|
---|
| 983 | +
|
---|
| 984 | /* If defined, a C expression to determine the base term of address X.
|
---|
| 985 | This macro is used in only one place: `find_base_term' in alias.c.
|
---|
| 986 |
|
---|
| 987 | diff -Naur gcc-4.6.3.orig/gcc/config/i386/i386.md gcc-4.6.3/gcc/config/i386/i386.md
|
---|
| 988 | --- gcc-4.6.3.orig/gcc/config/i386/i386.md 2012-01-12 10:33:42.000000000 +0000
|
---|
| 989 | +++ gcc-4.6.3/gcc/config/i386/i386.md 2012-05-21 12:59:53.696085000 +0000
|
---|
| 990 | @@ -233,9 +233,6 @@
|
---|
| 991 |
|
---|
| 992 | ;; For BMI support
|
---|
| 993 | UNSPEC_BEXTR
|
---|
| 994 | -
|
---|
| 995 | - ;; For RDRAND support
|
---|
| 996 | - UNSPEC_RDRAND
|
---|
| 997 | ])
|
---|
| 998 |
|
---|
| 999 | (define_c_enum "unspecv" [
|
---|
| 1000 | @@ -270,6 +267,9 @@
|
---|
| 1001 | UNSPECV_WRFSBASE
|
---|
| 1002 | UNSPECV_WRGSBASE
|
---|
| 1003 | UNSPECV_SPLIT_STACK_RETURN
|
---|
| 1004 | +
|
---|
| 1005 | + ;; For RDRAND support
|
---|
| 1006 | + UNSPECV_RDRAND
|
---|
| 1007 | ])
|
---|
| 1008 |
|
---|
| 1009 | ;; Constants to represent pcomtrue/pcomfalse variants
|
---|
| 1010 | @@ -16349,7 +16349,8 @@
|
---|
| 1011 | (define_insn "*x86_mov<mode>cc_0_m1_neg"
|
---|
| 1012 | [(set (match_operand:SWI48 0 "register_operand" "=r")
|
---|
| 1013 | (neg:SWI48 (match_operator 1 "ix86_carry_flag_operator"
|
---|
| 1014 | - [(reg FLAGS_REG) (const_int 0)])))]
|
---|
| 1015 | + [(reg FLAGS_REG) (const_int 0)])))
|
---|
| 1016 | + (clobber (reg:CC FLAGS_REG))]
|
---|
| 1017 | ""
|
---|
| 1018 | "sbb{<imodesuffix>}\t%0, %0"
|
---|
| 1019 | [(set_attr "type" "alu")
|
---|
| 1020 | @@ -18357,9 +18358,9 @@
|
---|
| 1021 |
|
---|
| 1022 | (define_insn "rdrand<mode>_1"
|
---|
| 1023 | [(set (match_operand:SWI248 0 "register_operand" "=r")
|
---|
| 1024 | - (unspec:SWI248 [(const_int 0)] UNSPEC_RDRAND))
|
---|
| 1025 | + (unspec_volatile:SWI248 [(const_int 0)] UNSPECV_RDRAND))
|
---|
| 1026 | (set (reg:CCC FLAGS_REG)
|
---|
| 1027 | - (unspec:CCC [(const_int 0)] UNSPEC_RDRAND))]
|
---|
| 1028 | + (unspec_volatile:CCC [(const_int 0)] UNSPECV_RDRAND))]
|
---|
| 1029 | "TARGET_RDRND"
|
---|
| 1030 | "rdrand\t%0"
|
---|
| 1031 | [(set_attr "type" "other")
|
---|
| 1032 | diff -Naur gcc-4.6.3.orig/gcc/config/i386/linux-unwind.h gcc-4.6.3/gcc/config/i386/linux-unwind.h
|
---|
| 1033 | --- gcc-4.6.3.orig/gcc/config/i386/linux-unwind.h 2011-01-03 20:52:22.000000000 +0000
|
---|
| 1034 | +++ gcc-4.6.3/gcc/config/i386/linux-unwind.h 2012-04-20 08:08:13.688436000 +0000
|
---|
| 1035 | @@ -1,5 +1,6 @@
|
---|
| 1036 | /* DWARF2 EH unwinding support for AMD x86-64 and x86.
|
---|
| 1037 | - Copyright (C) 2004, 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
|
---|
| 1038 | + Copyright (C) 2004, 2005, 2006, 2009, 2010, 2012 Free Software Foundation,
|
---|
| 1039 | + Inc.
|
---|
| 1040 |
|
---|
| 1041 | This file is part of GCC.
|
---|
| 1042 |
|
---|
| 1043 | @@ -133,9 +134,9 @@
|
---|
| 1044 | {
|
---|
| 1045 | struct rt_sigframe {
|
---|
| 1046 | int sig;
|
---|
| 1047 | - struct siginfo *pinfo;
|
---|
| 1048 | + siginfo_t *pinfo;
|
---|
| 1049 | void *puc;
|
---|
| 1050 | - struct siginfo info;
|
---|
| 1051 | + siginfo_t info;
|
---|
| 1052 | struct ucontext uc;
|
---|
| 1053 | } *rt_ = context->cfa;
|
---|
| 1054 | /* The void * cast is necessary to avoid an aliasing warning.
|
---|
| 1055 | diff -Naur gcc-4.6.3.orig/gcc/config/i386/sse.md gcc-4.6.3/gcc/config/i386/sse.md
|
---|
| 1056 | --- gcc-4.6.3.orig/gcc/config/i386/sse.md 2011-10-27 21:55:22.000000000 +0000
|
---|
| 1057 | +++ gcc-4.6.3/gcc/config/i386/sse.md 2012-06-17 14:09:00.121097000 +0000
|
---|
| 1058 | @@ -392,18 +392,7 @@
|
---|
| 1059 | DONE;
|
---|
| 1060 | })
|
---|
| 1061 |
|
---|
| 1062 | -(define_expand "avx_movu<ssemodesuffix><avxmodesuffix>"
|
---|
| 1063 | - [(set (match_operand:AVXMODEF2P 0 "nonimmediate_operand" "")
|
---|
| 1064 | - (unspec:AVXMODEF2P
|
---|
| 1065 | - [(match_operand:AVXMODEF2P 1 "nonimmediate_operand" "")]
|
---|
| 1066 | - UNSPEC_MOVU))]
|
---|
| 1067 | - "AVX_VEC_FLOAT_MODE_P (<MODE>mode)"
|
---|
| 1068 | -{
|
---|
| 1069 | - if (MEM_P (operands[0]) && MEM_P (operands[1]))
|
---|
| 1070 | - operands[1] = force_reg (<MODE>mode, operands[1]);
|
---|
| 1071 | -})
|
---|
| 1072 | -
|
---|
| 1073 | -(define_insn "*avx_movu<ssemodesuffix><avxmodesuffix>"
|
---|
| 1074 | +(define_insn "avx_movu<ssemodesuffix><avxmodesuffix>"
|
---|
| 1075 | [(set (match_operand:AVXMODEF2P 0 "nonimmediate_operand" "=x,m")
|
---|
| 1076 | (unspec:AVXMODEF2P
|
---|
| 1077 | [(match_operand:AVXMODEF2P 1 "nonimmediate_operand" "xm,x")]
|
---|
| 1078 | @@ -429,18 +418,7 @@
|
---|
| 1079 | (set_attr "prefix" "maybe_vex")
|
---|
| 1080 | (set_attr "mode" "TI")])
|
---|
| 1081 |
|
---|
| 1082 | -(define_expand "<sse>_movu<ssemodesuffix>"
|
---|
| 1083 | - [(set (match_operand:SSEMODEF2P 0 "nonimmediate_operand" "")
|
---|
| 1084 | - (unspec:SSEMODEF2P
|
---|
| 1085 | - [(match_operand:SSEMODEF2P 1 "nonimmediate_operand" "")]
|
---|
| 1086 | - UNSPEC_MOVU))]
|
---|
| 1087 | - "SSE_VEC_FLOAT_MODE_P (<MODE>mode)"
|
---|
| 1088 | -{
|
---|
| 1089 | - if (MEM_P (operands[0]) && MEM_P (operands[1]))
|
---|
| 1090 | - operands[1] = force_reg (<MODE>mode, operands[1]);
|
---|
| 1091 | -})
|
---|
| 1092 | -
|
---|
| 1093 | -(define_insn "*<sse>_movu<ssemodesuffix>"
|
---|
| 1094 | +(define_insn "<sse>_movu<ssemodesuffix>"
|
---|
| 1095 | [(set (match_operand:SSEMODEF2P 0 "nonimmediate_operand" "=x,m")
|
---|
| 1096 | (unspec:SSEMODEF2P
|
---|
| 1097 | [(match_operand:SSEMODEF2P 1 "nonimmediate_operand" "xm,x")]
|
---|
| 1098 | @@ -452,18 +430,7 @@
|
---|
| 1099 | (set_attr "movu" "1")
|
---|
| 1100 | (set_attr "mode" "<MODE>")])
|
---|
| 1101 |
|
---|
| 1102 | -(define_expand "avx_movdqu<avxmodesuffix>"
|
---|
| 1103 | - [(set (match_operand:AVXMODEQI 0 "nonimmediate_operand" "")
|
---|
| 1104 | - (unspec:AVXMODEQI
|
---|
| 1105 | - [(match_operand:AVXMODEQI 1 "nonimmediate_operand" "")]
|
---|
| 1106 | - UNSPEC_MOVU))]
|
---|
| 1107 | - "TARGET_AVX"
|
---|
| 1108 | -{
|
---|
| 1109 | - if (MEM_P (operands[0]) && MEM_P (operands[1]))
|
---|
| 1110 | - operands[1] = force_reg (<MODE>mode, operands[1]);
|
---|
| 1111 | -})
|
---|
| 1112 | -
|
---|
| 1113 | -(define_insn "*avx_movdqu<avxmodesuffix>"
|
---|
| 1114 | +(define_insn "avx_movdqu<avxmodesuffix>"
|
---|
| 1115 | [(set (match_operand:AVXMODEQI 0 "nonimmediate_operand" "=x,m")
|
---|
| 1116 | (unspec:AVXMODEQI
|
---|
| 1117 | [(match_operand:AVXMODEQI 1 "nonimmediate_operand" "xm,x")]
|
---|
| 1118 | @@ -475,17 +442,7 @@
|
---|
| 1119 | (set_attr "prefix" "vex")
|
---|
| 1120 | (set_attr "mode" "<avxvecmode>")])
|
---|
| 1121 |
|
---|
| 1122 | -(define_expand "sse2_movdqu"
|
---|
| 1123 | - [(set (match_operand:V16QI 0 "nonimmediate_operand" "")
|
---|
| 1124 | - (unspec:V16QI [(match_operand:V16QI 1 "nonimmediate_operand" "")]
|
---|
| 1125 | - UNSPEC_MOVU))]
|
---|
| 1126 | - "TARGET_SSE2"
|
---|
| 1127 | -{
|
---|
| 1128 | - if (MEM_P (operands[0]) && MEM_P (operands[1]))
|
---|
| 1129 | - operands[1] = force_reg (V16QImode, operands[1]);
|
---|
| 1130 | -})
|
---|
| 1131 | -
|
---|
| 1132 | -(define_insn "*sse2_movdqu"
|
---|
| 1133 | +(define_insn "sse2_movdqu"
|
---|
| 1134 | [(set (match_operand:V16QI 0 "nonimmediate_operand" "=x,m")
|
---|
| 1135 | (unspec:V16QI [(match_operand:V16QI 1 "nonimmediate_operand" "xm,x")]
|
---|
| 1136 | UNSPEC_MOVU))]
|
---|
| 1137 | @@ -1324,14 +1281,14 @@
|
---|
| 1138 | (parallel [(const_int 0)]))
|
---|
| 1139 | (vec_select:DF (match_dup 1) (parallel [(const_int 1)])))
|
---|
| 1140 | (plusminus:DF
|
---|
| 1141 | - (vec_select:DF (match_dup 1) (parallel [(const_int 2)]))
|
---|
| 1142 | - (vec_select:DF (match_dup 1) (parallel [(const_int 3)]))))
|
---|
| 1143 | - (vec_concat:V2DF
|
---|
| 1144 | - (plusminus:DF
|
---|
| 1145 | (vec_select:DF
|
---|
| 1146 | (match_operand:V4DF 2 "nonimmediate_operand" "xm")
|
---|
| 1147 | (parallel [(const_int 0)]))
|
---|
| 1148 | - (vec_select:DF (match_dup 2) (parallel [(const_int 1)])))
|
---|
| 1149 | + (vec_select:DF (match_dup 2) (parallel [(const_int 1)]))))
|
---|
| 1150 | + (vec_concat:V2DF
|
---|
| 1151 | + (plusminus:DF
|
---|
| 1152 | + (vec_select:DF (match_dup 1) (parallel [(const_int 2)]))
|
---|
| 1153 | + (vec_select:DF (match_dup 1) (parallel [(const_int 3)])))
|
---|
| 1154 | (plusminus:DF
|
---|
| 1155 | (vec_select:DF (match_dup 2) (parallel [(const_int 2)]))
|
---|
| 1156 | (vec_select:DF (match_dup 2) (parallel [(const_int 3)]))))))]
|
---|
| 1157 | @@ -5058,7 +5015,7 @@
|
---|
| 1158 | (vec_select:DF (match_dup 0) (parallel [(const_int 1)]))))]
|
---|
| 1159 | "TARGET_SSE2 && reload_completed"
|
---|
| 1160 | [(set (match_dup 0) (match_dup 1))]
|
---|
| 1161 | - "operands[0] = adjust_address (operands[0], DFmode, 8);")
|
---|
| 1162 | + "operands[0] = adjust_address (operands[0], DFmode, 0);")
|
---|
| 1163 |
|
---|
| 1164 | ;; Not sure these two are ever used, but it doesn't hurt to have
|
---|
| 1165 | ;; them. -aoliva
|
---|
| 1166 | @@ -12095,7 +12052,7 @@
|
---|
| 1167 | (unspec:V8SF [(match_operand:V8HI 1 "register_operand" "x")]
|
---|
| 1168 | UNSPEC_VCVTPH2PS)
|
---|
| 1169 | (parallel [(const_int 0) (const_int 1)
|
---|
| 1170 | - (const_int 1) (const_int 2)])))]
|
---|
| 1171 | + (const_int 2) (const_int 3)])))]
|
---|
| 1172 | "TARGET_F16C"
|
---|
| 1173 | "vcvtph2ps\t{%1, %0|%0, %1}"
|
---|
| 1174 | [(set_attr "type" "ssecvt")
|
---|
| 1175 | diff -Naur gcc-4.6.3.orig/gcc/config/ia64/linux-unwind.h gcc-4.6.3/gcc/config/ia64/linux-unwind.h
|
---|
| 1176 | --- gcc-4.6.3.orig/gcc/config/ia64/linux-unwind.h 2009-08-14 20:49:40.000000000 +0000
|
---|
| 1177 | +++ gcc-4.6.3/gcc/config/ia64/linux-unwind.h 2012-04-20 08:08:13.688436000 +0000
|
---|
| 1178 | @@ -1,5 +1,5 @@
|
---|
| 1179 | /* DWARF2 EH unwinding support for IA64 Linux.
|
---|
| 1180 | - Copyright (C) 2004, 2005, 2009 Free Software Foundation, Inc.
|
---|
| 1181 | + Copyright (C) 2004, 2005, 2009, 2012 Free Software Foundation, Inc.
|
---|
| 1182 |
|
---|
| 1183 | This file is part of GCC.
|
---|
| 1184 |
|
---|
| 1185 | @@ -47,7 +47,7 @@
|
---|
| 1186 | struct sigframe {
|
---|
| 1187 | char scratch[16];
|
---|
| 1188 | unsigned long sig_number;
|
---|
| 1189 | - struct siginfo *info;
|
---|
| 1190 | + siginfo_t *info;
|
---|
| 1191 | struct sigcontext *sc;
|
---|
| 1192 | } *frame_ = (struct sigframe *)context->psp;
|
---|
| 1193 | struct sigcontext *sc = frame_->sc;
|
---|
| 1194 | @@ -137,7 +137,7 @@
|
---|
| 1195 | struct sigframe {
|
---|
| 1196 | char scratch[16];
|
---|
| 1197 | unsigned long sig_number;
|
---|
| 1198 | - struct siginfo *info;
|
---|
| 1199 | + siginfo_t *info;
|
---|
| 1200 | struct sigcontext *sc;
|
---|
| 1201 | } *frame = (struct sigframe *)context->psp;
|
---|
| 1202 | struct sigcontext *sc = frame->sc;
|
---|
| 1203 | diff -Naur gcc-4.6.3.orig/gcc/config/m32c/m32c.c gcc-4.6.3/gcc/config/m32c/m32c.c
|
---|
| 1204 | --- gcc-4.6.3.orig/gcc/config/m32c/m32c.c 2011-02-10 19:41:26.000000000 +0000
|
---|
| 1205 | +++ gcc-4.6.3/gcc/config/m32c/m32c.c 2012-03-29 02:15:29.973365000 +0000
|
---|
| 1206 | @@ -447,7 +447,7 @@
|
---|
| 1207 | flag_ivopts = 0;
|
---|
| 1208 |
|
---|
| 1209 | /* This target defaults to strict volatile bitfields. */
|
---|
| 1210 | - if (flag_strict_volatile_bitfields < 0)
|
---|
| 1211 | + if (flag_strict_volatile_bitfields < 0 && abi_version_at_least(2))
|
---|
| 1212 | flag_strict_volatile_bitfields = 1;
|
---|
| 1213 |
|
---|
| 1214 | /* r8c/m16c have no 16-bit indirect call, so thunks are involved.
|
---|
| 1215 | diff -Naur gcc-4.6.3.orig/gcc/config/mips/linux-unwind.h gcc-4.6.3/gcc/config/mips/linux-unwind.h
|
---|
| 1216 | --- gcc-4.6.3.orig/gcc/config/mips/linux-unwind.h 2009-04-09 15:00:19.000000000 +0000
|
---|
| 1217 | +++ gcc-4.6.3/gcc/config/mips/linux-unwind.h 2012-04-20 08:08:13.688436000 +0000
|
---|
| 1218 | @@ -1,5 +1,6 @@
|
---|
| 1219 | /* DWARF2 EH unwinding support for MIPS Linux.
|
---|
| 1220 | - Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
---|
| 1221 | + Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2012 Free Software
|
---|
| 1222 | + Foundation, Inc.
|
---|
| 1223 |
|
---|
| 1224 | This file is part of GCC.
|
---|
| 1225 |
|
---|
| 1226 | @@ -75,7 +76,7 @@
|
---|
| 1227 | struct rt_sigframe {
|
---|
| 1228 | u_int32_t ass[4]; /* Argument save space for o32. */
|
---|
| 1229 | u_int32_t trampoline[2];
|
---|
| 1230 | - struct siginfo info;
|
---|
| 1231 | + siginfo_t info;
|
---|
| 1232 | _sig_ucontext_t uc;
|
---|
| 1233 | } *rt_ = context->cfa;
|
---|
| 1234 | sc = &rt_->uc.uc_mcontext;
|
---|
| 1235 | diff -Naur gcc-4.6.3.orig/gcc/config/mn10300/mn10300.c gcc-4.6.3/gcc/config/mn10300/mn10300.c
|
---|
| 1236 | --- gcc-4.6.3.orig/gcc/config/mn10300/mn10300.c 2011-02-15 17:09:39.000000000 +0000
|
---|
| 1237 | +++ gcc-4.6.3/gcc/config/mn10300/mn10300.c 2012-07-06 10:09:28.333336000 +0000
|
---|
| 1238 | @@ -2505,12 +2505,15 @@
|
---|
| 1239 | may access it using GOTOFF instead of GOT. */
|
---|
| 1240 |
|
---|
| 1241 | static void
|
---|
| 1242 | -mn10300_encode_section_info (tree decl, rtx rtl, int first ATTRIBUTE_UNUSED)
|
---|
| 1243 | +mn10300_encode_section_info (tree decl, rtx rtl, int first)
|
---|
| 1244 | {
|
---|
| 1245 | rtx symbol;
|
---|
| 1246 |
|
---|
| 1247 | + default_encode_section_info (decl, rtl, first);
|
---|
| 1248 | +
|
---|
| 1249 | if (! MEM_P (rtl))
|
---|
| 1250 | return;
|
---|
| 1251 | +
|
---|
| 1252 | symbol = XEXP (rtl, 0);
|
---|
| 1253 | if (GET_CODE (symbol) != SYMBOL_REF)
|
---|
| 1254 | return;
|
---|
| 1255 | diff -Naur gcc-4.6.3.orig/gcc/config/pa/linux-unwind.h gcc-4.6.3/gcc/config/pa/linux-unwind.h
|
---|
| 1256 | --- gcc-4.6.3.orig/gcc/config/pa/linux-unwind.h 2009-12-05 17:45:59.000000000 +0000
|
---|
| 1257 | +++ gcc-4.6.3/gcc/config/pa/linux-unwind.h 2012-04-20 08:08:13.688436000 +0000
|
---|
| 1258 | @@ -1,5 +1,5 @@
|
---|
| 1259 | /* DWARF2 EH unwinding support for PA Linux.
|
---|
| 1260 | - Copyright (C) 2004, 2005, 2009 Free Software Foundation, Inc.
|
---|
| 1261 | + Copyright (C) 2004, 2005, 2009, 2012 Free Software Foundation, Inc.
|
---|
| 1262 |
|
---|
| 1263 | This file is part of GCC.
|
---|
| 1264 |
|
---|
| 1265 | @@ -63,7 +63,7 @@
|
---|
| 1266 | int i;
|
---|
| 1267 | struct sigcontext *sc;
|
---|
| 1268 | struct rt_sigframe {
|
---|
| 1269 | - struct siginfo info;
|
---|
| 1270 | + siginfo_t info;
|
---|
| 1271 | struct ucontext uc;
|
---|
| 1272 | } *frame;
|
---|
| 1273 |
|
---|
| 1274 | diff -Naur gcc-4.6.3.orig/gcc/config/pa/pa-protos.h gcc-4.6.3/gcc/config/pa/pa-protos.h
|
---|
| 1275 | --- gcc-4.6.3.orig/gcc/config/pa/pa-protos.h 2011-10-29 21:40:55.000000000 +0000
|
---|
| 1276 | +++ gcc-4.6.3/gcc/config/pa/pa-protos.h 2012-03-12 17:08:20.095334000 +0000
|
---|
| 1277 | @@ -136,6 +136,7 @@
|
---|
| 1278 | extern int cint_ok_for_move (HOST_WIDE_INT);
|
---|
| 1279 | extern void hppa_expand_prologue (void);
|
---|
| 1280 | extern void hppa_expand_epilogue (void);
|
---|
| 1281 | +extern bool pa_can_use_return_insn (void);
|
---|
| 1282 | extern int ior_mask_p (unsigned HOST_WIDE_INT);
|
---|
| 1283 | extern void compute_zdepdi_operands (unsigned HOST_WIDE_INT,
|
---|
| 1284 | unsigned *);
|
---|
| 1285 | diff -Naur gcc-4.6.3.orig/gcc/config/pa/pa.c gcc-4.6.3/gcc/config/pa/pa.c
|
---|
| 1286 | --- gcc-4.6.3.orig/gcc/config/pa/pa.c 2011-10-29 21:40:55.000000000 +0000
|
---|
| 1287 | +++ gcc-4.6.3/gcc/config/pa/pa.c 2012-06-17 01:33:06.931030000 +0000
|
---|
| 1288 | @@ -185,6 +185,7 @@
|
---|
| 1289 | static void pa_conditional_register_usage (void);
|
---|
| 1290 | static enum machine_mode pa_c_mode_for_suffix (char);
|
---|
| 1291 | static section *pa_function_section (tree, enum node_frequency, bool, bool);
|
---|
| 1292 | +static unsigned int pa_section_type_flags (tree, const char *, int);
|
---|
| 1293 |
|
---|
| 1294 | /* The following extra sections are only used for SOM. */
|
---|
| 1295 | static GTY(()) section *som_readonly_data_section;
|
---|
| 1296 | @@ -400,6 +401,9 @@
|
---|
| 1297 | #undef TARGET_ASM_FUNCTION_SECTION
|
---|
| 1298 | #define TARGET_ASM_FUNCTION_SECTION pa_function_section
|
---|
| 1299 |
|
---|
| 1300 | +#undef TARGET_SECTION_TYPE_FLAGS
|
---|
| 1301 | +#define TARGET_SECTION_TYPE_FLAGS pa_section_type_flags
|
---|
| 1302 | +
|
---|
| 1303 | struct gcc_target targetm = TARGET_INITIALIZER;
|
---|
| 1304 | |
---|
| 1305 |
|
---|
| 1306 | /* Parse the -mfixed-range= option string. */
|
---|
| 1307 | @@ -4442,6 +4446,24 @@
|
---|
| 1308 | }
|
---|
| 1309 | }
|
---|
| 1310 |
|
---|
| 1311 | +bool
|
---|
| 1312 | +pa_can_use_return_insn (void)
|
---|
| 1313 | +{
|
---|
| 1314 | + if (!reload_completed)
|
---|
| 1315 | + return false;
|
---|
| 1316 | +
|
---|
| 1317 | + if (frame_pointer_needed)
|
---|
| 1318 | + return false;
|
---|
| 1319 | +
|
---|
| 1320 | + if (df_regs_ever_live_p (2))
|
---|
| 1321 | + return false;
|
---|
| 1322 | +
|
---|
| 1323 | + if (crtl->profile)
|
---|
| 1324 | + return false;
|
---|
| 1325 | +
|
---|
| 1326 | + return compute_frame_size (get_frame_size (), 0) == 0;
|
---|
| 1327 | +}
|
---|
| 1328 | +
|
---|
| 1329 | rtx
|
---|
| 1330 | hppa_pic_save_rtx (void)
|
---|
| 1331 | {
|
---|
| 1332 | @@ -4586,7 +4608,7 @@
|
---|
| 1333 | rtx saved_rp;
|
---|
| 1334 | rtx ins;
|
---|
| 1335 |
|
---|
| 1336 | - /* Instruction stream at the normal return address for the export stub:
|
---|
| 1337 | + /* The instruction stream at the return address of a PA1.X export stub is:
|
---|
| 1338 |
|
---|
| 1339 | 0x4bc23fd1 | stub+8: ldw -18(sr0,sp),rp
|
---|
| 1340 | 0x004010a1 | stub+12: ldsid (sr0,rp),r1
|
---|
| 1341 | @@ -4594,10 +4616,16 @@
|
---|
| 1342 | 0xe0400002 | stub+20: be,n 0(sr0,rp)
|
---|
| 1343 |
|
---|
| 1344 | 0xe0400002 must be specified as -532676606 so that it won't be
|
---|
| 1345 | - rejected as an invalid immediate operand on 64-bit hosts. */
|
---|
| 1346 | + rejected as an invalid immediate operand on 64-bit hosts.
|
---|
| 1347 |
|
---|
| 1348 | - HOST_WIDE_INT insns[4] = {0x4bc23fd1, 0x004010a1, 0x00011820, -532676606};
|
---|
| 1349 | - int i;
|
---|
| 1350 | + The instruction stream at the return address of a PA2.0 export stub is:
|
---|
| 1351 | +
|
---|
| 1352 | + 0x4bc23fd1 | stub+8: ldw -18(sr0,sp),rp
|
---|
| 1353 | + 0xe840d002 | stub+12: bve,n (rp)
|
---|
| 1354 | + */
|
---|
| 1355 | +
|
---|
| 1356 | + HOST_WIDE_INT insns[4];
|
---|
| 1357 | + int i, len;
|
---|
| 1358 |
|
---|
| 1359 | if (count != 0)
|
---|
| 1360 | return NULL_RTX;
|
---|
| 1361 | @@ -4620,11 +4648,26 @@
|
---|
| 1362 | ins = copy_to_reg (gen_rtx_AND (Pmode, rp, MASK_RETURN_ADDR));
|
---|
| 1363 | label = gen_label_rtx ();
|
---|
| 1364 |
|
---|
| 1365 | + if (TARGET_PA_20)
|
---|
| 1366 | + {
|
---|
| 1367 | + insns[0] = 0x4bc23fd1;
|
---|
| 1368 | + insns[1] = -398405630;
|
---|
| 1369 | + len = 2;
|
---|
| 1370 | + }
|
---|
| 1371 | + else
|
---|
| 1372 | + {
|
---|
| 1373 | + insns[0] = 0x4bc23fd1;
|
---|
| 1374 | + insns[1] = 0x004010a1;
|
---|
| 1375 | + insns[2] = 0x00011820;
|
---|
| 1376 | + insns[3] = -532676606;
|
---|
| 1377 | + len = 4;
|
---|
| 1378 | + }
|
---|
| 1379 | +
|
---|
| 1380 | /* Check the instruction stream at the normal return address for the
|
---|
| 1381 | export stub. If it is an export stub, than our return address is
|
---|
| 1382 | really in -24[frameaddr]. */
|
---|
| 1383 |
|
---|
| 1384 | - for (i = 0; i < 3; i++)
|
---|
| 1385 | + for (i = 0; i < len; i++)
|
---|
| 1386 | {
|
---|
| 1387 | rtx op0 = gen_rtx_MEM (SImode, plus_constant (ins, i * 4));
|
---|
| 1388 | rtx op1 = GEN_INT (insns[i]);
|
---|
| 1389 | @@ -7501,7 +7544,7 @@
|
---|
| 1390 | return 24;
|
---|
| 1391 | else
|
---|
| 1392 | {
|
---|
| 1393 | - if (!TARGET_LONG_CALLS && distance < 240000)
|
---|
| 1394 | + if (!TARGET_LONG_CALLS && distance < MAX_PCREL17F_OFFSET)
|
---|
| 1395 | return 8;
|
---|
| 1396 |
|
---|
| 1397 | if (TARGET_LONG_ABS_CALL && !flag_pic)
|
---|
| 1398 | @@ -7714,7 +7757,7 @@
|
---|
| 1399 | /* pc-relative branch. */
|
---|
| 1400 | if (!TARGET_LONG_CALLS
|
---|
| 1401 | && ((TARGET_PA_20 && !sibcall && distance < 7600000)
|
---|
| 1402 | - || distance < 240000))
|
---|
| 1403 | + || distance < MAX_PCREL17F_OFFSET))
|
---|
| 1404 | length += 8;
|
---|
| 1405 |
|
---|
| 1406 | /* 64-bit plabel sequence. */
|
---|
| 1407 | @@ -8073,7 +8116,7 @@
|
---|
| 1408 | if (TARGET_FAST_INDIRECT_CALLS
|
---|
| 1409 | || (!TARGET_PORTABLE_RUNTIME
|
---|
| 1410 | && ((TARGET_PA_20 && !TARGET_SOM && distance < 7600000)
|
---|
| 1411 | - || distance < 240000)))
|
---|
| 1412 | + || distance < MAX_PCREL17F_OFFSET)))
|
---|
| 1413 | return 8;
|
---|
| 1414 |
|
---|
| 1415 | if (flag_pic)
|
---|
| 1416 | @@ -10392,4 +10435,23 @@
|
---|
| 1417 | return default_function_section (decl, freq, startup, exit);
|
---|
| 1418 | }
|
---|
| 1419 |
|
---|
| 1420 | +/* Implement TARGET_SECTION_TYPE_FLAGS. */
|
---|
| 1421 | +
|
---|
| 1422 | +static unsigned int
|
---|
| 1423 | +pa_section_type_flags (tree decl, const char *name, int reloc)
|
---|
| 1424 | +{
|
---|
| 1425 | + unsigned int flags;
|
---|
| 1426 | +
|
---|
| 1427 | + flags = default_section_type_flags (decl, name, reloc);
|
---|
| 1428 | +
|
---|
| 1429 | + /* Function labels are placed in the constant pool. This can
|
---|
| 1430 | + cause a section conflict if decls are put in ".data.rel.ro"
|
---|
| 1431 | + or ".data.rel.ro.local" using the __attribute__ construct. */
|
---|
| 1432 | + if (strcmp (name, ".data.rel.ro") == 0
|
---|
| 1433 | + || strcmp (name, ".data.rel.ro.local") == 0)
|
---|
| 1434 | + flags |= SECTION_WRITE | SECTION_RELRO;
|
---|
| 1435 | +
|
---|
| 1436 | + return flags;
|
---|
| 1437 | +}
|
---|
| 1438 | +
|
---|
| 1439 | #include "gt-pa.h"
|
---|
| 1440 | diff -Naur gcc-4.6.3.orig/gcc/config/pa/pa.h gcc-4.6.3/gcc/config/pa/pa.h
|
---|
| 1441 | --- gcc-4.6.3.orig/gcc/config/pa/pa.h 2011-10-29 20:19:38.000000000 +0000
|
---|
| 1442 | +++ gcc-4.6.3/gcc/config/pa/pa.h 2012-06-17 01:33:06.931030000 +0000
|
---|
| 1443 | @@ -1563,3 +1563,12 @@
|
---|
| 1444 | #undef TARGET_HAVE_TLS
|
---|
| 1445 | #define TARGET_HAVE_TLS true
|
---|
| 1446 | #endif
|
---|
| 1447 | +
|
---|
| 1448 | +/* The maximum offset in bytes for a PA 1.X pc-relative call to the
|
---|
| 1449 | + head of the preceding stub table. The selected offsets have been
|
---|
| 1450 | + chosen so that approximately one call stub is allocated for every
|
---|
| 1451 | + 86.7 instructions. A long branch stub is two instructions when
|
---|
| 1452 | + not generating PIC code. For HP-UX and ELF targets, PIC stubs are
|
---|
| 1453 | + seven and four instructions, respectively. */
|
---|
| 1454 | +#define MAX_PCREL17F_OFFSET \
|
---|
| 1455 | + (flag_pic ? (TARGET_HPUX ? 198164 : 221312) : 240000)
|
---|
| 1456 | diff -Naur gcc-4.6.3.orig/gcc/config/pa/pa.md gcc-4.6.3/gcc/config/pa/pa.md
|
---|
| 1457 | --- gcc-4.6.3.orig/gcc/config/pa/pa.md 2011-10-29 21:40:55.000000000 +0000
|
---|
| 1458 | +++ gcc-4.6.3/gcc/config/pa/pa.md 2012-03-12 17:08:20.095334000 +0000
|
---|
| 1459 | @@ -6348,7 +6348,7 @@
|
---|
| 1460 | ""
|
---|
| 1461 | "*
|
---|
| 1462 | {
|
---|
| 1463 | - int x = INTVAL (operands[1]);
|
---|
| 1464 | + unsigned HOST_WIDE_INT x = UINTVAL (operands[1]);
|
---|
| 1465 | operands[2] = GEN_INT (4 + exact_log2 ((x >> 4) + 1));
|
---|
| 1466 | operands[1] = GEN_INT ((x & 0xf) - 0x10);
|
---|
| 1467 | return \"{zvdepi %1,%2,%0|depwi,z %1,%%sar,%2,%0}\";
|
---|
| 1468 | @@ -6366,7 +6366,7 @@
|
---|
| 1469 | "exact_log2 (INTVAL (operands[1]) + 1) > 0"
|
---|
| 1470 | "*
|
---|
| 1471 | {
|
---|
| 1472 | - int x = INTVAL (operands[1]);
|
---|
| 1473 | + HOST_WIDE_INT x = INTVAL (operands[1]);
|
---|
| 1474 | operands[2] = GEN_INT (exact_log2 (x + 1));
|
---|
| 1475 | return \"{vdepi -1,%2,%0|depwi -1,%%sar,%2,%0}\";
|
---|
| 1476 | }"
|
---|
| 1477 | @@ -6383,7 +6383,7 @@
|
---|
| 1478 | "INTVAL (operands[1]) == -2"
|
---|
| 1479 | "*
|
---|
| 1480 | {
|
---|
| 1481 | - int x = INTVAL (operands[1]);
|
---|
| 1482 | + HOST_WIDE_INT x = INTVAL (operands[1]);
|
---|
| 1483 | operands[2] = GEN_INT (exact_log2 ((~x) + 1));
|
---|
| 1484 | return \"{vdepi 0,%2,%0|depwi 0,%%sar,%2,%0}\";
|
---|
| 1485 | }"
|
---|
| 1486 | @@ -6447,7 +6447,7 @@
|
---|
| 1487 | "TARGET_64BIT"
|
---|
| 1488 | "*
|
---|
| 1489 | {
|
---|
| 1490 | - int x = INTVAL (operands[1]);
|
---|
| 1491 | + unsigned HOST_WIDE_INT x = UINTVAL (operands[1]);
|
---|
| 1492 | operands[2] = GEN_INT (4 + exact_log2 ((x >> 4) + 1));
|
---|
| 1493 | operands[1] = GEN_INT ((x & 0x1f) - 0x20);
|
---|
| 1494 | return \"depdi,z %1,%%sar,%2,%0\";
|
---|
| 1495 | @@ -6465,7 +6465,7 @@
|
---|
| 1496 | "TARGET_64BIT && exact_log2 (INTVAL (operands[1]) + 1) > 0"
|
---|
| 1497 | "*
|
---|
| 1498 | {
|
---|
| 1499 | - int x = INTVAL (operands[1]);
|
---|
| 1500 | + HOST_WIDE_INT x = INTVAL (operands[1]);
|
---|
| 1501 | operands[2] = GEN_INT (exact_log2 (x + 1));
|
---|
| 1502 | return \"depdi -1,%%sar,%2,%0\";
|
---|
| 1503 | }"
|
---|
| 1504 | @@ -6482,7 +6482,7 @@
|
---|
| 1505 | "TARGET_64BIT && INTVAL (operands[1]) == -2"
|
---|
| 1506 | "*
|
---|
| 1507 | {
|
---|
| 1508 | - int x = INTVAL (operands[1]);
|
---|
| 1509 | + HOST_WIDE_INT x = INTVAL (operands[1]);
|
---|
| 1510 | operands[2] = GEN_INT (exact_log2 ((~x) + 1));
|
---|
| 1511 | return \"depdi 0,%%sar,%2,%0\";
|
---|
| 1512 | }"
|
---|
| 1513 | @@ -6671,6 +6671,20 @@
|
---|
| 1514 | |
---|
| 1515 |
|
---|
| 1516 | ;; Unconditional and other jump instructions.
|
---|
| 1517 |
|
---|
| 1518 | +;; Trivial return used when no epilogue is needed.
|
---|
| 1519 | +(define_insn "return"
|
---|
| 1520 | + [(return)
|
---|
| 1521 | + (use (reg:SI 2))]
|
---|
| 1522 | + "pa_can_use_return_insn ()"
|
---|
| 1523 | + "*
|
---|
| 1524 | +{
|
---|
| 1525 | + if (TARGET_PA_20)
|
---|
| 1526 | + return \"bve%* (%%r2)\";
|
---|
| 1527 | + return \"bv%* %%r0(%%r2)\";
|
---|
| 1528 | +}"
|
---|
| 1529 | + [(set_attr "type" "branch")
|
---|
| 1530 | + (set_attr "length" "4")])
|
---|
| 1531 | +
|
---|
| 1532 | ;; This is used for most returns.
|
---|
| 1533 | (define_insn "return_internal"
|
---|
| 1534 | [(return)
|
---|
| 1535 | @@ -6719,11 +6733,8 @@
|
---|
| 1536 | rtx x;
|
---|
| 1537 |
|
---|
| 1538 | /* Try to use the trivial return first. Else use the full epilogue. */
|
---|
| 1539 | - if (reload_completed
|
---|
| 1540 | - && !frame_pointer_needed
|
---|
| 1541 | - && !df_regs_ever_live_p (2)
|
---|
| 1542 | - && (compute_frame_size (get_frame_size (), 0) ? 0 : 1))
|
---|
| 1543 | - x = gen_return_internal ();
|
---|
| 1544 | + if (pa_can_use_return_insn ())
|
---|
| 1545 | + x = gen_return ();
|
---|
| 1546 | else
|
---|
| 1547 | {
|
---|
| 1548 | hppa_expand_epilogue ();
|
---|
| 1549 | diff -Naur gcc-4.6.3.orig/gcc/config/pa/predicates.md gcc-4.6.3/gcc/config/pa/predicates.md
|
---|
| 1550 | --- gcc-4.6.3.orig/gcc/config/pa/predicates.md 2011-04-20 23:36:20.000000000 +0000
|
---|
| 1551 | +++ gcc-4.6.3/gcc/config/pa/predicates.md 2012-03-04 16:23:26.705142000 +0000
|
---|
| 1552 | @@ -421,9 +421,9 @@
|
---|
| 1553 | (ior (match_operand 0 "register_operand")
|
---|
| 1554 | (match_operand 0 "cint_ior_operand")))
|
---|
| 1555 |
|
---|
| 1556 | -;; True iff OP is a CONST_INT of the forms 0...0xxxx or
|
---|
| 1557 | -;; 0...01...1xxxx. Such values can be the left hand side x in (x <<
|
---|
| 1558 | -;; r), using the zvdepi instruction.
|
---|
| 1559 | +;; True iff OP is a CONST_INT of the forms 0...0xxxx, 0...01...1xxxx,
|
---|
| 1560 | +;; or 1...1xxxx. Such values can be the left hand side x in (x << r),
|
---|
| 1561 | +;; using the zvdepi instruction.
|
---|
| 1562 |
|
---|
| 1563 | (define_predicate "lhs_lshift_cint_operand"
|
---|
| 1564 | (match_code "const_int")
|
---|
| 1565 | diff -Naur gcc-4.6.3.orig/gcc/config/rs6000/altivec.md gcc-4.6.3/gcc/config/rs6000/altivec.md
|
---|
| 1566 | --- gcc-4.6.3.orig/gcc/config/rs6000/altivec.md 2011-07-08 20:10:18.000000000 +0000
|
---|
| 1567 | +++ gcc-4.6.3/gcc/config/rs6000/altivec.md 2012-06-04 17:42:25.267281000 +0000
|
---|
| 1568 | @@ -2394,8 +2394,8 @@
|
---|
| 1569 |
|
---|
| 1570 | (define_insn "altivec_stvlx"
|
---|
| 1571 | [(parallel
|
---|
| 1572 | - [(set (match_operand:V4SI 0 "memory_operand" "=Z")
|
---|
| 1573 | - (match_operand:V4SI 1 "register_operand" "v"))
|
---|
| 1574 | + [(set (match_operand:V16QI 0 "memory_operand" "=Z")
|
---|
| 1575 | + (match_operand:V16QI 1 "register_operand" "v"))
|
---|
| 1576 | (unspec [(const_int 0)] UNSPEC_STVLX)])]
|
---|
| 1577 | "TARGET_ALTIVEC && rs6000_cpu == PROCESSOR_CELL"
|
---|
| 1578 | "stvlx %1,%y0"
|
---|
| 1579 | @@ -2403,8 +2403,8 @@
|
---|
| 1580 |
|
---|
| 1581 | (define_insn "altivec_stvlxl"
|
---|
| 1582 | [(parallel
|
---|
| 1583 | - [(set (match_operand:V4SI 0 "memory_operand" "=Z")
|
---|
| 1584 | - (match_operand:V4SI 1 "register_operand" "v"))
|
---|
| 1585 | + [(set (match_operand:V16QI 0 "memory_operand" "=Z")
|
---|
| 1586 | + (match_operand:V16QI 1 "register_operand" "v"))
|
---|
| 1587 | (unspec [(const_int 0)] UNSPEC_STVLXL)])]
|
---|
| 1588 | "TARGET_ALTIVEC && rs6000_cpu == PROCESSOR_CELL"
|
---|
| 1589 | "stvlxl %1,%y0"
|
---|
| 1590 | @@ -2412,8 +2412,8 @@
|
---|
| 1591 |
|
---|
| 1592 | (define_insn "altivec_stvrx"
|
---|
| 1593 | [(parallel
|
---|
| 1594 | - [(set (match_operand:V4SI 0 "memory_operand" "=Z")
|
---|
| 1595 | - (match_operand:V4SI 1 "register_operand" "v"))
|
---|
| 1596 | + [(set (match_operand:V16QI 0 "memory_operand" "=Z")
|
---|
| 1597 | + (match_operand:V16QI 1 "register_operand" "v"))
|
---|
| 1598 | (unspec [(const_int 0)] UNSPEC_STVRX)])]
|
---|
| 1599 | "TARGET_ALTIVEC && rs6000_cpu == PROCESSOR_CELL"
|
---|
| 1600 | "stvrx %1,%y0"
|
---|
| 1601 | @@ -2421,8 +2421,8 @@
|
---|
| 1602 |
|
---|
| 1603 | (define_insn "altivec_stvrxl"
|
---|
| 1604 | [(parallel
|
---|
| 1605 | - [(set (match_operand:V4SI 0 "memory_operand" "=Z")
|
---|
| 1606 | - (match_operand:V4SI 1 "register_operand" "v"))
|
---|
| 1607 | + [(set (match_operand:V16QI 0 "memory_operand" "=Z")
|
---|
| 1608 | + (match_operand:V16QI 1 "register_operand" "v"))
|
---|
| 1609 | (unspec [(const_int 0)] UNSPEC_STVRXL)])]
|
---|
| 1610 | "TARGET_ALTIVEC && rs6000_cpu == PROCESSOR_CELL"
|
---|
| 1611 | "stvrxl %1,%y0"
|
---|
| 1612 | diff -Naur gcc-4.6.3.orig/gcc/config/rs6000/rs6000.c gcc-4.6.3/gcc/config/rs6000/rs6000.c
|
---|
| 1613 | --- gcc-4.6.3.orig/gcc/config/rs6000/rs6000.c 2012-02-15 21:17:42.000000000 +0000
|
---|
| 1614 | +++ gcc-4.6.3/gcc/config/rs6000/rs6000.c 2012-05-24 13:52:56.478084000 +0000
|
---|
| 1615 | @@ -3695,12 +3695,23 @@
|
---|
| 1616 | case vec_to_scalar:
|
---|
| 1617 | case scalar_to_vec:
|
---|
| 1618 | case cond_branch_not_taken:
|
---|
| 1619 | - case vec_perm:
|
---|
| 1620 | return 1;
|
---|
| 1621 |
|
---|
| 1622 | case cond_branch_taken:
|
---|
| 1623 | return 3;
|
---|
| 1624 |
|
---|
| 1625 | + case vec_perm:
|
---|
| 1626 | + if (TARGET_VSX)
|
---|
| 1627 | + return 4;
|
---|
| 1628 | + else
|
---|
| 1629 | + return 1;
|
---|
| 1630 | +
|
---|
| 1631 | + case vec_promote_demote:
|
---|
| 1632 | + if (TARGET_VSX)
|
---|
| 1633 | + return 5;
|
---|
| 1634 | + else
|
---|
| 1635 | + return 1;
|
---|
| 1636 | +
|
---|
| 1637 | case unaligned_load:
|
---|
| 1638 | if (TARGET_VSX && TARGET_ALLOW_MOVMISALIGN)
|
---|
| 1639 | {
|
---|
| 1640 | @@ -15811,7 +15822,6 @@
|
---|
| 1641 | print_operand (FILE *file, rtx x, int code)
|
---|
| 1642 | {
|
---|
| 1643 | int i;
|
---|
| 1644 | - HOST_WIDE_INT val;
|
---|
| 1645 | unsigned HOST_WIDE_INT uval;
|
---|
| 1646 |
|
---|
| 1647 | switch (code)
|
---|
| 1648 | @@ -16252,34 +16262,17 @@
|
---|
| 1649 |
|
---|
| 1650 | case 'W':
|
---|
| 1651 | /* MB value for a PowerPC64 rldic operand. */
|
---|
| 1652 | - val = (GET_CODE (x) == CONST_INT
|
---|
| 1653 | - ? INTVAL (x) : CONST_DOUBLE_HIGH (x));
|
---|
| 1654 | -
|
---|
| 1655 | - if (val < 0)
|
---|
| 1656 | - i = -1;
|
---|
| 1657 | - else
|
---|
| 1658 | - for (i = 0; i < HOST_BITS_PER_WIDE_INT; i++)
|
---|
| 1659 | - if ((val <<= 1) < 0)
|
---|
| 1660 | - break;
|
---|
| 1661 | + i = clz_hwi (GET_CODE (x) == CONST_INT
|
---|
| 1662 | + ? INTVAL (x) : CONST_DOUBLE_HIGH (x));
|
---|
| 1663 |
|
---|
| 1664 | #if HOST_BITS_PER_WIDE_INT == 32
|
---|
| 1665 | - if (GET_CODE (x) == CONST_INT && i >= 0)
|
---|
| 1666 | + if (GET_CODE (x) == CONST_INT && i > 0)
|
---|
| 1667 | i += 32; /* zero-extend high-part was all 0's */
|
---|
| 1668 | else if (GET_CODE (x) == CONST_DOUBLE && i == 32)
|
---|
| 1669 | - {
|
---|
| 1670 | - val = CONST_DOUBLE_LOW (x);
|
---|
| 1671 | -
|
---|
| 1672 | - gcc_assert (val);
|
---|
| 1673 | - if (val < 0)
|
---|
| 1674 | - --i;
|
---|
| 1675 | - else
|
---|
| 1676 | - for ( ; i < 64; i++)
|
---|
| 1677 | - if ((val <<= 1) < 0)
|
---|
| 1678 | - break;
|
---|
| 1679 | - }
|
---|
| 1680 | + i = clz_hwi (CONST_DOUBLE_LOW (x)) + 32;
|
---|
| 1681 | #endif
|
---|
| 1682 |
|
---|
| 1683 | - fprintf (file, "%d", i + 1);
|
---|
| 1684 | + fprintf (file, "%d", i);
|
---|
| 1685 | return;
|
---|
| 1686 |
|
---|
| 1687 | case 'x':
|
---|
| 1688 | @@ -17229,6 +17222,10 @@
|
---|
| 1689 | case EQ:
|
---|
| 1690 | case GT:
|
---|
| 1691 | case GTU:
|
---|
| 1692 | + case ORDERED:
|
---|
| 1693 | + case UNORDERED:
|
---|
| 1694 | + case UNEQ:
|
---|
| 1695 | + case LTGT:
|
---|
| 1696 | mask = gen_reg_rtx (mode);
|
---|
| 1697 | emit_insn (gen_rtx_SET (VOIDmode,
|
---|
| 1698 | mask,
|
---|
| 1699 | diff -Naur gcc-4.6.3.orig/gcc/config/rs6000/rs6000.h gcc-4.6.3/gcc/config/rs6000/rs6000.h
|
---|
| 1700 | --- gcc-4.6.3.orig/gcc/config/rs6000/rs6000.h 2011-07-27 18:17:15.000000000 +0000
|
---|
| 1701 | +++ gcc-4.6.3/gcc/config/rs6000/rs6000.h 2012-04-13 21:55:15.746111000 +0000
|
---|
| 1702 | @@ -469,10 +469,11 @@
|
---|
| 1703 | /* ISA 2.01 allowed FCFID to be done in 32-bit, previously it was 64-bit only.
|
---|
| 1704 | Enable 32-bit fcfid's on any of the switches for newer ISA machines or
|
---|
| 1705 | XILINX. */
|
---|
| 1706 | -#define TARGET_FCFID (TARGET_POWERPC64 \
|
---|
| 1707 | - || TARGET_POPCNTB /* ISA 2.02 */ \
|
---|
| 1708 | - || TARGET_CMPB /* ISA 2.05 */ \
|
---|
| 1709 | - || TARGET_POPCNTD /* ISA 2.06 */ \
|
---|
| 1710 | +#define TARGET_FCFID (TARGET_POWERPC64 \
|
---|
| 1711 | + || TARGET_PPC_GPOPT /* 970/power4 */ \
|
---|
| 1712 | + || TARGET_POPCNTB /* ISA 2.02 */ \
|
---|
| 1713 | + || TARGET_CMPB /* ISA 2.05 */ \
|
---|
| 1714 | + || TARGET_POPCNTD /* ISA 2.06 */ \
|
---|
| 1715 | || TARGET_XILINX_FPU)
|
---|
| 1716 |
|
---|
| 1717 | #define TARGET_FCTIDZ TARGET_FCFID
|
---|
| 1718 | diff -Naur gcc-4.6.3.orig/gcc/config/rs6000/rs6000.md gcc-4.6.3/gcc/config/rs6000/rs6000.md
|
---|
| 1719 | --- gcc-4.6.3.orig/gcc/config/rs6000/rs6000.md 2012-01-18 19:14:48.000000000 +0000
|
---|
| 1720 | +++ gcc-4.6.3/gcc/config/rs6000/rs6000.md 2012-05-04 00:31:50.505528000 +0000
|
---|
| 1721 | @@ -2524,7 +2524,18 @@
|
---|
| 1722 | if (GET_CODE (addr1) == PLUS)
|
---|
| 1723 | {
|
---|
| 1724 | emit_insn (gen_add3_insn (op2, XEXP (addr1, 0), GEN_INT (4)));
|
---|
| 1725 | - addr2 = gen_rtx_PLUS (Pmode, op2, XEXP (addr1, 1));
|
---|
| 1726 | + if (TARGET_AVOID_XFORM)
|
---|
| 1727 | + {
|
---|
| 1728 | + emit_insn (gen_add3_insn (op2, XEXP (addr1, 1), op2));
|
---|
| 1729 | + addr2 = op2;
|
---|
| 1730 | + }
|
---|
| 1731 | + else
|
---|
| 1732 | + addr2 = gen_rtx_PLUS (Pmode, op2, XEXP (addr1, 1));
|
---|
| 1733 | + }
|
---|
| 1734 | + else if (TARGET_AVOID_XFORM)
|
---|
| 1735 | + {
|
---|
| 1736 | + emit_insn (gen_add3_insn (op2, addr1, GEN_INT (4)));
|
---|
| 1737 | + addr2 = op2;
|
---|
| 1738 | }
|
---|
| 1739 | else
|
---|
| 1740 | {
|
---|
| 1741 | @@ -2574,7 +2585,18 @@
|
---|
| 1742 | if (GET_CODE (addr1) == PLUS)
|
---|
| 1743 | {
|
---|
| 1744 | emit_insn (gen_add3_insn (op2, XEXP (addr1, 0), GEN_INT (4)));
|
---|
| 1745 | - addr2 = gen_rtx_PLUS (Pmode, op2, XEXP (addr1, 1));
|
---|
| 1746 | + if (TARGET_AVOID_XFORM)
|
---|
| 1747 | + {
|
---|
| 1748 | + emit_insn (gen_add3_insn (op2, XEXP (addr1, 1), op2));
|
---|
| 1749 | + addr2 = op2;
|
---|
| 1750 | + }
|
---|
| 1751 | + else
|
---|
| 1752 | + addr2 = gen_rtx_PLUS (Pmode, op2, XEXP (addr1, 1));
|
---|
| 1753 | + }
|
---|
| 1754 | + else if (TARGET_AVOID_XFORM)
|
---|
| 1755 | + {
|
---|
| 1756 | + emit_insn (gen_add3_insn (op2, addr1, GEN_INT (4)));
|
---|
| 1757 | + addr2 = op2;
|
---|
| 1758 | }
|
---|
| 1759 | else
|
---|
| 1760 | {
|
---|
| 1761 | @@ -2655,7 +2677,18 @@
|
---|
| 1762 | if (GET_CODE (addr1) == PLUS)
|
---|
| 1763 | {
|
---|
| 1764 | emit_insn (gen_add3_insn (op2, XEXP (addr1, 0), GEN_INT (4)));
|
---|
| 1765 | - addr2 = gen_rtx_PLUS (SImode, op2, XEXP (addr1, 1));
|
---|
| 1766 | + if (TARGET_AVOID_XFORM)
|
---|
| 1767 | + {
|
---|
| 1768 | + emit_insn (gen_add3_insn (op2, XEXP (addr1, 1), op2));
|
---|
| 1769 | + addr2 = op2;
|
---|
| 1770 | + }
|
---|
| 1771 | + else
|
---|
| 1772 | + addr2 = gen_rtx_PLUS (SImode, op2, XEXP (addr1, 1));
|
---|
| 1773 | + }
|
---|
| 1774 | + else if (TARGET_AVOID_XFORM)
|
---|
| 1775 | + {
|
---|
| 1776 | + emit_insn (gen_add3_insn (op2, addr1, GEN_INT (4)));
|
---|
| 1777 | + addr2 = op2;
|
---|
| 1778 | }
|
---|
| 1779 | else
|
---|
| 1780 | {
|
---|
| 1781 | @@ -2700,7 +2733,18 @@
|
---|
| 1782 | if (GET_CODE (addr1) == PLUS)
|
---|
| 1783 | {
|
---|
| 1784 | emit_insn (gen_add3_insn (op2, XEXP (addr1, 0), GEN_INT (4)));
|
---|
| 1785 | - addr2 = gen_rtx_PLUS (SImode, op2, XEXP (addr1, 1));
|
---|
| 1786 | + if (TARGET_AVOID_XFORM)
|
---|
| 1787 | + {
|
---|
| 1788 | + emit_insn (gen_add3_insn (op2, XEXP (addr1, 1), op2));
|
---|
| 1789 | + addr2 = op2;
|
---|
| 1790 | + }
|
---|
| 1791 | + else
|
---|
| 1792 | + addr2 = gen_rtx_PLUS (SImode, op2, XEXP (addr1, 1));
|
---|
| 1793 | + }
|
---|
| 1794 | + else if (TARGET_AVOID_XFORM)
|
---|
| 1795 | + {
|
---|
| 1796 | + emit_insn (gen_add3_insn (op2, addr1, GEN_INT (4)));
|
---|
| 1797 | + addr2 = op2;
|
---|
| 1798 | }
|
---|
| 1799 | else
|
---|
| 1800 | {
|
---|
| 1801 | diff -Naur gcc-4.6.3.orig/gcc/config/rs6000/vector.md gcc-4.6.3/gcc/config/rs6000/vector.md
|
---|
| 1802 | --- gcc-4.6.3.orig/gcc/config/rs6000/vector.md 2011-07-08 20:10:18.000000000 +0000
|
---|
| 1803 | +++ gcc-4.6.3/gcc/config/rs6000/vector.md 2012-03-06 19:46:28.829628000 +0000
|
---|
| 1804 | @@ -448,6 +448,94 @@
|
---|
| 1805 | "VECTOR_UNIT_ALTIVEC_P (<MODE>mode)"
|
---|
| 1806 | "")
|
---|
| 1807 |
|
---|
| 1808 | +(define_insn_and_split "*vector_uneq<mode>"
|
---|
| 1809 | + [(set (match_operand:VEC_F 0 "vfloat_operand" "")
|
---|
| 1810 | + (uneq:VEC_F (match_operand:VEC_F 1 "vfloat_operand" "")
|
---|
| 1811 | + (match_operand:VEC_F 2 "vfloat_operand" "")))]
|
---|
| 1812 | + "VECTOR_UNIT_ALTIVEC_OR_VSX_P (<MODE>mode)"
|
---|
| 1813 | + "#"
|
---|
| 1814 | + ""
|
---|
| 1815 | + [(set (match_dup 3)
|
---|
| 1816 | + (gt:VEC_F (match_dup 1)
|
---|
| 1817 | + (match_dup 2)))
|
---|
| 1818 | + (set (match_dup 4)
|
---|
| 1819 | + (gt:VEC_F (match_dup 2)
|
---|
| 1820 | + (match_dup 1)))
|
---|
| 1821 | + (set (match_dup 0)
|
---|
| 1822 | + (not:VEC_F (ior:VEC_F (match_dup 3)
|
---|
| 1823 | + (match_dup 4))))]
|
---|
| 1824 | + "
|
---|
| 1825 | +{
|
---|
| 1826 | + operands[3] = gen_reg_rtx (<MODE>mode);
|
---|
| 1827 | + operands[4] = gen_reg_rtx (<MODE>mode);
|
---|
| 1828 | +}")
|
---|
| 1829 | +
|
---|
| 1830 | +(define_insn_and_split "*vector_ltgt<mode>"
|
---|
| 1831 | + [(set (match_operand:VEC_F 0 "vfloat_operand" "")
|
---|
| 1832 | + (ltgt:VEC_F (match_operand:VEC_F 1 "vfloat_operand" "")
|
---|
| 1833 | + (match_operand:VEC_F 2 "vfloat_operand" "")))]
|
---|
| 1834 | + "VECTOR_UNIT_ALTIVEC_OR_VSX_P (<MODE>mode)"
|
---|
| 1835 | + "#"
|
---|
| 1836 | + ""
|
---|
| 1837 | + [(set (match_dup 3)
|
---|
| 1838 | + (gt:VEC_F (match_dup 1)
|
---|
| 1839 | + (match_dup 2)))
|
---|
| 1840 | + (set (match_dup 4)
|
---|
| 1841 | + (gt:VEC_F (match_dup 2)
|
---|
| 1842 | + (match_dup 1)))
|
---|
| 1843 | + (set (match_dup 0)
|
---|
| 1844 | + (ior:VEC_F (match_dup 3)
|
---|
| 1845 | + (match_dup 4)))]
|
---|
| 1846 | + "
|
---|
| 1847 | +{
|
---|
| 1848 | + operands[3] = gen_reg_rtx (<MODE>mode);
|
---|
| 1849 | + operands[4] = gen_reg_rtx (<MODE>mode);
|
---|
| 1850 | +}")
|
---|
| 1851 | +
|
---|
| 1852 | +(define_insn_and_split "*vector_ordered<mode>"
|
---|
| 1853 | + [(set (match_operand:VEC_F 0 "vfloat_operand" "")
|
---|
| 1854 | + (ordered:VEC_F (match_operand:VEC_F 1 "vfloat_operand" "")
|
---|
| 1855 | + (match_operand:VEC_F 2 "vfloat_operand" "")))]
|
---|
| 1856 | + "VECTOR_UNIT_ALTIVEC_OR_VSX_P (<MODE>mode)"
|
---|
| 1857 | + "#"
|
---|
| 1858 | + ""
|
---|
| 1859 | + [(set (match_dup 3)
|
---|
| 1860 | + (ge:VEC_F (match_dup 1)
|
---|
| 1861 | + (match_dup 2)))
|
---|
| 1862 | + (set (match_dup 4)
|
---|
| 1863 | + (ge:VEC_F (match_dup 2)
|
---|
| 1864 | + (match_dup 1)))
|
---|
| 1865 | + (set (match_dup 0)
|
---|
| 1866 | + (ior:VEC_F (match_dup 3)
|
---|
| 1867 | + (match_dup 4)))]
|
---|
| 1868 | + "
|
---|
| 1869 | +{
|
---|
| 1870 | + operands[3] = gen_reg_rtx (<MODE>mode);
|
---|
| 1871 | + operands[4] = gen_reg_rtx (<MODE>mode);
|
---|
| 1872 | +}")
|
---|
| 1873 | +
|
---|
| 1874 | +(define_insn_and_split "*vector_unordered<mode>"
|
---|
| 1875 | + [(set (match_operand:VEC_F 0 "vfloat_operand" "")
|
---|
| 1876 | + (unordered:VEC_F (match_operand:VEC_F 1 "vfloat_operand" "")
|
---|
| 1877 | + (match_operand:VEC_F 2 "vfloat_operand" "")))]
|
---|
| 1878 | + "VECTOR_UNIT_ALTIVEC_OR_VSX_P (<MODE>mode)"
|
---|
| 1879 | + "#"
|
---|
| 1880 | + ""
|
---|
| 1881 | + [(set (match_dup 3)
|
---|
| 1882 | + (ge:VEC_F (match_dup 1)
|
---|
| 1883 | + (match_dup 2)))
|
---|
| 1884 | + (set (match_dup 4)
|
---|
| 1885 | + (ge:VEC_F (match_dup 2)
|
---|
| 1886 | + (match_dup 1)))
|
---|
| 1887 | + (set (match_dup 0)
|
---|
| 1888 | + (not:VEC_F (ior:VEC_F (match_dup 3)
|
---|
| 1889 | + (match_dup 4))))]
|
---|
| 1890 | + "
|
---|
| 1891 | +{
|
---|
| 1892 | + operands[3] = gen_reg_rtx (<MODE>mode);
|
---|
| 1893 | + operands[4] = gen_reg_rtx (<MODE>mode);
|
---|
| 1894 | +}")
|
---|
| 1895 | +
|
---|
| 1896 | ;; Note the arguments for __builtin_altivec_vsel are op2, op1, mask
|
---|
| 1897 | ;; which is in the reverse order that we want
|
---|
| 1898 | (define_expand "vector_select_<mode>"
|
---|
| 1899 | diff -Naur gcc-4.6.3.orig/gcc/config/rs6000/vsx.md gcc-4.6.3/gcc/config/rs6000/vsx.md
|
---|
| 1900 | --- gcc-4.6.3.orig/gcc/config/rs6000/vsx.md 2011-07-08 20:10:18.000000000 +0000
|
---|
| 1901 | +++ gcc-4.6.3/gcc/config/rs6000/vsx.md 2012-03-02 22:12:52.237313000 +0000
|
---|
| 1902 | @@ -1006,9 +1006,9 @@
|
---|
| 1903 | "VECTOR_MEM_VSX_P (<MODE>mode)"
|
---|
| 1904 | {
|
---|
| 1905 | if (INTVAL (operands[3]) == 0)
|
---|
| 1906 | - return \"xxpermdi %x0,%x1,%x2,1\";
|
---|
| 1907 | + return \"xxpermdi %x0,%x2,%x1,1\";
|
---|
| 1908 | else if (INTVAL (operands[3]) == 1)
|
---|
| 1909 | - return \"xxpermdi %x0,%x2,%x1,0\";
|
---|
| 1910 | + return \"xxpermdi %x0,%x1,%x2,0\";
|
---|
| 1911 | else
|
---|
| 1912 | gcc_unreachable ();
|
---|
| 1913 | }
|
---|
| 1914 | diff -Naur gcc-4.6.3.orig/gcc/config/rx/rx.c gcc-4.6.3/gcc/config/rx/rx.c
|
---|
| 1915 | --- gcc-4.6.3.orig/gcc/config/rx/rx.c 2011-05-17 08:59:10.000000000 +0000
|
---|
| 1916 | +++ gcc-4.6.3/gcc/config/rx/rx.c 2012-03-29 02:15:29.973365000 +0000
|
---|
| 1917 | @@ -2348,7 +2348,7 @@
|
---|
| 1918 | rx_option_override (void)
|
---|
| 1919 | {
|
---|
| 1920 | /* This target defaults to strict volatile bitfields. */
|
---|
| 1921 | - if (flag_strict_volatile_bitfields < 0)
|
---|
| 1922 | + if (flag_strict_volatile_bitfields < 0 && abi_version_at_least(2))
|
---|
| 1923 | flag_strict_volatile_bitfields = 1;
|
---|
| 1924 |
|
---|
| 1925 | rx_override_options_after_change ();
|
---|
| 1926 | diff -Naur gcc-4.6.3.orig/gcc/config/sh/linux-unwind.h gcc-4.6.3/gcc/config/sh/linux-unwind.h
|
---|
| 1927 | --- gcc-4.6.3.orig/gcc/config/sh/linux-unwind.h 2009-04-09 15:00:19.000000000 +0000
|
---|
| 1928 | +++ gcc-4.6.3/gcc/config/sh/linux-unwind.h 2012-04-20 08:08:13.688436000 +0000
|
---|
| 1929 | @@ -1,5 +1,6 @@
|
---|
| 1930 | /* DWARF2 EH unwinding support for SH Linux.
|
---|
| 1931 | - Copyright (C) 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
|
---|
| 1932 | + Copyright (C) 2004, 2005, 2006, 2007, 2009, 2012 Free Software Foundation,
|
---|
| 1933 | + Inc.
|
---|
| 1934 |
|
---|
| 1935 | This file is part of GCC.
|
---|
| 1936 |
|
---|
| 1937 | @@ -80,9 +81,9 @@
|
---|
| 1938 | && (*(unsigned long *) (pc+11) == 0x6ff0fff0))
|
---|
| 1939 | {
|
---|
| 1940 | struct rt_sigframe {
|
---|
| 1941 | - struct siginfo *pinfo;
|
---|
| 1942 | + siginfo_t *pinfo;
|
---|
| 1943 | void *puc;
|
---|
| 1944 | - struct siginfo info;
|
---|
| 1945 | + siginfo_t info;
|
---|
| 1946 | struct ucontext uc;
|
---|
| 1947 | } *rt_ = context->cfa;
|
---|
| 1948 | /* The void * cast is necessary to avoid an aliasing warning.
|
---|
| 1949 | @@ -179,7 +180,7 @@
|
---|
| 1950 | && (*(unsigned short *) (pc+14) == 0x00ad))))
|
---|
| 1951 | {
|
---|
| 1952 | struct rt_sigframe {
|
---|
| 1953 | - struct siginfo info;
|
---|
| 1954 | + siginfo_t info;
|
---|
| 1955 | struct ucontext uc;
|
---|
| 1956 | } *rt_ = context->cfa;
|
---|
| 1957 | /* The void * cast is necessary to avoid an aliasing warning.
|
---|
| 1958 | diff -Naur gcc-4.6.3.orig/gcc/config/sh/sh.c gcc-4.6.3/gcc/config/sh/sh.c
|
---|
| 1959 | --- gcc-4.6.3.orig/gcc/config/sh/sh.c 2011-06-08 04:07:25.000000000 +0000
|
---|
| 1960 | +++ gcc-4.6.3/gcc/config/sh/sh.c 2012-07-22 23:49:56.312817000 +0000
|
---|
| 1961 | @@ -763,11 +763,6 @@
|
---|
| 1962 | SUBTARGET_OVERRIDE_OPTIONS;
|
---|
| 1963 | if (optimize > 1 && !optimize_size)
|
---|
| 1964 | target_flags |= MASK_SAVE_ALL_TARGET_REGS;
|
---|
| 1965 | - if (flag_finite_math_only == 2)
|
---|
| 1966 | - flag_finite_math_only
|
---|
| 1967 | - = !flag_signaling_nans && TARGET_SH2E && ! TARGET_IEEE;
|
---|
| 1968 | - if (TARGET_SH2E && !flag_finite_math_only)
|
---|
| 1969 | - target_flags |= MASK_IEEE;
|
---|
| 1970 | sh_cpu = PROCESSOR_SH1;
|
---|
| 1971 | assembler_dialect = 0;
|
---|
| 1972 | if (TARGET_SH2)
|
---|
| 1973 | @@ -911,8 +906,6 @@
|
---|
| 1974 | if (! VALID_REGISTER_P (ADDREGNAMES_REGNO (regno)))
|
---|
| 1975 | sh_additional_register_names[regno][0] = '\0';
|
---|
| 1976 |
|
---|
| 1977 | - flag_omit_frame_pointer = (PREFERRED_DEBUGGING_TYPE == DWARF2_DEBUG);
|
---|
| 1978 | -
|
---|
| 1979 | if ((flag_pic && ! TARGET_PREFERGOT)
|
---|
| 1980 | || (TARGET_SHMEDIA && !TARGET_PT_FIXED))
|
---|
| 1981 | flag_no_function_cse = 1;
|
---|
| 1982 | @@ -944,22 +937,17 @@
|
---|
| 1983 | flag_schedule_insns = 0;
|
---|
| 1984 | }
|
---|
| 1985 |
|
---|
| 1986 | - if ((target_flags_explicit & MASK_ACCUMULATE_OUTGOING_ARGS) == 0)
|
---|
| 1987 | - target_flags |= MASK_ACCUMULATE_OUTGOING_ARGS;
|
---|
| 1988 | -
|
---|
| 1989 | /* Unwind info is not correct around the CFG unless either a frame
|
---|
| 1990 | pointer is present or M_A_O_A is set. Fixing this requires rewriting
|
---|
| 1991 | unwind info generation to be aware of the CFG and propagating states
|
---|
| 1992 | around edges. */
|
---|
| 1993 | if ((flag_unwind_tables || flag_asynchronous_unwind_tables
|
---|
| 1994 | || flag_exceptions || flag_non_call_exceptions)
|
---|
| 1995 | - && flag_omit_frame_pointer
|
---|
| 1996 | - && !(target_flags & MASK_ACCUMULATE_OUTGOING_ARGS))
|
---|
| 1997 | + && flag_omit_frame_pointer && !TARGET_ACCUMULATE_OUTGOING_ARGS)
|
---|
| 1998 | {
|
---|
| 1999 | - if (target_flags_explicit & MASK_ACCUMULATE_OUTGOING_ARGS)
|
---|
| 2000 | warning (0, "unwind tables currently require either a frame pointer "
|
---|
| 2001 | "or -maccumulate-outgoing-args for correctness");
|
---|
| 2002 | - target_flags |= MASK_ACCUMULATE_OUTGOING_ARGS;
|
---|
| 2003 | + TARGET_ACCUMULATE_OUTGOING_ARGS = 1;
|
---|
| 2004 | }
|
---|
| 2005 |
|
---|
| 2006 | /* Unwinding with -freorder-blocks-and-partition does not work on this
|
---|
| 2007 | @@ -1014,11 +1002,16 @@
|
---|
| 2008 | align_functions = min_align;
|
---|
| 2009 | }
|
---|
| 2010 |
|
---|
| 2011 | + /* If the -mieee option was not explicitly set by the user, turn it on
|
---|
| 2012 | + unless -ffinite-math-only was specified. See also PR 33135. */
|
---|
| 2013 | + if (! global_options_set.x_TARGET_IEEE)
|
---|
| 2014 | + TARGET_IEEE = ! flag_finite_math_only;
|
---|
| 2015 | +
|
---|
| 2016 | if (sh_fixed_range_str)
|
---|
| 2017 | sh_fix_range (sh_fixed_range_str);
|
---|
| 2018 |
|
---|
| 2019 | /* This target defaults to strict volatile bitfields. */
|
---|
| 2020 | - if (flag_strict_volatile_bitfields < 0)
|
---|
| 2021 | + if (flag_strict_volatile_bitfields < 0 && abi_version_at_least(2))
|
---|
| 2022 | flag_strict_volatile_bitfields = 1;
|
---|
| 2023 | }
|
---|
| 2024 | |
---|
| 2025 |
|
---|
| 2026 | diff -Naur gcc-4.6.3.orig/gcc/config/sh/sh.opt gcc-4.6.3/gcc/config/sh/sh.opt
|
---|
| 2027 | --- gcc-4.6.3.orig/gcc/config/sh/sh.opt 2010-10-22 12:14:45.000000000 +0000
|
---|
| 2028 | +++ gcc-4.6.3/gcc/config/sh/sh.opt 2012-07-22 23:49:56.312817000 +0000
|
---|
| 2029 | @@ -202,7 +202,7 @@
|
---|
| 2030 | Generate FPU-less SHcompact code
|
---|
| 2031 |
|
---|
| 2032 | maccumulate-outgoing-args
|
---|
| 2033 | -Target Report Mask(ACCUMULATE_OUTGOING_ARGS)
|
---|
| 2034 | +Target Report Var(TARGET_ACCUMULATE_OUTGOING_ARGS) Init(1)
|
---|
| 2035 | Reserve space for outgoing arguments in the function prologue
|
---|
| 2036 |
|
---|
| 2037 | madjust-unroll
|
---|
| 2038 | @@ -270,8 +270,8 @@
|
---|
| 2039 | Follow Renesas (formerly Hitachi) / SuperH calling conventions
|
---|
| 2040 |
|
---|
| 2041 | mieee
|
---|
| 2042 | -Target Report Mask(IEEE)
|
---|
| 2043 | -Increase the IEEE compliance for floating-point code
|
---|
| 2044 | +Target Var(TARGET_IEEE)
|
---|
| 2045 | +Increase the IEEE compliance for floating-point comparisons
|
---|
| 2046 |
|
---|
| 2047 | mindexed-addressing
|
---|
| 2048 | Target Report Mask(ALLOW_INDEXED_ADDRESS) Condition(SUPPORT_ANY_SH5_32MEDIA)
|
---|
| 2049 | diff -Naur gcc-4.6.3.orig/gcc/config/sol2.h gcc-4.6.3/gcc/config/sol2.h
|
---|
| 2050 | --- gcc-4.6.3.orig/gcc/config/sol2.h 2011-07-15 09:39:41.000000000 +0000
|
---|
| 2051 | +++ gcc-4.6.3/gcc/config/sol2.h 2012-08-16 13:21:11.398440000 +0000
|
---|
| 2052 | @@ -1,6 +1,6 @@
|
---|
| 2053 | /* Operating system specific defines to be used when targeting GCC for any
|
---|
| 2054 | Solaris 2 system.
|
---|
| 2055 | - Copyright 2002, 2003, 2004, 2007, 2008, 2009, 2010, 2011
|
---|
| 2056 | + Copyright 2002, 2003, 2004, 2007, 2008, 2009, 2010, 2011, 2012
|
---|
| 2057 | Free Software Foundation, Inc.
|
---|
| 2058 |
|
---|
| 2059 | This file is part of GCC.
|
---|
| 2060 | @@ -163,12 +163,12 @@
|
---|
| 2061 | %{YP,*} \
|
---|
| 2062 | %{R*} \
|
---|
| 2063 | %{compat-bsd: \
|
---|
| 2064 | - %{!YP,*:%{p|pg:-Y P,%R/usr/ucblib:%R/usr/ccs/lib/libp:%R/usr/lib/libp:%R/usr/ccs/lib:%R/usr/lib} \
|
---|
| 2065 | - %{!p:%{!pg:-Y P,%R/usr/ucblib:%R/usr/ccs/lib:%R/usr/lib}}} \
|
---|
| 2066 | + %{!YP,*:%{p|pg:-Y P,%R/usr/ucblib:%R/usr/ccs/lib/libp:%R/usr/lib/libp:%R/usr/ccs/lib:%R/usr/lib:%R/lib} \
|
---|
| 2067 | + %{!p:%{!pg:-Y P,%R/usr/ucblib:%R/usr/ccs/lib:%R/usr/lib:%R/lib}}} \
|
---|
| 2068 | -R %R/usr/ucblib} \
|
---|
| 2069 | %{!compat-bsd: \
|
---|
| 2070 | - %{!YP,*:%{p|pg:-Y P,%R/usr/ccs/lib/libp:%R/usr/lib/libp:%R/usr/ccs/lib:%R/usr/lib} \
|
---|
| 2071 | - %{!p:%{!pg:-Y P,%R/usr/ccs/lib:%R/usr/lib}}}}"
|
---|
| 2072 | + %{!YP,*:%{p|pg:-Y P,%R/usr/ccs/lib/libp:%R/usr/lib/libp:%R/usr/ccs/lib:%R/usr/lib:%R/lib} \
|
---|
| 2073 | + %{!p:%{!pg:-Y P,%R/usr/ccs/lib:%R/usr/lib:%R/lib}}}}"
|
---|
| 2074 |
|
---|
| 2075 | #undef LINK_ARCH32_SPEC
|
---|
| 2076 | #define LINK_ARCH32_SPEC LINK_ARCH32_SPEC_BASE
|
---|
| 2077 | diff -Naur gcc-4.6.3.orig/gcc/config/sparc/sol2-bi.h gcc-4.6.3/gcc/config/sparc/sol2-bi.h
|
---|
| 2078 | --- gcc-4.6.3.orig/gcc/config/sparc/sol2-bi.h 2011-02-17 13:57:21.000000000 +0000
|
---|
| 2079 | +++ gcc-4.6.3/gcc/config/sparc/sol2-bi.h 2012-08-16 13:21:11.398440000 +0000
|
---|
| 2080 | @@ -1,6 +1,6 @@
|
---|
| 2081 | /* Definitions of target machine for GCC, for bi-arch SPARC
|
---|
| 2082 | running Solaris 2 using the system assembler and linker.
|
---|
| 2083 | - Copyright (C) 2002, 2003, 2004, 2006, 2007, 2009, 2010, 2011
|
---|
| 2084 | + Copyright (C) 2002, 2003, 2004, 2006, 2007, 2009, 2010, 2011, 2012
|
---|
| 2085 | Free Software Foundation, Inc.
|
---|
| 2086 |
|
---|
| 2087 | This file is part of GCC.
|
---|
| 2088 | @@ -191,12 +191,12 @@
|
---|
| 2089 | %{YP,*} \
|
---|
| 2090 | %{R*} \
|
---|
| 2091 | %{compat-bsd: \
|
---|
| 2092 | - %{!YP,*:%{p|pg:-Y P,%R/usr/ucblib/sparcv9:%R/usr/lib/libp/sparcv9:%R/usr/lib/sparcv9} \
|
---|
| 2093 | - %{!p:%{!pg:-Y P,%R/usr/ucblib/sparcv9:%R/usr/lib/sparcv9}}} \
|
---|
| 2094 | + %{!YP,*:%{p|pg:-Y P,%R/usr/ucblib/sparcv9:%R/usr/lib/libp/sparcv9:%R/usr/lib/sparcv9:%R/lib/sparcv9} \
|
---|
| 2095 | + %{!p:%{!pg:-Y P,%R/usr/ucblib/sparcv9:%R/usr/lib/sparcv9:%R/lib/sparcv9}}} \
|
---|
| 2096 | -R %R/usr/ucblib/sparcv9} \
|
---|
| 2097 | %{!compat-bsd: \
|
---|
| 2098 | - %{!YP,*:%{p|pg:-Y P,%R/usr/lib/libp/sparcv9:%R/usr/lib/sparcv9} \
|
---|
| 2099 | - %{!p:%{!pg:-Y P,%R/usr/lib/sparcv9}}}}"
|
---|
| 2100 | + %{!YP,*:%{p|pg:-Y P,%R/usr/lib/libp/sparcv9:%R/usr/lib/sparcv9:%R/lib/sparcv9} \
|
---|
| 2101 | + %{!p:%{!pg:-Y P,%R/usr/lib/sparcv9:%R/lib/sparcv9}}}}"
|
---|
| 2102 |
|
---|
| 2103 | #define LINK_ARCH64_SPEC LINK_ARCH64_SPEC_BASE
|
---|
| 2104 |
|
---|
| 2105 | diff -Naur gcc-4.6.3.orig/gcc/config/sparc/sparc.c gcc-4.6.3/gcc/config/sparc/sparc.c
|
---|
| 2106 | --- gcc-4.6.3.orig/gcc/config/sparc/sparc.c 2011-12-16 23:38:34.000000000 +0000
|
---|
| 2107 | +++ gcc-4.6.3/gcc/config/sparc/sparc.c 2012-04-09 08:53:49.126746000 +0000
|
---|
| 2108 | @@ -3658,13 +3658,17 @@
|
---|
| 2109 | {
|
---|
| 2110 | x = delegitimize_mem_from_attrs (x);
|
---|
| 2111 |
|
---|
| 2112 | - if (GET_CODE (x) == LO_SUM
|
---|
| 2113 | - && GET_CODE (XEXP (x, 1)) == UNSPEC
|
---|
| 2114 | - && XINT (XEXP (x, 1), 1) == UNSPEC_TLSLE)
|
---|
| 2115 | - {
|
---|
| 2116 | - x = XVECEXP (XEXP (x, 1), 0, 0);
|
---|
| 2117 | - gcc_assert (GET_CODE (x) == SYMBOL_REF);
|
---|
| 2118 | - }
|
---|
| 2119 | + if (GET_CODE (x) == LO_SUM && GET_CODE (XEXP (x, 1)) == UNSPEC)
|
---|
| 2120 | + switch (XINT (XEXP (x, 1), 1))
|
---|
| 2121 | + {
|
---|
| 2122 | + case UNSPEC_MOVE_PIC:
|
---|
| 2123 | + case UNSPEC_TLSLE:
|
---|
| 2124 | + x = XVECEXP (XEXP (x, 1), 0, 0);
|
---|
| 2125 | + gcc_assert (GET_CODE (x) == SYMBOL_REF);
|
---|
| 2126 | + break;
|
---|
| 2127 | + default:
|
---|
| 2128 | + break;
|
---|
| 2129 | + }
|
---|
| 2130 |
|
---|
| 2131 | return x;
|
---|
| 2132 | }
|
---|
| 2133 | @@ -9634,6 +9638,7 @@
|
---|
| 2134 | void_list_node));
|
---|
| 2135 | DECL_RESULT (decl) = build_decl (BUILTINS_LOCATION, RESULT_DECL,
|
---|
| 2136 | NULL_TREE, void_type_node);
|
---|
| 2137 | + TREE_PUBLIC (decl) = 1;
|
---|
| 2138 | TREE_STATIC (decl) = 1;
|
---|
| 2139 | make_decl_one_only (decl, DECL_ASSEMBLER_NAME (decl));
|
---|
| 2140 | DECL_VISIBILITY (decl) = VISIBILITY_HIDDEN;
|
---|
| 2141 | diff -Naur gcc-4.6.3.orig/gcc/config/spu/spu.c gcc-4.6.3/gcc/config/spu/spu.c
|
---|
| 2142 | --- gcc-4.6.3.orig/gcc/config/spu/spu.c 2011-07-15 12:33:27.000000000 +0000
|
---|
| 2143 | +++ gcc-4.6.3/gcc/config/spu/spu.c 2012-03-02 14:51:58.551861000 +0000
|
---|
| 2144 | @@ -6794,6 +6794,7 @@
|
---|
| 2145 | case scalar_to_vec:
|
---|
| 2146 | case cond_branch_not_taken:
|
---|
| 2147 | case vec_perm:
|
---|
| 2148 | + case vec_promote_demote:
|
---|
| 2149 | return 1;
|
---|
| 2150 |
|
---|
| 2151 | case scalar_store:
|
---|
| 2152 | diff -Naur gcc-4.6.3.orig/gcc/config/xtensa/linux-unwind.h gcc-4.6.3/gcc/config/xtensa/linux-unwind.h
|
---|
| 2153 | --- gcc-4.6.3.orig/gcc/config/xtensa/linux-unwind.h 2009-04-09 15:00:19.000000000 +0000
|
---|
| 2154 | +++ gcc-4.6.3/gcc/config/xtensa/linux-unwind.h 2012-04-20 08:08:13.688436000 +0000
|
---|
| 2155 | @@ -1,5 +1,5 @@
|
---|
| 2156 | /* DWARF2 EH unwinding support for Xtensa.
|
---|
| 2157 | - Copyright (C) 2008, 2009 Free Software Foundation, Inc.
|
---|
| 2158 | + Copyright (C) 2008, 2009, 2012 Free Software Foundation, Inc.
|
---|
| 2159 |
|
---|
| 2160 | This file is part of GCC.
|
---|
| 2161 |
|
---|
| 2162 | @@ -62,7 +62,7 @@
|
---|
| 2163 | struct sigcontext *sc;
|
---|
| 2164 |
|
---|
| 2165 | struct rt_sigframe {
|
---|
| 2166 | - struct siginfo info;
|
---|
| 2167 | + siginfo_t info;
|
---|
| 2168 | struct ucontext uc;
|
---|
| 2169 | } *rt_;
|
---|
| 2170 |
|
---|
| 2171 | diff -Naur gcc-4.6.3.orig/gcc/config.gcc gcc-4.6.3/gcc/config.gcc
|
---|
| 2172 | --- gcc-4.6.3.orig/gcc/config.gcc 2011-07-22 16:44:50.000000000 +0000
|
---|
| 2173 | +++ gcc-4.6.3/gcc/config.gcc 2012-06-04 09:53:04.873173000 +0000
|
---|
| 2174 | @@ -817,7 +817,7 @@
|
---|
| 2175 | arm*-*-linux*) # ARM GNU/Linux with ELF
|
---|
| 2176 | tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
|
---|
| 2177 | case $target in
|
---|
| 2178 | - arm*b-*)
|
---|
| 2179 | + arm*b-*-linux*)
|
---|
| 2180 | tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
|
---|
| 2181 | ;;
|
---|
| 2182 | esac
|
---|
| 2183 | @@ -925,7 +925,7 @@
|
---|
| 2184 | extra_objs="avr-devices.o"
|
---|
| 2185 | ;;
|
---|
| 2186 | avr-*-*)
|
---|
| 2187 | - tm_file="avr/avr.h dbxelf.h newlib-stdint.h"
|
---|
| 2188 | + tm_file="avr/avr.h dbxelf.h avr/avr-stdint.h"
|
---|
| 2189 | use_gcc_stdint=wrap
|
---|
| 2190 | extra_gcc_objs="driver-avr.o avr-devices.o"
|
---|
| 2191 | extra_objs="avr-devices.o"
|
---|
| 2192 | diff -Naur gcc-4.6.3.orig/gcc/configure gcc-4.6.3/gcc/configure
|
---|
| 2193 | --- gcc-4.6.3.orig/gcc/configure 2011-11-20 21:24:07.000000000 +0000
|
---|
| 2194 | +++ gcc-4.6.3/gcc/configure 2012-05-16 09:19:25.461438000 +0000
|
---|
| 2195 | @@ -4842,7 +4842,7 @@
|
---|
| 2196 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_cc_gcc_supports_ada" >&5
|
---|
| 2197 | $as_echo "$acx_cv_cc_gcc_supports_ada" >&6; }
|
---|
| 2198 |
|
---|
| 2199 | -if test x$GNATBIND != xno && test x$GNATMAKE != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
|
---|
| 2200 | +if test "x$GNATBIND" != xno && test "x$GNATMAKE" != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
|
---|
| 2201 | have_gnat=yes
|
---|
| 2202 | else
|
---|
| 2203 | have_gnat=no
|
---|
| 2204 | diff -Naur gcc-4.6.3.orig/gcc/convert.c gcc-4.6.3/gcc/convert.c
|
---|
| 2205 | --- gcc-4.6.3.orig/gcc/convert.c 2011-10-12 11:57:36.000000000 +0000
|
---|
| 2206 | +++ gcc-4.6.3/gcc/convert.c 2012-05-22 09:17:42.260176000 +0000
|
---|
| 2207 | @@ -44,11 +44,6 @@
|
---|
| 2208 | if (TREE_TYPE (expr) == type)
|
---|
| 2209 | return expr;
|
---|
| 2210 |
|
---|
| 2211 | - /* Propagate overflow to the NULL pointer. */
|
---|
| 2212 | - if (integer_zerop (expr))
|
---|
| 2213 | - return force_fit_type_double (type, double_int_zero, 0,
|
---|
| 2214 | - TREE_OVERFLOW (expr));
|
---|
| 2215 | -
|
---|
| 2216 | switch (TREE_CODE (TREE_TYPE (expr)))
|
---|
| 2217 | {
|
---|
| 2218 | case POINTER_TYPE:
|
---|
| 2219 | diff -Naur gcc-4.6.3.orig/gcc/cp/decl.c gcc-4.6.3/gcc/cp/decl.c
|
---|
| 2220 | --- gcc-4.6.3.orig/gcc/cp/decl.c 2012-02-14 23:34:34.000000000 +0000
|
---|
| 2221 | +++ gcc-4.6.3/gcc/cp/decl.c 2012-04-04 20:48:59.830836000 +0000
|
---|
| 2222 | @@ -3636,7 +3636,7 @@
|
---|
| 2223 | TYPE_SIZE_UNIT (nullptr_type_node) = size_int (GET_MODE_SIZE (ptr_mode));
|
---|
| 2224 | TYPE_UNSIGNED (nullptr_type_node) = 1;
|
---|
| 2225 | TYPE_PRECISION (nullptr_type_node) = GET_MODE_BITSIZE (ptr_mode);
|
---|
| 2226 | - SET_TYPE_MODE (nullptr_type_node, Pmode);
|
---|
| 2227 | + SET_TYPE_MODE (nullptr_type_node, ptr_mode);
|
---|
| 2228 | record_builtin_type (RID_MAX, "decltype(nullptr)", nullptr_type_node);
|
---|
| 2229 | nullptr_node = build_int_cst (nullptr_type_node, 0);
|
---|
| 2230 | }
|
---|
| 2231 | diff -Naur gcc-4.6.3.orig/gcc/cp/pt.c gcc-4.6.3/gcc/cp/pt.c
|
---|
| 2232 | --- gcc-4.6.3.orig/gcc/cp/pt.c 2012-02-14 23:36:19.000000000 +0000
|
---|
| 2233 | +++ gcc-4.6.3/gcc/cp/pt.c 2012-04-03 22:51:08.968182000 +0000
|
---|
| 2234 | @@ -17785,6 +17785,7 @@
|
---|
| 2235 | }
|
---|
| 2236 | else
|
---|
| 2237 | {
|
---|
| 2238 | + tree tmp;
|
---|
| 2239 | decl = tsubst_copy (TREE_PURPOSE (t), argvec,
|
---|
| 2240 | tf_warning_or_error, NULL_TREE);
|
---|
| 2241 |
|
---|
| 2242 | @@ -17793,10 +17794,17 @@
|
---|
| 2243 | in_base_initializer = 1;
|
---|
| 2244 |
|
---|
| 2245 | init = TREE_VALUE (t);
|
---|
| 2246 | + tmp = init;
|
---|
| 2247 | if (init != void_type_node)
|
---|
| 2248 | init = tsubst_expr (init, argvec,
|
---|
| 2249 | tf_warning_or_error, NULL_TREE,
|
---|
| 2250 | /*integral_constant_expression_p=*/false);
|
---|
| 2251 | + if (init == NULL_TREE && tmp != NULL_TREE)
|
---|
| 2252 | + /* If we had an initializer but it instantiated to nothing,
|
---|
| 2253 | + value-initialize the object. This will only occur when
|
---|
| 2254 | + the initializer was a pack expansion where the parameter
|
---|
| 2255 | + packs used in that expansion were of length zero. */
|
---|
| 2256 | + init = void_type_node;
|
---|
| 2257 | in_base_initializer = 0;
|
---|
| 2258 | }
|
---|
| 2259 |
|
---|
| 2260 | diff -Naur gcc-4.6.3.orig/gcc/cp/semantics.c gcc-4.6.3/gcc/cp/semantics.c
|
---|
| 2261 | --- gcc-4.6.3.orig/gcc/cp/semantics.c 2012-02-09 17:17:36.000000000 +0000
|
---|
| 2262 | +++ gcc-4.6.3/gcc/cp/semantics.c 2012-04-03 22:50:13.736130000 +0000
|
---|
| 2263 | @@ -6763,7 +6763,6 @@
|
---|
| 2264 |
|
---|
| 2265 | STRIP_NOPS (sub);
|
---|
| 2266 | subtype = TREE_TYPE (sub);
|
---|
| 2267 | - gcc_assert (POINTER_TYPE_P (subtype));
|
---|
| 2268 |
|
---|
| 2269 | if (TREE_CODE (sub) == ADDR_EXPR)
|
---|
| 2270 | {
|
---|
| 2271 | diff -Naur gcc-4.6.3.orig/gcc/cp/typeck.c gcc-4.6.3/gcc/cp/typeck.c
|
---|
| 2272 | --- gcc-4.6.3.orig/gcc/cp/typeck.c 2012-01-16 21:34:26.000000000 +0000
|
---|
| 2273 | +++ gcc-4.6.3/gcc/cp/typeck.c 2012-06-25 20:37:14.416810000 +0000
|
---|
| 2274 | @@ -1822,7 +1822,7 @@
|
---|
| 2275 | if (error_operand_p (exp))
|
---|
| 2276 | return error_mark_node;
|
---|
| 2277 |
|
---|
| 2278 | - if (NULLPTR_TYPE_P (type))
|
---|
| 2279 | + if (NULLPTR_TYPE_P (type) && !TREE_SIDE_EFFECTS (exp))
|
---|
| 2280 | return nullptr_node;
|
---|
| 2281 |
|
---|
| 2282 | /* build_c_cast puts on a NOP_EXPR to make the result not an lvalue.
|
---|
| 2283 | diff -Naur gcc-4.6.3.orig/gcc/df-problems.c gcc-4.6.3/gcc/df-problems.c
|
---|
| 2284 | --- gcc-4.6.3.orig/gcc/df-problems.c 2011-07-07 19:10:01.000000000 +0000
|
---|
| 2285 | +++ gcc-4.6.3/gcc/df-problems.c 2012-07-16 09:36:04.162835000 +0000
|
---|
| 2286 | @@ -3956,6 +3956,19 @@
|
---|
| 2287 | df_simulate_initialize_backwards (merge_bb, test_use);
|
---|
| 2288 | for (insn = across_to; ; insn = next)
|
---|
| 2289 | {
|
---|
| 2290 | + if (CALL_P (insn))
|
---|
| 2291 | + {
|
---|
| 2292 | + if (RTL_CONST_OR_PURE_CALL_P (insn))
|
---|
| 2293 | + /* Pure functions can read from memory. Const functions can
|
---|
| 2294 | + read from arguments that the ABI has forced onto the stack.
|
---|
| 2295 | + Neither sort of read can be volatile. */
|
---|
| 2296 | + memrefs_in_across |= MEMREF_NORMAL;
|
---|
| 2297 | + else
|
---|
| 2298 | + {
|
---|
| 2299 | + memrefs_in_across |= MEMREF_VOLATILE;
|
---|
| 2300 | + mem_sets_in_across |= MEMREF_VOLATILE;
|
---|
| 2301 | + }
|
---|
| 2302 | + }
|
---|
| 2303 | if (NONDEBUG_INSN_P (insn))
|
---|
| 2304 | {
|
---|
| 2305 | df_simulate_find_defs (insn, test_set);
|
---|
| 2306 | diff -Naur gcc-4.6.3.orig/gcc/doc/install.texi gcc-4.6.3/gcc/doc/install.texi
|
---|
| 2307 | --- gcc-4.6.3.orig/gcc/doc/install.texi 2011-03-21 12:13:26.000000000 +0000
|
---|
| 2308 | +++ gcc-4.6.3/gcc/doc/install.texi 2012-04-06 08:28:56.865123000 +0000
|
---|
| 2309 | @@ -1208,7 +1208,7 @@
|
---|
| 2310 |
|
---|
| 2311 | @item --with-llsc
|
---|
| 2312 | On MIPS targets, make @option{-mllsc} the default when no
|
---|
| 2313 | -@option{-mno-lsc} option is passed. This is the default for
|
---|
| 2314 | +@option{-mno-llsc} option is passed. This is the default for
|
---|
| 2315 | Linux-based targets, as the kernel will emulate them if the ISA does
|
---|
| 2316 | not provide them.
|
---|
| 2317 |
|
---|
| 2318 | diff -Naur gcc-4.6.3.orig/gcc/doc/invoke.texi gcc-4.6.3/gcc/doc/invoke.texi
|
---|
| 2319 | --- gcc-4.6.3.orig/gcc/doc/invoke.texi 2012-01-03 16:43:38.000000000 +0000
|
---|
| 2320 | +++ gcc-4.6.3/gcc/doc/invoke.texi 2012-07-22 23:49:56.312817000 +0000
|
---|
| 2321 | @@ -853,8 +853,8 @@
|
---|
| 2322 | -m5-compact -m5-compact-nofpu @gol
|
---|
| 2323 | -mb -ml -mdalign -mrelax @gol
|
---|
| 2324 | -mbigtable -mfmovd -mhitachi -mrenesas -mno-renesas -mnomacsave @gol
|
---|
| 2325 | --mieee -mbitops -misize -minline-ic_invalidate -mpadstruct -mspace @gol
|
---|
| 2326 | --mprefergot -musermode -multcost=@var{number} -mdiv=@var{strategy} @gol
|
---|
| 2327 | +-mieee -mno-ieee -mbitops -misize -minline-ic_invalidate -mpadstruct @gol
|
---|
| 2328 | +-mspace -mprefergot -musermode -multcost=@var{number} -mdiv=@var{strategy} @gol
|
---|
| 2329 | -mdivsi3_libfunc=@var{name} -mfixed-range=@var{register-range} @gol
|
---|
| 2330 | -madjust-unroll -mindexed-addressing -mgettrcost=@var{number} -mpt-fixed @gol
|
---|
| 2331 | -maccumulate-outgoing-args -minvalid-symbols}
|
---|
| 2332 | @@ -16938,13 +16938,15 @@
|
---|
| 2333 | @option{-mhitachi} is given.
|
---|
| 2334 |
|
---|
| 2335 | @item -mieee
|
---|
| 2336 | +@item -mno-ieee
|
---|
| 2337 | @opindex mieee
|
---|
| 2338 | -Increase IEEE-compliance of floating-point code.
|
---|
| 2339 | -At the moment, this is equivalent to @option{-fno-finite-math-only}.
|
---|
| 2340 | -When generating 16 bit SH opcodes, getting IEEE-conforming results for
|
---|
| 2341 | -comparisons of NANs / infinities incurs extra overhead in every
|
---|
| 2342 | -floating point comparison, therefore the default is set to
|
---|
| 2343 | -@option{-ffinite-math-only}.
|
---|
| 2344 | +@opindex mnoieee
|
---|
| 2345 | +Control the IEEE compliance of floating-point comparisons, which affects the
|
---|
| 2346 | +handling of cases where the result of a comparison is unordered. By default
|
---|
| 2347 | +@option{-mieee} is implicitly enabled. If @option{-ffinite-math-only} is
|
---|
| 2348 | +enabled @option{-mno-ieee} is implicitly set, which results in faster
|
---|
| 2349 | +floating-point greater-equal and less-equal comparisons. The implcit settings
|
---|
| 2350 | +can be overridden by specifying either @option{-mieee} or @option{-mno-ieee}.
|
---|
| 2351 |
|
---|
| 2352 | @item -minline-ic_invalidate
|
---|
| 2353 | @opindex minline-ic_invalidate
|
---|
| 2354 | diff -Naur gcc-4.6.3.orig/gcc/doc/tm.texi gcc-4.6.3/gcc/doc/tm.texi
|
---|
| 2355 | --- gcc-4.6.3.orig/gcc/doc/tm.texi 2011-06-04 10:15:48.000000000 +0000
|
---|
| 2356 | +++ gcc-4.6.3/gcc/doc/tm.texi 2012-08-10 13:26:44.694722000 +0000
|
---|
| 2357 | @@ -1118,6 +1118,14 @@
|
---|
| 2358 | If the value of this macro has a type, it should be an unsigned type.
|
---|
| 2359 | @end defmac
|
---|
| 2360 |
|
---|
| 2361 | +@deftypefn {Target Hook} HOST_WIDE_INT TARGET_VECTOR_ALIGNMENT (const_tree @var{type})
|
---|
| 2362 | +This hook can be used to define the alignment for a vector of type
|
---|
| 2363 | +@var{type}, in order to comply with a platform ABI. The default is to
|
---|
| 2364 | +require natural alignment for vector types. The alignment returned by
|
---|
| 2365 | +this hook must be a power-of-two multiple of the default alignment of
|
---|
| 2366 | +the vector element type.
|
---|
| 2367 | +@end deftypefn
|
---|
| 2368 | +
|
---|
| 2369 | @defmac STACK_SLOT_ALIGNMENT (@var{type}, @var{mode}, @var{basic-align})
|
---|
| 2370 | If defined, a C expression to compute the alignment for stack slot.
|
---|
| 2371 | @var{type} is the data type, @var{mode} is the widest mode available,
|
---|
| 2372 | diff -Naur gcc-4.6.3.orig/gcc/doc/tm.texi.in gcc-4.6.3/gcc/doc/tm.texi.in
|
---|
| 2373 | --- gcc-4.6.3.orig/gcc/doc/tm.texi.in 2011-06-04 10:15:48.000000000 +0000
|
---|
| 2374 | +++ gcc-4.6.3/gcc/doc/tm.texi.in 2012-08-10 13:26:44.694722000 +0000
|
---|
| 2375 | @@ -1108,6 +1108,8 @@
|
---|
| 2376 | If the value of this macro has a type, it should be an unsigned type.
|
---|
| 2377 | @end defmac
|
---|
| 2378 |
|
---|
| 2379 | +@hook TARGET_VECTOR_ALIGNMENT
|
---|
| 2380 | +
|
---|
| 2381 | @defmac STACK_SLOT_ALIGNMENT (@var{type}, @var{mode}, @var{basic-align})
|
---|
| 2382 | If defined, a C expression to compute the alignment for stack slot.
|
---|
| 2383 | @var{type} is the data type, @var{mode} is the widest mode available,
|
---|
| 2384 | diff -Naur gcc-4.6.3.orig/gcc/expr.c gcc-4.6.3/gcc/expr.c
|
---|
| 2385 | --- gcc-4.6.3.orig/gcc/expr.c 2012-02-09 17:28:22.000000000 +0000
|
---|
| 2386 | +++ gcc-4.6.3/gcc/expr.c 2012-06-28 12:01:16.874415000 +0000
|
---|
| 2387 | @@ -5971,6 +5971,8 @@
|
---|
| 2388 | || bitpos % GET_MODE_ALIGNMENT (mode))
|
---|
| 2389 | && SLOW_UNALIGNED_ACCESS (mode, MEM_ALIGN (target)))
|
---|
| 2390 | || (bitpos % BITS_PER_UNIT != 0)))
|
---|
| 2391 | + || (bitsize >= 0 && mode != BLKmode
|
---|
| 2392 | + && GET_MODE_BITSIZE (mode) > bitsize)
|
---|
| 2393 | /* If the RHS and field are a constant size and the size of the
|
---|
| 2394 | RHS isn't the same size as the bitfield, we must use bitfield
|
---|
| 2395 | operations. */
|
---|
| 2396 | @@ -9182,6 +9184,7 @@
|
---|
| 2397 | orig_op0 = op0
|
---|
| 2398 | = expand_expr (tem,
|
---|
| 2399 | (TREE_CODE (TREE_TYPE (tem)) == UNION_TYPE
|
---|
| 2400 | + && COMPLETE_TYPE_P (TREE_TYPE (tem))
|
---|
| 2401 | && (TREE_CODE (TYPE_SIZE (TREE_TYPE (tem)))
|
---|
| 2402 | != INTEGER_CST)
|
---|
| 2403 | && modifier != EXPAND_STACK_PARM
|
---|
| 2404 | diff -Naur gcc-4.6.3.orig/gcc/fortran/decl.c gcc-4.6.3/gcc/fortran/decl.c
|
---|
| 2405 | --- gcc-4.6.3.orig/gcc/fortran/decl.c 2011-06-02 19:53:02.000000000 +0000
|
---|
| 2406 | +++ gcc-4.6.3/gcc/fortran/decl.c 2012-06-14 13:11:27.149798000 +0000
|
---|
| 2407 | @@ -3623,8 +3623,9 @@
|
---|
| 2408 | }
|
---|
| 2409 | }
|
---|
| 2410 |
|
---|
| 2411 | - /* Module variables implicitly have the SAVE attribute. */
|
---|
| 2412 | - if (gfc_current_state () == COMP_MODULE && !current_attr.save)
|
---|
| 2413 | + /* Since Fortran 2008 module variables implicitly have the SAVE attribute. */
|
---|
| 2414 | + if (gfc_current_state () == COMP_MODULE && !current_attr.save
|
---|
| 2415 | + && (gfc_option.allow_std & GFC_STD_F2008) != 0)
|
---|
| 2416 | current_attr.save = SAVE_IMPLICIT;
|
---|
| 2417 |
|
---|
| 2418 | colon_seen = 1;
|
---|
| 2419 | diff -Naur gcc-4.6.3.orig/gcc/fortran/expr.c gcc-4.6.3/gcc/fortran/expr.c
|
---|
| 2420 | --- gcc-4.6.3.orig/gcc/fortran/expr.c 2012-01-19 22:21:43.000000000 +0000
|
---|
| 2421 | +++ gcc-4.6.3/gcc/fortran/expr.c 2012-05-02 12:53:20.873985000 +0000
|
---|
| 2422 | @@ -4474,7 +4474,11 @@
|
---|
| 2423 | if (ptr_component && ref->type == REF_COMPONENT)
|
---|
| 2424 | check_intentin = false;
|
---|
| 2425 | if (ref->type == REF_COMPONENT && ref->u.c.component->attr.pointer)
|
---|
| 2426 | - ptr_component = true;
|
---|
| 2427 | + {
|
---|
| 2428 | + ptr_component = true;
|
---|
| 2429 | + if (!pointer)
|
---|
| 2430 | + check_intentin = false;
|
---|
| 2431 | + }
|
---|
| 2432 | }
|
---|
| 2433 | if (check_intentin && sym->attr.intent == INTENT_IN)
|
---|
| 2434 | {
|
---|
| 2435 | diff -Naur gcc-4.6.3.orig/gcc/fortran/resolve.c gcc-4.6.3/gcc/fortran/resolve.c
|
---|
| 2436 | --- gcc-4.6.3.orig/gcc/fortran/resolve.c 2012-01-25 08:11:56.000000000 +0000
|
---|
| 2437 | +++ gcc-4.6.3/gcc/fortran/resolve.c 2012-06-05 13:05:31.580646000 +0000
|
---|
| 2438 | @@ -1452,7 +1452,7 @@
|
---|
| 2439 |
|
---|
| 2440 | if (sym->intmod_sym_id)
|
---|
| 2441 | isym = gfc_intrinsic_function_by_id ((gfc_isym_id) sym->intmod_sym_id);
|
---|
| 2442 | - else
|
---|
| 2443 | + else if (!sym->attr.subroutine)
|
---|
| 2444 | isym = gfc_find_function (sym->name);
|
---|
| 2445 |
|
---|
| 2446 | if (isym)
|
---|
| 2447 | @@ -9700,7 +9700,8 @@
|
---|
| 2448 | || sym->attr.data
|
---|
| 2449 | || sym->module
|
---|
| 2450 | || sym->attr.cray_pointee
|
---|
| 2451 | - || sym->attr.cray_pointer)
|
---|
| 2452 | + || sym->attr.cray_pointer
|
---|
| 2453 | + || sym->assoc)
|
---|
| 2454 | return NULL;
|
---|
| 2455 |
|
---|
| 2456 | /* Now we'll try to build an initializer expression. */
|
---|
| 2457 | diff -Naur gcc-4.6.3.orig/gcc/fortran/trans-array.c gcc-4.6.3/gcc/fortran/trans-array.c
|
---|
| 2458 | --- gcc-4.6.3.orig/gcc/fortran/trans-array.c 2011-12-08 20:54:57.000000000 +0000
|
---|
| 2459 | +++ gcc-4.6.3/gcc/fortran/trans-array.c 2012-07-14 15:24:12.262320000 +0000
|
---|
| 2460 | @@ -2056,6 +2056,11 @@
|
---|
| 2461 | gfc_se se;
|
---|
| 2462 | int n;
|
---|
| 2463 |
|
---|
| 2464 | + /* Don't evaluate the arguments for realloc_lhs_loop_for_fcn_call; otherwise,
|
---|
| 2465 | + arguments could get evaluated multiple times. */
|
---|
| 2466 | + if (ss->is_alloc_lhs)
|
---|
| 2467 | + return;
|
---|
| 2468 | +
|
---|
| 2469 | /* TODO: This can generate bad code if there are ordering dependencies,
|
---|
| 2470 | e.g., a callee allocated function and an unknown size constructor. */
|
---|
| 2471 | gcc_assert (ss != NULL);
|
---|
| 2472 | @@ -7548,7 +7553,7 @@
|
---|
| 2473 | scalar = 1;
|
---|
| 2474 | for (; arg; arg = arg->next)
|
---|
| 2475 | {
|
---|
| 2476 | - if (!arg->expr)
|
---|
| 2477 | + if (!arg->expr || arg->expr->expr_type == EXPR_NULL)
|
---|
| 2478 | continue;
|
---|
| 2479 |
|
---|
| 2480 | newss = gfc_walk_subexpr (head, arg->expr);
|
---|
| 2481 | diff -Naur gcc-4.6.3.orig/gcc/fortran/trans-types.c gcc-4.6.3/gcc/fortran/trans-types.c
|
---|
| 2482 | --- gcc-4.6.3.orig/gcc/fortran/trans-types.c 2011-11-25 17:18:05.000000000 +0000
|
---|
| 2483 | +++ gcc-4.6.3/gcc/fortran/trans-types.c 2012-03-10 09:20:22.792570000 +0000
|
---|
| 2484 | @@ -2519,7 +2519,11 @@
|
---|
| 2485 | || sym->attr.flavor == FL_PROGRAM);
|
---|
| 2486 |
|
---|
| 2487 | if (sym->backend_decl)
|
---|
| 2488 | - return TREE_TYPE (sym->backend_decl);
|
---|
| 2489 | + {
|
---|
| 2490 | + if (sym->attr.proc_pointer)
|
---|
| 2491 | + return TREE_TYPE (TREE_TYPE (sym->backend_decl));
|
---|
| 2492 | + return TREE_TYPE (sym->backend_decl);
|
---|
| 2493 | + }
|
---|
| 2494 |
|
---|
| 2495 | alternate_return = 0;
|
---|
| 2496 | typelist = NULL_TREE;
|
---|
| 2497 | diff -Naur gcc-4.6.3.orig/gcc/fortran/trans.c gcc-4.6.3/gcc/fortran/trans.c
|
---|
| 2498 | --- gcc-4.6.3.orig/gcc/fortran/trans.c 2011-02-23 22:38:27.000000000 +0000
|
---|
| 2499 | +++ gcc-4.6.3/gcc/fortran/trans.c 2012-06-01 20:06:39.161162000 +0000
|
---|
| 2500 | @@ -1005,15 +1005,12 @@
|
---|
| 2501 | if (!res && size != 0)
|
---|
| 2502 | _gfortran_os_error ("Allocation would exceed memory limit");
|
---|
| 2503 |
|
---|
| 2504 | - if (size == 0)
|
---|
| 2505 | - return NULL;
|
---|
| 2506 | -
|
---|
| 2507 | return res;
|
---|
| 2508 | } */
|
---|
| 2509 | tree
|
---|
| 2510 | gfc_call_realloc (stmtblock_t * block, tree mem, tree size)
|
---|
| 2511 | {
|
---|
| 2512 | - tree msg, res, nonzero, zero, null_result, tmp;
|
---|
| 2513 | + tree msg, res, nonzero, null_result, tmp;
|
---|
| 2514 | tree type = TREE_TYPE (mem);
|
---|
| 2515 |
|
---|
| 2516 | size = gfc_evaluate_now (size, block);
|
---|
| 2517 | @@ -1044,15 +1041,6 @@
|
---|
| 2518 | build_empty_stmt (input_location));
|
---|
| 2519 | gfc_add_expr_to_block (block, tmp);
|
---|
| 2520 |
|
---|
| 2521 | - /* if (size == 0) then the result is NULL. */
|
---|
| 2522 | - tmp = fold_build2_loc (input_location, MODIFY_EXPR, type, res,
|
---|
| 2523 | - build_int_cst (type, 0));
|
---|
| 2524 | - zero = fold_build1_loc (input_location, TRUTH_NOT_EXPR, boolean_type_node,
|
---|
| 2525 | - nonzero);
|
---|
| 2526 | - tmp = fold_build3_loc (input_location, COND_EXPR, void_type_node, zero, tmp,
|
---|
| 2527 | - build_empty_stmt (input_location));
|
---|
| 2528 | - gfc_add_expr_to_block (block, tmp);
|
---|
| 2529 | -
|
---|
| 2530 | return res;
|
---|
| 2531 | }
|
---|
| 2532 |
|
---|
| 2533 | diff -Naur gcc-4.6.3.orig/gcc/gcov-iov.c gcc-4.6.3/gcc/gcov-iov.c
|
---|
| 2534 | --- gcc-4.6.3.orig/gcc/gcov-iov.c 2011-01-03 20:52:22.000000000 +0000
|
---|
| 2535 | +++ gcc-4.6.3/gcc/gcov-iov.c 2012-06-22 12:32:34.527642000 +0000
|
---|
| 2536 | @@ -19,8 +19,8 @@
|
---|
| 2537 | along with GCC; see the file COPYING3. If not see
|
---|
| 2538 | <http://www.gnu.org/licenses/>. */
|
---|
| 2539 |
|
---|
| 2540 | -#include <stdio.h>
|
---|
| 2541 | -#include <stdlib.h>
|
---|
| 2542 | +#include "bconfig.h"
|
---|
| 2543 | +#include "system.h"
|
---|
| 2544 |
|
---|
| 2545 | /* Command line arguments are the base GCC version and the development
|
---|
| 2546 | phase (the latter may be an empty string). */
|
---|
| 2547 | @@ -48,8 +48,14 @@
|
---|
| 2548 | if (*ptr == '.')
|
---|
| 2549 | minor = strtoul (ptr + 1, 0, 10);
|
---|
| 2550 |
|
---|
| 2551 | + /* For releases the development phase is an empty string, for
|
---|
| 2552 | + prerelease versions on a release branch it is "prerelease".
|
---|
| 2553 | + Consider both equal as patch-level releases do not change
|
---|
| 2554 | + the GCOV version either.
|
---|
| 2555 | + On the trunk the development phase is "experimental". */
|
---|
| 2556 | phase = argv[2][0];
|
---|
| 2557 | - if (phase == '\0')
|
---|
| 2558 | + if (phase == '\0'
|
---|
| 2559 | + || strcmp (argv[2], "prerelease") == 0)
|
---|
| 2560 | phase = '*';
|
---|
| 2561 |
|
---|
| 2562 | v[0] = (major < 10 ? '0' : 'A' - 10) + major;
|
---|
| 2563 | diff -Naur gcc-4.6.3.orig/gcc/gimple.c gcc-4.6.3/gcc/gimple.c
|
---|
| 2564 | --- gcc-4.6.3.orig/gcc/gimple.c 2011-08-03 18:56:02.000000000 +0000
|
---|
| 2565 | +++ gcc-4.6.3/gcc/gimple.c 2012-05-22 09:23:01.937094000 +0000
|
---|
| 2566 | @@ -2275,8 +2275,6 @@
|
---|
| 2567 | bool
|
---|
| 2568 | gimple_has_side_effects (const_gimple s)
|
---|
| 2569 | {
|
---|
| 2570 | - unsigned i;
|
---|
| 2571 | -
|
---|
| 2572 | if (is_gimple_debug (s))
|
---|
| 2573 | return false;
|
---|
| 2574 |
|
---|
| 2575 | @@ -2292,45 +2290,15 @@
|
---|
| 2576 |
|
---|
| 2577 | if (is_gimple_call (s))
|
---|
| 2578 | {
|
---|
| 2579 | - unsigned nargs = gimple_call_num_args (s);
|
---|
| 2580 | + int flags = gimple_call_flags (s);
|
---|
| 2581 |
|
---|
| 2582 | - if (!(gimple_call_flags (s) & (ECF_CONST | ECF_PURE)))
|
---|
| 2583 | - return true;
|
---|
| 2584 | - else if (gimple_call_flags (s) & ECF_LOOPING_CONST_OR_PURE)
|
---|
| 2585 | - /* An infinite loop is considered a side effect. */
|
---|
| 2586 | + /* An infinite loop is considered a side effect. */
|
---|
| 2587 | + if (!(flags & (ECF_CONST | ECF_PURE))
|
---|
| 2588 | + || (flags & ECF_LOOPING_CONST_OR_PURE))
|
---|
| 2589 | return true;
|
---|
| 2590 |
|
---|
| 2591 | - if (gimple_call_lhs (s)
|
---|
| 2592 | - && TREE_SIDE_EFFECTS (gimple_call_lhs (s)))
|
---|
| 2593 | - {
|
---|
| 2594 | - gcc_checking_assert (gimple_has_volatile_ops (s));
|
---|
| 2595 | - return true;
|
---|
| 2596 | - }
|
---|
| 2597 | -
|
---|
| 2598 | - if (TREE_SIDE_EFFECTS (gimple_call_fn (s)))
|
---|
| 2599 | - return true;
|
---|
| 2600 | -
|
---|
| 2601 | - for (i = 0; i < nargs; i++)
|
---|
| 2602 | - if (TREE_SIDE_EFFECTS (gimple_call_arg (s, i)))
|
---|
| 2603 | - {
|
---|
| 2604 | - gcc_checking_assert (gimple_has_volatile_ops (s));
|
---|
| 2605 | - return true;
|
---|
| 2606 | - }
|
---|
| 2607 | -
|
---|
| 2608 | return false;
|
---|
| 2609 | }
|
---|
| 2610 | - else
|
---|
| 2611 | - {
|
---|
| 2612 | - for (i = 0; i < gimple_num_ops (s); i++)
|
---|
| 2613 | - {
|
---|
| 2614 | - tree op = gimple_op (s, i);
|
---|
| 2615 | - if (op && TREE_SIDE_EFFECTS (op))
|
---|
| 2616 | - {
|
---|
| 2617 | - gcc_checking_assert (gimple_has_volatile_ops (s));
|
---|
| 2618 | - return true;
|
---|
| 2619 | - }
|
---|
| 2620 | - }
|
---|
| 2621 | - }
|
---|
| 2622 |
|
---|
| 2623 | return false;
|
---|
| 2624 | }
|
---|
| 2625 | diff -Naur gcc-4.6.3.orig/gcc/gthr-posix.h gcc-4.6.3/gcc/gthr-posix.h
|
---|
| 2626 | --- gcc-4.6.3.orig/gcc/gthr-posix.h 2011-01-03 20:52:22.000000000 +0000
|
---|
| 2627 | +++ gcc-4.6.3/gcc/gthr-posix.h 2012-06-05 21:42:30.036539000 +0000
|
---|
| 2628 | @@ -239,16 +239,15 @@
|
---|
| 2629 | static inline int
|
---|
| 2630 | __gthread_active_p (void)
|
---|
| 2631 | {
|
---|
| 2632 | - static void *const __gthread_active_ptr
|
---|
| 2633 | - = __extension__ (void *) &__gthrw_(
|
---|
| 2634 | /* Android's C library does not provide pthread_cancel, check for
|
---|
| 2635 | `pthread_create' instead. */
|
---|
| 2636 | #ifndef __BIONIC__
|
---|
| 2637 | - pthread_cancel
|
---|
| 2638 | + static void *const __gthread_active_ptr
|
---|
| 2639 | + = __extension__ (void *) &__gthrw_(pthread_cancel);
|
---|
| 2640 | #else
|
---|
| 2641 | - pthread_create
|
---|
| 2642 | + static void *const __gthread_active_ptr
|
---|
| 2643 | + = __extension__ (void *) &__gthrw_(pthread_create);
|
---|
| 2644 | #endif
|
---|
| 2645 | - );
|
---|
| 2646 | return __gthread_active_ptr != 0;
|
---|
| 2647 | }
|
---|
| 2648 |
|
---|
| 2649 | diff -Naur gcc-4.6.3.orig/gcc/ipa-prop.c gcc-4.6.3/gcc/ipa-prop.c
|
---|
| 2650 | --- gcc-4.6.3.orig/gcc/ipa-prop.c 2011-12-13 22:03:05.000000000 +0000
|
---|
| 2651 | +++ gcc-4.6.3/gcc/ipa-prop.c 2012-07-02 15:53:21.612759000 +0000
|
---|
| 2652 | @@ -704,12 +704,11 @@
|
---|
| 2653 | || is_global_var (base))
|
---|
| 2654 | return;
|
---|
| 2655 |
|
---|
| 2656 | - if (detect_type_change (op, base, call, jfunc, offset))
|
---|
| 2657 | - return;
|
---|
| 2658 | -
|
---|
| 2659 | binfo = TYPE_BINFO (TREE_TYPE (base));
|
---|
| 2660 | - if (!binfo)
|
---|
| 2661 | + if (!binfo
|
---|
| 2662 | + || detect_type_change (op, base, call, jfunc, offset))
|
---|
| 2663 | return;
|
---|
| 2664 | +
|
---|
| 2665 | binfo = get_binfo_at_offset (binfo, offset, TREE_TYPE (op));
|
---|
| 2666 | if (binfo)
|
---|
| 2667 | {
|
---|
| 2668 | diff -Naur gcc-4.6.3.orig/gcc/lto/lto.c gcc-4.6.3/gcc/lto/lto.c
|
---|
| 2669 | --- gcc-4.6.3.orig/gcc/lto/lto.c 2011-12-13 22:03:05.000000000 +0000
|
---|
| 2670 | +++ gcc-4.6.3/gcc/lto/lto.c 2012-04-23 12:44:46.674224000 +0000
|
---|
| 2671 | @@ -893,7 +893,8 @@
|
---|
| 2672 |
|
---|
| 2673 | for (node = cgraph_nodes; node; node = node->next)
|
---|
| 2674 | {
|
---|
| 2675 | - if (!partition_cgraph_node_p (node))
|
---|
| 2676 | + if (!partition_cgraph_node_p (node)
|
---|
| 2677 | + || node->aux)
|
---|
| 2678 | continue;
|
---|
| 2679 |
|
---|
| 2680 | file_data = node->local.lto_file_data;
|
---|
| 2681 | @@ -923,13 +924,13 @@
|
---|
| 2682 | npartitions++;
|
---|
| 2683 | }
|
---|
| 2684 |
|
---|
| 2685 | - if (!node->aux)
|
---|
| 2686 | - add_cgraph_node_to_partition (partition, node);
|
---|
| 2687 | + add_cgraph_node_to_partition (partition, node);
|
---|
| 2688 | }
|
---|
| 2689 |
|
---|
| 2690 | for (vnode = varpool_nodes; vnode; vnode = vnode->next)
|
---|
| 2691 | {
|
---|
| 2692 | - if (!partition_varpool_node_p (vnode))
|
---|
| 2693 | + if (!partition_varpool_node_p (vnode)
|
---|
| 2694 | + || vnode->aux)
|
---|
| 2695 | continue;
|
---|
| 2696 | file_data = vnode->lto_file_data;
|
---|
| 2697 | slot = pointer_map_contains (pmap, file_data);
|
---|
| 2698 | @@ -943,8 +944,7 @@
|
---|
| 2699 | npartitions++;
|
---|
| 2700 | }
|
---|
| 2701 |
|
---|
| 2702 | - if (!vnode->aux)
|
---|
| 2703 | - add_varpool_node_to_partition (partition, vnode);
|
---|
| 2704 | + add_varpool_node_to_partition (partition, vnode);
|
---|
| 2705 | }
|
---|
| 2706 | for (node = cgraph_nodes; node; node = node->next)
|
---|
| 2707 | node->aux = NULL;
|
---|
| 2708 | @@ -1050,8 +1050,9 @@
|
---|
| 2709 |
|
---|
| 2710 | for (i = 0; i < n_nodes; i++)
|
---|
| 2711 | {
|
---|
| 2712 | - if (!order[i]->aux)
|
---|
| 2713 | - add_cgraph_node_to_partition (partition, order[i]);
|
---|
| 2714 | + if (order[i]->aux)
|
---|
| 2715 | + continue;
|
---|
| 2716 | + add_cgraph_node_to_partition (partition, order[i]);
|
---|
| 2717 | total_size -= order[i]->global.size;
|
---|
| 2718 |
|
---|
| 2719 | /* Once we added a new node to the partition, we also want to add
|
---|
| 2720 | @@ -1231,6 +1232,8 @@
|
---|
| 2721 | }
|
---|
| 2722 | i = best_i;
|
---|
| 2723 | /* When we are finished, avoid creating empty partition. */
|
---|
| 2724 | + while (i < n_nodes - 1 && order[i + 1]->aux)
|
---|
| 2725 | + i++;
|
---|
| 2726 | if (i == n_nodes - 1)
|
---|
| 2727 | break;
|
---|
| 2728 | partition = new_partition ("");
|
---|
| 2729 | diff -Naur gcc-4.6.3.orig/gcc/predict.c gcc-4.6.3/gcc/predict.c
|
---|
| 2730 | --- gcc-4.6.3.orig/gcc/predict.c 2011-01-22 21:47:40.000000000 +0000
|
---|
| 2731 | +++ gcc-4.6.3/gcc/predict.c 2012-03-25 10:59:19.696090000 +0000
|
---|
| 2732 | @@ -1790,7 +1790,8 @@
|
---|
| 2733 | static void
|
---|
| 2734 | predict_paths_for_bb (basic_block cur, basic_block bb,
|
---|
| 2735 | enum br_predictor pred,
|
---|
| 2736 | - enum prediction taken)
|
---|
| 2737 | + enum prediction taken,
|
---|
| 2738 | + bitmap visited)
|
---|
| 2739 | {
|
---|
| 2740 | edge e;
|
---|
| 2741 | edge_iterator ei;
|
---|
| 2742 | @@ -1811,7 +1812,7 @@
|
---|
| 2743 | continue;
|
---|
| 2744 | gcc_assert (bb == cur || dominated_by_p (CDI_POST_DOMINATORS, cur, bb));
|
---|
| 2745 |
|
---|
| 2746 | - /* See if there is how many edge from e->src that is not abnormal
|
---|
| 2747 | + /* See if there is an edge from e->src that is not abnormal
|
---|
| 2748 | and does not lead to BB. */
|
---|
| 2749 | FOR_EACH_EDGE (e2, ei2, e->src->succs)
|
---|
| 2750 | if (e2 != e
|
---|
| 2751 | @@ -1824,16 +1825,20 @@
|
---|
| 2752 |
|
---|
| 2753 | /* If there is non-abnormal path leaving e->src, predict edge
|
---|
| 2754 | using predictor. Otherwise we need to look for paths
|
---|
| 2755 | - leading to e->src. */
|
---|
| 2756 | + leading to e->src.
|
---|
| 2757 | +
|
---|
| 2758 | + The second may lead to infinite loop in the case we are predicitng
|
---|
| 2759 | + regions that are only reachable by abnormal edges. We simply
|
---|
| 2760 | + prevent visiting given BB twice. */
|
---|
| 2761 | if (found)
|
---|
| 2762 | predict_edge_def (e, pred, taken);
|
---|
| 2763 | - else
|
---|
| 2764 | - predict_paths_for_bb (e->src, e->src, pred, taken);
|
---|
| 2765 | + else if (bitmap_set_bit (visited, e->src->index))
|
---|
| 2766 | + predict_paths_for_bb (e->src, e->src, pred, taken, visited);
|
---|
| 2767 | }
|
---|
| 2768 | for (son = first_dom_son (CDI_POST_DOMINATORS, cur);
|
---|
| 2769 | son;
|
---|
| 2770 | son = next_dom_son (CDI_POST_DOMINATORS, son))
|
---|
| 2771 | - predict_paths_for_bb (son, bb, pred, taken);
|
---|
| 2772 | + predict_paths_for_bb (son, bb, pred, taken, visited);
|
---|
| 2773 | }
|
---|
| 2774 |
|
---|
| 2775 | /* Sets branch probabilities according to PREDiction and
|
---|
| 2776 | @@ -1843,7 +1848,9 @@
|
---|
| 2777 | predict_paths_leading_to (basic_block bb, enum br_predictor pred,
|
---|
| 2778 | enum prediction taken)
|
---|
| 2779 | {
|
---|
| 2780 | - predict_paths_for_bb (bb, bb, pred, taken);
|
---|
| 2781 | + bitmap visited = BITMAP_ALLOC (NULL);
|
---|
| 2782 | + predict_paths_for_bb (bb, bb, pred, taken, visited);
|
---|
| 2783 | + BITMAP_FREE (visited);
|
---|
| 2784 | }
|
---|
| 2785 |
|
---|
| 2786 | /* Like predict_paths_leading_to but take edge instead of basic block. */
|
---|
| 2787 | @@ -1866,7 +1873,11 @@
|
---|
| 2788 | break;
|
---|
| 2789 | }
|
---|
| 2790 | if (!has_nonloop_edge)
|
---|
| 2791 | - predict_paths_for_bb (bb, bb, pred, taken);
|
---|
| 2792 | + {
|
---|
| 2793 | + bitmap visited = BITMAP_ALLOC (NULL);
|
---|
| 2794 | + predict_paths_for_bb (bb, bb, pred, taken, visited);
|
---|
| 2795 | + BITMAP_FREE (visited);
|
---|
| 2796 | + }
|
---|
| 2797 | else
|
---|
| 2798 | predict_edge_def (e, pred, taken);
|
---|
| 2799 | }
|
---|
| 2800 | diff -Naur gcc-4.6.3.orig/gcc/stor-layout.c gcc-4.6.3/gcc/stor-layout.c
|
---|
| 2801 | --- gcc-4.6.3.orig/gcc/stor-layout.c 2012-02-20 22:09:48.000000000 +0000
|
---|
| 2802 | +++ gcc-4.6.3/gcc/stor-layout.c 2012-08-10 13:26:44.694722000 +0000
|
---|
| 2803 | @@ -660,12 +660,13 @@
|
---|
| 2804 | /* See if we can use an ordinary integer mode for a bit-field.
|
---|
| 2805 | Conditions are: a fixed size that is correct for another mode,
|
---|
| 2806 | occupying a complete byte or bytes on proper boundary,
|
---|
| 2807 | - and not volatile or not -fstrict-volatile-bitfields. */
|
---|
| 2808 | + and not -fstrict-volatile-bitfields. If the latter is set,
|
---|
| 2809 | + we unfortunately can't check TREE_THIS_VOLATILE, as a cast
|
---|
| 2810 | + may make a volatile object later. */
|
---|
| 2811 | if (TYPE_SIZE (type) != 0
|
---|
| 2812 | && TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST
|
---|
| 2813 | && GET_MODE_CLASS (TYPE_MODE (type)) == MODE_INT
|
---|
| 2814 | - && !(TREE_THIS_VOLATILE (decl)
|
---|
| 2815 | - && flag_strict_volatile_bitfields > 0))
|
---|
| 2816 | + && flag_strict_volatile_bitfields <= 0)
|
---|
| 2817 | {
|
---|
| 2818 | enum machine_mode xmode
|
---|
| 2819 | = mode_for_size_tree (DECL_SIZE (decl), MODE_INT, 1);
|
---|
| 2820 | @@ -1926,9 +1927,17 @@
|
---|
| 2821 | TYPE_SIZE (type) = int_const_binop (MULT_EXPR, TYPE_SIZE (innertype),
|
---|
| 2822 | bitsize_int (nunits), 0);
|
---|
| 2823 |
|
---|
| 2824 | - /* Always naturally align vectors. This prevents ABI changes
|
---|
| 2825 | - depending on whether or not native vector modes are supported. */
|
---|
| 2826 | - TYPE_ALIGN (type) = tree_low_cst (TYPE_SIZE (type), 0);
|
---|
| 2827 | + /* For vector types, we do not default to the mode's alignment.
|
---|
| 2828 | + Instead, query a target hook, defaulting to natural alignment.
|
---|
| 2829 | + This prevents ABI changes depending on whether or not native
|
---|
| 2830 | + vector modes are supported. */
|
---|
| 2831 | + TYPE_ALIGN (type) = targetm.vector_alignment (type);
|
---|
| 2832 | +
|
---|
| 2833 | + /* However, if the underlying mode requires a bigger alignment than
|
---|
| 2834 | + what the target hook provides, we cannot use the mode. For now,
|
---|
| 2835 | + simply reject that case. */
|
---|
| 2836 | + gcc_assert (TYPE_ALIGN (type)
|
---|
| 2837 | + >= GET_MODE_ALIGNMENT (TYPE_MODE (type)));
|
---|
| 2838 | break;
|
---|
| 2839 | }
|
---|
| 2840 |
|
---|
| 2841 | diff -Naur gcc-4.6.3.orig/gcc/target.def gcc-4.6.3/gcc/target.def
|
---|
| 2842 | --- gcc-4.6.3.orig/gcc/target.def 2011-06-04 10:15:48.000000000 +0000
|
---|
| 2843 | +++ gcc-4.6.3/gcc/target.def 2012-08-10 13:26:44.694722000 +0000
|
---|
| 2844 | @@ -1611,6 +1611,16 @@
|
---|
| 2845 | bool, (enum machine_mode mode),
|
---|
| 2846 | hook_bool_mode_false)
|
---|
| 2847 |
|
---|
| 2848 | +DEFHOOK
|
---|
| 2849 | +(vector_alignment,
|
---|
| 2850 | + "This hook can be used to define the alignment for a vector of type\n\
|
---|
| 2851 | +@var{type}, in order to comply with a platform ABI. The default is to\n\
|
---|
| 2852 | +require natural alignment for vector types. The alignment returned by\n\
|
---|
| 2853 | +this hook must be a power-of-two multiple of the default alignment of\n\
|
---|
| 2854 | +the vector element type.",
|
---|
| 2855 | + HOST_WIDE_INT, (const_tree type),
|
---|
| 2856 | + default_vector_alignment)
|
---|
| 2857 | +
|
---|
| 2858 | /* Compute cost of moving data from a register of class FROM to one of
|
---|
| 2859 | TO, using MODE. */
|
---|
| 2860 | DEFHOOK
|
---|
| 2861 | diff -Naur gcc-4.6.3.orig/gcc/target.h gcc-4.6.3/gcc/target.h
|
---|
| 2862 | --- gcc-4.6.3.orig/gcc/target.h 2011-01-14 15:02:20.000000000 +0000
|
---|
| 2863 | +++ gcc-4.6.3/gcc/target.h 2012-03-02 14:51:58.551861000 +0000
|
---|
| 2864 | @@ -128,7 +128,8 @@
|
---|
| 2865 | scalar_to_vec,
|
---|
| 2866 | cond_branch_not_taken,
|
---|
| 2867 | cond_branch_taken,
|
---|
| 2868 | - vec_perm
|
---|
| 2869 | + vec_perm,
|
---|
| 2870 | + vec_promote_demote
|
---|
| 2871 | };
|
---|
| 2872 |
|
---|
| 2873 | /* Sets of optimization levels at which an option may be enabled by
|
---|
| 2874 | diff -Naur gcc-4.6.3.orig/gcc/targhooks.c gcc-4.6.3/gcc/targhooks.c
|
---|
| 2875 | --- gcc-4.6.3.orig/gcc/targhooks.c 2011-01-14 15:02:20.000000000 +0000
|
---|
| 2876 | +++ gcc-4.6.3/gcc/targhooks.c 2012-08-10 13:26:44.694722000 +0000
|
---|
| 2877 | @@ -529,6 +529,7 @@
|
---|
| 2878 | case scalar_to_vec:
|
---|
| 2879 | case cond_branch_not_taken:
|
---|
| 2880 | case vec_perm:
|
---|
| 2881 | + case vec_promote_demote:
|
---|
| 2882 | return 1;
|
---|
| 2883 |
|
---|
| 2884 | case unaligned_load:
|
---|
| 2885 | @@ -978,6 +979,13 @@
|
---|
| 2886 | return id;
|
---|
| 2887 | }
|
---|
| 2888 |
|
---|
| 2889 | +/* Default to natural alignment for vector types. */
|
---|
| 2890 | +HOST_WIDE_INT
|
---|
| 2891 | +default_vector_alignment (const_tree type)
|
---|
| 2892 | +{
|
---|
| 2893 | + return tree_low_cst (TYPE_SIZE (type), 0);
|
---|
| 2894 | +}
|
---|
| 2895 | +
|
---|
| 2896 | bool
|
---|
| 2897 | default_builtin_vector_alignment_reachable (const_tree type, bool is_packed)
|
---|
| 2898 | {
|
---|
| 2899 | diff -Naur gcc-4.6.3.orig/gcc/targhooks.h gcc-4.6.3/gcc/targhooks.h
|
---|
| 2900 | --- gcc-4.6.3.orig/gcc/targhooks.h 2011-01-14 15:02:20.000000000 +0000
|
---|
| 2901 | +++ gcc-4.6.3/gcc/targhooks.h 2012-08-10 13:26:44.694722000 +0000
|
---|
| 2902 | @@ -85,6 +85,8 @@
|
---|
| 2903 |
|
---|
| 2904 | extern tree default_builtin_reciprocal (unsigned int, bool, bool);
|
---|
| 2905 |
|
---|
| 2906 | +extern HOST_WIDE_INT default_vector_alignment (const_tree);
|
---|
| 2907 | +
|
---|
| 2908 | extern bool default_builtin_vector_alignment_reachable (const_tree, bool);
|
---|
| 2909 | extern bool
|
---|
| 2910 | default_builtin_support_vector_misalignment (enum machine_mode mode,
|
---|
| 2911 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/c-c++-common/abi-bf.c gcc-4.6.3/gcc/testsuite/c-c++-common/abi-bf.c
|
---|
| 2912 | --- gcc-4.6.3.orig/gcc/testsuite/c-c++-common/abi-bf.c 1970-01-01 00:00:00.000000000 +0000
|
---|
| 2913 | +++ gcc-4.6.3/gcc/testsuite/c-c++-common/abi-bf.c 2012-03-29 02:15:29.973365000 +0000
|
---|
| 2914 | @@ -0,0 +1,3 @@
|
---|
| 2915 | +/* { dg-warning "incompatible" } */
|
---|
| 2916 | +/* { dg-do compile } */
|
---|
| 2917 | +/* { dg-options "-fstrict-volatile-bitfields -fabi-version=1" } */
|
---|
| 2918 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/g++.dg/cpp0x/nullptr28.C gcc-4.6.3/gcc/testsuite/g++.dg/cpp0x/nullptr28.C
|
---|
| 2919 | --- gcc-4.6.3.orig/gcc/testsuite/g++.dg/cpp0x/nullptr28.C 1970-01-01 00:00:00.000000000 +0000
|
---|
| 2920 | +++ gcc-4.6.3/gcc/testsuite/g++.dg/cpp0x/nullptr28.C 2012-07-03 23:29:03.323158000 +0000
|
---|
| 2921 | @@ -0,0 +1,17 @@
|
---|
| 2922 | +// { dg-do run }
|
---|
| 2923 | +// { dg-options "-std=c++0x -pedantic-errors" }
|
---|
| 2924 | +
|
---|
| 2925 | +typedef decltype(nullptr) nullptr_t;
|
---|
| 2926 | +
|
---|
| 2927 | +int i;
|
---|
| 2928 | +nullptr_t n;
|
---|
| 2929 | +const nullptr_t& f() { ++i; return n; }
|
---|
| 2930 | +
|
---|
| 2931 | +nullptr_t g() { return f(); }
|
---|
| 2932 | +
|
---|
| 2933 | +int main()
|
---|
| 2934 | +{
|
---|
| 2935 | + g();
|
---|
| 2936 | + if (i != 1)
|
---|
| 2937 | + __builtin_abort ();
|
---|
| 2938 | +}
|
---|
| 2939 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/g++.dg/cpp0x/variadic-value1.C gcc-4.6.3/gcc/testsuite/g++.dg/cpp0x/variadic-value1.C
|
---|
| 2940 | --- gcc-4.6.3.orig/gcc/testsuite/g++.dg/cpp0x/variadic-value1.C 1970-01-01 00:00:00.000000000 +0000
|
---|
| 2941 | +++ gcc-4.6.3/gcc/testsuite/g++.dg/cpp0x/variadic-value1.C 2012-05-23 21:29:55.463235000 +0000
|
---|
| 2942 | @@ -0,0 +1,24 @@
|
---|
| 2943 | +// PR c++/52796
|
---|
| 2944 | +// { dg-options "-std=c++0x -pedantic-errors" }
|
---|
| 2945 | +
|
---|
| 2946 | +inline void *operator new(__SIZE_TYPE__ s, void *p) { return p; }
|
---|
| 2947 | +
|
---|
| 2948 | +struct A
|
---|
| 2949 | +{
|
---|
| 2950 | + int i;
|
---|
| 2951 | + template<class... Ts>
|
---|
| 2952 | + A(Ts&&... ts): i(ts...) { }
|
---|
| 2953 | +};
|
---|
| 2954 | +
|
---|
| 2955 | +static union {
|
---|
| 2956 | + unsigned char c[sizeof(A)];
|
---|
| 2957 | + int i;
|
---|
| 2958 | +};
|
---|
| 2959 | +
|
---|
| 2960 | +int main()
|
---|
| 2961 | +{
|
---|
| 2962 | + i = 0xdeadbeef;
|
---|
| 2963 | + new(c) A;
|
---|
| 2964 | + if (i != 0)
|
---|
| 2965 | + __builtin_abort();
|
---|
| 2966 | +}
|
---|
| 2967 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.c-torture/compile/limits-externdecl.c gcc-4.6.3/gcc/testsuite/gcc.c-torture/compile/limits-externdecl.c
|
---|
| 2968 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.c-torture/compile/limits-externdecl.c 1970-01-01 00:00:00.000000000 +0000
|
---|
| 2969 | +++ gcc-4.6.3/gcc/testsuite/gcc.c-torture/compile/limits-externdecl.c 2012-03-24 13:47:46.199387000 +0000
|
---|
| 2970 | @@ -0,0 +1,56 @@
|
---|
| 2971 | +/* Inspired by the test case for PR middle-end/52640. */
|
---|
| 2972 | +
|
---|
| 2973 | +typedef struct
|
---|
| 2974 | +{
|
---|
| 2975 | + char *value;
|
---|
| 2976 | +} REFERENCE;
|
---|
| 2977 | +
|
---|
| 2978 | +/* Add a few "extern int Xxxxxx ();" declarations. */
|
---|
| 2979 | +#undef DEF
|
---|
| 2980 | +#undef LIM1
|
---|
| 2981 | +#undef LIM2
|
---|
| 2982 | +#undef LIM3
|
---|
| 2983 | +#undef LIM4
|
---|
| 2984 | +#undef LIM5
|
---|
| 2985 | +#undef LIM6
|
---|
| 2986 | +#define DEF(x) extern int x ()
|
---|
| 2987 | +#define LIM1(x) DEF(x##0); DEF(x##1); DEF(x##2); DEF(x##3); DEF(x##4); \
|
---|
| 2988 | + DEF(x##5); DEF(x##6); DEF(x##7); DEF(x##8); DEF(x##9);
|
---|
| 2989 | +#define LIM2(x) LIM1(x##0) LIM1(x##1) LIM1(x##2) LIM1(x##3) LIM1(x##4) \
|
---|
| 2990 | + LIM1(x##5) LIM1(x##6) LIM1(x##7) LIM1(x##8) LIM1(x##9)
|
---|
| 2991 | +#define LIM3(x) LIM2(x##0) LIM2(x##1) LIM2(x##2) LIM2(x##3) LIM2(x##4) \
|
---|
| 2992 | + LIM2(x##5) LIM2(x##6) LIM2(x##7) LIM2(x##8) LIM2(x##9)
|
---|
| 2993 | +#define LIM4(x) LIM3(x##0) LIM3(x##1) LIM3(x##2) LIM3(x##3) LIM3(x##4) \
|
---|
| 2994 | + LIM3(x##5) LIM3(x##6) LIM3(x##7) LIM3(x##8) LIM3(x##9)
|
---|
| 2995 | +#define LIM5(x) LIM4(x##0) LIM4(x##1) LIM4(x##2) LIM4(x##3) LIM4(x##4) \
|
---|
| 2996 | + LIM4(x##5) LIM4(x##6) LIM4(x##7) LIM4(x##8) LIM4(x##9)
|
---|
| 2997 | +#define LIM6(x) LIM5(x##0) LIM5(x##1) LIM5(x##2) LIM5(x##3) LIM5(x##4) \
|
---|
| 2998 | + LIM5(x##5) LIM5(x##6) LIM5(x##7) LIM5(x##8) LIM5(x##9)
|
---|
| 2999 | +LIM5 (X);
|
---|
| 3000 | +
|
---|
| 3001 | +/* Add references to them, or GCC will simply ignore the extern decls. */
|
---|
| 3002 | +#undef DEF
|
---|
| 3003 | +#undef LIM1
|
---|
| 3004 | +#undef LIM2
|
---|
| 3005 | +#undef LIM3
|
---|
| 3006 | +#undef LIM4
|
---|
| 3007 | +#undef LIM5
|
---|
| 3008 | +#undef LIM6
|
---|
| 3009 | +#define DEF(x) (char *) x
|
---|
| 3010 | +#define LIM1(x) DEF(x##0), DEF(x##1), DEF(x##2), DEF(x##3), DEF(x##4), \
|
---|
| 3011 | + DEF(x##5), DEF(x##6), DEF(x##7), DEF(x##8), DEF(x##9),
|
---|
| 3012 | +#define LIM2(x) LIM1(x##0) LIM1(x##1) LIM1(x##2) LIM1(x##3) LIM1(x##4) \
|
---|
| 3013 | + LIM1(x##5) LIM1(x##6) LIM1(x##7) LIM1(x##8) LIM1(x##9)
|
---|
| 3014 | +#define LIM3(x) LIM2(x##0) LIM2(x##1) LIM2(x##2) LIM2(x##3) LIM2(x##4) \
|
---|
| 3015 | + LIM2(x##5) LIM2(x##6) LIM2(x##7) LIM2(x##8) LIM2(x##9)
|
---|
| 3016 | +#define LIM4(x) LIM3(x##0) LIM3(x##1) LIM3(x##2) LIM3(x##3) LIM3(x##4) \
|
---|
| 3017 | + LIM3(x##5) LIM3(x##6) LIM3(x##7) LIM3(x##8) LIM3(x##9)
|
---|
| 3018 | +#define LIM5(x) LIM4(x##0) LIM4(x##1) LIM4(x##2) LIM4(x##3) LIM4(x##4) \
|
---|
| 3019 | + LIM4(x##5) LIM4(x##6) LIM4(x##7) LIM4(x##8) LIM4(x##9)
|
---|
| 3020 | +#define LIM6(x) LIM5(x##0) LIM5(x##1) LIM5(x##2) LIM5(x##3) LIM5(x##4) \
|
---|
| 3021 | + LIM5(x##5) LIM5(x##6) LIM5(x##7) LIM5(x##8) LIM5(x##9)
|
---|
| 3022 | +REFERENCE references[] = {
|
---|
| 3023 | + LIM5 (X)
|
---|
| 3024 | + 0
|
---|
| 3025 | +};
|
---|
| 3026 | +
|
---|
| 3027 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.c-torture/compile/pr53418-1.c gcc-4.6.3/gcc/testsuite/gcc.c-torture/compile/pr53418-1.c
|
---|
| 3028 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.c-torture/compile/pr53418-1.c 1970-01-01 00:00:00.000000000 +0000
|
---|
| 3029 | +++ gcc-4.6.3/gcc/testsuite/gcc.c-torture/compile/pr53418-1.c 2012-05-21 20:12:05.729358000 +0000
|
---|
| 3030 | @@ -0,0 +1,5 @@
|
---|
| 3031 | +void
|
---|
| 3032 | +f (void)
|
---|
| 3033 | +{
|
---|
| 3034 | + int i = (0 ? 1 : 0U / 0);
|
---|
| 3035 | +}
|
---|
| 3036 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.c-torture/compile/pr53418-2.c gcc-4.6.3/gcc/testsuite/gcc.c-torture/compile/pr53418-2.c
|
---|
| 3037 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.c-torture/compile/pr53418-2.c 1970-01-01 00:00:00.000000000 +0000
|
---|
| 3038 | +++ gcc-4.6.3/gcc/testsuite/gcc.c-torture/compile/pr53418-2.c 2012-05-21 20:12:05.729358000 +0000
|
---|
| 3039 | @@ -0,0 +1,5 @@
|
---|
| 3040 | +void
|
---|
| 3041 | +f (void)
|
---|
| 3042 | +{
|
---|
| 3043 | + int i = (1 ? 0U / 0 : 1);
|
---|
| 3044 | +}
|
---|
| 3045 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.c-torture/execute/20120427-1.c gcc-4.6.3/gcc/testsuite/gcc.c-torture/execute/20120427-1.c
|
---|
| 3046 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.c-torture/execute/20120427-1.c 1970-01-01 00:00:00.000000000 +0000
|
---|
| 3047 | +++ gcc-4.6.3/gcc/testsuite/gcc.c-torture/execute/20120427-1.c 2012-04-30 09:56:27.764158000 +0000
|
---|
| 3048 | @@ -0,0 +1,36 @@
|
---|
| 3049 | +typedef struct sreal
|
---|
| 3050 | +{
|
---|
| 3051 | + unsigned sig; /* Significant. */
|
---|
| 3052 | + int exp; /* Exponent. */
|
---|
| 3053 | +} sreal;
|
---|
| 3054 | +
|
---|
| 3055 | +sreal_compare (sreal *a, sreal *b)
|
---|
| 3056 | +{
|
---|
| 3057 | + if (a->exp > b->exp)
|
---|
| 3058 | + return 1;
|
---|
| 3059 | + if (a->exp < b->exp)
|
---|
| 3060 | + return -1;
|
---|
| 3061 | + if (a->sig > b->sig)
|
---|
| 3062 | + return 1;
|
---|
| 3063 | + return -(a->sig < b->sig);
|
---|
| 3064 | +}
|
---|
| 3065 | +
|
---|
| 3066 | +sreal a[] = {
|
---|
| 3067 | + { 0, 0 },
|
---|
| 3068 | + { 1, 0 },
|
---|
| 3069 | + { 0, 1 },
|
---|
| 3070 | + { 1, 1 }
|
---|
| 3071 | +};
|
---|
| 3072 | +
|
---|
| 3073 | +int main()
|
---|
| 3074 | +{
|
---|
| 3075 | + int i, j;
|
---|
| 3076 | + for (i = 0; i <= 3; i++) {
|
---|
| 3077 | + for (j = 0; j < 3; j++) {
|
---|
| 3078 | + if (i < j && sreal_compare(&a[i], &a[j]) != -1) abort();
|
---|
| 3079 | + if (i == j && sreal_compare(&a[i], &a[j]) != 0) abort();
|
---|
| 3080 | + if (i > j && sreal_compare(&a[i], &a[j]) != 1) abort();
|
---|
| 3081 | + }
|
---|
| 3082 | + }
|
---|
| 3083 | + return 0;
|
---|
| 3084 | +}
|
---|
| 3085 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.c-torture/execute/pr53084.c gcc-4.6.3/gcc/testsuite/gcc.c-torture/execute/pr53084.c
|
---|
| 3086 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.c-torture/execute/pr53084.c 1970-01-01 00:00:00.000000000 +0000
|
---|
| 3087 | +++ gcc-4.6.3/gcc/testsuite/gcc.c-torture/execute/pr53084.c 2012-04-24 06:14:37.854759000 +0000
|
---|
| 3088 | @@ -0,0 +1,18 @@
|
---|
| 3089 | +/* PR middle-end/53084 */
|
---|
| 3090 | +
|
---|
| 3091 | +extern void abort (void);
|
---|
| 3092 | +
|
---|
| 3093 | +__attribute__((noinline, noclone)) void
|
---|
| 3094 | +bar (const char *p)
|
---|
| 3095 | +{
|
---|
| 3096 | + if (p[0] != 'o' || p[1] != 'o' || p[2])
|
---|
| 3097 | + abort ();
|
---|
| 3098 | +}
|
---|
| 3099 | +
|
---|
| 3100 | +int
|
---|
| 3101 | +main ()
|
---|
| 3102 | +{
|
---|
| 3103 | + static const char *const foo[] = {"foo" + 1};
|
---|
| 3104 | + bar (foo[0]);
|
---|
| 3105 | + return 0;
|
---|
| 3106 | +}
|
---|
| 3107 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.dg/20020201-1.c gcc-4.6.3/gcc/testsuite/gcc.dg/20020201-1.c
|
---|
| 3108 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.dg/20020201-1.c 2005-03-31 18:14:11.000000000 +0000
|
---|
| 3109 | +++ gcc-4.6.3/gcc/testsuite/gcc.dg/20020201-1.c 2012-08-06 07:11:07.208019000 +0000
|
---|
| 3110 | @@ -7,11 +7,7 @@
|
---|
| 3111 | /* { dg-options "-fprofile-arcs" } */
|
---|
| 3112 | /* { dg-do run { target native } } */
|
---|
| 3113 |
|
---|
| 3114 | -extern void abort (void);
|
---|
| 3115 | -extern void exit (int);
|
---|
| 3116 | -
|
---|
| 3117 | -int rand (void);
|
---|
| 3118 | -void srand (unsigned int seed);
|
---|
| 3119 | +#include <stdlib.h>
|
---|
| 3120 |
|
---|
| 3121 | int globvar;
|
---|
| 3122 |
|
---|
| 3123 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.dg/align-2.c gcc-4.6.3/gcc/testsuite/gcc.dg/align-2.c
|
---|
| 3124 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.dg/align-2.c 2004-10-19 19:21:41.000000000 +0000
|
---|
| 3125 | +++ gcc-4.6.3/gcc/testsuite/gcc.dg/align-2.c 2012-08-10 13:26:44.694722000 +0000
|
---|
| 3126 | @@ -1,5 +1,5 @@
|
---|
| 3127 | /* PR 17962 */
|
---|
| 3128 | -/* { dg-do compile } */
|
---|
| 3129 | +/* { dg-do compile { target vect_natural_alignment } } */
|
---|
| 3130 | /* { dg-options "" } */
|
---|
| 3131 |
|
---|
| 3132 | typedef float v4 __attribute__((vector_size(sizeof(float)*4)));
|
---|
| 3133 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.dg/pr52862.c gcc-4.6.3/gcc/testsuite/gcc.dg/pr52862.c
|
---|
| 3134 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.dg/pr52862.c 1970-01-01 00:00:00.000000000 +0000
|
---|
| 3135 | +++ gcc-4.6.3/gcc/testsuite/gcc.dg/pr52862.c 2012-05-22 09:17:42.260176000 +0000
|
---|
| 3136 | @@ -0,0 +1,9 @@
|
---|
| 3137 | +/* { dg-do compile } */
|
---|
| 3138 | +/* { dg-options "-O" } */
|
---|
| 3139 | +
|
---|
| 3140 | +void ASMAtomicWritePtrVoid(const void *pv);
|
---|
| 3141 | +void rtThreadDestroy(void)
|
---|
| 3142 | +{
|
---|
| 3143 | + void * const pvTypeChecked = ((void *)0);
|
---|
| 3144 | + ASMAtomicWritePtrVoid((void *)(pvTypeChecked));
|
---|
| 3145 | +}
|
---|
| 3146 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.dg/stack-usage-1.c gcc-4.6.3/gcc/testsuite/gcc.dg/stack-usage-1.c
|
---|
| 3147 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.dg/stack-usage-1.c 2011-01-05 13:25:36.000000000 +0000
|
---|
| 3148 | +++ gcc-4.6.3/gcc/testsuite/gcc.dg/stack-usage-1.c 2012-06-20 07:54:17.441164000 +0000
|
---|
| 3149 | @@ -41,6 +41,8 @@
|
---|
| 3150 | # define SIZE 160 /* 256 - 96 bytes for register save area */
|
---|
| 3151 | #elif defined (__SPU__)
|
---|
| 3152 | # define SIZE 224
|
---|
| 3153 | +#elif defined (__sh__)
|
---|
| 3154 | +# define SIZE 252
|
---|
| 3155 | #else
|
---|
| 3156 | # define SIZE 256
|
---|
| 3157 | #endif
|
---|
| 3158 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.dg/torture/pr51071-2.c gcc-4.6.3/gcc/testsuite/gcc.dg/torture/pr51071-2.c
|
---|
| 3159 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.dg/torture/pr51071-2.c 1970-01-01 00:00:00.000000000 +0000
|
---|
| 3160 | +++ gcc-4.6.3/gcc/testsuite/gcc.dg/torture/pr51071-2.c 2012-05-22 09:23:01.937094000 +0000
|
---|
| 3161 | @@ -0,0 +1,38 @@
|
---|
| 3162 | +/* { dg-do compile } */
|
---|
| 3163 | +/* { dg-options "-fno-delete-null-pointer-checks" } */
|
---|
| 3164 | +
|
---|
| 3165 | +extern struct module __this_module;
|
---|
| 3166 | +static inline void
|
---|
| 3167 | +trace_module_get (struct module *mod, unsigned long ip) { }
|
---|
| 3168 | +struct module;
|
---|
| 3169 | +static inline __attribute__((no_instrument_function))
|
---|
| 3170 | +int try_module_get(struct module *module)
|
---|
| 3171 | +{
|
---|
| 3172 | + int ret = 1;
|
---|
| 3173 | + if (module)
|
---|
| 3174 | + {
|
---|
| 3175 | + if (module_is_live(module))
|
---|
| 3176 | + {
|
---|
| 3177 | + __label__ __here;
|
---|
| 3178 | + asm("");
|
---|
| 3179 | + __here:
|
---|
| 3180 | + trace_module_get(module, (unsigned long)&&__here);
|
---|
| 3181 | + }
|
---|
| 3182 | + else
|
---|
| 3183 | + ret = 0;
|
---|
| 3184 | + }
|
---|
| 3185 | + return ret;
|
---|
| 3186 | +}
|
---|
| 3187 | +struct net_device;
|
---|
| 3188 | +struct net_device_ops {
|
---|
| 3189 | + int (*ndo_open)(struct net_device *dev);
|
---|
| 3190 | +};
|
---|
| 3191 | +int t3e3_open(struct net_device *dev)
|
---|
| 3192 | +{
|
---|
| 3193 | + int ret = hdlc_open(dev);
|
---|
| 3194 | + if (ret)
|
---|
| 3195 | + return ret;
|
---|
| 3196 | + try_module_get((&__this_module));
|
---|
| 3197 | + return 0;
|
---|
| 3198 | +}
|
---|
| 3199 | +const struct net_device_ops t3e3_ops = { .ndo_open = t3e3_open };
|
---|
| 3200 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.dg/torture/pr51071.c gcc-4.6.3/gcc/testsuite/gcc.dg/torture/pr51071.c
|
---|
| 3201 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.dg/torture/pr51071.c 1970-01-01 00:00:00.000000000 +0000
|
---|
| 3202 | +++ gcc-4.6.3/gcc/testsuite/gcc.dg/torture/pr51071.c 2012-05-22 09:23:01.937094000 +0000
|
---|
| 3203 | @@ -0,0 +1,33 @@
|
---|
| 3204 | +/* { dg-do compile } */
|
---|
| 3205 | +
|
---|
| 3206 | +void foo (void);
|
---|
| 3207 | +void bar (void *);
|
---|
| 3208 | +extern int t;
|
---|
| 3209 | +
|
---|
| 3210 | +static void kmalloc_large (int size, int flags)
|
---|
| 3211 | +{
|
---|
| 3212 | + (void) size;
|
---|
| 3213 | + (void) flags;
|
---|
| 3214 | + foo ();
|
---|
| 3215 | + bar (({__here:&&__here;}));
|
---|
| 3216 | +}
|
---|
| 3217 | +
|
---|
| 3218 | +static void kmalloc (int size, int flags)
|
---|
| 3219 | +{
|
---|
| 3220 | + if (size)
|
---|
| 3221 | + {
|
---|
| 3222 | + if ((unsigned long) size > 0x1000)
|
---|
| 3223 | + kmalloc_large (size, flags);
|
---|
| 3224 | +
|
---|
| 3225 | + if (flags)
|
---|
| 3226 | + bar (({__here:&&__here;}));
|
---|
| 3227 | + }
|
---|
| 3228 | +}
|
---|
| 3229 | +
|
---|
| 3230 | +void compress_file_range (int i, int j, int k)
|
---|
| 3231 | +{
|
---|
| 3232 | + int nr_pages = ({j < k;});
|
---|
| 3233 | +
|
---|
| 3234 | + if (i || t)
|
---|
| 3235 | + kmalloc (0x1000UL * nr_pages, 0x40UL);
|
---|
| 3236 | +}
|
---|
| 3237 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.dg/torture/pr52407.c gcc-4.6.3/gcc/testsuite/gcc.dg/torture/pr52407.c
|
---|
| 3238 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.dg/torture/pr52407.c 1970-01-01 00:00:00.000000000 +0000
|
---|
| 3239 | +++ gcc-4.6.3/gcc/testsuite/gcc.dg/torture/pr52407.c 2012-05-22 09:20:15.992160000 +0000
|
---|
| 3240 | @@ -0,0 +1,33 @@
|
---|
| 3241 | +/* { dg-do run } */
|
---|
| 3242 | +
|
---|
| 3243 | +extern void abort (void);
|
---|
| 3244 | +
|
---|
| 3245 | +typedef long long T;
|
---|
| 3246 | +typedef T vl_t __attribute__((vector_size(2 * sizeof (T))));
|
---|
| 3247 | +
|
---|
| 3248 | +vl_t ul[4], vl[4] = { { 1, 2 }, { 3, 4 }, { 5, 6 }, { 7, 8 } };
|
---|
| 3249 | +
|
---|
| 3250 | +static void
|
---|
| 3251 | +mul_vl_l(vl_t *u, vl_t *v, T x, int m)
|
---|
| 3252 | +{
|
---|
| 3253 | + vl_t w;
|
---|
| 3254 | + T *p = (T *)&w;
|
---|
| 3255 | + p[0] = p[1] = x;
|
---|
| 3256 | + while (m--)
|
---|
| 3257 | + *u++ = *v++ * w;
|
---|
| 3258 | +}
|
---|
| 3259 | +
|
---|
| 3260 | +int
|
---|
| 3261 | +main(int argc, char *argv[])
|
---|
| 3262 | +{
|
---|
| 3263 | + int i;
|
---|
| 3264 | + T *pl;
|
---|
| 3265 | +
|
---|
| 3266 | + pl = (T *) &ul;
|
---|
| 3267 | + mul_vl_l(ul, vl, 2, 4);
|
---|
| 3268 | + for (i = 0; i < 8; i++)
|
---|
| 3269 | + if (pl[i] != 2 * (i + 1))
|
---|
| 3270 | + abort ();
|
---|
| 3271 | +
|
---|
| 3272 | + return 0;
|
---|
| 3273 | +}
|
---|
| 3274 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.dg/torture/pr52693.c gcc-4.6.3/gcc/testsuite/gcc.dg/torture/pr52693.c
|
---|
| 3275 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.dg/torture/pr52693.c 1970-01-01 00:00:00.000000000 +0000
|
---|
| 3276 | +++ gcc-4.6.3/gcc/testsuite/gcc.dg/torture/pr52693.c 2012-03-28 18:03:28.014541000 +0000
|
---|
| 3277 | @@ -0,0 +1,33 @@
|
---|
| 3278 | +/* { dg-do run } */
|
---|
| 3279 | +
|
---|
| 3280 | +struct pair
|
---|
| 3281 | +{
|
---|
| 3282 | + int x;
|
---|
| 3283 | + int y;
|
---|
| 3284 | +};
|
---|
| 3285 | +
|
---|
| 3286 | +struct array
|
---|
| 3287 | +{
|
---|
| 3288 | + struct pair elems[ 2 ];
|
---|
| 3289 | + unsigned index;
|
---|
| 3290 | +};
|
---|
| 3291 | +
|
---|
| 3292 | +extern void abort ();
|
---|
| 3293 | +
|
---|
| 3294 | +void __attribute__ ((noinline,noclone))
|
---|
| 3295 | +test_results (int x1, int y1, int x2, int y2)
|
---|
| 3296 | +{
|
---|
| 3297 | + if (x1 != x2 || y1 != y2)
|
---|
| 3298 | + abort ();
|
---|
| 3299 | +}
|
---|
| 3300 | +
|
---|
| 3301 | +int
|
---|
| 3302 | +main (void)
|
---|
| 3303 | +{
|
---|
| 3304 | + struct array arr = {{{1,2}, {3,4}}, 1};
|
---|
| 3305 | + struct pair last = arr.elems[arr.index];
|
---|
| 3306 | +
|
---|
| 3307 | + test_results ( last.x, last.y, arr.elems[1].x, arr.elems[1].y);
|
---|
| 3308 | +
|
---|
| 3309 | + return 0;
|
---|
| 3310 | +}
|
---|
| 3311 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.dg/torture/pr53790.c gcc-4.6.3/gcc/testsuite/gcc.dg/torture/pr53790.c
|
---|
| 3312 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.dg/torture/pr53790.c 1970-01-01 00:00:00.000000000 +0000
|
---|
| 3313 | +++ gcc-4.6.3/gcc/testsuite/gcc.dg/torture/pr53790.c 2012-06-28 12:01:16.874415000 +0000
|
---|
| 3314 | @@ -0,0 +1,17 @@
|
---|
| 3315 | +/* { dg-do compile } */
|
---|
| 3316 | +
|
---|
| 3317 | +typedef struct s {
|
---|
| 3318 | + int value;
|
---|
| 3319 | +} s_t;
|
---|
| 3320 | +
|
---|
| 3321 | +static inline int
|
---|
| 3322 | +read(s_t const *var)
|
---|
| 3323 | +{
|
---|
| 3324 | + return var->value;
|
---|
| 3325 | +}
|
---|
| 3326 | +
|
---|
| 3327 | +int main()
|
---|
| 3328 | +{
|
---|
| 3329 | + extern union u extern_var;
|
---|
| 3330 | + return read((s_t *)&extern_var);
|
---|
| 3331 | +}
|
---|
| 3332 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.dg/torture/pr53908.c gcc-4.6.3/gcc/testsuite/gcc.dg/torture/pr53908.c
|
---|
| 3333 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.dg/torture/pr53908.c 1970-01-01 00:00:00.000000000 +0000
|
---|
| 3334 | +++ gcc-4.6.3/gcc/testsuite/gcc.dg/torture/pr53908.c 2012-07-16 09:36:04.162835000 +0000
|
---|
| 3335 | @@ -0,0 +1,288 @@
|
---|
| 3336 | +/* { dg-do run } */
|
---|
| 3337 | +/* SEGV at comment below. */
|
---|
| 3338 | +typedef unsigned int size_t;
|
---|
| 3339 | +typedef enum har {
|
---|
| 3340 | + he_fatal = (-199),
|
---|
| 3341 | + he_not_initialized,
|
---|
| 3342 | + he_bad_input,
|
---|
| 3343 | + he_memory_too_small,
|
---|
| 3344 | + he_bad_action,
|
---|
| 3345 | + he_duplicate,
|
---|
| 3346 | + he_bad_nonce,
|
---|
| 3347 | + he_stale_nonce,
|
---|
| 3348 | + he_bad_credentials,
|
---|
| 3349 | + he_bad_user,
|
---|
| 3350 | + he_no_such_user,
|
---|
| 3351 | + he_bad_passwd,
|
---|
| 3352 | + he_unknown_auth_scheme,
|
---|
| 3353 | + he_not_found,
|
---|
| 3354 | + he_failed_digest_file_check,
|
---|
| 3355 | + he_failed_digest_file_save,
|
---|
| 3356 | + he_process_not_privileged,
|
---|
| 3357 | + he_other,
|
---|
| 3358 | + he_end_of_range,
|
---|
| 3359 | + ha_no_error = 0,
|
---|
| 3360 | + ha_no_value = 1
|
---|
| 3361 | +} har;
|
---|
| 3362 | +typedef enum realm_type
|
---|
| 3363 | +{
|
---|
| 3364 | + axis_realm = 0,
|
---|
| 3365 | + ws_realm
|
---|
| 3366 | +} realm_type;
|
---|
| 3367 | +
|
---|
| 3368 | +__attribute__((__noclone__, __noinline__))
|
---|
| 3369 | +har has_www_auth(char *, size_t, realm_type, har);
|
---|
| 3370 | +
|
---|
| 3371 | +__attribute__((__noclone__, __noinline__))
|
---|
| 3372 | +har has_auth_user(const char *, const char *, realm_type, char *, size_t);
|
---|
| 3373 | +
|
---|
| 3374 | +__attribute__((__noclone__, __noinline__))
|
---|
| 3375 | +char *ha_get_string_value(void);
|
---|
| 3376 | +
|
---|
| 3377 | +typedef struct
|
---|
| 3378 | +{
|
---|
| 3379 | + unsigned int track_id;
|
---|
| 3380 | + char* user;
|
---|
| 3381 | + char* realm;
|
---|
| 3382 | + char* authent;
|
---|
| 3383 | + int internal_realm;
|
---|
| 3384 | +} request;
|
---|
| 3385 | +enum user_response {
|
---|
| 3386 | + file_not_found_user_response = -3,
|
---|
| 3387 | + access_denied_user_response = -2,
|
---|
| 3388 | + no_user_response = -1,
|
---|
| 3389 | + ok_user_response = 0
|
---|
| 3390 | +};
|
---|
| 3391 | +struct realm_group {
|
---|
| 3392 | + char *name;
|
---|
| 3393 | + int id;
|
---|
| 3394 | + struct realm_group *next;
|
---|
| 3395 | +};
|
---|
| 3396 | +struct realm {
|
---|
| 3397 | + char *name;
|
---|
| 3398 | + char *space;
|
---|
| 3399 | + struct realm_group *groups;
|
---|
| 3400 | + struct realm *next;
|
---|
| 3401 | +};
|
---|
| 3402 | +struct user_info {
|
---|
| 3403 | + char *name;
|
---|
| 3404 | + int no_groups;
|
---|
| 3405 | + int groups[128];
|
---|
| 3406 | + struct user_info *next;
|
---|
| 3407 | +};
|
---|
| 3408 | +static struct user_info *find_user(const char *user_name);
|
---|
| 3409 | +static int is_member_of_groups(const struct user_info *user_item,
|
---|
| 3410 | + const struct realm_group *groups);
|
---|
| 3411 | +int authent_author(request *req);
|
---|
| 3412 | +struct realm *realms = ((void *)0);
|
---|
| 3413 | +struct user_info *users = ((void *)0);
|
---|
| 3414 | +static struct user_info*
|
---|
| 3415 | +find_user(const char *user_name)
|
---|
| 3416 | +{
|
---|
| 3417 | + struct user_info *user_item;
|
---|
| 3418 | + user_item = users;
|
---|
| 3419 | + while (user_item != ((void *)0)) {
|
---|
| 3420 | + /* SEGV due to NULL access here on user_name. See also comment below. */
|
---|
| 3421 | + if ((__builtin_strcmp(user_item->name, user_name) == 0))
|
---|
| 3422 | + break;
|
---|
| 3423 | + user_item = user_item->next;
|
---|
| 3424 | + }
|
---|
| 3425 | + return user_item;
|
---|
| 3426 | +}
|
---|
| 3427 | +static int
|
---|
| 3428 | +is_member_of_groups(const struct user_info *user_item,
|
---|
| 3429 | + const struct realm_group *groups)
|
---|
| 3430 | +{
|
---|
| 3431 | + const struct realm_group *group_item;
|
---|
| 3432 | + int i;
|
---|
| 3433 | + group_item = groups;
|
---|
| 3434 | + while (group_item != ((void *)0)) {
|
---|
| 3435 | + for (i = 0; i < user_item->no_groups; i++)
|
---|
| 3436 | + if (user_item->groups[i] == group_item->id)
|
---|
| 3437 | + return 0;
|
---|
| 3438 | + group_item = group_item->next;
|
---|
| 3439 | + }
|
---|
| 3440 | + return -1;
|
---|
| 3441 | +}
|
---|
| 3442 | +char *foo (void) __attribute__((__noclone__, __noinline__));
|
---|
| 3443 | +char* g_strdup (const char *str) __attribute__((__malloc__, __noclone__, __noinline__));
|
---|
| 3444 | +int g_strcmp0 (const char *str1, const char *str2);
|
---|
| 3445 | +static int
|
---|
| 3446 | +is_basic(char **user)
|
---|
| 3447 | +{
|
---|
| 3448 | + char *passwd_ptr;
|
---|
| 3449 | + char *authent = foo();
|
---|
| 3450 | + passwd_ptr = __builtin_strchr(authent, ':');
|
---|
| 3451 | + if (passwd_ptr != ((void *)0)) {
|
---|
| 3452 | + *user = g_strdup(authent);
|
---|
| 3453 | + return 0;
|
---|
| 3454 | + }
|
---|
| 3455 | + return -1;
|
---|
| 3456 | +}
|
---|
| 3457 | +static int
|
---|
| 3458 | +is_digest(char **user)
|
---|
| 3459 | +{
|
---|
| 3460 | + int ret_val = -1;
|
---|
| 3461 | + char *authent;
|
---|
| 3462 | + authent = ha_get_string_value();
|
---|
| 3463 | + if (authent) {
|
---|
| 3464 | + *user = g_strdup(authent);
|
---|
| 3465 | + ret_val = 0;
|
---|
| 3466 | + }
|
---|
| 3467 | + return ret_val;
|
---|
| 3468 | +}
|
---|
| 3469 | +__attribute__((__noclone__, __noinline__))
|
---|
| 3470 | +void g_free (void * mem);
|
---|
| 3471 | +static enum user_response
|
---|
| 3472 | +get_user_info_from_header(const realm_type type,
|
---|
| 3473 | + char **user_name,
|
---|
| 3474 | + struct user_info **user_item)
|
---|
| 3475 | +{
|
---|
| 3476 | + int ret_val = no_user_response;
|
---|
| 3477 | + if ((type == ws_realm)) {
|
---|
| 3478 | + if (is_basic(user_name) == 0)
|
---|
| 3479 | + ret_val = access_denied_user_response;
|
---|
| 3480 | + if (is_digest(user_name) == 0)
|
---|
| 3481 | + ret_val = ok_user_response;
|
---|
| 3482 | + } else {
|
---|
| 3483 | + if (is_basic(user_name) < 0 &&
|
---|
| 3484 | + /* Load of *user_name here, but not after the is_digest call. */
|
---|
| 3485 | + is_digest(user_name) < 0)
|
---|
| 3486 | + ;
|
---|
| 3487 | + else if ((*user_item = find_user(*user_name)) != ((void *)0))
|
---|
| 3488 | + ret_val = ok_user_response;
|
---|
| 3489 | + else
|
---|
| 3490 | + ret_val = access_denied_user_response;
|
---|
| 3491 | + if (ret_val != ok_user_response)
|
---|
| 3492 | + g_free(*user_name);
|
---|
| 3493 | + }
|
---|
| 3494 | + return ret_val;
|
---|
| 3495 | +}
|
---|
| 3496 | +static enum user_response
|
---|
| 3497 | +authenticate_user(request *req,
|
---|
| 3498 | + char **user_name,
|
---|
| 3499 | + struct user_info **user_item)
|
---|
| 3500 | +{
|
---|
| 3501 | + char *authent = ((void *)0);
|
---|
| 3502 | + har resp = ha_no_value;
|
---|
| 3503 | + enum user_response user_resp;
|
---|
| 3504 | + int ret_val = no_user_response;
|
---|
| 3505 | + if (req->authent && __builtin_strlen(req->authent)) {
|
---|
| 3506 | + authent = req->authent;
|
---|
| 3507 | + user_resp = get_user_info_from_header(req->internal_realm,
|
---|
| 3508 | + user_name,
|
---|
| 3509 | + user_item);
|
---|
| 3510 | + if (user_resp == ok_user_response) {
|
---|
| 3511 | + resp = has_auth_user(authent, 0, req->internal_realm, "", 1);
|
---|
| 3512 | + if (resp == ha_no_error)
|
---|
| 3513 | + ret_val = ok_user_response;
|
---|
| 3514 | + else if (resp != he_stale_nonce)
|
---|
| 3515 | + ret_val = access_denied_user_response;
|
---|
| 3516 | + } else if (user_resp == access_denied_user_response)
|
---|
| 3517 | + ret_val = access_denied_user_response;
|
---|
| 3518 | + }
|
---|
| 3519 | + if (resp != he_memory_too_small && resp != ha_no_error)
|
---|
| 3520 | + resp = has_www_auth("", 1, req->internal_realm, resp);
|
---|
| 3521 | + return ret_val;
|
---|
| 3522 | +}
|
---|
| 3523 | +
|
---|
| 3524 | +int __attribute__ ((__noinline__, __noclone__))
|
---|
| 3525 | +authent_author(request *req)
|
---|
| 3526 | +{
|
---|
| 3527 | + struct realm *realm;
|
---|
| 3528 | + char *user_name = ((void *)0);
|
---|
| 3529 | + struct user_info *user_item = ((void *)0);
|
---|
| 3530 | + int res = 0;
|
---|
| 3531 | + asm ("");
|
---|
| 3532 | + realm = realms;
|
---|
| 3533 | + if (__builtin_strcmp("Wsd", realm->name) == 0) {
|
---|
| 3534 | + req->internal_realm = ws_realm;
|
---|
| 3535 | + is_digest(&user_name);
|
---|
| 3536 | + }
|
---|
| 3537 | + if (authenticate_user(req, &user_name, &user_item) < 0) {
|
---|
| 3538 | + if (user_name != ((void *)0))
|
---|
| 3539 | + req->user = user_name;
|
---|
| 3540 | + res = -2;
|
---|
| 3541 | + goto authent_author_return;
|
---|
| 3542 | + }
|
---|
| 3543 | + if (is_member_of_groups(user_item, realm->groups) < 0)
|
---|
| 3544 | + res = -1;
|
---|
| 3545 | +authent_author_return:
|
---|
| 3546 | + return res;
|
---|
| 3547 | +}
|
---|
| 3548 | +
|
---|
| 3549 | +int good0, good1, good2;
|
---|
| 3550 | +
|
---|
| 3551 | +__attribute__ ((__noinline__, __noclone__))
|
---|
| 3552 | +char *foo(void)
|
---|
| 3553 | +{
|
---|
| 3554 | + asm ("");
|
---|
| 3555 | + good0++;
|
---|
| 3556 | + return "";
|
---|
| 3557 | +}
|
---|
| 3558 | +
|
---|
| 3559 | +__attribute__ ((__noinline__, __noclone__))
|
---|
| 3560 | +char *ha_get_string_value(void)
|
---|
| 3561 | +{
|
---|
| 3562 | + asm ("");
|
---|
| 3563 | + good1++;
|
---|
| 3564 | + return "f";
|
---|
| 3565 | +}
|
---|
| 3566 | +
|
---|
| 3567 | +__attribute__ ((__noinline__, __noclone__))
|
---|
| 3568 | +har has_auth_user(const char *a, const char *b, realm_type c, char *d, size_t e)
|
---|
| 3569 | +{
|
---|
| 3570 | + asm ("");
|
---|
| 3571 | + if (*a != 'z' || a[1] != 0 || b != 0 || c != axis_realm || *d != 0
|
---|
| 3572 | + || e != 1)
|
---|
| 3573 | + __builtin_abort ();
|
---|
| 3574 | + return ha_no_error;
|
---|
| 3575 | +}
|
---|
| 3576 | +
|
---|
| 3577 | +__attribute__ ((__noinline__, __noclone__))
|
---|
| 3578 | +har has_www_auth(char *a, size_t b, realm_type c, har d)
|
---|
| 3579 | +{
|
---|
| 3580 | + (void)(*a+b+c+d);
|
---|
| 3581 | + asm ("");
|
---|
| 3582 | + __builtin_abort ();
|
---|
| 3583 | +}
|
---|
| 3584 | +
|
---|
| 3585 | +
|
---|
| 3586 | +char *strdupped_user = "me";
|
---|
| 3587 | +__attribute__((__malloc__, __noclone__, __noinline__))
|
---|
| 3588 | +char* g_strdup (const char *str)
|
---|
| 3589 | +{
|
---|
| 3590 | + asm ("");
|
---|
| 3591 | + if (*str != 'f')
|
---|
| 3592 | + __builtin_abort ();
|
---|
| 3593 | + good2++;
|
---|
| 3594 | + return strdupped_user;
|
---|
| 3595 | +}
|
---|
| 3596 | +
|
---|
| 3597 | +__attribute__((__noclone__, __noinline__))
|
---|
| 3598 | +void g_free (void * mem)
|
---|
| 3599 | +{
|
---|
| 3600 | + (void)mem;
|
---|
| 3601 | + asm ("");
|
---|
| 3602 | + __builtin_abort ();
|
---|
| 3603 | +}
|
---|
| 3604 | +
|
---|
| 3605 | +struct user_info me = { .name = "me", .no_groups = 1, .groups = {42}, .next = 0};
|
---|
| 3606 | +struct user_info you = { .name = "you", .next = &me};
|
---|
| 3607 | +struct realm_group xgroups = { .name = "*", .id = 42, .next = 0};
|
---|
| 3608 | +
|
---|
| 3609 | +int main(void)
|
---|
| 3610 | +{
|
---|
| 3611 | + char *orig_user = "?";
|
---|
| 3612 | + struct realm r = { .name = "x", .space = "space?", .groups = &xgroups, .next = 0};
|
---|
| 3613 | + request req = { .user = orig_user, .realm = "!", .authent = "z",
|
---|
| 3614 | + .internal_realm = axis_realm};
|
---|
| 3615 | + realms = &r;
|
---|
| 3616 | + users = &you;
|
---|
| 3617 | + if (authent_author (&req) != 0 || good0 != 1 || good1 != 1 || good2 != 1
|
---|
| 3618 | + || req.user != orig_user
|
---|
| 3619 | + || req.internal_realm != axis_realm)
|
---|
| 3620 | + __builtin_abort ();
|
---|
| 3621 | + __builtin_exit (0);
|
---|
| 3622 | +}
|
---|
| 3623 | +
|
---|
| 3624 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.dg/vect/slp-25.c gcc-4.6.3/gcc/testsuite/gcc.dg/vect/slp-25.c
|
---|
| 3625 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.dg/vect/slp-25.c 2010-10-04 14:59:30.000000000 +0000
|
---|
| 3626 | +++ gcc-4.6.3/gcc/testsuite/gcc.dg/vect/slp-25.c 2012-08-10 13:26:44.694722000 +0000
|
---|
| 3627 | @@ -57,5 +57,5 @@
|
---|
| 3628 |
|
---|
| 3629 | /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
|
---|
| 3630 | /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
|
---|
| 3631 | -/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail { vect_no_align } } } } */
|
---|
| 3632 | +/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail { vect_no_align || { ! vect_natural_alignment } } } } } */
|
---|
| 3633 | /* { dg-final { cleanup-tree-dump "vect" } } */
|
---|
| 3634 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.dg/vect/vect-peel-1.c gcc-4.6.3/gcc/testsuite/gcc.dg/vect/vect-peel-1.c
|
---|
| 3635 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.dg/vect/vect-peel-1.c 2011-01-10 12:41:40.000000000 +0000
|
---|
| 3636 | +++ gcc-4.6.3/gcc/testsuite/gcc.dg/vect/vect-peel-1.c 2012-08-10 13:26:44.694722000 +0000
|
---|
| 3637 | @@ -49,6 +49,6 @@
|
---|
| 3638 | }
|
---|
| 3639 |
|
---|
| 3640 | /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
|
---|
| 3641 | -/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target vect_element_align } } } */
|
---|
| 3642 | +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { { vect_element_align } && { vect_aligned_arrays } } } } } */
|
---|
| 3643 | /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" } } */
|
---|
| 3644 | /* { dg-final { cleanup-tree-dump "vect" } } */
|
---|
| 3645 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.dg/vect/vect-peel-2.c gcc-4.6.3/gcc/testsuite/gcc.dg/vect/vect-peel-2.c
|
---|
| 3646 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.dg/vect/vect-peel-2.c 2011-01-10 12:41:40.000000000 +0000
|
---|
| 3647 | +++ gcc-4.6.3/gcc/testsuite/gcc.dg/vect/vect-peel-2.c 2012-08-10 13:26:44.694722000 +0000
|
---|
| 3648 | @@ -50,6 +50,6 @@
|
---|
| 3649 | }
|
---|
| 3650 |
|
---|
| 3651 | /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
|
---|
| 3652 | -/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target vect_element_align } } } */
|
---|
| 3653 | -/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target vect_element_align } } } */
|
---|
| 3654 | +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { { vect_element_align } && { vect_aligned_arrays } } } } } */
|
---|
| 3655 | +/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target { { vect_element_align } && { vect_aligned_arrays } } } } } */
|
---|
| 3656 | /* { dg-final { cleanup-tree-dump "vect" } } */
|
---|
| 3657 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.dg/vect/vect-peel-3.c gcc-4.6.3/gcc/testsuite/gcc.dg/vect/vect-peel-3.c
|
---|
| 3658 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.dg/vect/vect-peel-3.c 2010-11-22 13:59:45.000000000 +0000
|
---|
| 3659 | +++ gcc-4.6.3/gcc/testsuite/gcc.dg/vect/vect-peel-3.c 2012-08-10 13:26:44.694722000 +0000
|
---|
| 3660 | @@ -4,9 +4,7 @@
|
---|
| 3661 | #include "tree-vect.h"
|
---|
| 3662 |
|
---|
| 3663 | #define N 128
|
---|
| 3664 | -#define RES 21888
|
---|
| 3665 | -
|
---|
| 3666 | -/* unaligned store. */
|
---|
| 3667 | +#define RES 21640
|
---|
| 3668 |
|
---|
| 3669 | int ib[N+10];
|
---|
| 3670 | int ia[N+10];
|
---|
| 3671 | @@ -18,11 +16,11 @@
|
---|
| 3672 | int i, suma = 0, sumb = 0, sumc = 0;
|
---|
| 3673 |
|
---|
| 3674 | /* ib and ic have same misalignment, we peel to align them. */
|
---|
| 3675 | - for (i = 1; i <= N; i++)
|
---|
| 3676 | + for (i = 0; i <= N; i++)
|
---|
| 3677 | {
|
---|
| 3678 | suma += ia[i];
|
---|
| 3679 | - sumb += ib[i+6];
|
---|
| 3680 | - sumc += ic[i+2];
|
---|
| 3681 | + sumb += ib[i+5];
|
---|
| 3682 | + sumc += ic[i+1];
|
---|
| 3683 | }
|
---|
| 3684 |
|
---|
| 3685 | /* check results: */
|
---|
| 3686 | @@ -49,7 +47,7 @@
|
---|
| 3687 | return main1 ();
|
---|
| 3688 | }
|
---|
| 3689 |
|
---|
| 3690 | -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
|
---|
| 3691 | +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
|
---|
| 3692 | /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail vect_no_align } } } */
|
---|
| 3693 | -/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" } } */
|
---|
| 3694 | +/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail vect_no_align } } } */
|
---|
| 3695 | /* { dg-final { cleanup-tree-dump "vect" } } */
|
---|
| 3696 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.dg/vect/vect-peel-4.c gcc-4.6.3/gcc/testsuite/gcc.dg/vect/vect-peel-4.c
|
---|
| 3697 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.dg/vect/vect-peel-4.c 2011-01-10 12:41:40.000000000 +0000
|
---|
| 3698 | +++ gcc-4.6.3/gcc/testsuite/gcc.dg/vect/vect-peel-4.c 2012-08-10 13:26:44.694722000 +0000
|
---|
| 3699 | @@ -16,13 +16,13 @@
|
---|
| 3700 | /* Don't peel keeping one load and the store aligned. */
|
---|
| 3701 | for (i = 0; i <= N; i++)
|
---|
| 3702 | {
|
---|
| 3703 | - ia[i] = ib[i] + ib[i+6];
|
---|
| 3704 | + ia[i] = ib[i] + ib[i+5];
|
---|
| 3705 | }
|
---|
| 3706 |
|
---|
| 3707 | /* check results: */
|
---|
| 3708 | for (i = 1; i <= N; i++)
|
---|
| 3709 | {
|
---|
| 3710 | - if (ia[i] != ib[i] + ib[i+6])
|
---|
| 3711 | + if (ia[i] != ib[i] + ib[i+5])
|
---|
| 3712 | abort ();
|
---|
| 3713 | }
|
---|
| 3714 |
|
---|
| 3715 | @@ -44,7 +44,7 @@
|
---|
| 3716 | return main1 ();
|
---|
| 3717 | }
|
---|
| 3718 |
|
---|
| 3719 | -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
|
---|
| 3720 | +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
|
---|
| 3721 | /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail vect_no_align } } } */
|
---|
| 3722 | /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
|
---|
| 3723 | /* { dg-final { cleanup-tree-dump "vect" } } */
|
---|
| 3724 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.dg/volatile-bitfields-2.c gcc-4.6.3/gcc/testsuite/gcc.dg/volatile-bitfields-2.c
|
---|
| 3725 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.dg/volatile-bitfields-2.c 1970-01-01 00:00:00.000000000 +0000
|
---|
| 3726 | +++ gcc-4.6.3/gcc/testsuite/gcc.dg/volatile-bitfields-2.c 2012-03-29 02:15:29.973365000 +0000
|
---|
| 3727 | @@ -0,0 +1,15 @@
|
---|
| 3728 | +/* { dg-do run } */
|
---|
| 3729 | +/* { dg-options "-fstrict-volatile-bitfields" } */
|
---|
| 3730 | +
|
---|
| 3731 | +extern void abort(void);
|
---|
| 3732 | +struct thing {
|
---|
| 3733 | + volatile unsigned short a: 8;
|
---|
| 3734 | + volatile unsigned short b: 8;
|
---|
| 3735 | +} t = {1,2};
|
---|
| 3736 | +
|
---|
| 3737 | +int main()
|
---|
| 3738 | +{
|
---|
| 3739 | + t.a = 3;
|
---|
| 3740 | + if (t.a !=3 || t.b !=2) abort();
|
---|
| 3741 | + return 0;
|
---|
| 3742 | +}
|
---|
| 3743 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/arm/volatile-bitfields-4.c gcc-4.6.3/gcc/testsuite/gcc.target/arm/volatile-bitfields-4.c
|
---|
| 3744 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.target/arm/volatile-bitfields-4.c 1970-01-01 00:00:00.000000000 +0000
|
---|
| 3745 | +++ gcc-4.6.3/gcc/testsuite/gcc.target/arm/volatile-bitfields-4.c 2012-03-29 02:15:29.973365000 +0000
|
---|
| 3746 | @@ -0,0 +1,30 @@
|
---|
| 3747 | +/* { dg-require-effective-target arm_eabi } */
|
---|
| 3748 | +/* { dg-do compile } */
|
---|
| 3749 | +/* { dg-options "-O2" } */
|
---|
| 3750 | +/* { dg-final { scan-assembler-times "ldr\[\\t \]+\[^\n\]*,\[\\t \]*\\\[\[^\n\]*\\\]" 2 } } */
|
---|
| 3751 | +/* { dg-final { scan-assembler-times "str\[\\t \]+\[^\n\]*,\[\\t \]*\\\[\[^\n\]*\\\]" 2 } } */
|
---|
| 3752 | +/* { dg-final { scan-assembler-not "strb" } } */
|
---|
| 3753 | +
|
---|
| 3754 | +struct thing {
|
---|
| 3755 | + unsigned a: 8;
|
---|
| 3756 | + unsigned b: 8;
|
---|
| 3757 | + unsigned c: 8;
|
---|
| 3758 | + unsigned d: 8;
|
---|
| 3759 | +};
|
---|
| 3760 | +
|
---|
| 3761 | +struct thing2 {
|
---|
| 3762 | + volatile unsigned a: 8;
|
---|
| 3763 | + volatile unsigned b: 8;
|
---|
| 3764 | + volatile unsigned c: 8;
|
---|
| 3765 | + volatile unsigned d: 8;
|
---|
| 3766 | +};
|
---|
| 3767 | +
|
---|
| 3768 | +void test1(volatile struct thing *t)
|
---|
| 3769 | +{
|
---|
| 3770 | + t->a = 5;
|
---|
| 3771 | +}
|
---|
| 3772 | +
|
---|
| 3773 | +void test2(struct thing2 *t)
|
---|
| 3774 | +{
|
---|
| 3775 | + t->a = 5;
|
---|
| 3776 | +}
|
---|
| 3777 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-1.c gcc-4.6.3/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-1.c
|
---|
| 3778 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-1.c 2011-06-28 23:27:06.000000000 +0000
|
---|
| 3779 | +++ gcc-4.6.3/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-1.c 2012-05-14 21:32:29.729958000 +0000
|
---|
| 3780 | @@ -14,6 +14,6 @@
|
---|
| 3781 | c[i] = a[i] * b[i+3];
|
---|
| 3782 | }
|
---|
| 3783 |
|
---|
| 3784 | -/* { dg-final { scan-assembler-not "\\*avx_movups256/1" } } */
|
---|
| 3785 | -/* { dg-final { scan-assembler "\\*avx_movups/1" } } */
|
---|
| 3786 | +/* { dg-final { scan-assembler-not "avx_movups256/1" } } */
|
---|
| 3787 | +/* { dg-final { scan-assembler "avx_movups/1" } } */
|
---|
| 3788 | /* { dg-final { scan-assembler "vinsertf128" } } */
|
---|
| 3789 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-2.c gcc-4.6.3/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-2.c
|
---|
| 3790 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-2.c 2011-06-28 23:27:06.000000000 +0000
|
---|
| 3791 | +++ gcc-4.6.3/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-2.c 2012-05-14 21:32:29.729958000 +0000
|
---|
| 3792 | @@ -24,6 +24,6 @@
|
---|
| 3793 | }
|
---|
| 3794 | }
|
---|
| 3795 |
|
---|
| 3796 | -/* { dg-final { scan-assembler-not "\\*avx_movdqu256/1" } } */
|
---|
| 3797 | -/* { dg-final { scan-assembler "\\*avx_movdqu/1" } } */
|
---|
| 3798 | +/* { dg-final { scan-assembler-not "avx_movdqu256/1" } } */
|
---|
| 3799 | +/* { dg-final { scan-assembler "avx_movdqu/1" } } */
|
---|
| 3800 | /* { dg-final { scan-assembler "vinsertf128" } } */
|
---|
| 3801 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-3.c gcc-4.6.3/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-3.c
|
---|
| 3802 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-3.c 2011-06-28 23:27:06.000000000 +0000
|
---|
| 3803 | +++ gcc-4.6.3/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-3.c 2012-05-14 21:32:29.729958000 +0000
|
---|
| 3804 | @@ -14,6 +14,6 @@
|
---|
| 3805 | c[i] = a[i] * b[i+3];
|
---|
| 3806 | }
|
---|
| 3807 |
|
---|
| 3808 | -/* { dg-final { scan-assembler-not "\\*avx_movupd256/1" } } */
|
---|
| 3809 | -/* { dg-final { scan-assembler "\\*avx_movupd/1" } } */
|
---|
| 3810 | +/* { dg-final { scan-assembler-not "avx_movupd256/1" } } */
|
---|
| 3811 | +/* { dg-final { scan-assembler "avx_movupd/1" } } */
|
---|
| 3812 | /* { dg-final { scan-assembler "vinsertf128" } } */
|
---|
| 3813 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-4.c gcc-4.6.3/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-4.c
|
---|
| 3814 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-4.c 2011-06-28 23:27:06.000000000 +0000
|
---|
| 3815 | +++ gcc-4.6.3/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-4.c 2012-05-14 21:32:29.729958000 +0000
|
---|
| 3816 | @@ -14,6 +14,6 @@
|
---|
| 3817 | b[i] = a[i+3] * 2;
|
---|
| 3818 | }
|
---|
| 3819 |
|
---|
| 3820 | -/* { dg-final { scan-assembler "\\*avx_movups256/1" } } */
|
---|
| 3821 | -/* { dg-final { scan-assembler-not "\\*avx_movups/1" } } */
|
---|
| 3822 | +/* { dg-final { scan-assembler "avx_movups256/1" } } */
|
---|
| 3823 | +/* { dg-final { scan-assembler-not "avx_movups/1" } } */
|
---|
| 3824 | /* { dg-final { scan-assembler-not "vinsertf128" } } */
|
---|
| 3825 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-1.c gcc-4.6.3/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-1.c
|
---|
| 3826 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-1.c 2011-06-28 23:27:06.000000000 +0000
|
---|
| 3827 | +++ gcc-4.6.3/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-1.c 2012-05-14 21:32:29.729958000 +0000
|
---|
| 3828 | @@ -17,6 +17,6 @@
|
---|
| 3829 | d[i] = c[i] * 20.0;
|
---|
| 3830 | }
|
---|
| 3831 |
|
---|
| 3832 | -/* { dg-final { scan-assembler-not "\\*avx_movups256/2" } } */
|
---|
| 3833 | +/* { dg-final { scan-assembler-not "avx_movups256/2" } } */
|
---|
| 3834 | /* { dg-final { scan-assembler "movups.*\\*avx_movv4sf_internal/3" } } */
|
---|
| 3835 | /* { dg-final { scan-assembler "vextractf128" } } */
|
---|
| 3836 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-2.c gcc-4.6.3/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-2.c
|
---|
| 3837 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-2.c 2011-06-28 23:27:06.000000000 +0000
|
---|
| 3838 | +++ gcc-4.6.3/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-2.c 2012-05-14 21:32:29.729958000 +0000
|
---|
| 3839 | @@ -24,6 +24,6 @@
|
---|
| 3840 | }
|
---|
| 3841 | }
|
---|
| 3842 |
|
---|
| 3843 | -/* { dg-final { scan-assembler-not "\\*avx_movdqu256/2" } } */
|
---|
| 3844 | +/* { dg-final { scan-assembler-not "avx_movdqu256/2" } } */
|
---|
| 3845 | /* { dg-final { scan-assembler "movdqu.*\\*avx_movv16qi_internal/3" } } */
|
---|
| 3846 | /* { dg-final { scan-assembler "vextractf128" } } */
|
---|
| 3847 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-3.c gcc-4.6.3/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-3.c
|
---|
| 3848 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-3.c 2011-06-28 23:27:06.000000000 +0000
|
---|
| 3849 | +++ gcc-4.6.3/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-3.c 2012-05-14 21:32:29.729958000 +0000
|
---|
| 3850 | @@ -17,6 +17,6 @@
|
---|
| 3851 | d[i] = c[i] * 20.0;
|
---|
| 3852 | }
|
---|
| 3853 |
|
---|
| 3854 | -/* { dg-final { scan-assembler-not "\\*avx_movupd256/2" } } */
|
---|
| 3855 | +/* { dg-final { scan-assembler-not "avx_movupd256/2" } } */
|
---|
| 3856 | /* { dg-final { scan-assembler "movupd.*\\*avx_movv2df_internal/3" } } */
|
---|
| 3857 | /* { dg-final { scan-assembler "vextractf128" } } */
|
---|
| 3858 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-4.c gcc-4.6.3/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-4.c
|
---|
| 3859 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-4.c 2011-06-28 23:27:06.000000000 +0000
|
---|
| 3860 | +++ gcc-4.6.3/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-4.c 2012-05-14 21:32:29.729958000 +0000
|
---|
| 3861 | @@ -14,7 +14,7 @@
|
---|
| 3862 | b[i+3] = a[i] * c[i];
|
---|
| 3863 | }
|
---|
| 3864 |
|
---|
| 3865 | -/* { dg-final { scan-assembler "\\*avx_movups256/2" } } */
|
---|
| 3866 | -/* { dg-final { scan-assembler-not "\\*avx_movups/2" } } */
|
---|
| 3867 | +/* { dg-final { scan-assembler "avx_movups256/2" } } */
|
---|
| 3868 | +/* { dg-final { scan-assembler-not "avx_movups/2" } } */
|
---|
| 3869 | /* { dg-final { scan-assembler-not "\\*avx_movv4sf_internal/3" } } */
|
---|
| 3870 | /* { dg-final { scan-assembler-not "vextractf128" } } */
|
---|
| 3871 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/i386/pr52736.c gcc-4.6.3/gcc/testsuite/gcc.target/i386/pr52736.c
|
---|
| 3872 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.target/i386/pr52736.c 1970-01-01 00:00:00.000000000 +0000
|
---|
| 3873 | +++ gcc-4.6.3/gcc/testsuite/gcc.target/i386/pr52736.c 2012-03-28 08:09:55.449307000 +0000
|
---|
| 3874 | @@ -0,0 +1,29 @@
|
---|
| 3875 | +/* PR target/52736 */
|
---|
| 3876 | +/* { dg-do run } */
|
---|
| 3877 | +/* { dg-options "-O1 -msse2" } */
|
---|
| 3878 | +/* { dg-require-effective-target sse2_runtime } */
|
---|
| 3879 | +
|
---|
| 3880 | +#include <x86intrin.h>
|
---|
| 3881 | +
|
---|
| 3882 | +typedef double D __attribute__((may_alias));
|
---|
| 3883 | +__attribute__((aligned(16))) static const double r[4] = { 1., 5., 1., 3. };
|
---|
| 3884 | +
|
---|
| 3885 | +__attribute__((noinline, noclone))
|
---|
| 3886 | +void
|
---|
| 3887 | +foo (int x)
|
---|
| 3888 | +{
|
---|
| 3889 | + asm volatile ("" : "+g" (x) : : "memory");
|
---|
| 3890 | + if (x != 3)
|
---|
| 3891 | + __builtin_abort ();
|
---|
| 3892 | +}
|
---|
| 3893 | +
|
---|
| 3894 | +int
|
---|
| 3895 | +main ()
|
---|
| 3896 | +{
|
---|
| 3897 | + __m128d t = _mm_set1_pd (5.);
|
---|
| 3898 | + ((D *)(&t))[0] = 1.;
|
---|
| 3899 | + foo (_mm_movemask_pd (_mm_cmpeq_pd (t, _mm_load_pd (&r[0]))));
|
---|
| 3900 | + ((D *)(&t))[1] = 3.;
|
---|
| 3901 | + foo (_mm_movemask_pd (_mm_cmpeq_pd (t, _mm_load_pd (&r[2]))));
|
---|
| 3902 | + return 0;
|
---|
| 3903 | +}
|
---|
| 3904 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/i386/pr53416.c gcc-4.6.3/gcc/testsuite/gcc.target/i386/pr53416.c
|
---|
| 3905 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.target/i386/pr53416.c 1970-01-01 00:00:00.000000000 +0000
|
---|
| 3906 | +++ gcc-4.6.3/gcc/testsuite/gcc.target/i386/pr53416.c 2012-05-21 12:59:53.696085000 +0000
|
---|
| 3907 | @@ -0,0 +1,17 @@
|
---|
| 3908 | +/* PR target/53416 */
|
---|
| 3909 | +/* { dg-options "-O2 -mrdrnd" } */
|
---|
| 3910 | +
|
---|
| 3911 | +int test (void)
|
---|
| 3912 | +{
|
---|
| 3913 | + unsigned int number = 0;
|
---|
| 3914 | + int result0, result1, result2, result3;
|
---|
| 3915 | +
|
---|
| 3916 | + result0 = __builtin_ia32_rdrand32_step (&number);
|
---|
| 3917 | + result1 = __builtin_ia32_rdrand32_step (&number);
|
---|
| 3918 | + result2 = __builtin_ia32_rdrand32_step (&number);
|
---|
| 3919 | + result3 = __builtin_ia32_rdrand32_step (&number);
|
---|
| 3920 | +
|
---|
| 3921 | + return result0 + result1 +result2 + result3;
|
---|
| 3922 | +}
|
---|
| 3923 | +
|
---|
| 3924 | +/* { dg-final { scan-assembler-times "rdrand" 4 } } */
|
---|
| 3925 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-1.c gcc-4.6.3/gcc/testsuite/gcc.target/powerpc/cell_builtin-1.c
|
---|
| 3926 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-1.c 1970-01-01 00:00:00.000000000 +0000
|
---|
| 3927 | +++ gcc-4.6.3/gcc/testsuite/gcc.target/powerpc/cell_builtin-1.c 2012-06-04 17:42:25.267281000 +0000
|
---|
| 3928 | @@ -0,0 +1,48 @@
|
---|
| 3929 | +/* { dg-do compile { target { powerpc*-*-* } } } */
|
---|
| 3930 | +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
|
---|
| 3931 | +/* { dg-require-effective-target powerpc_altivec_ok } */
|
---|
| 3932 | +/* { dg-options "-O2 -maltivec -mcpu=cell" } */
|
---|
| 3933 | +/* { dg-final { scan-assembler-times "lvlx" 19 } } */
|
---|
| 3934 | +
|
---|
| 3935 | +#include <altivec.h>
|
---|
| 3936 | +
|
---|
| 3937 | +typedef __vector signed char vsc;
|
---|
| 3938 | +typedef __vector signed short vss;
|
---|
| 3939 | +typedef __vector signed int vsi;
|
---|
| 3940 | +typedef __vector unsigned char vuc;
|
---|
| 3941 | +typedef __vector unsigned short vus;
|
---|
| 3942 | +typedef __vector unsigned int vui;
|
---|
| 3943 | +typedef __vector bool char vbc;
|
---|
| 3944 | +typedef __vector bool short vbs;
|
---|
| 3945 | +typedef __vector bool int vbi;
|
---|
| 3946 | +typedef __vector float vsf;
|
---|
| 3947 | +typedef __vector pixel vp;
|
---|
| 3948 | +typedef signed char sc;
|
---|
| 3949 | +typedef signed short ss;
|
---|
| 3950 | +typedef signed int si;
|
---|
| 3951 | +typedef signed long sl;
|
---|
| 3952 | +typedef unsigned char uc;
|
---|
| 3953 | +typedef unsigned short us;
|
---|
| 3954 | +typedef unsigned int ui;
|
---|
| 3955 | +typedef unsigned long ul;
|
---|
| 3956 | +typedef float sf;
|
---|
| 3957 | +
|
---|
| 3958 | +vsc lc1(long a, void *p) { return __builtin_altivec_lvlx (a,p); }
|
---|
| 3959 | +vsf llx01(long a, vsf *p) { return __builtin_vec_lvlx (a,p); }
|
---|
| 3960 | +vsf llx02(long a, sf *p) { return __builtin_vec_lvlx (a,p); }
|
---|
| 3961 | +vbi llx03(long a, vbi *p) { return __builtin_vec_lvlx (a,p); }
|
---|
| 3962 | +vsi llx04(long a, vsi *p) { return __builtin_vec_lvlx (a,p); }
|
---|
| 3963 | +vsi llx05(long a, si *p) { return __builtin_vec_lvlx (a,p); }
|
---|
| 3964 | +vui llx06(long a, vui *p) { return __builtin_vec_lvlx (a,p); }
|
---|
| 3965 | +vui llx07(long a, ui *p) { return __builtin_vec_lvlx (a,p); }
|
---|
| 3966 | +vbs llx08(long a, vbs *p) { return __builtin_vec_lvlx (a,p); }
|
---|
| 3967 | +vp llx09(long a, vp *p) { return __builtin_vec_lvlx (a,p); }
|
---|
| 3968 | +vss llx10(long a, vss *p) { return __builtin_vec_lvlx (a,p); }
|
---|
| 3969 | +vss llx11(long a, ss *p) { return __builtin_vec_lvlx (a,p); }
|
---|
| 3970 | +vus llx12(long a, vus *p) { return __builtin_vec_lvlx (a,p); }
|
---|
| 3971 | +vus llx13(long a, us *p) { return __builtin_vec_lvlx (a,p); }
|
---|
| 3972 | +vbc llx14(long a, vbc *p) { return __builtin_vec_lvlx (a,p); }
|
---|
| 3973 | +vsc llx15(long a, vsc *p) { return __builtin_vec_lvlx (a,p); }
|
---|
| 3974 | +vsc llx16(long a, sc *p) { return __builtin_vec_lvlx (a,p); }
|
---|
| 3975 | +vuc llx17(long a, vuc *p) { return __builtin_vec_lvlx (a,p); }
|
---|
| 3976 | +vuc llx18(long a, uc *p) { return __builtin_vec_lvlx (a,p); }
|
---|
| 3977 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-2.c gcc-4.6.3/gcc/testsuite/gcc.target/powerpc/cell_builtin-2.c
|
---|
| 3978 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-2.c 1970-01-01 00:00:00.000000000 +0000
|
---|
| 3979 | +++ gcc-4.6.3/gcc/testsuite/gcc.target/powerpc/cell_builtin-2.c 2012-06-04 17:42:25.267281000 +0000
|
---|
| 3980 | @@ -0,0 +1,48 @@
|
---|
| 3981 | +/* { dg-do compile { target { powerpc*-*-* } } } */
|
---|
| 3982 | +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
|
---|
| 3983 | +/* { dg-require-effective-target powerpc_altivec_ok } */
|
---|
| 3984 | +/* { dg-options "-O2 -maltivec -mcpu=cell" } */
|
---|
| 3985 | +/* { dg-final { scan-assembler-times "lvlxl" 19 } } */
|
---|
| 3986 | +
|
---|
| 3987 | +#include <altivec.h>
|
---|
| 3988 | +
|
---|
| 3989 | +typedef __vector signed char vsc;
|
---|
| 3990 | +typedef __vector signed short vss;
|
---|
| 3991 | +typedef __vector signed int vsi;
|
---|
| 3992 | +typedef __vector unsigned char vuc;
|
---|
| 3993 | +typedef __vector unsigned short vus;
|
---|
| 3994 | +typedef __vector unsigned int vui;
|
---|
| 3995 | +typedef __vector bool char vbc;
|
---|
| 3996 | +typedef __vector bool short vbs;
|
---|
| 3997 | +typedef __vector bool int vbi;
|
---|
| 3998 | +typedef __vector float vsf;
|
---|
| 3999 | +typedef __vector pixel vp;
|
---|
| 4000 | +typedef signed char sc;
|
---|
| 4001 | +typedef signed short ss;
|
---|
| 4002 | +typedef signed int si;
|
---|
| 4003 | +typedef signed long sl;
|
---|
| 4004 | +typedef unsigned char uc;
|
---|
| 4005 | +typedef unsigned short us;
|
---|
| 4006 | +typedef unsigned int ui;
|
---|
| 4007 | +typedef unsigned long ul;
|
---|
| 4008 | +typedef float sf;
|
---|
| 4009 | +
|
---|
| 4010 | +vsc lc2(long a, void *p) { return __builtin_altivec_lvlxl (a,p); }
|
---|
| 4011 | +vsf llxl01(long a, vsf *p) { return __builtin_vec_lvlxl (a,p); }
|
---|
| 4012 | +vsf llxl02(long a, sf *p) { return __builtin_vec_lvlxl (a,p); }
|
---|
| 4013 | +vbi llxl03(long a, vbi *p) { return __builtin_vec_lvlxl (a,p); }
|
---|
| 4014 | +vsi llxl04(long a, vsi *p) { return __builtin_vec_lvlxl (a,p); }
|
---|
| 4015 | +vsi llxl05(long a, si *p) { return __builtin_vec_lvlxl (a,p); }
|
---|
| 4016 | +vui llxl06(long a, vui *p) { return __builtin_vec_lvlxl (a,p); }
|
---|
| 4017 | +vui llxl07(long a, ui *p) { return __builtin_vec_lvlxl (a,p); }
|
---|
| 4018 | +vbs llxl08(long a, vbs *p) { return __builtin_vec_lvlxl (a,p); }
|
---|
| 4019 | +vp llxl09(long a, vp *p) { return __builtin_vec_lvlxl (a,p); }
|
---|
| 4020 | +vss llxl10(long a, vss *p) { return __builtin_vec_lvlxl (a,p); }
|
---|
| 4021 | +vss llxl11(long a, ss *p) { return __builtin_vec_lvlxl (a,p); }
|
---|
| 4022 | +vus llxl12(long a, vus *p) { return __builtin_vec_lvlxl (a,p); }
|
---|
| 4023 | +vus llxl13(long a, us *p) { return __builtin_vec_lvlxl (a,p); }
|
---|
| 4024 | +vbc llxl14(long a, vbc *p) { return __builtin_vec_lvlxl (a,p); }
|
---|
| 4025 | +vsc llxl15(long a, vsc *p) { return __builtin_vec_lvlxl (a,p); }
|
---|
| 4026 | +vsc llxl16(long a, sc *p) { return __builtin_vec_lvlxl (a,p); }
|
---|
| 4027 | +vuc llxl17(long a, vuc *p) { return __builtin_vec_lvlxl (a,p); }
|
---|
| 4028 | +vuc llxl18(long a, uc *p) { return __builtin_vec_lvlxl (a,p); }
|
---|
| 4029 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-3.c gcc-4.6.3/gcc/testsuite/gcc.target/powerpc/cell_builtin-3.c
|
---|
| 4030 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-3.c 1970-01-01 00:00:00.000000000 +0000
|
---|
| 4031 | +++ gcc-4.6.3/gcc/testsuite/gcc.target/powerpc/cell_builtin-3.c 2012-06-04 17:42:25.267281000 +0000
|
---|
| 4032 | @@ -0,0 +1,48 @@
|
---|
| 4033 | +/* { dg-do compile { target { powerpc*-*-* } } } */
|
---|
| 4034 | +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
|
---|
| 4035 | +/* { dg-require-effective-target powerpc_altivec_ok } */
|
---|
| 4036 | +/* { dg-options "-O2 -maltivec -mcpu=cell" } */
|
---|
| 4037 | +/* { dg-final { scan-assembler-times "lvrx" 19 } } */
|
---|
| 4038 | +
|
---|
| 4039 | +#include <altivec.h>
|
---|
| 4040 | +
|
---|
| 4041 | +typedef __vector signed char vsc;
|
---|
| 4042 | +typedef __vector signed short vss;
|
---|
| 4043 | +typedef __vector signed int vsi;
|
---|
| 4044 | +typedef __vector unsigned char vuc;
|
---|
| 4045 | +typedef __vector unsigned short vus;
|
---|
| 4046 | +typedef __vector unsigned int vui;
|
---|
| 4047 | +typedef __vector bool char vbc;
|
---|
| 4048 | +typedef __vector bool short vbs;
|
---|
| 4049 | +typedef __vector bool int vbi;
|
---|
| 4050 | +typedef __vector float vsf;
|
---|
| 4051 | +typedef __vector pixel vp;
|
---|
| 4052 | +typedef signed char sc;
|
---|
| 4053 | +typedef signed short ss;
|
---|
| 4054 | +typedef signed int si;
|
---|
| 4055 | +typedef signed long sl;
|
---|
| 4056 | +typedef unsigned char uc;
|
---|
| 4057 | +typedef unsigned short us;
|
---|
| 4058 | +typedef unsigned int ui;
|
---|
| 4059 | +typedef unsigned long ul;
|
---|
| 4060 | +typedef float sf;
|
---|
| 4061 | +
|
---|
| 4062 | +vsc lc3(long a, void *p) { return __builtin_altivec_lvrx (a,p); }
|
---|
| 4063 | +vsf lrx01(long a, vsf *p) { return __builtin_vec_lvrx (a,p); }
|
---|
| 4064 | +vsf lrx02(long a, sf *p) { return __builtin_vec_lvrx (a,p); }
|
---|
| 4065 | +vbi lrx03(long a, vbi *p) { return __builtin_vec_lvrx (a,p); }
|
---|
| 4066 | +vsi lrx04(long a, vsi *p) { return __builtin_vec_lvrx (a,p); }
|
---|
| 4067 | +vsi lrx05(long a, si *p) { return __builtin_vec_lvrx (a,p); }
|
---|
| 4068 | +vui lrx06(long a, vui *p) { return __builtin_vec_lvrx (a,p); }
|
---|
| 4069 | +vui lrx07(long a, ui *p) { return __builtin_vec_lvrx (a,p); }
|
---|
| 4070 | +vbs lrx08(long a, vbs *p) { return __builtin_vec_lvrx (a,p); }
|
---|
| 4071 | +vp lrx09(long a, vp *p) { return __builtin_vec_lvrx (a,p); }
|
---|
| 4072 | +vss lrx10(long a, vss *p) { return __builtin_vec_lvrx (a,p); }
|
---|
| 4073 | +vss lrx11(long a, ss *p) { return __builtin_vec_lvrx (a,p); }
|
---|
| 4074 | +vus lrx12(long a, vus *p) { return __builtin_vec_lvrx (a,p); }
|
---|
| 4075 | +vus lrx13(long a, us *p) { return __builtin_vec_lvrx (a,p); }
|
---|
| 4076 | +vbc lrx14(long a, vbc *p) { return __builtin_vec_lvrx (a,p); }
|
---|
| 4077 | +vsc lrx15(long a, vsc *p) { return __builtin_vec_lvrx (a,p); }
|
---|
| 4078 | +vsc lrx16(long a, sc *p) { return __builtin_vec_lvrx (a,p); }
|
---|
| 4079 | +vuc lrx17(long a, vuc *p) { return __builtin_vec_lvrx (a,p); }
|
---|
| 4080 | +vuc lrx18(long a, uc *p) { return __builtin_vec_lvrx (a,p); }
|
---|
| 4081 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-4.c gcc-4.6.3/gcc/testsuite/gcc.target/powerpc/cell_builtin-4.c
|
---|
| 4082 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-4.c 1970-01-01 00:00:00.000000000 +0000
|
---|
| 4083 | +++ gcc-4.6.3/gcc/testsuite/gcc.target/powerpc/cell_builtin-4.c 2012-06-04 17:42:25.267281000 +0000
|
---|
| 4084 | @@ -0,0 +1,48 @@
|
---|
| 4085 | +/* { dg-do compile { target { powerpc*-*-* } } } */
|
---|
| 4086 | +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
|
---|
| 4087 | +/* { dg-require-effective-target powerpc_altivec_ok } */
|
---|
| 4088 | +/* { dg-options "-O2 -maltivec -mcpu=cell" } */
|
---|
| 4089 | +/* { dg-final { scan-assembler-times "lvrxl" 19 } } */
|
---|
| 4090 | +
|
---|
| 4091 | +#include <altivec.h>
|
---|
| 4092 | +
|
---|
| 4093 | +typedef __vector signed char vsc;
|
---|
| 4094 | +typedef __vector signed short vss;
|
---|
| 4095 | +typedef __vector signed int vsi;
|
---|
| 4096 | +typedef __vector unsigned char vuc;
|
---|
| 4097 | +typedef __vector unsigned short vus;
|
---|
| 4098 | +typedef __vector unsigned int vui;
|
---|
| 4099 | +typedef __vector bool char vbc;
|
---|
| 4100 | +typedef __vector bool short vbs;
|
---|
| 4101 | +typedef __vector bool int vbi;
|
---|
| 4102 | +typedef __vector float vsf;
|
---|
| 4103 | +typedef __vector pixel vp;
|
---|
| 4104 | +typedef signed char sc;
|
---|
| 4105 | +typedef signed short ss;
|
---|
| 4106 | +typedef signed int si;
|
---|
| 4107 | +typedef signed long sl;
|
---|
| 4108 | +typedef unsigned char uc;
|
---|
| 4109 | +typedef unsigned short us;
|
---|
| 4110 | +typedef unsigned int ui;
|
---|
| 4111 | +typedef unsigned long ul;
|
---|
| 4112 | +typedef float sf;
|
---|
| 4113 | +
|
---|
| 4114 | +vsc lc4(long a, void *p) { return __builtin_altivec_lvrxl (a,p); }
|
---|
| 4115 | +vsf lrxl01(long a, vsf *p) { return __builtin_vec_lvrxl (a,p); }
|
---|
| 4116 | +vsf lrxl02(long a, sf *p) { return __builtin_vec_lvrxl (a,p); }
|
---|
| 4117 | +vbi lrxl03(long a, vbi *p) { return __builtin_vec_lvrxl (a,p); }
|
---|
| 4118 | +vsi lrxl04(long a, vsi *p) { return __builtin_vec_lvrxl (a,p); }
|
---|
| 4119 | +vsi lrxl05(long a, si *p) { return __builtin_vec_lvrxl (a,p); }
|
---|
| 4120 | +vui lrxl06(long a, vui *p) { return __builtin_vec_lvrxl (a,p); }
|
---|
| 4121 | +vui lrxl07(long a, ui *p) { return __builtin_vec_lvrxl (a,p); }
|
---|
| 4122 | +vbs lrxl08(long a, vbs *p) { return __builtin_vec_lvrxl (a,p); }
|
---|
| 4123 | +vp lrxl09(long a, vp *p) { return __builtin_vec_lvrxl (a,p); }
|
---|
| 4124 | +vss lrxl10(long a, vss *p) { return __builtin_vec_lvrxl (a,p); }
|
---|
| 4125 | +vss lrxl11(long a, ss *p) { return __builtin_vec_lvrxl (a,p); }
|
---|
| 4126 | +vus lrxl12(long a, vus *p) { return __builtin_vec_lvrxl (a,p); }
|
---|
| 4127 | +vus lrxl13(long a, us *p) { return __builtin_vec_lvrxl (a,p); }
|
---|
| 4128 | +vbc lrxl14(long a, vbc *p) { return __builtin_vec_lvrxl (a,p); }
|
---|
| 4129 | +vsc lrxl15(long a, vsc *p) { return __builtin_vec_lvrxl (a,p); }
|
---|
| 4130 | +vsc lrxl16(long a, sc *p) { return __builtin_vec_lvrxl (a,p); }
|
---|
| 4131 | +vuc lrxl17(long a, vuc *p) { return __builtin_vec_lvrxl (a,p); }
|
---|
| 4132 | +vuc lrxl18(long a, uc *p) { return __builtin_vec_lvrxl (a,p); }
|
---|
| 4133 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-5.c gcc-4.6.3/gcc/testsuite/gcc.target/powerpc/cell_builtin-5.c
|
---|
| 4134 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-5.c 1970-01-01 00:00:00.000000000 +0000
|
---|
| 4135 | +++ gcc-4.6.3/gcc/testsuite/gcc.target/powerpc/cell_builtin-5.c 2012-06-04 17:42:25.267281000 +0000
|
---|
| 4136 | @@ -0,0 +1,48 @@
|
---|
| 4137 | +/* { dg-do compile { target { powerpc*-*-* } } } */
|
---|
| 4138 | +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
|
---|
| 4139 | +/* { dg-require-effective-target powerpc_altivec_ok } */
|
---|
| 4140 | +/* { dg-options "-O2 -maltivec -mcpu=cell" } */
|
---|
| 4141 | +/* { dg-final { scan-assembler-times "stvlx" 19 } } */
|
---|
| 4142 | +
|
---|
| 4143 | +#include <altivec.h>
|
---|
| 4144 | +
|
---|
| 4145 | +typedef __vector signed char vsc;
|
---|
| 4146 | +typedef __vector signed short vss;
|
---|
| 4147 | +typedef __vector signed int vsi;
|
---|
| 4148 | +typedef __vector unsigned char vuc;
|
---|
| 4149 | +typedef __vector unsigned short vus;
|
---|
| 4150 | +typedef __vector unsigned int vui;
|
---|
| 4151 | +typedef __vector bool char vbc;
|
---|
| 4152 | +typedef __vector bool short vbs;
|
---|
| 4153 | +typedef __vector bool int vbi;
|
---|
| 4154 | +typedef __vector float vsf;
|
---|
| 4155 | +typedef __vector pixel vp;
|
---|
| 4156 | +typedef signed char sc;
|
---|
| 4157 | +typedef signed short ss;
|
---|
| 4158 | +typedef signed int si;
|
---|
| 4159 | +typedef signed long sl;
|
---|
| 4160 | +typedef unsigned char uc;
|
---|
| 4161 | +typedef unsigned short us;
|
---|
| 4162 | +typedef unsigned int ui;
|
---|
| 4163 | +typedef unsigned long ul;
|
---|
| 4164 | +typedef float sf;
|
---|
| 4165 | +
|
---|
| 4166 | +void sc1(vsc v, long a, void *p) { __builtin_altivec_stvlx (v,a,p); }
|
---|
| 4167 | +void slx01(vsf v, long a, vsf *p) { __builtin_vec_stvlx (v,a,p); }
|
---|
| 4168 | +void slx02(vsf v, long a, sf *p) { __builtin_vec_stvlx (v,a,p); }
|
---|
| 4169 | +void slx03(vbi v, long a, vbi *p) { __builtin_vec_stvlx (v,a,p); }
|
---|
| 4170 | +void slx04(vsi v, long a, vsi *p) { __builtin_vec_stvlx (v,a,p); }
|
---|
| 4171 | +void slx05(vsi v, long a, si *p) { __builtin_vec_stvlx (v,a,p); }
|
---|
| 4172 | +void slx06(vui v, long a, vui *p) { __builtin_vec_stvlx (v,a,p); }
|
---|
| 4173 | +void slx07(vui v, long a, ui *p) { __builtin_vec_stvlx (v,a,p); }
|
---|
| 4174 | +void slx08(vbs v, long a, vbs *p) { __builtin_vec_stvlx (v,a,p); }
|
---|
| 4175 | +void slx09(vp v, long a, vp *p) { __builtin_vec_stvlx (v,a,p); }
|
---|
| 4176 | +void slx10(vss v, long a, vss *p) { __builtin_vec_stvlx (v,a,p); }
|
---|
| 4177 | +void slx11(vss v, long a, ss *p) { __builtin_vec_stvlx (v,a,p); }
|
---|
| 4178 | +void slx12(vus v, long a, vus *p) { __builtin_vec_stvlx (v,a,p); }
|
---|
| 4179 | +void slx13(vus v, long a, us *p) { __builtin_vec_stvlx (v,a,p); }
|
---|
| 4180 | +void slx14(vbc v, long a, vbc *p) { __builtin_vec_stvlx (v,a,p); }
|
---|
| 4181 | +void slx15(vsc v, long a, vsc *p) { __builtin_vec_stvlx (v,a,p); }
|
---|
| 4182 | +void slx16(vsc v, long a, sc *p) { __builtin_vec_stvlx (v,a,p); }
|
---|
| 4183 | +void slx17(vuc v, long a, vuc *p) { __builtin_vec_stvlx (v,a,p); }
|
---|
| 4184 | +void slx18(vuc v, long a, uc *p) { __builtin_vec_stvlx (v,a,p); }
|
---|
| 4185 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-6.c gcc-4.6.3/gcc/testsuite/gcc.target/powerpc/cell_builtin-6.c
|
---|
| 4186 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-6.c 1970-01-01 00:00:00.000000000 +0000
|
---|
| 4187 | +++ gcc-4.6.3/gcc/testsuite/gcc.target/powerpc/cell_builtin-6.c 2012-06-04 17:42:25.267281000 +0000
|
---|
| 4188 | @@ -0,0 +1,48 @@
|
---|
| 4189 | +/* { dg-do compile { target { powerpc*-*-* } } } */
|
---|
| 4190 | +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
|
---|
| 4191 | +/* { dg-require-effective-target powerpc_altivec_ok } */
|
---|
| 4192 | +/* { dg-options "-O2 -maltivec -mcpu=cell" } */
|
---|
| 4193 | +/* { dg-final { scan-assembler-times "stvlxl" 19 } } */
|
---|
| 4194 | +
|
---|
| 4195 | +#include <altivec.h>
|
---|
| 4196 | +
|
---|
| 4197 | +typedef __vector signed char vsc;
|
---|
| 4198 | +typedef __vector signed short vss;
|
---|
| 4199 | +typedef __vector signed int vsi;
|
---|
| 4200 | +typedef __vector unsigned char vuc;
|
---|
| 4201 | +typedef __vector unsigned short vus;
|
---|
| 4202 | +typedef __vector unsigned int vui;
|
---|
| 4203 | +typedef __vector bool char vbc;
|
---|
| 4204 | +typedef __vector bool short vbs;
|
---|
| 4205 | +typedef __vector bool int vbi;
|
---|
| 4206 | +typedef __vector float vsf;
|
---|
| 4207 | +typedef __vector pixel vp;
|
---|
| 4208 | +typedef signed char sc;
|
---|
| 4209 | +typedef signed short ss;
|
---|
| 4210 | +typedef signed int si;
|
---|
| 4211 | +typedef signed long sl;
|
---|
| 4212 | +typedef unsigned char uc;
|
---|
| 4213 | +typedef unsigned short us;
|
---|
| 4214 | +typedef unsigned int ui;
|
---|
| 4215 | +typedef unsigned long ul;
|
---|
| 4216 | +typedef float sf;
|
---|
| 4217 | +
|
---|
| 4218 | +void sc2(vsc v, long a, void *p) { __builtin_altivec_stvlxl (v,a,p); }
|
---|
| 4219 | +void slxl01(vsf v, long a, vsf *p) { __builtin_vec_stvlxl (v,a,p); }
|
---|
| 4220 | +void slxl02(vsf v, long a, sf *p) { __builtin_vec_stvlxl (v,a,p); }
|
---|
| 4221 | +void slxl03(vbi v, long a, vbi *p) { __builtin_vec_stvlxl (v,a,p); }
|
---|
| 4222 | +void slxl04(vsi v, long a, vsi *p) { __builtin_vec_stvlxl (v,a,p); }
|
---|
| 4223 | +void slxl05(vsi v, long a, si *p) { __builtin_vec_stvlxl (v,a,p); }
|
---|
| 4224 | +void slxl06(vui v, long a, vui *p) { __builtin_vec_stvlxl (v,a,p); }
|
---|
| 4225 | +void slxl07(vui v, long a, ui *p) { __builtin_vec_stvlxl (v,a,p); }
|
---|
| 4226 | +void slxl08(vbs v, long a, vbs *p) { __builtin_vec_stvlxl (v,a,p); }
|
---|
| 4227 | +void slxl09(vp v, long a, vp *p) { __builtin_vec_stvlxl (v,a,p); }
|
---|
| 4228 | +void slxl10(vss v, long a, vss *p) { __builtin_vec_stvlxl (v,a,p); }
|
---|
| 4229 | +void slxl11(vss v, long a, ss *p) { __builtin_vec_stvlxl (v,a,p); }
|
---|
| 4230 | +void slxl12(vus v, long a, vus *p) { __builtin_vec_stvlxl (v,a,p); }
|
---|
| 4231 | +void slxl13(vus v, long a, us *p) { __builtin_vec_stvlxl (v,a,p); }
|
---|
| 4232 | +void slxl14(vbc v, long a, vbc *p) { __builtin_vec_stvlxl (v,a,p); }
|
---|
| 4233 | +void slxl15(vsc v, long a, vsc *p) { __builtin_vec_stvlxl (v,a,p); }
|
---|
| 4234 | +void slxl16(vsc v, long a, sc *p) { __builtin_vec_stvlxl (v,a,p); }
|
---|
| 4235 | +void slxl17(vuc v, long a, vuc *p) { __builtin_vec_stvlxl (v,a,p); }
|
---|
| 4236 | +void slxl18(vuc v, long a, uc *p) { __builtin_vec_stvlxl (v,a,p); }
|
---|
| 4237 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-7.c gcc-4.6.3/gcc/testsuite/gcc.target/powerpc/cell_builtin-7.c
|
---|
| 4238 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-7.c 1970-01-01 00:00:00.000000000 +0000
|
---|
| 4239 | +++ gcc-4.6.3/gcc/testsuite/gcc.target/powerpc/cell_builtin-7.c 2012-06-04 17:42:25.267281000 +0000
|
---|
| 4240 | @@ -0,0 +1,48 @@
|
---|
| 4241 | +/* { dg-do compile { target { powerpc*-*-* } } } */
|
---|
| 4242 | +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
|
---|
| 4243 | +/* { dg-require-effective-target powerpc_altivec_ok } */
|
---|
| 4244 | +/* { dg-options "-O2 -maltivec -mcpu=cell" } */
|
---|
| 4245 | +/* { dg-final { scan-assembler-times "stvrx" 19 } } */
|
---|
| 4246 | +
|
---|
| 4247 | +#include <altivec.h>
|
---|
| 4248 | +
|
---|
| 4249 | +typedef __vector signed char vsc;
|
---|
| 4250 | +typedef __vector signed short vss;
|
---|
| 4251 | +typedef __vector signed int vsi;
|
---|
| 4252 | +typedef __vector unsigned char vuc;
|
---|
| 4253 | +typedef __vector unsigned short vus;
|
---|
| 4254 | +typedef __vector unsigned int vui;
|
---|
| 4255 | +typedef __vector bool char vbc;
|
---|
| 4256 | +typedef __vector bool short vbs;
|
---|
| 4257 | +typedef __vector bool int vbi;
|
---|
| 4258 | +typedef __vector float vsf;
|
---|
| 4259 | +typedef __vector pixel vp;
|
---|
| 4260 | +typedef signed char sc;
|
---|
| 4261 | +typedef signed short ss;
|
---|
| 4262 | +typedef signed int si;
|
---|
| 4263 | +typedef signed long sl;
|
---|
| 4264 | +typedef unsigned char uc;
|
---|
| 4265 | +typedef unsigned short us;
|
---|
| 4266 | +typedef unsigned int ui;
|
---|
| 4267 | +typedef unsigned long ul;
|
---|
| 4268 | +typedef float sf;
|
---|
| 4269 | +
|
---|
| 4270 | +void sc3(vsc v, long a, void *p) { __builtin_altivec_stvrx (v,a,p); }
|
---|
| 4271 | +void srx01(vsf v, long a, vsf *p) { __builtin_vec_stvrx (v,a,p); }
|
---|
| 4272 | +void srx02(vsf v, long a, sf *p) { __builtin_vec_stvrx (v,a,p); }
|
---|
| 4273 | +void srx03(vbi v, long a, vbi *p) { __builtin_vec_stvrx (v,a,p); }
|
---|
| 4274 | +void srx04(vsi v, long a, vsi *p) { __builtin_vec_stvrx (v,a,p); }
|
---|
| 4275 | +void srx05(vsi v, long a, si *p) { __builtin_vec_stvrx (v,a,p); }
|
---|
| 4276 | +void srx06(vui v, long a, vui *p) { __builtin_vec_stvrx (v,a,p); }
|
---|
| 4277 | +void srx07(vui v, long a, ui *p) { __builtin_vec_stvrx (v,a,p); }
|
---|
| 4278 | +void srx08(vbs v, long a, vbs *p) { __builtin_vec_stvrx (v,a,p); }
|
---|
| 4279 | +void srx09(vp v, long a, vp *p) { __builtin_vec_stvrx (v,a,p); }
|
---|
| 4280 | +void srx10(vss v, long a, vss *p) { __builtin_vec_stvrx (v,a,p); }
|
---|
| 4281 | +void srx11(vss v, long a, ss *p) { __builtin_vec_stvrx (v,a,p); }
|
---|
| 4282 | +void srx12(vus v, long a, vus *p) { __builtin_vec_stvrx (v,a,p); }
|
---|
| 4283 | +void srx13(vus v, long a, us *p) { __builtin_vec_stvrx (v,a,p); }
|
---|
| 4284 | +void srx14(vbc v, long a, vbc *p) { __builtin_vec_stvrx (v,a,p); }
|
---|
| 4285 | +void srx15(vsc v, long a, vsc *p) { __builtin_vec_stvrx (v,a,p); }
|
---|
| 4286 | +void srx16(vsc v, long a, sc *p) { __builtin_vec_stvrx (v,a,p); }
|
---|
| 4287 | +void srx17(vuc v, long a, vuc *p) { __builtin_vec_stvrx (v,a,p); }
|
---|
| 4288 | +void srx18(vuc v, long a, uc *p) { __builtin_vec_stvrx (v,a,p); }
|
---|
| 4289 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-8.c gcc-4.6.3/gcc/testsuite/gcc.target/powerpc/cell_builtin-8.c
|
---|
| 4290 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-8.c 1970-01-01 00:00:00.000000000 +0000
|
---|
| 4291 | +++ gcc-4.6.3/gcc/testsuite/gcc.target/powerpc/cell_builtin-8.c 2012-06-04 17:42:25.267281000 +0000
|
---|
| 4292 | @@ -0,0 +1,48 @@
|
---|
| 4293 | +/* { dg-do compile { target { powerpc*-*-* } } } */
|
---|
| 4294 | +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
|
---|
| 4295 | +/* { dg-require-effective-target powerpc_altivec_ok } */
|
---|
| 4296 | +/* { dg-options "-O2 -maltivec -mcpu=cell" } */
|
---|
| 4297 | +/* { dg-final { scan-assembler-times "stvrxl" 19 } } */
|
---|
| 4298 | +
|
---|
| 4299 | +#include <altivec.h>
|
---|
| 4300 | +
|
---|
| 4301 | +typedef __vector signed char vsc;
|
---|
| 4302 | +typedef __vector signed short vss;
|
---|
| 4303 | +typedef __vector signed int vsi;
|
---|
| 4304 | +typedef __vector unsigned char vuc;
|
---|
| 4305 | +typedef __vector unsigned short vus;
|
---|
| 4306 | +typedef __vector unsigned int vui;
|
---|
| 4307 | +typedef __vector bool char vbc;
|
---|
| 4308 | +typedef __vector bool short vbs;
|
---|
| 4309 | +typedef __vector bool int vbi;
|
---|
| 4310 | +typedef __vector float vsf;
|
---|
| 4311 | +typedef __vector pixel vp;
|
---|
| 4312 | +typedef signed char sc;
|
---|
| 4313 | +typedef signed short ss;
|
---|
| 4314 | +typedef signed int si;
|
---|
| 4315 | +typedef signed long sl;
|
---|
| 4316 | +typedef unsigned char uc;
|
---|
| 4317 | +typedef unsigned short us;
|
---|
| 4318 | +typedef unsigned int ui;
|
---|
| 4319 | +typedef unsigned long ul;
|
---|
| 4320 | +typedef float sf;
|
---|
| 4321 | +
|
---|
| 4322 | +void sc4(vsc v, long a, void *p) { __builtin_altivec_stvrxl (v,a,p); }
|
---|
| 4323 | +void srxl01(vsf v, long a, vsf *p) { __builtin_vec_stvrxl (v,a,p); }
|
---|
| 4324 | +void srxl02(vsf v, long a, sf *p) { __builtin_vec_stvrxl (v,a,p); }
|
---|
| 4325 | +void srxl03(vbi v, long a, vbi *p) { __builtin_vec_stvrxl (v,a,p); }
|
---|
| 4326 | +void srxl04(vsi v, long a, vsi *p) { __builtin_vec_stvrxl (v,a,p); }
|
---|
| 4327 | +void srxl05(vsi v, long a, si *p) { __builtin_vec_stvrxl (v,a,p); }
|
---|
| 4328 | +void srxl06(vui v, long a, vui *p) { __builtin_vec_stvrxl (v,a,p); }
|
---|
| 4329 | +void srxl07(vui v, long a, ui *p) { __builtin_vec_stvrxl (v,a,p); }
|
---|
| 4330 | +void srxl08(vbs v, long a, vbs *p) { __builtin_vec_stvrxl (v,a,p); }
|
---|
| 4331 | +void srxl09(vp v, long a, vp *p) { __builtin_vec_stvrxl (v,a,p); }
|
---|
| 4332 | +void srxl10(vss v, long a, vss *p) { __builtin_vec_stvrxl (v,a,p); }
|
---|
| 4333 | +void srxl11(vss v, long a, ss *p) { __builtin_vec_stvrxl (v,a,p); }
|
---|
| 4334 | +void srxl12(vus v, long a, vus *p) { __builtin_vec_stvrxl (v,a,p); }
|
---|
| 4335 | +void srxl13(vus v, long a, us *p) { __builtin_vec_stvrxl (v,a,p); }
|
---|
| 4336 | +void srxl14(vbc v, long a, vbc *p) { __builtin_vec_stvrxl (v,a,p); }
|
---|
| 4337 | +void srxl15(vsc v, long a, vsc *p) { __builtin_vec_stvrxl (v,a,p); }
|
---|
| 4338 | +void srxl16(vsc v, long a, sc *p) { __builtin_vec_stvrxl (v,a,p); }
|
---|
| 4339 | +void srxl17(vuc v, long a, vuc *p) { __builtin_vec_stvrxl (v,a,p); }
|
---|
| 4340 | +void srxl18(vuc v, long a, uc *p) { __builtin_vec_stvrxl (v,a,p); }
|
---|
| 4341 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/powerpc/pr52457.c gcc-4.6.3/gcc/testsuite/gcc.target/powerpc/pr52457.c
|
---|
| 4342 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.target/powerpc/pr52457.c 1970-01-01 00:00:00.000000000 +0000
|
---|
| 4343 | +++ gcc-4.6.3/gcc/testsuite/gcc.target/powerpc/pr52457.c 2012-03-02 22:12:52.237313000 +0000
|
---|
| 4344 | @@ -0,0 +1,34 @@
|
---|
| 4345 | +/* { dg-do run { target { powerpc*-*-linux* } } } */
|
---|
| 4346 | +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
|
---|
| 4347 | +/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
|
---|
| 4348 | +/* { dg-require-effective-target vsx_hw } */
|
---|
| 4349 | +/* { dg-options "-O1 -mcpu=power7" } */
|
---|
| 4350 | +
|
---|
| 4351 | +extern void abort (void);
|
---|
| 4352 | +
|
---|
| 4353 | +typedef long long T;
|
---|
| 4354 | +typedef T vl_t __attribute__((vector_size(2 * sizeof (T))));
|
---|
| 4355 | +
|
---|
| 4356 | +vl_t
|
---|
| 4357 | +buggy_func (T x)
|
---|
| 4358 | +{
|
---|
| 4359 | + vl_t w;
|
---|
| 4360 | + T *p = (T *)&w;
|
---|
| 4361 | + p[0] = p[1] = x;
|
---|
| 4362 | + return w;
|
---|
| 4363 | +}
|
---|
| 4364 | +
|
---|
| 4365 | +int
|
---|
| 4366 | +main(void)
|
---|
| 4367 | +{
|
---|
| 4368 | + vl_t rval;
|
---|
| 4369 | + T *pl;
|
---|
| 4370 | +
|
---|
| 4371 | + pl = (T *) &rval;
|
---|
| 4372 | + rval = buggy_func (2);
|
---|
| 4373 | +
|
---|
| 4374 | + if (pl[0] != 2 || pl[1] != 2)
|
---|
| 4375 | + abort ();
|
---|
| 4376 | +
|
---|
| 4377 | + return 0;
|
---|
| 4378 | +}
|
---|
| 4379 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/powerpc/pr52775.c gcc-4.6.3/gcc/testsuite/gcc.target/powerpc/pr52775.c
|
---|
| 4380 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.target/powerpc/pr52775.c 1970-01-01 00:00:00.000000000 +0000
|
---|
| 4381 | +++ gcc-4.6.3/gcc/testsuite/gcc.target/powerpc/pr52775.c 2012-04-13 21:55:15.746111000 +0000
|
---|
| 4382 | @@ -0,0 +1,16 @@
|
---|
| 4383 | +/* { dg-do compile { target { powerpc*-*-* && ilp32 } } } */
|
---|
| 4384 | +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
|
---|
| 4385 | +/* { dg-options "-O1 -mcpu=power4" } */
|
---|
| 4386 | +/* { dg-final { scan-assembler-times "fcfid" 2 } } */
|
---|
| 4387 | +
|
---|
| 4388 | +double
|
---|
| 4389 | +int_to_double (int *p)
|
---|
| 4390 | +{
|
---|
| 4391 | + return (double)*p;
|
---|
| 4392 | +}
|
---|
| 4393 | +
|
---|
| 4394 | +double
|
---|
| 4395 | +long_long_to_double (long long *p)
|
---|
| 4396 | +{
|
---|
| 4397 | + return (double)*p;
|
---|
| 4398 | +}
|
---|
| 4399 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/powerpc/pr53199.c gcc-4.6.3/gcc/testsuite/gcc.target/powerpc/pr53199.c
|
---|
| 4400 | --- gcc-4.6.3.orig/gcc/testsuite/gcc.target/powerpc/pr53199.c 1970-01-01 00:00:00.000000000 +0000
|
---|
| 4401 | +++ gcc-4.6.3/gcc/testsuite/gcc.target/powerpc/pr53199.c 2012-05-04 00:31:50.505528000 +0000
|
---|
| 4402 | @@ -0,0 +1,50 @@
|
---|
| 4403 | +/* { dg-do compile { target { powerpc*-*-* } } } */
|
---|
| 4404 | +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
|
---|
| 4405 | +/* { dg-options "-O2 -mcpu=power6 -mavoid-indexed-addresses" } */
|
---|
| 4406 | +/* { dg-final { scan-assembler-times "lwbrx" 6 } } */
|
---|
| 4407 | +/* { dg-final { scan-assembler-times "stwbrx" 6 } } */
|
---|
| 4408 | +
|
---|
| 4409 | +/* PR 51399: bswap gets an error if -mavoid-indexed-addresses was used in
|
---|
| 4410 | + creating the two lwbrx instructions. */
|
---|
| 4411 | +
|
---|
| 4412 | +long long
|
---|
| 4413 | +load64_reverse_1 (long long *p)
|
---|
| 4414 | +{
|
---|
| 4415 | + return __builtin_bswap64 (*p);
|
---|
| 4416 | +}
|
---|
| 4417 | +
|
---|
| 4418 | +long long
|
---|
| 4419 | +load64_reverse_2 (long long *p)
|
---|
| 4420 | +{
|
---|
| 4421 | + return __builtin_bswap64 (p[1]);
|
---|
| 4422 | +}
|
---|
| 4423 | +
|
---|
| 4424 | +long long
|
---|
| 4425 | +load64_reverse_3 (long long *p, int i)
|
---|
| 4426 | +{
|
---|
| 4427 | + return __builtin_bswap64 (p[i]);
|
---|
| 4428 | +}
|
---|
| 4429 | +
|
---|
| 4430 | +void
|
---|
| 4431 | +store64_reverse_1 (long long *p, long long x)
|
---|
| 4432 | +{
|
---|
| 4433 | + *p = __builtin_bswap64 (x);
|
---|
| 4434 | +}
|
---|
| 4435 | +
|
---|
| 4436 | +void
|
---|
| 4437 | +store64_reverse_2 (long long *p, long long x)
|
---|
| 4438 | +{
|
---|
| 4439 | + p[1] = __builtin_bswap64 (x);
|
---|
| 4440 | +}
|
---|
| 4441 | +
|
---|
| 4442 | +void
|
---|
| 4443 | +store64_reverse_3 (long long *p, long long x, int i)
|
---|
| 4444 | +{
|
---|
| 4445 | + p[i] = __builtin_bswap64 (x);
|
---|
| 4446 | +}
|
---|
| 4447 | +
|
---|
| 4448 | +long long
|
---|
| 4449 | +reg_reverse (long long x)
|
---|
| 4450 | +{
|
---|
| 4451 | + return __builtin_bswap64 (x);
|
---|
| 4452 | +}
|
---|
| 4453 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gfortran.dg/init_flag_10.f90 gcc-4.6.3/gcc/testsuite/gfortran.dg/init_flag_10.f90
|
---|
| 4454 | --- gcc-4.6.3.orig/gcc/testsuite/gfortran.dg/init_flag_10.f90 1970-01-01 00:00:00.000000000 +0000
|
---|
| 4455 | +++ gcc-4.6.3/gcc/testsuite/gfortran.dg/init_flag_10.f90 2012-06-05 13:05:31.580646000 +0000
|
---|
| 4456 | @@ -0,0 +1,43 @@
|
---|
| 4457 | +! { dg-do run }
|
---|
| 4458 | +! { dg-options "-finit-real=NAN" }
|
---|
| 4459 | +! { dg-add-options ieee }
|
---|
| 4460 | +! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
|
---|
| 4461 | +!
|
---|
| 4462 | +! PR fortran/50619
|
---|
| 4463 | +!
|
---|
| 4464 | +! Contributed by Fred Krogh
|
---|
| 4465 | +!
|
---|
| 4466 | +! The NaN initialization used to set the associate name to NaN!
|
---|
| 4467 | +!
|
---|
| 4468 | +
|
---|
| 4469 | +module testa2
|
---|
| 4470 | +type, public :: test_ty
|
---|
| 4471 | + real :: rmult = 1.0e0
|
---|
| 4472 | +end type test_ty
|
---|
| 4473 | +
|
---|
| 4474 | +contains
|
---|
| 4475 | + subroutine test(e, var1)
|
---|
| 4476 | + type(test_ty) :: e
|
---|
| 4477 | + real :: var1, var2 ! Should get NaN initialized
|
---|
| 4478 | +
|
---|
| 4479 | + ! Should be the default value
|
---|
| 4480 | + if (e%rmult /= 1.0) call abort ()
|
---|
| 4481 | +
|
---|
| 4482 | + ! Check that NaN initialization is really turned on
|
---|
| 4483 | + if (var1 == var1) call abort ()
|
---|
| 4484 | + if (var2 == var2) call abort ()
|
---|
| 4485 | +
|
---|
| 4486 | + ! The following was failing:
|
---|
| 4487 | + associate (rmult=>e%rmult)
|
---|
| 4488 | + if (e%rmult /= 1.0) call abort ()
|
---|
| 4489 | + end associate
|
---|
| 4490 | + end subroutine test
|
---|
| 4491 | +end module testa2
|
---|
| 4492 | +
|
---|
| 4493 | +program testa1
|
---|
| 4494 | + use testa2
|
---|
| 4495 | + type(test_ty) :: e
|
---|
| 4496 | + real :: var1 ! Should get NaN initialized
|
---|
| 4497 | + call test(e, var1)
|
---|
| 4498 | + stop
|
---|
| 4499 | +end program testa1
|
---|
| 4500 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gfortran.dg/intrinsic_8.f90 gcc-4.6.3/gcc/testsuite/gfortran.dg/intrinsic_8.f90
|
---|
| 4501 | --- gcc-4.6.3.orig/gcc/testsuite/gfortran.dg/intrinsic_8.f90 1970-01-01 00:00:00.000000000 +0000
|
---|
| 4502 | +++ gcc-4.6.3/gcc/testsuite/gfortran.dg/intrinsic_8.f90 2012-03-06 17:08:01.409469000 +0000
|
---|
| 4503 | @@ -0,0 +1,23 @@
|
---|
| 4504 | +! { dg-do compile }
|
---|
| 4505 | +!
|
---|
| 4506 | +! PR fortran/52452
|
---|
| 4507 | +!
|
---|
| 4508 | +! Contributed by Roger Ferrer Ibanez
|
---|
| 4509 | +!
|
---|
| 4510 | +PROGRAM test_etime
|
---|
| 4511 | + IMPLICIT NONE
|
---|
| 4512 | + INTRINSIC :: etime
|
---|
| 4513 | + REAL(4) :: tarray(1:2)
|
---|
| 4514 | + REAL(4) :: result
|
---|
| 4515 | +
|
---|
| 4516 | + CALL etime(tarray, result)
|
---|
| 4517 | +END PROGRAM test_etime
|
---|
| 4518 | +
|
---|
| 4519 | +subroutine test_etime2
|
---|
| 4520 | + IMPLICIT NONE
|
---|
| 4521 | + INTRINSIC :: etime
|
---|
| 4522 | + REAL(4) :: tarray(1:2)
|
---|
| 4523 | + REAL(4) :: result
|
---|
| 4524 | +
|
---|
| 4525 | + result = etime(tarray)
|
---|
| 4526 | +END subroutine test_etime2
|
---|
| 4527 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gfortran.dg/optional_absent_2.f90 gcc-4.6.3/gcc/testsuite/gfortran.dg/optional_absent_2.f90
|
---|
| 4528 | --- gcc-4.6.3.orig/gcc/testsuite/gfortran.dg/optional_absent_2.f90 1970-01-01 00:00:00.000000000 +0000
|
---|
| 4529 | +++ gcc-4.6.3/gcc/testsuite/gfortran.dg/optional_absent_2.f90 2012-07-14 15:24:12.262320000 +0000
|
---|
| 4530 | @@ -0,0 +1,53 @@
|
---|
| 4531 | +! { dg-do run }
|
---|
| 4532 | +!
|
---|
| 4533 | +! PR fortran/51758
|
---|
| 4534 | +!
|
---|
| 4535 | +! Contributed by Mikael Morin
|
---|
| 4536 | +!
|
---|
| 4537 | +! Check whether passing NULL() to an elemental procedure works,
|
---|
| 4538 | +! where NULL() denotes an absent optional argument.
|
---|
| 4539 | +!
|
---|
| 4540 | +program p
|
---|
| 4541 | +
|
---|
| 4542 | + integer :: a(2)
|
---|
| 4543 | + integer :: b
|
---|
| 4544 | +
|
---|
| 4545 | + a = 0
|
---|
| 4546 | + a = foo((/ 1, 1 /), null())
|
---|
| 4547 | +! print *, a
|
---|
| 4548 | + if (any(a /= 2)) call abort
|
---|
| 4549 | +
|
---|
| 4550 | + a = 0
|
---|
| 4551 | + a = bar((/ 1, 1 /), null())
|
---|
| 4552 | +! print *, a
|
---|
| 4553 | + if (any(a /= 2)) call abort
|
---|
| 4554 | +
|
---|
| 4555 | + b = 0
|
---|
| 4556 | + b = bar(1, null())
|
---|
| 4557 | +! print *, b
|
---|
| 4558 | + if (b /= 2) call abort
|
---|
| 4559 | +
|
---|
| 4560 | +contains
|
---|
| 4561 | +
|
---|
| 4562 | + function foo(a, b)
|
---|
| 4563 | + integer :: a(:)
|
---|
| 4564 | + integer, optional :: b(:)
|
---|
| 4565 | + integer :: foo(size(a))
|
---|
| 4566 | +
|
---|
| 4567 | + if (present(b)) call abort
|
---|
| 4568 | +
|
---|
| 4569 | + foo = 2
|
---|
| 4570 | + end function foo
|
---|
| 4571 | +
|
---|
| 4572 | + elemental function bar(a, b)
|
---|
| 4573 | + integer, intent(in) :: a
|
---|
| 4574 | + integer, intent(in), optional :: b
|
---|
| 4575 | + integer :: bar
|
---|
| 4576 | +
|
---|
| 4577 | + bar = 2
|
---|
| 4578 | +
|
---|
| 4579 | + if (present(b)) bar = 1
|
---|
| 4580 | +
|
---|
| 4581 | + end function bar
|
---|
| 4582 | +
|
---|
| 4583 | +end program p
|
---|
| 4584 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gfortran.dg/pointer_intent_6.f90 gcc-4.6.3/gcc/testsuite/gfortran.dg/pointer_intent_6.f90
|
---|
| 4585 | --- gcc-4.6.3.orig/gcc/testsuite/gfortran.dg/pointer_intent_6.f90 1970-01-01 00:00:00.000000000 +0000
|
---|
| 4586 | +++ gcc-4.6.3/gcc/testsuite/gfortran.dg/pointer_intent_6.f90 2012-05-02 12:53:20.873985000 +0000
|
---|
| 4587 | @@ -0,0 +1,19 @@
|
---|
| 4588 | +! { dg-do compile }
|
---|
| 4589 | +!
|
---|
| 4590 | +! PR fortran/52864
|
---|
| 4591 | +!
|
---|
| 4592 | +! Assigning to an intent(in) pointer (which is valid).
|
---|
| 4593 | +!
|
---|
| 4594 | + program test
|
---|
| 4595 | + type PoisFFT_Solver3D
|
---|
| 4596 | + complex, dimension(:,:,:), &
|
---|
| 4597 | + pointer :: work => null()
|
---|
| 4598 | + end type PoisFFT_Solver3D
|
---|
| 4599 | + contains
|
---|
| 4600 | + subroutine PoisFFT_Solver3D_FullPeriodic(D, p)
|
---|
| 4601 | + type(PoisFFT_Solver3D), intent(in) :: D
|
---|
| 4602 | + real, intent(in), pointer :: p(:)
|
---|
| 4603 | + D%work(i,j,k) = 0.0
|
---|
| 4604 | + p = 0.0
|
---|
| 4605 | + end subroutine
|
---|
| 4606 | + end
|
---|
| 4607 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gfortran.dg/proc_ptr_34.f90 gcc-4.6.3/gcc/testsuite/gfortran.dg/proc_ptr_34.f90
|
---|
| 4608 | --- gcc-4.6.3.orig/gcc/testsuite/gfortran.dg/proc_ptr_34.f90 1970-01-01 00:00:00.000000000 +0000
|
---|
| 4609 | +++ gcc-4.6.3/gcc/testsuite/gfortran.dg/proc_ptr_34.f90 2012-03-10 09:20:22.792570000 +0000
|
---|
| 4610 | @@ -0,0 +1,79 @@
|
---|
| 4611 | +! { dg-do compile }
|
---|
| 4612 | +!
|
---|
| 4613 | +! PR fortran/52469
|
---|
| 4614 | +!
|
---|
| 4615 | +! This was failing as the DECL of the proc pointer "func"
|
---|
| 4616 | +! was used for the interface of the proc-pointer component "my_f_ptr"
|
---|
| 4617 | +! rather than the decl of the proc-pointer target
|
---|
| 4618 | +!
|
---|
| 4619 | +! Contributed by palott@gmail.com
|
---|
| 4620 | +!
|
---|
| 4621 | +
|
---|
| 4622 | +module ExampleFuncs
|
---|
| 4623 | + implicit none
|
---|
| 4624 | +
|
---|
| 4625 | + ! NOTE: "func" is a procedure pointer!
|
---|
| 4626 | + pointer :: func
|
---|
| 4627 | + interface
|
---|
| 4628 | + function func (z)
|
---|
| 4629 | + real :: func
|
---|
| 4630 | + real, intent (in) :: z
|
---|
| 4631 | + end function func
|
---|
| 4632 | + end interface
|
---|
| 4633 | +
|
---|
| 4634 | + type Contains_f_ptr
|
---|
| 4635 | + procedure (func), pointer, nopass :: my_f_ptr
|
---|
| 4636 | + end type Contains_f_ptr
|
---|
| 4637 | +contains
|
---|
| 4638 | +
|
---|
| 4639 | +function f1 (x)
|
---|
| 4640 | + real :: f1
|
---|
| 4641 | + real, intent (in) :: x
|
---|
| 4642 | +
|
---|
| 4643 | + f1 = 2.0 * x
|
---|
| 4644 | +
|
---|
| 4645 | + return
|
---|
| 4646 | +end function f1
|
---|
| 4647 | +
|
---|
| 4648 | +function f2 (x)
|
---|
| 4649 | + real :: f2
|
---|
| 4650 | + real, intent (in) :: x
|
---|
| 4651 | +
|
---|
| 4652 | + f2 = 3.0 * x**2
|
---|
| 4653 | +
|
---|
| 4654 | + return
|
---|
| 4655 | +end function f2
|
---|
| 4656 | +
|
---|
| 4657 | +function fancy (func, x)
|
---|
| 4658 | + real :: fancy
|
---|
| 4659 | + real, intent (in) :: x
|
---|
| 4660 | +
|
---|
| 4661 | + interface AFunc
|
---|
| 4662 | + function func (y)
|
---|
| 4663 | + real :: func
|
---|
| 4664 | + real, intent (in) ::y
|
---|
| 4665 | + end function func
|
---|
| 4666 | + end interface AFunc
|
---|
| 4667 | +
|
---|
| 4668 | + fancy = func (x) + 3.3 * x
|
---|
| 4669 | +end function fancy
|
---|
| 4670 | +
|
---|
| 4671 | +end module ExampleFuncs
|
---|
| 4672 | +
|
---|
| 4673 | +
|
---|
| 4674 | +program test_proc_ptr
|
---|
| 4675 | + use ExampleFuncs
|
---|
| 4676 | + implicit none
|
---|
| 4677 | +
|
---|
| 4678 | + type (Contains_f_ptr), dimension (2) :: NewType
|
---|
| 4679 | +
|
---|
| 4680 | + !NewType(1) % my_f_ptr => f1
|
---|
| 4681 | + NewType(2) % my_f_ptr => f2
|
---|
| 4682 | +
|
---|
| 4683 | + !write (*, *) NewType(1) % my_f_ptr (3.0), NewType(2) % my_f_ptr (3.0)
|
---|
| 4684 | + write (6, *) NewType(2) % my_f_ptr (3.0) ! < Shall print '27.0'
|
---|
| 4685 | +
|
---|
| 4686 | + stop
|
---|
| 4687 | +end program test_proc_ptr
|
---|
| 4688 | +
|
---|
| 4689 | +! { dg-final { cleanup-modules "examplefuncs" } }
|
---|
| 4690 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gfortran.dg/realloc_on_assign_15.f90 gcc-4.6.3/gcc/testsuite/gfortran.dg/realloc_on_assign_15.f90
|
---|
| 4691 | --- gcc-4.6.3.orig/gcc/testsuite/gfortran.dg/realloc_on_assign_15.f90 1970-01-01 00:00:00.000000000 +0000
|
---|
| 4692 | +++ gcc-4.6.3/gcc/testsuite/gfortran.dg/realloc_on_assign_15.f90 2012-05-23 19:13:27.735982000 +0000
|
---|
| 4693 | @@ -0,0 +1,40 @@
|
---|
| 4694 | +! { dg-do run }
|
---|
| 4695 | +!
|
---|
| 4696 | +! PR fortran/53389
|
---|
| 4697 | +!
|
---|
| 4698 | +! The program was leaking memory before due to
|
---|
| 4699 | +! realloc on assignment and nested functions.
|
---|
| 4700 | +!
|
---|
| 4701 | +module foo
|
---|
| 4702 | + implicit none
|
---|
| 4703 | + contains
|
---|
| 4704 | +
|
---|
| 4705 | + function filler(array, val)
|
---|
| 4706 | + real, dimension(:), intent(in):: array
|
---|
| 4707 | + real, dimension(size(array)):: filler
|
---|
| 4708 | + real, intent(in):: val
|
---|
| 4709 | +
|
---|
| 4710 | + filler=val
|
---|
| 4711 | +
|
---|
| 4712 | + end function filler
|
---|
| 4713 | +end module
|
---|
| 4714 | +
|
---|
| 4715 | +program test
|
---|
| 4716 | + use foo
|
---|
| 4717 | + implicit none
|
---|
| 4718 | +
|
---|
| 4719 | + real, dimension(:), allocatable:: x, y
|
---|
| 4720 | + integer, parameter:: N=1000 !*1000
|
---|
| 4721 | + integer:: i
|
---|
| 4722 | +
|
---|
| 4723 | +! allocate( x(N) )
|
---|
| 4724 | + allocate( y(N) )
|
---|
| 4725 | + y=0.0
|
---|
| 4726 | +
|
---|
| 4727 | + do i=1, N
|
---|
| 4728 | +! print *,i
|
---|
| 4729 | + x=filler(filler(y, real(2*i)), real(i))
|
---|
| 4730 | + y=y+x
|
---|
| 4731 | + end do
|
---|
| 4732 | +
|
---|
| 4733 | +end program test
|
---|
| 4734 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/gfortran.dg/save_4.f90 gcc-4.6.3/gcc/testsuite/gfortran.dg/save_4.f90
|
---|
| 4735 | --- gcc-4.6.3.orig/gcc/testsuite/gfortran.dg/save_4.f90 1970-01-01 00:00:00.000000000 +0000
|
---|
| 4736 | +++ gcc-4.6.3/gcc/testsuite/gfortran.dg/save_4.f90 2012-06-14 13:11:27.149798000 +0000
|
---|
| 4737 | @@ -0,0 +1,13 @@
|
---|
| 4738 | +! { dg-do compile }
|
---|
| 4739 | +! { dg-options "-std=f2003" }
|
---|
| 4740 | +!
|
---|
| 4741 | +! PR fortran/53597
|
---|
| 4742 | +!
|
---|
| 4743 | +MODULE somemodule
|
---|
| 4744 | + IMPLICIT NONE
|
---|
| 4745 | + TYPE sometype
|
---|
| 4746 | + INTEGER :: i
|
---|
| 4747 | + DOUBLE PRECISION, POINTER, DIMENSION(:,:) :: coef => NULL()
|
---|
| 4748 | + END TYPE sometype
|
---|
| 4749 | + TYPE(sometype) :: somevariable ! { dg-error "Fortran 2008: Implied SAVE for module variable 'somevariable' at .1., needed due to the default initialization" }
|
---|
| 4750 | +END MODULE somemodule
|
---|
| 4751 | diff -Naur gcc-4.6.3.orig/gcc/testsuite/lib/target-supports.exp gcc-4.6.3/gcc/testsuite/lib/target-supports.exp
|
---|
| 4752 | --- gcc-4.6.3.orig/gcc/testsuite/lib/target-supports.exp 2012-02-22 17:38:22.000000000 +0000
|
---|
| 4753 | +++ gcc-4.6.3/gcc/testsuite/lib/target-supports.exp 2012-08-10 13:26:44.694722000 +0000
|
---|
| 4754 | @@ -2976,6 +2976,26 @@
|
---|
| 4755 | return $et_natural_alignment_64_saved
|
---|
| 4756 | }
|
---|
| 4757 |
|
---|
| 4758 | +# Return 1 if all vector types are naturally aligned (aligned to their
|
---|
| 4759 | +# type-size), 0 otherwise.
|
---|
| 4760 | +#
|
---|
| 4761 | +# This won't change for different subtargets so cache the result.
|
---|
| 4762 | +
|
---|
| 4763 | +proc check_effective_target_vect_natural_alignment { } {
|
---|
| 4764 | + global et_vect_natural_alignment
|
---|
| 4765 | +
|
---|
| 4766 | + if [info exists et_vect_natural_alignment_saved] {
|
---|
| 4767 | + verbose "check_effective_target_vect_natural_alignment: using cached result" 2
|
---|
| 4768 | + } else {
|
---|
| 4769 | + set et_vect_natural_alignment_saved 1
|
---|
| 4770 | + if { [check_effective_target_arm_eabi] } {
|
---|
| 4771 | + set et_vect_natural_alignment_saved 0
|
---|
| 4772 | + }
|
---|
| 4773 | + }
|
---|
| 4774 | + verbose "check_effective_target_vect_natural_alignment: returning $et_vect_natural_alignment_saved" 2
|
---|
| 4775 | + return $et_vect_natural_alignment_saved
|
---|
| 4776 | +}
|
---|
| 4777 | +
|
---|
| 4778 | # Return 1 if vector alignment (for types of size 32 bit or less) is reachable, 0 otherwise.
|
---|
| 4779 | #
|
---|
| 4780 | # This won't change for different subtargets so cache the result.
|
---|
| 4781 | diff -Naur gcc-4.6.3.orig/gcc/toplev.c gcc-4.6.3/gcc/toplev.c
|
---|
| 4782 | --- gcc-4.6.3.orig/gcc/toplev.c 2011-02-03 08:29:03.000000000 +0000
|
---|
| 4783 | +++ gcc-4.6.3/gcc/toplev.c 2012-03-29 02:15:29.973365000 +0000
|
---|
| 4784 | @@ -1326,6 +1326,13 @@
|
---|
| 4785 | "and -ftree-loop-linear)");
|
---|
| 4786 | #endif
|
---|
| 4787 |
|
---|
| 4788 | + if (flag_strict_volatile_bitfields > 0 && !abi_version_at_least (2))
|
---|
| 4789 | + {
|
---|
| 4790 | + warning (0, "-fstrict-volatile-bitfields disabled; "
|
---|
| 4791 | + "it is incompatible with ABI versions < 2");
|
---|
| 4792 | + flag_strict_volatile_bitfields = 0;
|
---|
| 4793 | + }
|
---|
| 4794 | +
|
---|
| 4795 | /* Unrolling all loops implies that standard loop unrolling must also
|
---|
| 4796 | be done. */
|
---|
| 4797 | if (flag_unroll_all_loops)
|
---|
| 4798 | diff -Naur gcc-4.6.3.orig/gcc/tree-inline.c gcc-4.6.3/gcc/tree-inline.c
|
---|
| 4799 | --- gcc-4.6.3.orig/gcc/tree-inline.c 2011-07-26 07:52:24.000000000 +0000
|
---|
| 4800 | +++ gcc-4.6.3/gcc/tree-inline.c 2012-03-25 09:39:32.217767000 +0000
|
---|
| 4801 | @@ -4947,7 +4947,7 @@
|
---|
| 4802 | if ((e = cgraph_edge (id->dst_node, gsi_stmt (bsi))) != NULL)
|
---|
| 4803 | {
|
---|
| 4804 | if (!e->inline_failed)
|
---|
| 4805 | - cgraph_remove_node_and_inline_clones (e->callee);
|
---|
| 4806 | + cgraph_remove_node_and_inline_clones (e->callee, id->dst_node);
|
---|
| 4807 | else
|
---|
| 4808 | cgraph_remove_edge (e);
|
---|
| 4809 | }
|
---|
| 4810 | @@ -4957,8 +4957,8 @@
|
---|
| 4811 | {
|
---|
| 4812 | if ((e = cgraph_edge (node, gsi_stmt (bsi))) != NULL)
|
---|
| 4813 | {
|
---|
| 4814 | - if (!e->inline_failed)
|
---|
| 4815 | - cgraph_remove_node_and_inline_clones (e->callee);
|
---|
| 4816 | + if (!e->inline_failed && e->callee != id->src_node)
|
---|
| 4817 | + cgraph_remove_node_and_inline_clones (e->callee, id->dst_node);
|
---|
| 4818 | else
|
---|
| 4819 | cgraph_remove_edge (e);
|
---|
| 4820 | }
|
---|
| 4821 | diff -Naur gcc-4.6.3.orig/gcc/tree-pretty-print.c gcc-4.6.3/gcc/tree-pretty-print.c
|
---|
| 4822 | --- gcc-4.6.3.orig/gcc/tree-pretty-print.c 2010-11-05 09:00:50.000000000 +0000
|
---|
| 4823 | +++ gcc-4.6.3/gcc/tree-pretty-print.c 2012-05-31 15:03:37.575990000 +0000
|
---|
| 4824 | @@ -805,6 +805,8 @@
|
---|
| 4825 | infer them and MEM_ATTR caching will share MEM_REFs
|
---|
| 4826 | with differently-typed op0s. */
|
---|
| 4827 | && TREE_CODE (TREE_OPERAND (node, 0)) != INTEGER_CST
|
---|
| 4828 | + /* Released SSA_NAMES have no TREE_TYPE. */
|
---|
| 4829 | + && TREE_TYPE (TREE_OPERAND (node, 0)) != NULL_TREE
|
---|
| 4830 | /* Same pointer types, but ignoring POINTER_TYPE vs.
|
---|
| 4831 | REFERENCE_TYPE. */
|
---|
| 4832 | && (TREE_TYPE (TREE_TYPE (TREE_OPERAND (node, 0)))
|
---|
| 4833 | @@ -1171,6 +1173,8 @@
|
---|
| 4834 | can't infer them and MEM_ATTR caching will share
|
---|
| 4835 | MEM_REFs with differently-typed op0s. */
|
---|
| 4836 | && TREE_CODE (TREE_OPERAND (op0, 0)) != INTEGER_CST
|
---|
| 4837 | + /* Released SSA_NAMES have no TREE_TYPE. */
|
---|
| 4838 | + && TREE_TYPE (TREE_OPERAND (op0, 0)) != NULL_TREE
|
---|
| 4839 | /* Same pointer types, but ignoring POINTER_TYPE vs.
|
---|
| 4840 | REFERENCE_TYPE. */
|
---|
| 4841 | && (TREE_TYPE (TREE_TYPE (TREE_OPERAND (op0, 0)))
|
---|
| 4842 | diff -Naur gcc-4.6.3.orig/gcc/tree-sra.c gcc-4.6.3/gcc/tree-sra.c
|
---|
| 4843 | --- gcc-4.6.3.orig/gcc/tree-sra.c 2012-01-05 22:24:45.000000000 +0000
|
---|
| 4844 | +++ gcc-4.6.3/gcc/tree-sra.c 2012-03-28 18:03:28.014541000 +0000
|
---|
| 4845 | @@ -2937,7 +2937,13 @@
|
---|
| 4846 | }
|
---|
| 4847 | else
|
---|
| 4848 | {
|
---|
| 4849 | - if (access_has_children_p (lacc) && access_has_children_p (racc))
|
---|
| 4850 | + if (access_has_children_p (lacc)
|
---|
| 4851 | + && access_has_children_p (racc)
|
---|
| 4852 | + /* When an access represents an unscalarizable region, it usually
|
---|
| 4853 | + represents accesses with variable offset and thus must not be used
|
---|
| 4854 | + to generate new memory accesses. */
|
---|
| 4855 | + && !lacc->grp_unscalarizable_region
|
---|
| 4856 | + && !racc->grp_unscalarizable_region)
|
---|
| 4857 | {
|
---|
| 4858 | gimple_stmt_iterator orig_gsi = *gsi;
|
---|
| 4859 | enum unscalarized_data_handling refreshed;
|
---|
| 4860 | diff -Naur gcc-4.6.3.orig/gcc/tree-ssa-ccp.c gcc-4.6.3/gcc/tree-ssa-ccp.c
|
---|
| 4861 | --- gcc-4.6.3.orig/gcc/tree-ssa-ccp.c 2011-09-26 14:08:53.000000000 +0000
|
---|
| 4862 | +++ gcc-4.6.3/gcc/tree-ssa-ccp.c 2012-07-04 13:56:00.524689000 +0000
|
---|
| 4863 | @@ -1364,6 +1364,10 @@
|
---|
| 4864 | if (!DECL_INITIAL (base)
|
---|
| 4865 | && (TREE_STATIC (base) || DECL_EXTERNAL (base)))
|
---|
| 4866 | return error_mark_node;
|
---|
| 4867 | + /* Do not return an error_mark_node DECL_INITIAL. LTO uses this
|
---|
| 4868 | + as special marker (_not_ zero ...) for its own purposes. */
|
---|
| 4869 | + if (DECL_INITIAL (base) == error_mark_node)
|
---|
| 4870 | + return NULL_TREE;
|
---|
| 4871 | return DECL_INITIAL (base);
|
---|
| 4872 |
|
---|
| 4873 | case ARRAY_REF:
|
---|
| 4874 | diff -Naur gcc-4.6.3.orig/gcc/tree-vect-data-refs.c gcc-4.6.3/gcc/tree-vect-data-refs.c
|
---|
| 4875 | --- gcc-4.6.3.orig/gcc/tree-vect-data-refs.c 2011-12-12 19:43:06.000000000 +0000
|
---|
| 4876 | +++ gcc-4.6.3/gcc/tree-vect-data-refs.c 2012-08-10 13:26:44.694722000 +0000
|
---|
| 4877 | @@ -1019,7 +1019,7 @@
|
---|
| 4878 | int misal = DR_MISALIGNMENT (dr);
|
---|
| 4879 | tree vectype = STMT_VINFO_VECTYPE (stmt_info);
|
---|
| 4880 | misal += negative ? -npeel * dr_size : npeel * dr_size;
|
---|
| 4881 | - misal &= GET_MODE_SIZE (TYPE_MODE (vectype)) - 1;
|
---|
| 4882 | + misal &= (TYPE_ALIGN (vectype) / BITS_PER_UNIT) - 1;
|
---|
| 4883 | SET_DR_MISALIGNMENT (dr, misal);
|
---|
| 4884 | return;
|
---|
| 4885 | }
|
---|
| 4886 | diff -Naur gcc-4.6.3.orig/gcc/tree-vect-loop-manip.c gcc-4.6.3/gcc/tree-vect-loop-manip.c
|
---|
| 4887 | --- gcc-4.6.3.orig/gcc/tree-vect-loop-manip.c 2011-06-04 09:20:00.000000000 +0000
|
---|
| 4888 | +++ gcc-4.6.3/gcc/tree-vect-loop-manip.c 2012-08-10 13:26:44.694722000 +0000
|
---|
| 4889 | @@ -2008,7 +2008,7 @@
|
---|
| 4890 | If the misalignment of DR is known at compile time:
|
---|
| 4891 | addr_mis = int mis = DR_MISALIGNMENT (dr);
|
---|
| 4892 | Else, compute address misalignment in bytes:
|
---|
| 4893 | - addr_mis = addr & (vectype_size - 1)
|
---|
| 4894 | + addr_mis = addr & (vectype_align - 1)
|
---|
| 4895 |
|
---|
| 4896 | prolog_niters = min (LOOP_NITERS, ((VF - addr_mis/elem_size)&(VF-1))/step)
|
---|
| 4897 |
|
---|
| 4898 | @@ -2065,9 +2065,10 @@
|
---|
| 4899 | tree ptr_type = TREE_TYPE (start_addr);
|
---|
| 4900 | tree size = TYPE_SIZE (ptr_type);
|
---|
| 4901 | tree type = lang_hooks.types.type_for_size (tree_low_cst (size, 1), 1);
|
---|
| 4902 | - tree vectype_size_minus_1 = build_int_cst (type, vectype_align - 1);
|
---|
| 4903 | - tree elem_size_log =
|
---|
| 4904 | - build_int_cst (type, exact_log2 (vectype_align/nelements));
|
---|
| 4905 | + tree vectype_align_minus_1 = build_int_cst (type, vectype_align - 1);
|
---|
| 4906 | + HOST_WIDE_INT elem_size =
|
---|
| 4907 | + int_cst_value (TYPE_SIZE_UNIT (TREE_TYPE (vectype)));
|
---|
| 4908 | + tree elem_size_log = build_int_cst (type, exact_log2 (elem_size));
|
---|
| 4909 | tree nelements_minus_1 = build_int_cst (type, nelements - 1);
|
---|
| 4910 | tree nelements_tree = build_int_cst (type, nelements);
|
---|
| 4911 | tree byte_misalign;
|
---|
| 4912 | @@ -2076,10 +2077,10 @@
|
---|
| 4913 | new_bb = gsi_insert_seq_on_edge_immediate (pe, new_stmts);
|
---|
| 4914 | gcc_assert (!new_bb);
|
---|
| 4915 |
|
---|
| 4916 | - /* Create: byte_misalign = addr & (vectype_size - 1) */
|
---|
| 4917 | + /* Create: byte_misalign = addr & (vectype_align - 1) */
|
---|
| 4918 | byte_misalign =
|
---|
| 4919 | fold_build2 (BIT_AND_EXPR, type, fold_convert (type, start_addr),
|
---|
| 4920 | - vectype_size_minus_1);
|
---|
| 4921 | + vectype_align_minus_1);
|
---|
| 4922 |
|
---|
| 4923 | /* Create: elem_misalign = byte_misalign / element_size */
|
---|
| 4924 | elem_misalign =
|
---|
| 4925 | diff -Naur gcc-4.6.3.orig/gcc/tree-vect-loop.c gcc-4.6.3/gcc/tree-vect-loop.c
|
---|
| 4926 | --- gcc-4.6.3.orig/gcc/tree-vect-loop.c 2011-06-04 09:20:00.000000000 +0000
|
---|
| 4927 | +++ gcc-4.6.3/gcc/tree-vect-loop.c 2012-03-02 14:51:58.551861000 +0000
|
---|
| 4928 | @@ -2104,7 +2104,8 @@
|
---|
| 4929 | if (stmt_info
|
---|
| 4930 | && !STMT_VINFO_RELEVANT_P (stmt_info)
|
---|
| 4931 | && (!STMT_VINFO_LIVE_P (stmt_info)
|
---|
| 4932 | - || STMT_VINFO_DEF_TYPE (stmt_info) != vect_reduction_def))
|
---|
| 4933 | + || !VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_info)))
|
---|
| 4934 | + && !STMT_VINFO_IN_PATTERN_P (stmt_info))
|
---|
| 4935 | continue;
|
---|
| 4936 |
|
---|
| 4937 | if (STMT_VINFO_DATA_REF (vinfo_for_stmt (stmt)))
|
---|
| 4938 | @@ -2251,11 +2252,19 @@
|
---|
| 4939 | {
|
---|
| 4940 | gimple stmt = gsi_stmt (si);
|
---|
| 4941 | stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
|
---|
| 4942 | +
|
---|
| 4943 | + if (STMT_VINFO_IN_PATTERN_P (stmt_info))
|
---|
| 4944 | + {
|
---|
| 4945 | + stmt = STMT_VINFO_RELATED_STMT (stmt_info);
|
---|
| 4946 | + stmt_info = vinfo_for_stmt (stmt);
|
---|
| 4947 | + }
|
---|
| 4948 | +
|
---|
| 4949 | /* Skip stmts that are not vectorized inside the loop. */
|
---|
| 4950 | if (!STMT_VINFO_RELEVANT_P (stmt_info)
|
---|
| 4951 | && (!STMT_VINFO_LIVE_P (stmt_info)
|
---|
| 4952 | - || STMT_VINFO_DEF_TYPE (stmt_info) != vect_reduction_def))
|
---|
| 4953 | + || !VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_info))))
|
---|
| 4954 | continue;
|
---|
| 4955 | +
|
---|
| 4956 | vec_inside_cost += STMT_VINFO_INSIDE_OF_LOOP_COST (stmt_info) * factor;
|
---|
| 4957 | /* FIXME: for stmts in the inner-loop in outer-loop vectorization,
|
---|
| 4958 | some of the "outside" costs are generated inside the outer-loop. */
|
---|
| 4959 | diff -Naur gcc-4.6.3.orig/gcc/tree-vect-stmts.c gcc-4.6.3/gcc/tree-vect-stmts.c
|
---|
| 4960 | --- gcc-4.6.3.orig/gcc/tree-vect-stmts.c 2012-02-10 12:34:17.000000000 +0000
|
---|
| 4961 | +++ gcc-4.6.3/gcc/tree-vect-stmts.c 2012-03-02 14:51:58.551861000 +0000
|
---|
| 4962 | @@ -623,6 +623,46 @@
|
---|
| 4963 | }
|
---|
| 4964 |
|
---|
| 4965 |
|
---|
| 4966 | +/* Model cost for type demotion and promotion operations. PWR is normally
|
---|
| 4967 | + zero for single-step promotions and demotions. It will be one if
|
---|
| 4968 | + two-step promotion/demotion is required, and so on. Each additional
|
---|
| 4969 | + step doubles the number of instructions required. */
|
---|
| 4970 | +
|
---|
| 4971 | +static void
|
---|
| 4972 | +vect_model_promotion_demotion_cost (stmt_vec_info stmt_info,
|
---|
| 4973 | + enum vect_def_type *dt, int pwr)
|
---|
| 4974 | +{
|
---|
| 4975 | + int i, tmp;
|
---|
| 4976 | + int inside_cost = 0, outside_cost = 0, single_stmt_cost;
|
---|
| 4977 | +
|
---|
| 4978 | + /* The SLP costs were already calculated during SLP tree build. */
|
---|
| 4979 | + if (PURE_SLP_STMT (stmt_info))
|
---|
| 4980 | + return;
|
---|
| 4981 | +
|
---|
| 4982 | + single_stmt_cost = vect_get_stmt_cost (vec_promote_demote);
|
---|
| 4983 | + for (i = 0; i < pwr + 1; i++)
|
---|
| 4984 | + {
|
---|
| 4985 | + tmp = (STMT_VINFO_TYPE (stmt_info) == type_promotion_vec_info_type) ?
|
---|
| 4986 | + (i + 1) : i;
|
---|
| 4987 | + inside_cost += vect_pow2 (tmp) * single_stmt_cost;
|
---|
| 4988 | + }
|
---|
| 4989 | +
|
---|
| 4990 | + /* FORNOW: Assuming maximum 2 args per stmts. */
|
---|
| 4991 | + for (i = 0; i < 2; i++)
|
---|
| 4992 | + {
|
---|
| 4993 | + if (dt[i] == vect_constant_def || dt[i] == vect_external_def)
|
---|
| 4994 | + outside_cost += vect_get_stmt_cost (vector_stmt);
|
---|
| 4995 | + }
|
---|
| 4996 | +
|
---|
| 4997 | + if (vect_print_dump_info (REPORT_COST))
|
---|
| 4998 | + fprintf (vect_dump, "vect_model_promotion_demotion_cost: inside_cost = %d, "
|
---|
| 4999 | + "outside_cost = %d .", inside_cost, outside_cost);
|
---|
| 5000 | +
|
---|
| 5001 | + /* Set the costs in STMT_INFO. */
|
---|
| 5002 | + stmt_vinfo_set_inside_of_loop_cost (stmt_info, NULL, inside_cost);
|
---|
| 5003 | + stmt_vinfo_set_outside_of_loop_cost (stmt_info, NULL, outside_cost);
|
---|
| 5004 | +}
|
---|
| 5005 | +
|
---|
| 5006 | /* Function vect_cost_strided_group_size
|
---|
| 5007 |
|
---|
| 5008 | For strided load or store, return the group_size only if it is the first
|
---|
| 5009 | @@ -691,7 +731,7 @@
|
---|
| 5010 | {
|
---|
| 5011 | /* Uses a high and low interleave operation for each needed permute. */
|
---|
| 5012 | inside_cost = ncopies * exact_log2(group_size) * group_size
|
---|
| 5013 | - * vect_get_stmt_cost (vector_stmt);
|
---|
| 5014 | + * vect_get_stmt_cost (vec_perm);
|
---|
| 5015 |
|
---|
| 5016 | if (vect_print_dump_info (REPORT_COST))
|
---|
| 5017 | fprintf (vect_dump, "vect_model_store_cost: strided group_size = %d .",
|
---|
| 5018 | @@ -795,7 +835,7 @@
|
---|
| 5019 | {
|
---|
| 5020 | /* Uses an even and odd extract operations for each needed permute. */
|
---|
| 5021 | inside_cost = ncopies * exact_log2(group_size) * group_size
|
---|
| 5022 | - * vect_get_stmt_cost (vector_stmt);
|
---|
| 5023 | + * vect_get_stmt_cost (vec_perm);
|
---|
| 5024 |
|
---|
| 5025 | if (vect_print_dump_info (REPORT_COST))
|
---|
| 5026 | fprintf (vect_dump, "vect_model_load_cost: strided group_size = %d .",
|
---|
| 5027 | @@ -855,7 +895,7 @@
|
---|
| 5028 | case dr_explicit_realign:
|
---|
| 5029 | {
|
---|
| 5030 | *inside_cost += ncopies * (2 * vect_get_stmt_cost (vector_load)
|
---|
| 5031 | - + vect_get_stmt_cost (vector_stmt));
|
---|
| 5032 | + + vect_get_stmt_cost (vec_perm));
|
---|
| 5033 |
|
---|
| 5034 | /* FIXME: If the misalignment remains fixed across the iterations of
|
---|
| 5035 | the containing loop, the following cost should be added to the
|
---|
| 5036 | @@ -863,6 +903,9 @@
|
---|
| 5037 | if (targetm.vectorize.builtin_mask_for_load)
|
---|
| 5038 | *inside_cost += vect_get_stmt_cost (vector_stmt);
|
---|
| 5039 |
|
---|
| 5040 | + if (vect_print_dump_info (REPORT_COST))
|
---|
| 5041 | + fprintf (vect_dump, "vect_model_load_cost: explicit realign");
|
---|
| 5042 | +
|
---|
| 5043 | break;
|
---|
| 5044 | }
|
---|
| 5045 | case dr_explicit_realign_optimized:
|
---|
| 5046 | @@ -886,7 +929,12 @@
|
---|
| 5047 | }
|
---|
| 5048 |
|
---|
| 5049 | *inside_cost += ncopies * (vect_get_stmt_cost (vector_load)
|
---|
| 5050 | - + vect_get_stmt_cost (vector_stmt));
|
---|
| 5051 | + + vect_get_stmt_cost (vec_perm));
|
---|
| 5052 | +
|
---|
| 5053 | + if (vect_print_dump_info (REPORT_COST))
|
---|
| 5054 | + fprintf (vect_dump,
|
---|
| 5055 | + "vect_model_load_cost: explicit realign optimized");
|
---|
| 5056 | +
|
---|
| 5057 | break;
|
---|
| 5058 | }
|
---|
| 5059 |
|
---|
| 5060 | @@ -2919,7 +2967,7 @@
|
---|
| 5061 | STMT_VINFO_TYPE (stmt_info) = type_demotion_vec_info_type;
|
---|
| 5062 | if (vect_print_dump_info (REPORT_DETAILS))
|
---|
| 5063 | fprintf (vect_dump, "=== vectorizable_demotion ===");
|
---|
| 5064 | - vect_model_simple_cost (stmt_info, ncopies, dt, NULL);
|
---|
| 5065 | + vect_model_promotion_demotion_cost (stmt_info, dt, multi_step_cvt);
|
---|
| 5066 | return true;
|
---|
| 5067 | }
|
---|
| 5068 |
|
---|
| 5069 | @@ -3217,7 +3265,7 @@
|
---|
| 5070 | STMT_VINFO_TYPE (stmt_info) = type_promotion_vec_info_type;
|
---|
| 5071 | if (vect_print_dump_info (REPORT_DETAILS))
|
---|
| 5072 | fprintf (vect_dump, "=== vectorizable_promotion ===");
|
---|
| 5073 | - vect_model_simple_cost (stmt_info, 2*ncopies, dt, NULL);
|
---|
| 5074 | + vect_model_promotion_demotion_cost (stmt_info, dt, multi_step_cvt);
|
---|
| 5075 | return true;
|
---|
| 5076 | }
|
---|
| 5077 |
|
---|
| 5078 | diff -Naur gcc-4.6.3.orig/gcc/varasm.c gcc-4.6.3/gcc/varasm.c
|
---|
| 5079 | --- gcc-4.6.3.orig/gcc/varasm.c 2011-12-09 19:11:01.000000000 +0000
|
---|
| 5080 | +++ gcc-4.6.3/gcc/varasm.c 2012-04-24 06:14:37.854759000 +0000
|
---|
| 5081 | @@ -1,7 +1,7 @@
|
---|
| 5082 | /* Output variables, constants and external declarations, for GNU compiler.
|
---|
| 5083 | Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997,
|
---|
| 5084 | 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
---|
| 5085 | - 2010, 2011 Free Software Foundation, Inc.
|
---|
| 5086 | + 2010, 2011, 2012 Free Software Foundation, Inc.
|
---|
| 5087 |
|
---|
| 5088 | This file is part of GCC.
|
---|
| 5089 |
|
---|
| 5090 | @@ -30,6 +30,7 @@
|
---|
| 5091 | #include "config.h"
|
---|
| 5092 | #include "system.h"
|
---|
| 5093 | #include "coretypes.h"
|
---|
| 5094 | +#include "pointer-set.h"
|
---|
| 5095 | #include "tm.h"
|
---|
| 5096 | #include "rtl.h"
|
---|
| 5097 | #include "tree.h"
|
---|
| 5098 | @@ -2097,6 +2098,19 @@
|
---|
| 5099 | it all the way to final. See PR 17982 for further discussion. */
|
---|
| 5100 | static GTY(()) tree pending_assemble_externals;
|
---|
| 5101 |
|
---|
| 5102 | +/* FIXME: Trunk is at GCC 4.8 now and the above problem still hasn't been
|
---|
| 5103 | + addressed properly. This caused PR 52640 due to O(external_decls**2)
|
---|
| 5104 | + lookups in the pending_assemble_externals TREE_LIST in assemble_external.
|
---|
| 5105 | + Paper over with this pointer set, which we use to see if we have already
|
---|
| 5106 | + added a decl to pending_assemble_externals without first traversing
|
---|
| 5107 | + the entire pending_assemble_externals list. See assemble_external(). */
|
---|
| 5108 | +static struct pointer_set_t *pending_assemble_externals_set;
|
---|
| 5109 | +
|
---|
| 5110 | +/* Some targets delay some output to final using TARGET_ASM_FILE_END.
|
---|
| 5111 | + As a result, assemble_external can be called after the list of externals
|
---|
| 5112 | + is processed and the pointer set destroyed. */
|
---|
| 5113 | +static bool pending_assemble_externals_processed;
|
---|
| 5114 | +
|
---|
| 5115 | #ifdef ASM_OUTPUT_EXTERNAL
|
---|
| 5116 | /* True if DECL is a function decl for which no out-of-line copy exists.
|
---|
| 5117 | It is assumed that DECL's assembler name has been set. */
|
---|
| 5118 | @@ -2146,6 +2160,8 @@
|
---|
| 5119 | assemble_external_real (TREE_VALUE (list));
|
---|
| 5120 |
|
---|
| 5121 | pending_assemble_externals = 0;
|
---|
| 5122 | + pending_assemble_externals_processed = true;
|
---|
| 5123 | + pointer_set_destroy (pending_assemble_externals_set);
|
---|
| 5124 | #endif
|
---|
| 5125 | }
|
---|
| 5126 |
|
---|
| 5127 | @@ -2186,7 +2202,13 @@
|
---|
| 5128 | weak_decls = tree_cons (NULL, decl, weak_decls);
|
---|
| 5129 |
|
---|
| 5130 | #ifdef ASM_OUTPUT_EXTERNAL
|
---|
| 5131 | - if (value_member (decl, pending_assemble_externals) == NULL_TREE)
|
---|
| 5132 | + if (pending_assemble_externals_processed)
|
---|
| 5133 | + {
|
---|
| 5134 | + assemble_external_real (decl);
|
---|
| 5135 | + return;
|
---|
| 5136 | + }
|
---|
| 5137 | +
|
---|
| 5138 | + if (! pointer_set_insert (pending_assemble_externals_set, decl))
|
---|
| 5139 | pending_assemble_externals = tree_cons (NULL, decl,
|
---|
| 5140 | pending_assemble_externals);
|
---|
| 5141 | #endif
|
---|
| 5142 | @@ -3922,6 +3944,13 @@
|
---|
| 5143 | tem = TREE_OPERAND (tem, 0))
|
---|
| 5144 | ;
|
---|
| 5145 |
|
---|
| 5146 | + if (TREE_CODE (tem) == MEM_REF
|
---|
| 5147 | + && TREE_CODE (TREE_OPERAND (tem, 0)) == ADDR_EXPR)
|
---|
| 5148 | + {
|
---|
| 5149 | + reloc = compute_reloc_for_constant (TREE_OPERAND (tem, 0));
|
---|
| 5150 | + break;
|
---|
| 5151 | + }
|
---|
| 5152 | +
|
---|
| 5153 | if (TREE_PUBLIC (tem))
|
---|
| 5154 | reloc |= 2;
|
---|
| 5155 | else
|
---|
| 5156 | @@ -3990,6 +4019,9 @@
|
---|
| 5157 |
|
---|
| 5158 | if (CONSTANT_CLASS_P (tem) || TREE_CODE (tem) == CONSTRUCTOR)
|
---|
| 5159 | output_constant_def (tem, 0);
|
---|
| 5160 | +
|
---|
| 5161 | + if (TREE_CODE (tem) == MEM_REF)
|
---|
| 5162 | + output_addressed_constants (TREE_OPERAND (tem, 0));
|
---|
| 5163 | break;
|
---|
| 5164 |
|
---|
| 5165 | case PLUS_EXPR:
|
---|
| 5166 | @@ -6019,6 +6051,10 @@
|
---|
| 5167 |
|
---|
| 5168 | if (readonly_data_section == NULL)
|
---|
| 5169 | readonly_data_section = text_section;
|
---|
| 5170 | +
|
---|
| 5171 | +#ifdef ASM_OUTPUT_EXTERNAL
|
---|
| 5172 | + pending_assemble_externals_set = pointer_set_create ();
|
---|
| 5173 | +#endif
|
---|
| 5174 | }
|
---|
| 5175 |
|
---|
| 5176 | enum tls_model
|
---|
| 5177 | diff -Naur gcc-4.6.3.orig/gcc/version.c gcc-4.6.3/gcc/version.c
|
---|
| 5178 | --- gcc-4.6.3.orig/gcc/version.c 2009-04-21 19:03:23.000000000 +0000
|
---|
| 5179 | +++ gcc-4.6.3/gcc/version.c 2012-08-25 17:27:00.696732424 +0000
|
---|
| 5180 | @@ -33,4 +33,4 @@
|
---|
| 5181 | Makefile. */
|
---|
| 5182 |
|
---|
| 5183 | const char version_string[] = BASEVER DATESTAMP DEVPHASE REVISION;
|
---|
| 5184 | -const char pkgversion_string[] = PKGVERSION;
|
---|
| 5185 | +const char pkgversion_string[] = "(GCC for Cross-LFS 4.6.3.20120825) ";
|
---|
| 5186 | diff -Naur gcc-4.6.3.orig/libffi/src/powerpc/aix.S gcc-4.6.3/libffi/src/powerpc/aix.S
|
---|
| 5187 | --- gcc-4.6.3.orig/libffi/src/powerpc/aix.S 2009-12-05 21:48:58.000000000 +0000
|
---|
| 5188 | +++ gcc-4.6.3/libffi/src/powerpc/aix.S 2012-03-22 14:35:34.814561000 +0000
|
---|
| 5189 | @@ -1,5 +1,5 @@
|
---|
| 5190 | /* -----------------------------------------------------------------------
|
---|
| 5191 | - aix.S - Copyright (c) 2002,2009 Free Software Foundation, Inc.
|
---|
| 5192 | + aix.S - Copyright (c) 2002, 2009 Free Software Foundation, Inc.
|
---|
| 5193 | based on darwin.S by John Hornkvist
|
---|
| 5194 |
|
---|
| 5195 | PowerPC Assembly glue.
|
---|
| 5196 | @@ -79,6 +79,8 @@
|
---|
| 5197 | .set f20,20
|
---|
| 5198 | .set f21,21
|
---|
| 5199 |
|
---|
| 5200 | + .extern .ffi_prep_args
|
---|
| 5201 | +
|
---|
| 5202 | #define LIBFFI_ASM
|
---|
| 5203 | #include <fficonfig.h>
|
---|
| 5204 | #include <ffi.h>
|
---|
| 5205 | @@ -125,6 +127,7 @@
|
---|
| 5206 | /* Call ffi_prep_args. */
|
---|
| 5207 | mr r4, r1
|
---|
| 5208 | bl .ffi_prep_args
|
---|
| 5209 | + nop
|
---|
| 5210 |
|
---|
| 5211 | /* Now do the call. */
|
---|
| 5212 | ld r0, 0(r29)
|
---|
| 5213 | @@ -226,6 +229,7 @@
|
---|
| 5214 | /* Call ffi_prep_args. */
|
---|
| 5215 | mr r4, r1
|
---|
| 5216 | bl .ffi_prep_args
|
---|
| 5217 | + nop
|
---|
| 5218 |
|
---|
| 5219 | /* Now do the call. */
|
---|
| 5220 | lwz r0, 0(r29)
|
---|
| 5221 | diff -Naur gcc-4.6.3.orig/libffi/src/powerpc/aix_closure.S gcc-4.6.3/libffi/src/powerpc/aix_closure.S
|
---|
| 5222 | --- gcc-4.6.3.orig/libffi/src/powerpc/aix_closure.S 2009-12-08 00:41:10.000000000 +0000
|
---|
| 5223 | +++ gcc-4.6.3/libffi/src/powerpc/aix_closure.S 2012-03-22 14:35:34.814561000 +0000
|
---|
| 5224 | @@ -79,6 +79,8 @@
|
---|
| 5225 | .set f20,20
|
---|
| 5226 | .set f21,21
|
---|
| 5227 |
|
---|
| 5228 | + .extern .ffi_closure_helper_DARWIN
|
---|
| 5229 | +
|
---|
| 5230 | #define LIBFFI_ASM
|
---|
| 5231 | #define JUMPTARGET(name) name
|
---|
| 5232 | #define L(x) x
|
---|
| 5233 | @@ -165,6 +167,7 @@
|
---|
| 5234 |
|
---|
| 5235 | /* look up the proper starting point in table */
|
---|
| 5236 | /* by using return type as offset */
|
---|
| 5237 | + lhz r3, 10(r3) /* load type from return type */
|
---|
| 5238 | ld r4, LC..60(2) /* get address of jump table */
|
---|
| 5239 | sldi r3, r3, 4 /* now multiply return type by 16 */
|
---|
| 5240 | ld r0, 240+16(r1) /* load return address */
|
---|
| 5241 | @@ -337,8 +340,9 @@
|
---|
| 5242 |
|
---|
| 5243 | /* look up the proper starting point in table */
|
---|
| 5244 | /* by using return type as offset */
|
---|
| 5245 | + lhz r3, 6(r3) /* load type from return type */
|
---|
| 5246 | lwz r4, LC..60(2) /* get address of jump table */
|
---|
| 5247 | - slwi r3, r3, 4 /* now multiply return type by 4 */
|
---|
| 5248 | + slwi r3, r3, 4 /* now multiply return type by 16 */
|
---|
| 5249 | lwz r0, 176+8(r1) /* load return address */
|
---|
| 5250 | add r3, r3, r4 /* add contents of table to table address */
|
---|
| 5251 | mtctr r3
|
---|
| 5252 | diff -Naur gcc-4.6.3.orig/libgfortran/intrinsics/eoshift2.c gcc-4.6.3/libgfortran/intrinsics/eoshift2.c
|
---|
| 5253 | --- gcc-4.6.3.orig/libgfortran/intrinsics/eoshift2.c 2009-07-19 15:07:21.000000000 +0000
|
---|
| 5254 | +++ gcc-4.6.3/libgfortran/intrinsics/eoshift2.c 2012-05-11 22:33:21.046165000 +0000
|
---|
| 5255 | @@ -77,6 +77,12 @@
|
---|
| 5256 |
|
---|
| 5257 | ret->offset = 0;
|
---|
| 5258 | ret->dtype = array->dtype;
|
---|
| 5259 | +
|
---|
| 5260 | + if (arraysize > 0)
|
---|
| 5261 | + ret->data = internal_malloc_size (size * arraysize);
|
---|
| 5262 | + else
|
---|
| 5263 | + ret->data = internal_malloc_size (1);
|
---|
| 5264 | +
|
---|
| 5265 | for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
|
---|
| 5266 | {
|
---|
| 5267 | index_type ub, str;
|
---|
| 5268 | @@ -90,12 +96,6 @@
|
---|
| 5269 | * GFC_DESCRIPTOR_STRIDE(ret,i-1);
|
---|
| 5270 |
|
---|
| 5271 | GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
|
---|
| 5272 | -
|
---|
| 5273 | - if (arraysize > 0)
|
---|
| 5274 | - ret->data = internal_malloc_size (size * arraysize);
|
---|
| 5275 | - else
|
---|
| 5276 | - ret->data = internal_malloc_size (1);
|
---|
| 5277 | -
|
---|
| 5278 | }
|
---|
| 5279 | }
|
---|
| 5280 | else if (unlikely (compile_options.bounds_check))
|
---|
| 5281 | diff -Naur gcc-4.6.3.orig/libjava/configure gcc-4.6.3/libjava/configure
|
---|
| 5282 | --- gcc-4.6.3.orig/libjava/configure 2012-03-01 12:03:46.000000000 +0000
|
---|
| 5283 | +++ gcc-4.6.3/libjava/configure 2012-03-02 18:21:41.598223000 +0000
|
---|
| 5284 | @@ -19775,14 +19775,9 @@
|
---|
| 5285 | SYSTEMSPEC="-lunicows $SYSTEMSPEC"
|
---|
| 5286 | fi
|
---|
| 5287 | ;;
|
---|
| 5288 | - *-*-darwin9*)
|
---|
| 5289 | + *-*-darwin[912]*)
|
---|
| 5290 | SYSTEMSPEC="%{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}"
|
---|
| 5291 | ;;
|
---|
| 5292 | - *-*-darwin[12]*)
|
---|
| 5293 | - # Something is incompatible with pie, would be nice to fix it and
|
---|
| 5294 | - # remove -no_pie. PR49461
|
---|
| 5295 | - SYSTEMSPEC="-no_pie %{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}"
|
---|
| 5296 | - ;;
|
---|
| 5297 | *)
|
---|
| 5298 | SYSTEMSPEC=
|
---|
| 5299 | ;;
|
---|
| 5300 | diff -Naur gcc-4.6.3.orig/libjava/configure.ac gcc-4.6.3/libjava/configure.ac
|
---|
| 5301 | --- gcc-4.6.3.orig/libjava/configure.ac 2012-02-03 10:35:06.000000000 +0000
|
---|
| 5302 | +++ gcc-4.6.3/libjava/configure.ac 2012-03-02 18:21:41.598223000 +0000
|
---|
| 5303 | @@ -886,14 +886,9 @@
|
---|
| 5304 | SYSTEMSPEC="-lunicows $SYSTEMSPEC"
|
---|
| 5305 | fi
|
---|
| 5306 | ;;
|
---|
| 5307 | - *-*-darwin9*)
|
---|
| 5308 | + *-*-darwin[[912]]*)
|
---|
| 5309 | SYSTEMSPEC="%{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}"
|
---|
| 5310 | ;;
|
---|
| 5311 | - *-*-darwin[[12]]*)
|
---|
| 5312 | - # Something is incompatible with pie, would be nice to fix it and
|
---|
| 5313 | - # remove -no_pie. PR49461
|
---|
| 5314 | - SYSTEMSPEC="-no_pie %{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}"
|
---|
| 5315 | - ;;
|
---|
| 5316 | *)
|
---|
| 5317 | SYSTEMSPEC=
|
---|
| 5318 | ;;
|
---|
| 5319 | diff -Naur gcc-4.6.3.orig/libquadmath/libquadmath.info gcc-4.6.3/libquadmath/libquadmath.info
|
---|
| 5320 | --- gcc-4.6.3.orig/libquadmath/libquadmath.info 2012-03-01 12:41:20.000000000 +0000
|
---|
| 5321 | +++ gcc-4.6.3/libquadmath/libquadmath.info 1970-01-01 00:00:00.000000000 +0000
|
---|
| 5322 | @@ -1,924 +0,0 @@
|
---|
| 5323 | -This is libquadmath.info, produced by makeinfo version 4.13 from
|
---|
| 5324 | -/d//gcc-4.6.3/gcc-4.6.3/libquadmath/libquadmath.texi.
|
---|
| 5325 | -
|
---|
| 5326 | -Copyright (C) 2010 Free Software Foundation, Inc.
|
---|
| 5327 | -
|
---|
| 5328 | - Permission is granted to copy, distribute and/or modify this
|
---|
| 5329 | - document under the terms of the GNU Free Documentation License,
|
---|
| 5330 | - Version 1.2 or any later version published by the Free Software
|
---|
| 5331 | - Foundation; with no Invariant Sections, with the Front-Cover Texts
|
---|
| 5332 | - being "A GNU Manual," and with the Back-Cover Texts as in (a)
|
---|
| 5333 | - below. A copy of the license is included in the section entitled
|
---|
| 5334 | - "GNU Free Documentation License."
|
---|
| 5335 | -
|
---|
| 5336 | - (a) The FSF's Back-Cover Text is: "You have the freedom to copy
|
---|
| 5337 | - and modify this GNU manual.
|
---|
| 5338 | -
|
---|
| 5339 | -INFO-DIR-SECTION GNU Libraries
|
---|
| 5340 | -START-INFO-DIR-ENTRY
|
---|
| 5341 | -* libquadmath: (libquadmath). GCC Quad-Precision Math Library
|
---|
| 5342 | -END-INFO-DIR-ENTRY
|
---|
| 5343 | -
|
---|
| 5344 | - This manual documents the GCC Quad-Precision Math Library API.
|
---|
| 5345 | -
|
---|
| 5346 | - Published by the Free Software Foundation 51 Franklin Street, Fifth
|
---|
| 5347 | -Floor Boston, MA 02110-1301 USA
|
---|
| 5348 | -
|
---|
| 5349 | - Copyright (C) 2010 Free Software Foundation, Inc.
|
---|
| 5350 | -
|
---|
| 5351 | - Permission is granted to copy, distribute and/or modify this
|
---|
| 5352 | - document under the terms of the GNU Free Documentation License,
|
---|
| 5353 | - Version 1.2 or any later version published by the Free Software
|
---|
| 5354 | - Foundation; with no Invariant Sections, with the Front-Cover Texts
|
---|
| 5355 | - being "A GNU Manual," and with the Back-Cover Texts as in (a)
|
---|
| 5356 | - below. A copy of the license is included in the section entitled
|
---|
| 5357 | - "GNU Free Documentation License."
|
---|
| 5358 | -
|
---|
| 5359 | - (a) The FSF's Back-Cover Text is: "You have the freedom to copy
|
---|
| 5360 | - and modify this GNU manual.
|
---|
| 5361 | -
|
---|
| 5362 | -
|
---|
| 5363 | -File: libquadmath.info, Node: Top, Next: Typedef and constants, Up: (dir)
|
---|
| 5364 | -
|
---|
| 5365 | -Introduction
|
---|
| 5366 | -************
|
---|
| 5367 | -
|
---|
| 5368 | -This manual documents the usage of libquadmath, the GCC Quad-Precision
|
---|
| 5369 | -Math Library Application Programming Interface (API).
|
---|
| 5370 | -
|
---|
| 5371 | -* Menu:
|
---|
| 5372 | -
|
---|
| 5373 | -* Typedef and constants:: Defined data types and constants
|
---|
| 5374 | -* Math Library Routines:: The Libquadmath math runtime application
|
---|
| 5375 | - programming interface.
|
---|
| 5376 | -* I/O Library Routines:: The Libquadmath I/O runtime application
|
---|
| 5377 | - programming interface.
|
---|
| 5378 | -* GNU Free Documentation License::
|
---|
| 5379 | - How you can copy and share this manual.
|
---|
| 5380 | -* Reporting Bugs:: How to report bugs in GCC Libquadmath.
|
---|
| 5381 | -
|
---|
| 5382 | -
|
---|
| 5383 | -File: libquadmath.info, Node: Typedef and constants, Next: Math Library Routines, Prev: Top, Up: Top
|
---|
| 5384 | -
|
---|
| 5385 | -1 Typedef and constants
|
---|
| 5386 | -***********************
|
---|
| 5387 | -
|
---|
| 5388 | -The following data type has been defined via `typedef'.
|
---|
| 5389 | -
|
---|
| 5390 | -`__complex128': `__float128'-based complex number
|
---|
| 5391 | -
|
---|
| 5392 | - The following macros are defined, which give the numeric limits of
|
---|
| 5393 | -the `__float128' data type.
|
---|
| 5394 | -
|
---|
| 5395 | -`FLT128_MAX': largest finite number
|
---|
| 5396 | -
|
---|
| 5397 | -`FLT128_MIN': smallest positive number with full precision
|
---|
| 5398 | -
|
---|
| 5399 | -`FLT128_EPSILON': difference between 1 and the next larger
|
---|
| 5400 | - representable number
|
---|
| 5401 | -
|
---|
| 5402 | -`FLT128_DENORM_MIN': smallest positive denormalized number
|
---|
| 5403 | -
|
---|
| 5404 | -`FLT128_MANT_DIG': number of digits in the mantissa (bit precision)
|
---|
| 5405 | -
|
---|
| 5406 | -`FLT128_MIN_EXP': maximal negative exponent
|
---|
| 5407 | -
|
---|
| 5408 | -`FLT128_MAX_EXP': maximal positive exponent
|
---|
| 5409 | -
|
---|
| 5410 | -`FLT128_DIG': number of decimal digits in the mantissa
|
---|
| 5411 | -
|
---|
| 5412 | -`FLT128_MIN_10_EXP': maximal negative decimal exponent
|
---|
| 5413 | -
|
---|
| 5414 | -`FLT128_MAX_10_EXP': maximal positive decimal exponent
|
---|
| 5415 | -
|
---|
| 5416 | - The following mathematical constants of type `__float128' are
|
---|
| 5417 | -defined.
|
---|
| 5418 | -
|
---|
| 5419 | -`M_Eq': the constant e (Euler's number)
|
---|
| 5420 | -
|
---|
| 5421 | -`M_LOG2Eq': binary logarithm of 2
|
---|
| 5422 | -
|
---|
| 5423 | -`M_LOG10Eq': common, decimal logarithm of 2
|
---|
| 5424 | -
|
---|
| 5425 | -`M_LN2q': natural logarithm of 2
|
---|
| 5426 | -
|
---|
| 5427 | -`M_LN10q': natural logarithm of 10
|
---|
| 5428 | -
|
---|
| 5429 | -`M_PIq': pi
|
---|
| 5430 | -
|
---|
| 5431 | -`M_PI_2q': two pi
|
---|
| 5432 | -
|
---|
| 5433 | -`M_PI_4q': four pi
|
---|
| 5434 | -
|
---|
| 5435 | -`M_1_PIq': one over pi
|
---|
| 5436 | -
|
---|
| 5437 | -`M_2_PIq': one over two pi
|
---|
| 5438 | -
|
---|
| 5439 | -`M_2_SQRTPIq': two over square root of pi
|
---|
| 5440 | -
|
---|
| 5441 | -`M_SQRT2q': square root of 2
|
---|
| 5442 | -
|
---|
| 5443 | -`M_SQRT1_2q': one over square root of 2
|
---|
| 5444 | -
|
---|
| 5445 | -
|
---|
| 5446 | -File: libquadmath.info, Node: Math Library Routines, Next: I/O Library Routines, Prev: Typedef and constants, Up: Top
|
---|
| 5447 | -
|
---|
| 5448 | -2 Math Library Routines
|
---|
| 5449 | -***********************
|
---|
| 5450 | -
|
---|
| 5451 | -The following mathematical functions are available:
|
---|
| 5452 | -
|
---|
| 5453 | -`acosq': arc cosine function
|
---|
| 5454 | -
|
---|
| 5455 | -`acoshq': inverse hyperbolic cosine function
|
---|
| 5456 | -
|
---|
| 5457 | -`asinq': arc sine function
|
---|
| 5458 | -
|
---|
| 5459 | -`asinhq': inverse hyperbolic sine function
|
---|
| 5460 | -
|
---|
| 5461 | -`atanq': arc tangent function
|
---|
| 5462 | -
|
---|
| 5463 | -`atanhq': inverse hyperbolic tangent function
|
---|
| 5464 | -
|
---|
| 5465 | -`atan2q': arc tangent function
|
---|
| 5466 | -
|
---|
| 5467 | -`cbrtq': cube root function
|
---|
| 5468 | -
|
---|
| 5469 | -`ceilq': ceiling value function
|
---|
| 5470 | -
|
---|
| 5471 | -`copysignq': copy sign of a number
|
---|
| 5472 | -
|
---|
| 5473 | -`coshq': hyperbolic cosine function
|
---|
| 5474 | -
|
---|
| 5475 | -`cosq': cosine function
|
---|
| 5476 | -
|
---|
| 5477 | -`erfq': error function
|
---|
| 5478 | -
|
---|
| 5479 | -`erfcq': complementary error function
|
---|
| 5480 | -
|
---|
| 5481 | -`expq': exponential function
|
---|
| 5482 | -
|
---|
| 5483 | -`expm1q': exponential minus 1 function
|
---|
| 5484 | -
|
---|
| 5485 | -`fabsq': absolute value function
|
---|
| 5486 | -
|
---|
| 5487 | -`fdimq': positive difference function
|
---|
| 5488 | -
|
---|
| 5489 | -`finiteq': check finiteness of value
|
---|
| 5490 | -
|
---|
| 5491 | -`floorq': floor value function
|
---|
| 5492 | -
|
---|
| 5493 | -`fmaq': fused multiply and add
|
---|
| 5494 | -
|
---|
| 5495 | -`fmaxq': determine maximum of two values
|
---|
| 5496 | -
|
---|
| 5497 | -`fminq': determine minimum of two values
|
---|
| 5498 | -
|
---|
| 5499 | -`fmodq': remainder value function
|
---|
| 5500 | -
|
---|
| 5501 | -`frexpq': extract mantissa and exponent
|
---|
| 5502 | -
|
---|
| 5503 | -`hypotq': Eucledian distance function
|
---|
| 5504 | -
|
---|
| 5505 | -`ilogbq': get exponent of the value
|
---|
| 5506 | -
|
---|
| 5507 | -`isinfq': check for infinity
|
---|
| 5508 | -
|
---|
| 5509 | -`isnanq': check for not a number
|
---|
| 5510 | -
|
---|
| 5511 | -`j0q': Bessel function of the first kind, first order
|
---|
| 5512 | -
|
---|
| 5513 | -`j1q': Bessel function of the first kind, second order
|
---|
| 5514 | -
|
---|
| 5515 | -`jnq': Bessel function of the first kind, N-th order
|
---|
| 5516 | -
|
---|
| 5517 | -`ldexpq': load exponent of the value
|
---|
| 5518 | -
|
---|
| 5519 | -`lgammaq': logarithmic gamma function
|
---|
| 5520 | -
|
---|
| 5521 | -`llrintq': round to nearest integer value
|
---|
| 5522 | -
|
---|
| 5523 | -`llroundq': round to nearest integer value away from zero
|
---|
| 5524 | -
|
---|
| 5525 | -`logq': natural logarithm function
|
---|
| 5526 | -
|
---|
| 5527 | -`log10q': base 10 logarithm function
|
---|
| 5528 | -
|
---|
| 5529 | -`log1pq': compute natural logarithm of the value plus one
|
---|
| 5530 | -
|
---|
| 5531 | -`log2q': base 2 logarithm function
|
---|
| 5532 | -
|
---|
| 5533 | -`lrintq': round to nearest integer value
|
---|
| 5534 | -
|
---|
| 5535 | -`lroundq': round to nearest integer value away from zero
|
---|
| 5536 | -
|
---|
| 5537 | -`modfq': decompose the floating-point number
|
---|
| 5538 | -
|
---|
| 5539 | -`nanq': return quiet NaN
|
---|
| 5540 | -
|
---|
| 5541 | -`nearbyintq': round to nearest integer
|
---|
| 5542 | -
|
---|
| 5543 | -`nextafterq': next representable floating-point number
|
---|
| 5544 | -
|
---|
| 5545 | -`powq': power function
|
---|
| 5546 | -
|
---|
| 5547 | -`remainderq': remainder function
|
---|
| 5548 | -
|
---|
| 5549 | -`remquoq': remainder and part of quotient
|
---|
| 5550 | -
|
---|
| 5551 | -`rintq': round-to-nearest integral value
|
---|
| 5552 | -
|
---|
| 5553 | -`roundq': round-to-nearest integral value, return `__float128'
|
---|
| 5554 | -
|
---|
| 5555 | -`scalblnq': compute exponent using `FLT_RADIX'
|
---|
| 5556 | -
|
---|
| 5557 | -`scalbnq': compute exponent using `FLT_RADIX'
|
---|
| 5558 | -
|
---|
| 5559 | -`signbitq': return sign bit
|
---|
| 5560 | -
|
---|
| 5561 | -`sincosq': calculate sine and cosine simulataneously
|
---|
| 5562 | -
|
---|
| 5563 | -`sinhq': hyperbolic sine function
|
---|
| 5564 | -
|
---|
| 5565 | -`sinq': sine function
|
---|
| 5566 | -
|
---|
| 5567 | -`sqrtq': square root function
|
---|
| 5568 | -
|
---|
| 5569 | -`tanq': tangent function
|
---|
| 5570 | -
|
---|
| 5571 | -`tanhq': hyperbolic tangent function
|
---|
| 5572 | -
|
---|
| 5573 | -`tgammaq': true gamma function
|
---|
| 5574 | -
|
---|
| 5575 | -`truncq': round to integer, towards zero
|
---|
| 5576 | -
|
---|
| 5577 | -`y0q': Bessel function of the second kind, first order
|
---|
| 5578 | -
|
---|
| 5579 | -`y1q': Bessel function of the second kind, second order
|
---|
| 5580 | -
|
---|
| 5581 | -`ynq': Bessel function of the second kind, N-th order
|
---|
| 5582 | -
|
---|
| 5583 | -`cabsq' complex absolute value function
|
---|
| 5584 | -
|
---|
| 5585 | -`cargq': calculate the argument
|
---|
| 5586 | -
|
---|
| 5587 | -`cimagq' imaginary part of complex number
|
---|
| 5588 | -
|
---|
| 5589 | -`crealq': real part of complex number
|
---|
| 5590 | -
|
---|
| 5591 | -`cacoshq': complex arc hyperbolic cosine function
|
---|
| 5592 | -
|
---|
| 5593 | -`cacosq': complex arc cosine function
|
---|
| 5594 | -
|
---|
| 5595 | -`casinhq': complex arc hyperbolic sine function
|
---|
| 5596 | -
|
---|
| 5597 | -`casinq': complex arc sine function
|
---|
| 5598 | -
|
---|
| 5599 | -`catanhq': complex arc hyperbolic tangent function
|
---|
| 5600 | -
|
---|
| 5601 | -`catanq': complex arc tangent function
|
---|
| 5602 | -
|
---|
| 5603 | -`ccosq' complex cosine function:
|
---|
| 5604 | -
|
---|
| 5605 | -`ccoshq': complex hyperbolic cosine function
|
---|
| 5606 | -
|
---|
| 5607 | -`cexpq': complex exponential function
|
---|
| 5608 | -
|
---|
| 5609 | -`cexpiq': computes the exponential function of "i" times a
|
---|
| 5610 | - real value
|
---|
| 5611 | -
|
---|
| 5612 | -`clogq': complex natural logarithm
|
---|
| 5613 | -
|
---|
| 5614 | -`clog10q': complex base 10 logarithm
|
---|
| 5615 | -
|
---|
| 5616 | -`conjq': complex conjugate function
|
---|
| 5617 | -
|
---|
| 5618 | -`cpowq': complex power function
|
---|
| 5619 | -
|
---|
| 5620 | -`cprojq': project into Riemann Sphere
|
---|
| 5621 | -
|
---|
| 5622 | -`csinq': complex sine function
|
---|
| 5623 | -
|
---|
| 5624 | -`csinhq': complex hyperbolic sine function
|
---|
| 5625 | -
|
---|
| 5626 | -`csqrtq': complex square root
|
---|
| 5627 | -
|
---|
| 5628 | -`ctanq': complex tangent function
|
---|
| 5629 | -
|
---|
| 5630 | -`ctanhq': complex hyperbolic tangent function
|
---|
| 5631 | -
|
---|
| 5632 | -
|
---|
| 5633 | -File: libquadmath.info, Node: I/O Library Routines, Next: GNU Free Documentation License, Prev: Math Library Routines, Up: Top
|
---|
| 5634 | -
|
---|
| 5635 | -3 I/O Library Routines
|
---|
| 5636 | -**********************
|
---|
| 5637 | -
|
---|
| 5638 | -* Menu:
|
---|
| 5639 | -
|
---|
| 5640 | -* `strtoflt128': strtoflt128, Convert from string
|
---|
| 5641 | -* `quadmath_snprintf': quadmath_snprintf, Convert to string
|
---|
| 5642 | -
|
---|
| 5643 | -
|
---|
| 5644 | -File: libquadmath.info, Node: strtoflt128, Next: quadmath_snprintf, Up: I/O Library Routines
|
---|
| 5645 | -
|
---|
| 5646 | -3.1 `strtoflt128' -- Convert from string
|
---|
| 5647 | -========================================
|
---|
| 5648 | -
|
---|
| 5649 | -The function `dmath_strtopQ' converts a string into a `__float128'
|
---|
| 5650 | -number.
|
---|
| 5651 | -
|
---|
| 5652 | -Syntax
|
---|
| 5653 | - `__float128 strtoflt128 (const char *s, char **sp)'
|
---|
| 5654 | -
|
---|
| 5655 | -_Arguments_:
|
---|
| 5656 | - S input string
|
---|
| 5657 | - SP the address of the next character in the string
|
---|
| 5658 | -
|
---|
| 5659 | - The argument SP contains, if not `NULL', the address of the next
|
---|
| 5660 | - character following the parts of the string, which have been read.
|
---|
| 5661 | -
|
---|
| 5662 | -Example
|
---|
| 5663 | - #include <quadmath.h>
|
---|
| 5664 | -
|
---|
| 5665 | - int main ()
|
---|
| 5666 | - {
|
---|
| 5667 | - __float128 r;
|
---|
| 5668 | -
|
---|
| 5669 | - r = strtoflt128 ("1.2345678", NULL);
|
---|
| 5670 | -
|
---|
| 5671 | - return 0;
|
---|
| 5672 | - }
|
---|
| 5673 | -
|
---|
| 5674 | -
|
---|
| 5675 | -File: libquadmath.info, Node: quadmath_snprintf, Prev: strtoflt128, Up: I/O Library Routines
|
---|
| 5676 | -
|
---|
| 5677 | -3.2 `quadmath_snprintf' -- Convert to string
|
---|
| 5678 | -============================================
|
---|
| 5679 | -
|
---|
| 5680 | -The function `quadmath_snprintf' converts a `__float128' floating-point
|
---|
| 5681 | -number into a string. It is a specialized alternative to `snprintf',
|
---|
| 5682 | -where the format string is restricted to a single conversion specifier
|
---|
| 5683 | -with `Q' modifier and conversion specifier `e', `E', `f', `F', `g',
|
---|
| 5684 | -`G', `a' or `A', with no extra characters before or after the
|
---|
| 5685 | -conversion specifier. The `%m$' or `*m$' style must not be used in the
|
---|
| 5686 | -format.
|
---|
| 5687 | -
|
---|
| 5688 | -Syntax
|
---|
| 5689 | - `int quadmath_snprintf (char *s, size_t size, const char *format,
|
---|
| 5690 | - ...)'
|
---|
| 5691 | -
|
---|
| 5692 | -_Arguments_:
|
---|
| 5693 | - S output string
|
---|
| 5694 | - SIZE byte size of the string, including tailing NUL
|
---|
| 5695 | - FORMAT conversion specifier string
|
---|
| 5696 | -
|
---|
| 5697 | -Example
|
---|
| 5698 | - #include <quadmath.h>
|
---|
| 5699 | - #include <stdlib.h>
|
---|
| 5700 | - #include <stdio.h>
|
---|
| 5701 | -
|
---|
| 5702 | - int main ()
|
---|
| 5703 | - {
|
---|
| 5704 | - __float128 r;
|
---|
| 5705 | - int prec = 20;
|
---|
| 5706 | - int width = 46;
|
---|
| 5707 | - char buf[128];
|
---|
| 5708 | -
|
---|
| 5709 | - r = 2.0q;
|
---|
| 5710 | - r = sqrtq (r);
|
---|
| 5711 | - int n = quadmath_snprintf (buf, sizeof buf, "%+-#*.20Qe", width, r);
|
---|
| 5712 | - if ((size_t) n < sizeof buf)
|
---|
| 5713 | - printf ("%s\n", buf);
|
---|
| 5714 | - /* Prints: +1.41421356237309504880e+00 */
|
---|
| 5715 | - quadmath_snprintf (buf, sizeof buf, "%Qa", r);
|
---|
| 5716 | - if ((size_t) n < sizeof buf)
|
---|
| 5717 | - printf ("%s\n", buf);
|
---|
| 5718 | - /* Prints: 0x1.6a09e667f3bcc908b2fb1366ea96p+0 */
|
---|
| 5719 | - n = quadmath_snprintf (NULL, 0, "%+-#46.*Qe", prec, r);
|
---|
| 5720 | - if (n > -1)
|
---|
| 5721 | - {
|
---|
| 5722 | - char *str = malloc (n + 1);
|
---|
| 5723 | - if (str)
|
---|
| 5724 | - {
|
---|
| 5725 | - quadmath_snprintf (str, n + 1, "%+-#46.*Qe", prec, r);
|
---|
| 5726 | - printf ("%s\n", str);
|
---|
| 5727 | - /* Prints: +1.41421356237309504880e+00 */
|
---|
| 5728 | - }
|
---|
| 5729 | - free (str);
|
---|
| 5730 | - }
|
---|
| 5731 | - return 0;
|
---|
| 5732 | - }
|
---|
| 5733 | -
|
---|
| 5734 | -
|
---|
| 5735 | - On some targets when supported by the C library hooks are installed
|
---|
| 5736 | -for `printf' family of functions, so that `printf ("%Qe", 1.2Q);' etc.
|
---|
| 5737 | -works too.
|
---|
| 5738 | -
|
---|
| 5739 | -
|
---|
| 5740 | -File: libquadmath.info, Node: GNU Free Documentation License, Next: Reporting Bugs, Prev: I/O Library Routines, Up: Top
|
---|
| 5741 | -
|
---|
| 5742 | -GNU Free Documentation License
|
---|
| 5743 | -******************************
|
---|
| 5744 | -
|
---|
| 5745 | - Version 1.3, 3 November 2008
|
---|
| 5746 | -
|
---|
| 5747 | - Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
|
---|
| 5748 | - `http://fsf.org/'
|
---|
| 5749 | -
|
---|
| 5750 | - Everyone is permitted to copy and distribute verbatim copies
|
---|
| 5751 | - of this license document, but changing it is not allowed.
|
---|
| 5752 | -
|
---|
| 5753 | - 0. PREAMBLE
|
---|
| 5754 | -
|
---|
| 5755 | - The purpose of this License is to make a manual, textbook, or other
|
---|
| 5756 | - functional and useful document "free" in the sense of freedom: to
|
---|
| 5757 | - assure everyone the effective freedom to copy and redistribute it,
|
---|
| 5758 | - with or without modifying it, either commercially or
|
---|
| 5759 | - noncommercially. Secondarily, this License preserves for the
|
---|
| 5760 | - author and publisher a way to get credit for their work, while not
|
---|
| 5761 | - being considered responsible for modifications made by others.
|
---|
| 5762 | -
|
---|
| 5763 | - This License is a kind of "copyleft", which means that derivative
|
---|
| 5764 | - works of the document must themselves be free in the same sense.
|
---|
| 5765 | - It complements the GNU General Public License, which is a copyleft
|
---|
| 5766 | - license designed for free software.
|
---|
| 5767 | -
|
---|
| 5768 | - We have designed this License in order to use it for manuals for
|
---|
| 5769 | - free software, because free software needs free documentation: a
|
---|
| 5770 | - free program should come with manuals providing the same freedoms
|
---|
| 5771 | - that the software does. But this License is not limited to
|
---|
| 5772 | - software manuals; it can be used for any textual work, regardless
|
---|
| 5773 | - of subject matter or whether it is published as a printed book.
|
---|
| 5774 | - We recommend this License principally for works whose purpose is
|
---|
| 5775 | - instruction or reference.
|
---|
| 5776 | -
|
---|
| 5777 | - 1. APPLICABILITY AND DEFINITIONS
|
---|
| 5778 | -
|
---|
| 5779 | - This License applies to any manual or other work, in any medium,
|
---|
| 5780 | - that contains a notice placed by the copyright holder saying it
|
---|
| 5781 | - can be distributed under the terms of this License. Such a notice
|
---|
| 5782 | - grants a world-wide, royalty-free license, unlimited in duration,
|
---|
| 5783 | - to use that work under the conditions stated herein. The
|
---|
| 5784 | - "Document", below, refers to any such manual or work. Any member
|
---|
| 5785 | - of the public is a licensee, and is addressed as "you". You
|
---|
| 5786 | - accept the license if you copy, modify or distribute the work in a
|
---|
| 5787 | - way requiring permission under copyright law.
|
---|
| 5788 | -
|
---|
| 5789 | - A "Modified Version" of the Document means any work containing the
|
---|
| 5790 | - Document or a portion of it, either copied verbatim, or with
|
---|
| 5791 | - modifications and/or translated into another language.
|
---|
| 5792 | -
|
---|
| 5793 | - A "Secondary Section" is a named appendix or a front-matter section
|
---|
| 5794 | - of the Document that deals exclusively with the relationship of the
|
---|
| 5795 | - publishers or authors of the Document to the Document's overall
|
---|
| 5796 | - subject (or to related matters) and contains nothing that could
|
---|
| 5797 | - fall directly within that overall subject. (Thus, if the Document
|
---|
| 5798 | - is in part a textbook of mathematics, a Secondary Section may not
|
---|
| 5799 | - explain any mathematics.) The relationship could be a matter of
|
---|
| 5800 | - historical connection with the subject or with related matters, or
|
---|
| 5801 | - of legal, commercial, philosophical, ethical or political position
|
---|
| 5802 | - regarding them.
|
---|
| 5803 | -
|
---|
| 5804 | - The "Invariant Sections" are certain Secondary Sections whose
|
---|
| 5805 | - titles are designated, as being those of Invariant Sections, in
|
---|
| 5806 | - the notice that says that the Document is released under this
|
---|
| 5807 | - License. If a section does not fit the above definition of
|
---|
| 5808 | - Secondary then it is not allowed to be designated as Invariant.
|
---|
| 5809 | - The Document may contain zero Invariant Sections. If the Document
|
---|
| 5810 | - does not identify any Invariant Sections then there are none.
|
---|
| 5811 | -
|
---|
| 5812 | - The "Cover Texts" are certain short passages of text that are
|
---|
| 5813 | - listed, as Front-Cover Texts or Back-Cover Texts, in the notice
|
---|
| 5814 | - that says that the Document is released under this License. A
|
---|
| 5815 | - Front-Cover Text may be at most 5 words, and a Back-Cover Text may
|
---|
| 5816 | - be at most 25 words.
|
---|
| 5817 | -
|
---|
| 5818 | - A "Transparent" copy of the Document means a machine-readable copy,
|
---|
| 5819 | - represented in a format whose specification is available to the
|
---|
| 5820 | - general public, that is suitable for revising the document
|
---|
| 5821 | - straightforwardly with generic text editors or (for images
|
---|
| 5822 | - composed of pixels) generic paint programs or (for drawings) some
|
---|
| 5823 | - widely available drawing editor, and that is suitable for input to
|
---|
| 5824 | - text formatters or for automatic translation to a variety of
|
---|
| 5825 | - formats suitable for input to text formatters. A copy made in an
|
---|
| 5826 | - otherwise Transparent file format whose markup, or absence of
|
---|
| 5827 | - markup, has been arranged to thwart or discourage subsequent
|
---|
| 5828 | - modification by readers is not Transparent. An image format is
|
---|
| 5829 | - not Transparent if used for any substantial amount of text. A
|
---|
| 5830 | - copy that is not "Transparent" is called "Opaque".
|
---|
| 5831 | -
|
---|
| 5832 | - Examples of suitable formats for Transparent copies include plain
|
---|
| 5833 | - ASCII without markup, Texinfo input format, LaTeX input format,
|
---|
| 5834 | - SGML or XML using a publicly available DTD, and
|
---|
| 5835 | - standard-conforming simple HTML, PostScript or PDF designed for
|
---|
| 5836 | - human modification. Examples of transparent image formats include
|
---|
| 5837 | - PNG, XCF and JPG. Opaque formats include proprietary formats that
|
---|
| 5838 | - can be read and edited only by proprietary word processors, SGML or
|
---|
| 5839 | - XML for which the DTD and/or processing tools are not generally
|
---|
| 5840 | - available, and the machine-generated HTML, PostScript or PDF
|
---|
| 5841 | - produced by some word processors for output purposes only.
|
---|
| 5842 | -
|
---|
| 5843 | - The "Title Page" means, for a printed book, the title page itself,
|
---|
| 5844 | - plus such following pages as are needed to hold, legibly, the
|
---|
| 5845 | - material this License requires to appear in the title page. For
|
---|
| 5846 | - works in formats which do not have any title page as such, "Title
|
---|
| 5847 | - Page" means the text near the most prominent appearance of the
|
---|
| 5848 | - work's title, preceding the beginning of the body of the text.
|
---|
| 5849 | -
|
---|
| 5850 | - The "publisher" means any person or entity that distributes copies
|
---|
| 5851 | - of the Document to the public.
|
---|
| 5852 | -
|
---|
| 5853 | - A section "Entitled XYZ" means a named subunit of the Document
|
---|
| 5854 | - whose title either is precisely XYZ or contains XYZ in parentheses
|
---|
| 5855 | - following text that translates XYZ in another language. (Here XYZ
|
---|
| 5856 | - stands for a specific section name mentioned below, such as
|
---|
| 5857 | - "Acknowledgements", "Dedications", "Endorsements", or "History".)
|
---|
| 5858 | - To "Preserve the Title" of such a section when you modify the
|
---|
| 5859 | - Document means that it remains a section "Entitled XYZ" according
|
---|
| 5860 | - to this definition.
|
---|
| 5861 | -
|
---|
| 5862 | - The Document may include Warranty Disclaimers next to the notice
|
---|
| 5863 | - which states that this License applies to the Document. These
|
---|
| 5864 | - Warranty Disclaimers are considered to be included by reference in
|
---|
| 5865 | - this License, but only as regards disclaiming warranties: any other
|
---|
| 5866 | - implication that these Warranty Disclaimers may have is void and
|
---|
| 5867 | - has no effect on the meaning of this License.
|
---|
| 5868 | -
|
---|
| 5869 | - 2. VERBATIM COPYING
|
---|
| 5870 | -
|
---|
| 5871 | - You may copy and distribute the Document in any medium, either
|
---|
| 5872 | - commercially or noncommercially, provided that this License, the
|
---|
| 5873 | - copyright notices, and the license notice saying this License
|
---|
| 5874 | - applies to the Document are reproduced in all copies, and that you
|
---|
| 5875 | - add no other conditions whatsoever to those of this License. You
|
---|
| 5876 | - may not use technical measures to obstruct or control the reading
|
---|
| 5877 | - or further copying of the copies you make or distribute. However,
|
---|
| 5878 | - you may accept compensation in exchange for copies. If you
|
---|
| 5879 | - distribute a large enough number of copies you must also follow
|
---|
| 5880 | - the conditions in section 3.
|
---|
| 5881 | -
|
---|
| 5882 | - You may also lend copies, under the same conditions stated above,
|
---|
| 5883 | - and you may publicly display copies.
|
---|
| 5884 | -
|
---|
| 5885 | - 3. COPYING IN QUANTITY
|
---|
| 5886 | -
|
---|
| 5887 | - If you publish printed copies (or copies in media that commonly
|
---|
| 5888 | - have printed covers) of the Document, numbering more than 100, and
|
---|
| 5889 | - the Document's license notice requires Cover Texts, you must
|
---|
| 5890 | - enclose the copies in covers that carry, clearly and legibly, all
|
---|
| 5891 | - these Cover Texts: Front-Cover Texts on the front cover, and
|
---|
| 5892 | - Back-Cover Texts on the back cover. Both covers must also clearly
|
---|
| 5893 | - and legibly identify you as the publisher of these copies. The
|
---|
| 5894 | - front cover must present the full title with all words of the
|
---|
| 5895 | - title equally prominent and visible. You may add other material
|
---|
| 5896 | - on the covers in addition. Copying with changes limited to the
|
---|
| 5897 | - covers, as long as they preserve the title of the Document and
|
---|
| 5898 | - satisfy these conditions, can be treated as verbatim copying in
|
---|
| 5899 | - other respects.
|
---|
| 5900 | -
|
---|
| 5901 | - If the required texts for either cover are too voluminous to fit
|
---|
| 5902 | - legibly, you should put the first ones listed (as many as fit
|
---|
| 5903 | - reasonably) on the actual cover, and continue the rest onto
|
---|
| 5904 | - adjacent pages.
|
---|
| 5905 | -
|
---|
| 5906 | - If you publish or distribute Opaque copies of the Document
|
---|
| 5907 | - numbering more than 100, you must either include a
|
---|
| 5908 | - machine-readable Transparent copy along with each Opaque copy, or
|
---|
| 5909 | - state in or with each Opaque copy a computer-network location from
|
---|
| 5910 | - which the general network-using public has access to download
|
---|
| 5911 | - using public-standard network protocols a complete Transparent
|
---|
| 5912 | - copy of the Document, free of added material. If you use the
|
---|
| 5913 | - latter option, you must take reasonably prudent steps, when you
|
---|
| 5914 | - begin distribution of Opaque copies in quantity, to ensure that
|
---|
| 5915 | - this Transparent copy will remain thus accessible at the stated
|
---|
| 5916 | - location until at least one year after the last time you
|
---|
| 5917 | - distribute an Opaque copy (directly or through your agents or
|
---|
| 5918 | - retailers) of that edition to the public.
|
---|
| 5919 | -
|
---|
| 5920 | - It is requested, but not required, that you contact the authors of
|
---|
| 5921 | - the Document well before redistributing any large number of
|
---|
| 5922 | - copies, to give them a chance to provide you with an updated
|
---|
| 5923 | - version of the Document.
|
---|
| 5924 | -
|
---|
| 5925 | - 4. MODIFICATIONS
|
---|
| 5926 | -
|
---|
| 5927 | - You may copy and distribute a Modified Version of the Document
|
---|
| 5928 | - under the conditions of sections 2 and 3 above, provided that you
|
---|
| 5929 | - release the Modified Version under precisely this License, with
|
---|
| 5930 | - the Modified Version filling the role of the Document, thus
|
---|
| 5931 | - licensing distribution and modification of the Modified Version to
|
---|
| 5932 | - whoever possesses a copy of it. In addition, you must do these
|
---|
| 5933 | - things in the Modified Version:
|
---|
| 5934 | -
|
---|
| 5935 | - A. Use in the Title Page (and on the covers, if any) a title
|
---|
| 5936 | - distinct from that of the Document, and from those of
|
---|
| 5937 | - previous versions (which should, if there were any, be listed
|
---|
| 5938 | - in the History section of the Document). You may use the
|
---|
| 5939 | - same title as a previous version if the original publisher of
|
---|
| 5940 | - that version gives permission.
|
---|
| 5941 | -
|
---|
| 5942 | - B. List on the Title Page, as authors, one or more persons or
|
---|
| 5943 | - entities responsible for authorship of the modifications in
|
---|
| 5944 | - the Modified Version, together with at least five of the
|
---|
| 5945 | - principal authors of the Document (all of its principal
|
---|
| 5946 | - authors, if it has fewer than five), unless they release you
|
---|
| 5947 | - from this requirement.
|
---|
| 5948 | -
|
---|
| 5949 | - C. State on the Title page the name of the publisher of the
|
---|
| 5950 | - Modified Version, as the publisher.
|
---|
| 5951 | -
|
---|
| 5952 | - D. Preserve all the copyright notices of the Document.
|
---|
| 5953 | -
|
---|
| 5954 | - E. Add an appropriate copyright notice for your modifications
|
---|
| 5955 | - adjacent to the other copyright notices.
|
---|
| 5956 | -
|
---|
| 5957 | - F. Include, immediately after the copyright notices, a license
|
---|
| 5958 | - notice giving the public permission to use the Modified
|
---|
| 5959 | - Version under the terms of this License, in the form shown in
|
---|
| 5960 | - the Addendum below.
|
---|
| 5961 | -
|
---|
| 5962 | - G. Preserve in that license notice the full lists of Invariant
|
---|
| 5963 | - Sections and required Cover Texts given in the Document's
|
---|
| 5964 | - license notice.
|
---|
| 5965 | -
|
---|
| 5966 | - H. Include an unaltered copy of this License.
|
---|
| 5967 | -
|
---|
| 5968 | - I. Preserve the section Entitled "History", Preserve its Title,
|
---|
| 5969 | - and add to it an item stating at least the title, year, new
|
---|
| 5970 | - authors, and publisher of the Modified Version as given on
|
---|
| 5971 | - the Title Page. If there is no section Entitled "History" in
|
---|
| 5972 | - the Document, create one stating the title, year, authors,
|
---|
| 5973 | - and publisher of the Document as given on its Title Page,
|
---|
| 5974 | - then add an item describing the Modified Version as stated in
|
---|
| 5975 | - the previous sentence.
|
---|
| 5976 | -
|
---|
| 5977 | - J. Preserve the network location, if any, given in the Document
|
---|
| 5978 | - for public access to a Transparent copy of the Document, and
|
---|
| 5979 | - likewise the network locations given in the Document for
|
---|
| 5980 | - previous versions it was based on. These may be placed in
|
---|
| 5981 | - the "History" section. You may omit a network location for a
|
---|
| 5982 | - work that was published at least four years before the
|
---|
| 5983 | - Document itself, or if the original publisher of the version
|
---|
| 5984 | - it refers to gives permission.
|
---|
| 5985 | -
|
---|
| 5986 | - K. For any section Entitled "Acknowledgements" or "Dedications",
|
---|
| 5987 | - Preserve the Title of the section, and preserve in the
|
---|
| 5988 | - section all the substance and tone of each of the contributor
|
---|
| 5989 | - acknowledgements and/or dedications given therein.
|
---|
| 5990 | -
|
---|
| 5991 | - L. Preserve all the Invariant Sections of the Document,
|
---|
| 5992 | - unaltered in their text and in their titles. Section numbers
|
---|
| 5993 | - or the equivalent are not considered part of the section
|
---|
| 5994 | - titles.
|
---|
| 5995 | -
|
---|
| 5996 | - M. Delete any section Entitled "Endorsements". Such a section
|
---|
| 5997 | - may not be included in the Modified Version.
|
---|
| 5998 | -
|
---|
| 5999 | - N. Do not retitle any existing section to be Entitled
|
---|
| 6000 | - "Endorsements" or to conflict in title with any Invariant
|
---|
| 6001 | - Section.
|
---|
| 6002 | -
|
---|
| 6003 | - O. Preserve any Warranty Disclaimers.
|
---|
| 6004 | -
|
---|
| 6005 | - If the Modified Version includes new front-matter sections or
|
---|
| 6006 | - appendices that qualify as Secondary Sections and contain no
|
---|
| 6007 | - material copied from the Document, you may at your option
|
---|
| 6008 | - designate some or all of these sections as invariant. To do this,
|
---|
| 6009 | - add their titles to the list of Invariant Sections in the Modified
|
---|
| 6010 | - Version's license notice. These titles must be distinct from any
|
---|
| 6011 | - other section titles.
|
---|
| 6012 | -
|
---|
| 6013 | - You may add a section Entitled "Endorsements", provided it contains
|
---|
| 6014 | - nothing but endorsements of your Modified Version by various
|
---|
| 6015 | - parties--for example, statements of peer review or that the text
|
---|
| 6016 | - has been approved by an organization as the authoritative
|
---|
| 6017 | - definition of a standard.
|
---|
| 6018 | -
|
---|
| 6019 | - You may add a passage of up to five words as a Front-Cover Text,
|
---|
| 6020 | - and a passage of up to 25 words as a Back-Cover Text, to the end
|
---|
| 6021 | - of the list of Cover Texts in the Modified Version. Only one
|
---|
| 6022 | - passage of Front-Cover Text and one of Back-Cover Text may be
|
---|
| 6023 | - added by (or through arrangements made by) any one entity. If the
|
---|
| 6024 | - Document already includes a cover text for the same cover,
|
---|
| 6025 | - previously added by you or by arrangement made by the same entity
|
---|
| 6026 | - you are acting on behalf of, you may not add another; but you may
|
---|
| 6027 | - replace the old one, on explicit permission from the previous
|
---|
| 6028 | - publisher that added the old one.
|
---|
| 6029 | -
|
---|
| 6030 | - The author(s) and publisher(s) of the Document do not by this
|
---|
| 6031 | - License give permission to use their names for publicity for or to
|
---|
| 6032 | - assert or imply endorsement of any Modified Version.
|
---|
| 6033 | -
|
---|
| 6034 | - 5. COMBINING DOCUMENTS
|
---|
| 6035 | -
|
---|
| 6036 | - You may combine the Document with other documents released under
|
---|
| 6037 | - this License, under the terms defined in section 4 above for
|
---|
| 6038 | - modified versions, provided that you include in the combination
|
---|
| 6039 | - all of the Invariant Sections of all of the original documents,
|
---|
| 6040 | - unmodified, and list them all as Invariant Sections of your
|
---|
| 6041 | - combined work in its license notice, and that you preserve all
|
---|
| 6042 | - their Warranty Disclaimers.
|
---|
| 6043 | -
|
---|
| 6044 | - The combined work need only contain one copy of this License, and
|
---|
| 6045 | - multiple identical Invariant Sections may be replaced with a single
|
---|
| 6046 | - copy. If there are multiple Invariant Sections with the same name
|
---|
| 6047 | - but different contents, make the title of each such section unique
|
---|
| 6048 | - by adding at the end of it, in parentheses, the name of the
|
---|
| 6049 | - original author or publisher of that section if known, or else a
|
---|
| 6050 | - unique number. Make the same adjustment to the section titles in
|
---|
| 6051 | - the list of Invariant Sections in the license notice of the
|
---|
| 6052 | - combined work.
|
---|
| 6053 | -
|
---|
| 6054 | - In the combination, you must combine any sections Entitled
|
---|
| 6055 | - "History" in the various original documents, forming one section
|
---|
| 6056 | - Entitled "History"; likewise combine any sections Entitled
|
---|
| 6057 | - "Acknowledgements", and any sections Entitled "Dedications". You
|
---|
| 6058 | - must delete all sections Entitled "Endorsements."
|
---|
| 6059 | -
|
---|
| 6060 | - 6. COLLECTIONS OF DOCUMENTS
|
---|
| 6061 | -
|
---|
| 6062 | - You may make a collection consisting of the Document and other
|
---|
| 6063 | - documents released under this License, and replace the individual
|
---|
| 6064 | - copies of this License in the various documents with a single copy
|
---|
| 6065 | - that is included in the collection, provided that you follow the
|
---|
| 6066 | - rules of this License for verbatim copying of each of the
|
---|
| 6067 | - documents in all other respects.
|
---|
| 6068 | -
|
---|
| 6069 | - You may extract a single document from such a collection, and
|
---|
| 6070 | - distribute it individually under this License, provided you insert
|
---|
| 6071 | - a copy of this License into the extracted document, and follow
|
---|
| 6072 | - this License in all other respects regarding verbatim copying of
|
---|
| 6073 | - that document.
|
---|
| 6074 | -
|
---|
| 6075 | - 7. AGGREGATION WITH INDEPENDENT WORKS
|
---|
| 6076 | -
|
---|
| 6077 | - A compilation of the Document or its derivatives with other
|
---|
| 6078 | - separate and independent documents or works, in or on a volume of
|
---|
| 6079 | - a storage or distribution medium, is called an "aggregate" if the
|
---|
| 6080 | - copyright resulting from the compilation is not used to limit the
|
---|
| 6081 | - legal rights of the compilation's users beyond what the individual
|
---|
| 6082 | - works permit. When the Document is included in an aggregate, this
|
---|
| 6083 | - License does not apply to the other works in the aggregate which
|
---|
| 6084 | - are not themselves derivative works of the Document.
|
---|
| 6085 | -
|
---|
| 6086 | - If the Cover Text requirement of section 3 is applicable to these
|
---|
| 6087 | - copies of the Document, then if the Document is less than one half
|
---|
| 6088 | - of the entire aggregate, the Document's Cover Texts may be placed
|
---|
| 6089 | - on covers that bracket the Document within the aggregate, or the
|
---|
| 6090 | - electronic equivalent of covers if the Document is in electronic
|
---|
| 6091 | - form. Otherwise they must appear on printed covers that bracket
|
---|
| 6092 | - the whole aggregate.
|
---|
| 6093 | -
|
---|
| 6094 | - 8. TRANSLATION
|
---|
| 6095 | -
|
---|
| 6096 | - Translation is considered a kind of modification, so you may
|
---|
| 6097 | - distribute translations of the Document under the terms of section
|
---|
| 6098 | - 4. Replacing Invariant Sections with translations requires special
|
---|
| 6099 | - permission from their copyright holders, but you may include
|
---|
| 6100 | - translations of some or all Invariant Sections in addition to the
|
---|
| 6101 | - original versions of these Invariant Sections. You may include a
|
---|
| 6102 | - translation of this License, and all the license notices in the
|
---|
| 6103 | - Document, and any Warranty Disclaimers, provided that you also
|
---|
| 6104 | - include the original English version of this License and the
|
---|
| 6105 | - original versions of those notices and disclaimers. In case of a
|
---|
| 6106 | - disagreement between the translation and the original version of
|
---|
| 6107 | - this License or a notice or disclaimer, the original version will
|
---|
| 6108 | - prevail.
|
---|
| 6109 | -
|
---|
| 6110 | - If a section in the Document is Entitled "Acknowledgements",
|
---|
| 6111 | - "Dedications", or "History", the requirement (section 4) to
|
---|
| 6112 | - Preserve its Title (section 1) will typically require changing the
|
---|
| 6113 | - actual title.
|
---|
| 6114 | -
|
---|
| 6115 | - 9. TERMINATION
|
---|
| 6116 | -
|
---|
| 6117 | - You may not copy, modify, sublicense, or distribute the Document
|
---|
| 6118 | - except as expressly provided under this License. Any attempt
|
---|
| 6119 | - otherwise to copy, modify, sublicense, or distribute it is void,
|
---|
| 6120 | - and will automatically terminate your rights under this License.
|
---|
| 6121 | -
|
---|
| 6122 | - However, if you cease all violation of this License, then your
|
---|
| 6123 | - license from a particular copyright holder is reinstated (a)
|
---|
| 6124 | - provisionally, unless and until the copyright holder explicitly
|
---|
| 6125 | - and finally terminates your license, and (b) permanently, if the
|
---|
| 6126 | - copyright holder fails to notify you of the violation by some
|
---|
| 6127 | - reasonable means prior to 60 days after the cessation.
|
---|
| 6128 | -
|
---|
| 6129 | - Moreover, your license from a particular copyright holder is
|
---|
| 6130 | - reinstated permanently if the copyright holder notifies you of the
|
---|
| 6131 | - violation by some reasonable means, this is the first time you have
|
---|
| 6132 | - received notice of violation of this License (for any work) from
|
---|
| 6133 | - that copyright holder, and you cure the violation prior to 30 days
|
---|
| 6134 | - after your receipt of the notice.
|
---|
| 6135 | -
|
---|
| 6136 | - Termination of your rights under this section does not terminate
|
---|
| 6137 | - the licenses of parties who have received copies or rights from
|
---|
| 6138 | - you under this License. If your rights have been terminated and
|
---|
| 6139 | - not permanently reinstated, receipt of a copy of some or all of
|
---|
| 6140 | - the same material does not give you any rights to use it.
|
---|
| 6141 | -
|
---|
| 6142 | - 10. FUTURE REVISIONS OF THIS LICENSE
|
---|
| 6143 | -
|
---|
| 6144 | - The Free Software Foundation may publish new, revised versions of
|
---|
| 6145 | - the GNU Free Documentation License from time to time. Such new
|
---|
| 6146 | - versions will be similar in spirit to the present version, but may
|
---|
| 6147 | - differ in detail to address new problems or concerns. See
|
---|
| 6148 | - `http://www.gnu.org/copyleft/'.
|
---|
| 6149 | -
|
---|
| 6150 | - Each version of the License is given a distinguishing version
|
---|
| 6151 | - number. If the Document specifies that a particular numbered
|
---|
| 6152 | - version of this License "or any later version" applies to it, you
|
---|
| 6153 | - have the option of following the terms and conditions either of
|
---|
| 6154 | - that specified version or of any later version that has been
|
---|
| 6155 | - published (not as a draft) by the Free Software Foundation. If
|
---|
| 6156 | - the Document does not specify a version number of this License,
|
---|
| 6157 | - you may choose any version ever published (not as a draft) by the
|
---|
| 6158 | - Free Software Foundation. If the Document specifies that a proxy
|
---|
| 6159 | - can decide which future versions of this License can be used, that
|
---|
| 6160 | - proxy's public statement of acceptance of a version permanently
|
---|
| 6161 | - authorizes you to choose that version for the Document.
|
---|
| 6162 | -
|
---|
| 6163 | - 11. RELICENSING
|
---|
| 6164 | -
|
---|
| 6165 | - "Massive Multiauthor Collaboration Site" (or "MMC Site") means any
|
---|
| 6166 | - World Wide Web server that publishes copyrightable works and also
|
---|
| 6167 | - provides prominent facilities for anybody to edit those works. A
|
---|
| 6168 | - public wiki that anybody can edit is an example of such a server.
|
---|
| 6169 | - A "Massive Multiauthor Collaboration" (or "MMC") contained in the
|
---|
| 6170 | - site means any set of copyrightable works thus published on the MMC
|
---|
| 6171 | - site.
|
---|
| 6172 | -
|
---|
| 6173 | - "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
|
---|
| 6174 | - license published by Creative Commons Corporation, a not-for-profit
|
---|
| 6175 | - corporation with a principal place of business in San Francisco,
|
---|
| 6176 | - California, as well as future copyleft versions of that license
|
---|
| 6177 | - published by that same organization.
|
---|
| 6178 | -
|
---|
| 6179 | - "Incorporate" means to publish or republish a Document, in whole or
|
---|
| 6180 | - in part, as part of another Document.
|
---|
| 6181 | -
|
---|
| 6182 | - An MMC is "eligible for relicensing" if it is licensed under this
|
---|
| 6183 | - License, and if all works that were first published under this
|
---|
| 6184 | - License somewhere other than this MMC, and subsequently
|
---|
| 6185 | - incorporated in whole or in part into the MMC, (1) had no cover
|
---|
| 6186 | - texts or invariant sections, and (2) were thus incorporated prior
|
---|
| 6187 | - to November 1, 2008.
|
---|
| 6188 | -
|
---|
| 6189 | - The operator of an MMC Site may republish an MMC contained in the
|
---|
| 6190 | - site under CC-BY-SA on the same site at any time before August 1,
|
---|
| 6191 | - 2009, provided the MMC is eligible for relicensing.
|
---|
| 6192 | -
|
---|
| 6193 | -
|
---|
| 6194 | -ADDENDUM: How to use this License for your documents
|
---|
| 6195 | -====================================================
|
---|
| 6196 | -
|
---|
| 6197 | -To use this License in a document you have written, include a copy of
|
---|
| 6198 | -the License in the document and put the following copyright and license
|
---|
| 6199 | -notices just after the title page:
|
---|
| 6200 | -
|
---|
| 6201 | - Copyright (C) YEAR YOUR NAME.
|
---|
| 6202 | - Permission is granted to copy, distribute and/or modify this document
|
---|
| 6203 | - under the terms of the GNU Free Documentation License, Version 1.3
|
---|
| 6204 | - or any later version published by the Free Software Foundation;
|
---|
| 6205 | - with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
|
---|
| 6206 | - Texts. A copy of the license is included in the section entitled ``GNU
|
---|
| 6207 | - Free Documentation License''.
|
---|
| 6208 | -
|
---|
| 6209 | - If you have Invariant Sections, Front-Cover Texts and Back-Cover
|
---|
| 6210 | -Texts, replace the "with...Texts." line with this:
|
---|
| 6211 | -
|
---|
| 6212 | - with the Invariant Sections being LIST THEIR TITLES, with
|
---|
| 6213 | - the Front-Cover Texts being LIST, and with the Back-Cover Texts
|
---|
| 6214 | - being LIST.
|
---|
| 6215 | -
|
---|
| 6216 | - If you have Invariant Sections without Cover Texts, or some other
|
---|
| 6217 | -combination of the three, merge those two alternatives to suit the
|
---|
| 6218 | -situation.
|
---|
| 6219 | -
|
---|
| 6220 | - If your document contains nontrivial examples of program code, we
|
---|
| 6221 | -recommend releasing these examples in parallel under your choice of
|
---|
| 6222 | -free software license, such as the GNU General Public License, to
|
---|
| 6223 | -permit their use in free software.
|
---|
| 6224 | -
|
---|
| 6225 | -
|
---|
| 6226 | -File: libquadmath.info, Node: Reporting Bugs, Prev: GNU Free Documentation License, Up: Top
|
---|
| 6227 | -
|
---|
| 6228 | -4 Reporting Bugs
|
---|
| 6229 | -****************
|
---|
| 6230 | -
|
---|
| 6231 | -Bugs in the GCC Quad-Precision Math Library implementation should be
|
---|
| 6232 | -reported via `http://gcc.gnu.org/bugs.html'.
|
---|
| 6233 | -
|
---|
| 6234 | -
|
---|
| 6235 | -
|
---|
| 6236 | -Tag Table:
|
---|
| 6237 | -Node: Top1661
|
---|
| 6238 | -Node: Typedef and constants2395
|
---|
| 6239 | -Node: Math Library Routines3813
|
---|
| 6240 | -Node: I/O Library Routines7618
|
---|
| 6241 | -Node: strtoflt1287943
|
---|
| 6242 | -Node: quadmath_snprintf8703
|
---|
| 6243 | -Node: GNU Free Documentation License10894
|
---|
| 6244 | -Node: Reporting Bugs36060
|
---|
| 6245 | -
|
---|
| 6246 | -End Tag Table
|
---|
| 6247 | diff -Naur gcc-4.6.3.orig/libstdc++-v3/acinclude.m4 gcc-4.6.3/libstdc++-v3/acinclude.m4
|
---|
| 6248 | --- gcc-4.6.3.orig/libstdc++-v3/acinclude.m4 2011-10-05 23:09:51.000000000 +0000
|
---|
| 6249 | +++ gcc-4.6.3/libstdc++-v3/acinclude.m4 2012-07-22 16:46:02.814828000 +0000
|
---|
| 6250 | @@ -3213,6 +3213,58 @@
|
---|
| 6251 | ])
|
---|
| 6252 | ])
|
---|
| 6253 |
|
---|
| 6254 | +dnl
|
---|
| 6255 | +dnl Check whether gthreads types can be copy-assigned in C++11 mode.
|
---|
| 6256 | +dnl
|
---|
| 6257 | +AC_DEFUN([GLIBCXX_GTHREADS_CXX11_COPY_ASSIGN], [
|
---|
| 6258 | +
|
---|
| 6259 | + AC_LANG_SAVE
|
---|
| 6260 | + AC_LANG_CPLUSPLUS
|
---|
| 6261 | + ac_save_CXXFLAGS="$CXXFLAGS"
|
---|
| 6262 | + CXXFLAGS="$CXXFLAGS -std=c++0x -I${toplevel_srcdir}/gcc"
|
---|
| 6263 | +
|
---|
| 6264 | + target_thread_file=`$CXX -v 2>&1 | sed -n 's/^Thread model: //p'`
|
---|
| 6265 | + case $target_thread_file in
|
---|
| 6266 | + posix)
|
---|
| 6267 | + CXXFLAGS="$CXXFLAGS -DSUPPORTS_WEAK -DGTHREAD_USE_WEAK -D_PTHREADS"
|
---|
| 6268 | + esac
|
---|
| 6269 | +
|
---|
| 6270 | + AC_MSG_CHECKING([whether gthreads types are copy-assignable in C++11 mode])
|
---|
| 6271 | +
|
---|
| 6272 | + AC_TRY_COMPILE([#include "gthr.h"],
|
---|
| 6273 | + [
|
---|
| 6274 | + #ifdef __GTHREAD_MUTEX_INIT
|
---|
| 6275 | + __gthread_mutex_t m1;
|
---|
| 6276 | + __gthread_mutex_t m2 = __GTHREAD_MUTEX_INIT;
|
---|
| 6277 | + m1 = m2;
|
---|
| 6278 | + #endif
|
---|
| 6279 | + #ifdef __GTHREAD_RECURSIVE_MUTEX_INIT
|
---|
| 6280 | + __gthread_recursive_mutex_t r1;
|
---|
| 6281 | + __gthread_recursive_mutex_t r2 = __GTHREAD_RECURSIVE_MUTEX_INIT;
|
---|
| 6282 | + r1 = r2;
|
---|
| 6283 | + #endif
|
---|
| 6284 | + #ifdef __GTHREAD_HAS_COND
|
---|
| 6285 | + #ifdef __GTHREAD_COND_INIT
|
---|
| 6286 | + __gthread_cond_t c1;
|
---|
| 6287 | + __gthread_cond_t c2 = __GTHREAD_COND_INIT;
|
---|
| 6288 | + c1 = c2;
|
---|
| 6289 | + #endif
|
---|
| 6290 | + #endif
|
---|
| 6291 | + ], [ac_gthread_cxx11_copy_assign=1], [ac_gthread_cxx11_copy_assign=0])
|
---|
| 6292 | +
|
---|
| 6293 | + if test $ac_gthread_cxx11_copy_assign = 1 ; then res_gthr_copy_assign=yes ;
|
---|
| 6294 | + else res_gthr_copy_assign=no ; fi
|
---|
| 6295 | + AC_MSG_RESULT([$res_gthr_copy_assign])
|
---|
| 6296 | +
|
---|
| 6297 | + if test x"$res_gthr_copy_assign" = x"no"; then
|
---|
| 6298 | + AC_DEFINE(_GLIBCXX_GTHREADS_NO_COPY_ASSIGN_IN_CXX11, 1,
|
---|
| 6299 | + [Define if gthreads types cannot be copy-assigned in C++11.])
|
---|
| 6300 | + fi
|
---|
| 6301 | +
|
---|
| 6302 | + CXXFLAGS="$ac_save_CXXFLAGS"
|
---|
| 6303 | + AC_LANG_RESTORE
|
---|
| 6304 | +])
|
---|
| 6305 | +
|
---|
| 6306 | # Macros from the top-level gcc directory.
|
---|
| 6307 | m4_include([../config/gc++filt.m4])
|
---|
| 6308 | m4_include([../config/tls.m4])
|
---|
| 6309 | diff -Naur gcc-4.6.3.orig/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h gcc-4.6.3/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h
|
---|
| 6310 | --- gcc-4.6.3.orig/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h 2011-01-30 22:39:36.000000000 +0000
|
---|
| 6311 | +++ gcc-4.6.3/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h 2012-06-20 08:30:55.151768000 +0000
|
---|
| 6312 | @@ -1,6 +1,6 @@
|
---|
| 6313 | // Locale support -*- C++ -*-
|
---|
| 6314 |
|
---|
| 6315 | -// Copyright (C) 2000, 2009 Free Software Foundation, Inc.
|
---|
| 6316 | +// Copyright (C) 2000, 2009, 2011, 2012 Free Software Foundation, Inc.
|
---|
| 6317 | //
|
---|
| 6318 | // This file is part of the GNU ISO C++ Library. This library is free
|
---|
| 6319 | // software; you can redistribute it and/or modify it under the
|
---|
| 6320 | @@ -31,8 +31,6 @@
|
---|
| 6321 | // anoncvs@anoncvs.netbsd.org:/cvsroot/basesrc/include/ctype.h
|
---|
| 6322 | // See www.netbsd.org for details of access.
|
---|
| 6323 |
|
---|
| 6324 | -#include <sys/param.h>
|
---|
| 6325 | -
|
---|
| 6326 | namespace std _GLIBCXX_VISIBILITY(default)
|
---|
| 6327 | {
|
---|
| 6328 | _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
---|
| 6329 | @@ -47,7 +45,7 @@
|
---|
| 6330 | // on the mask type. Because of this, we don't use an enum.
|
---|
| 6331 | typedef unsigned char mask;
|
---|
| 6332 |
|
---|
| 6333 | -#if __NetBSD_Version__ < 599004100
|
---|
| 6334 | +#ifndef _CTYPE_U
|
---|
| 6335 | static const mask upper = _U;
|
---|
| 6336 | static const mask lower = _L;
|
---|
| 6337 | static const mask alpha = _U | _L;
|
---|
| 6338 | diff -Naur gcc-4.6.3.orig/libstdc++-v3/config.h.in gcc-4.6.3/libstdc++-v3/config.h.in
|
---|
| 6339 | --- gcc-4.6.3.orig/libstdc++-v3/config.h.in 2010-07-27 10:36:50.000000000 +0000
|
---|
| 6340 | +++ gcc-4.6.3/libstdc++-v3/config.h.in 2012-07-22 16:46:02.814828000 +0000
|
---|
| 6341 | @@ -692,6 +692,9 @@
|
---|
| 6342 | /* Define if a fully dynamic basic_string is wanted. */
|
---|
| 6343 | #undef _GLIBCXX_FULLY_DYNAMIC_STRING
|
---|
| 6344 |
|
---|
| 6345 | +/* Define if gthreads types cannot be copy-assigned in C++11. */
|
---|
| 6346 | +#undef _GLIBCXX_GTHREADS_NO_COPY_ASSIGN_IN_CXX11
|
---|
| 6347 | +
|
---|
| 6348 | /* Define if gthreads library is available. */
|
---|
| 6349 | #undef _GLIBCXX_HAS_GTHREADS
|
---|
| 6350 |
|
---|
| 6351 | diff -Naur gcc-4.6.3.orig/libstdc++-v3/configure gcc-4.6.3/libstdc++-v3/configure
|
---|
| 6352 | --- gcc-4.6.3.orig/libstdc++-v3/configure 2011-11-20 21:24:07.000000000 +0000
|
---|
| 6353 | +++ gcc-4.6.3/libstdc++-v3/configure 2012-07-22 16:46:02.814828000 +0000
|
---|
| 6354 | @@ -19477,6 +19477,84 @@
|
---|
| 6355 |
|
---|
| 6356 |
|
---|
| 6357 |
|
---|
| 6358 | +# For copy-assignable gthreads types
|
---|
| 6359 | +
|
---|
| 6360 | +
|
---|
| 6361 | +
|
---|
| 6362 | + ac_ext=cpp
|
---|
| 6363 | +ac_cpp='$CXXCPP $CPPFLAGS'
|
---|
| 6364 | +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
---|
| 6365 | +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
---|
| 6366 | +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
---|
| 6367 | +
|
---|
| 6368 | + ac_save_CXXFLAGS="$CXXFLAGS"
|
---|
| 6369 | + CXXFLAGS="$CXXFLAGS -std=c++0x -I${toplevel_srcdir}/gcc"
|
---|
| 6370 | +
|
---|
| 6371 | + target_thread_file=`$CXX -v 2>&1 | sed -n 's/^Thread model: //p'`
|
---|
| 6372 | + case $target_thread_file in
|
---|
| 6373 | + posix)
|
---|
| 6374 | + CXXFLAGS="$CXXFLAGS -DSUPPORTS_WEAK -DGTHREAD_USE_WEAK -D_PTHREADS"
|
---|
| 6375 | + esac
|
---|
| 6376 | +
|
---|
| 6377 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gthreads types are copy-assignable in C++11 mode" >&5
|
---|
| 6378 | +$as_echo_n "checking whether gthreads types are copy-assignable in C++11 mode... " >&6; }
|
---|
| 6379 | +
|
---|
| 6380 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
---|
| 6381 | +/* end confdefs.h. */
|
---|
| 6382 | +#include "gthr.h"
|
---|
| 6383 | +int
|
---|
| 6384 | +main ()
|
---|
| 6385 | +{
|
---|
| 6386 | +
|
---|
| 6387 | + #ifdef __GTHREAD_MUTEX_INIT
|
---|
| 6388 | + __gthread_mutex_t m1;
|
---|
| 6389 | + __gthread_mutex_t m2 = __GTHREAD_MUTEX_INIT;
|
---|
| 6390 | + m1 = m2;
|
---|
| 6391 | + #endif
|
---|
| 6392 | + #ifdef __GTHREAD_RECURSIVE_MUTEX_INIT
|
---|
| 6393 | + __gthread_recursive_mutex_t r1;
|
---|
| 6394 | + __gthread_recursive_mutex_t r2 = __GTHREAD_RECURSIVE_MUTEX_INIT;
|
---|
| 6395 | + r1 = r2;
|
---|
| 6396 | + #endif
|
---|
| 6397 | + #ifdef __GTHREAD_HAS_COND
|
---|
| 6398 | + #ifdef __GTHREAD_COND_INIT
|
---|
| 6399 | + __gthread_cond_t c1;
|
---|
| 6400 | + __gthread_cond_t c2 = __GTHREAD_COND_INIT;
|
---|
| 6401 | + c1 = c2;
|
---|
| 6402 | + #endif
|
---|
| 6403 | + #endif
|
---|
| 6404 | +
|
---|
| 6405 | + ;
|
---|
| 6406 | + return 0;
|
---|
| 6407 | +}
|
---|
| 6408 | +_ACEOF
|
---|
| 6409 | +if ac_fn_cxx_try_compile "$LINENO"; then :
|
---|
| 6410 | + ac_gthread_cxx11_copy_assign=1
|
---|
| 6411 | +else
|
---|
| 6412 | + ac_gthread_cxx11_copy_assign=0
|
---|
| 6413 | +fi
|
---|
| 6414 | +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
---|
| 6415 | +
|
---|
| 6416 | + if test $ac_gthread_cxx11_copy_assign = 1 ; then res_gthr_copy_assign=yes ;
|
---|
| 6417 | + else res_gthr_copy_assign=no ; fi
|
---|
| 6418 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $res_gthr_copy_assign" >&5
|
---|
| 6419 | +$as_echo "$res_gthr_copy_assign" >&6; }
|
---|
| 6420 | +
|
---|
| 6421 | + if test x"$res_gthr_copy_assign" = x"no"; then
|
---|
| 6422 | +
|
---|
| 6423 | +$as_echo "#define _GLIBCXX_GTHREADS_NO_COPY_ASSIGN_IN_CXX11 1" >>confdefs.h
|
---|
| 6424 | +
|
---|
| 6425 | + fi
|
---|
| 6426 | +
|
---|
| 6427 | + CXXFLAGS="$ac_save_CXXFLAGS"
|
---|
| 6428 | + ac_ext=c
|
---|
| 6429 | +ac_cpp='$CPP $CPPFLAGS'
|
---|
| 6430 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
---|
| 6431 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
---|
| 6432 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
---|
| 6433 | +
|
---|
| 6434 | +
|
---|
| 6435 | +
|
---|
| 6436 |
|
---|
| 6437 | ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
|
---|
| 6438 | if test "x$ac_cv_header_locale_h" = x""yes; then :
|
---|
| 6439 | diff -Naur gcc-4.6.3.orig/libstdc++-v3/configure.ac gcc-4.6.3/libstdc++-v3/configure.ac
|
---|
| 6440 | --- gcc-4.6.3.orig/libstdc++-v3/configure.ac 2011-10-05 23:09:51.000000000 +0000
|
---|
| 6441 | +++ gcc-4.6.3/libstdc++-v3/configure.ac 2012-07-22 16:46:02.814828000 +0000
|
---|
| 6442 | @@ -164,6 +164,9 @@
|
---|
| 6443 | # For gthread support
|
---|
| 6444 | GLIBCXX_CHECK_GTHREADS
|
---|
| 6445 |
|
---|
| 6446 | +# For copy-assignable gthreads types
|
---|
| 6447 | +GLIBCXX_GTHREADS_CXX11_COPY_ASSIGN
|
---|
| 6448 | +
|
---|
| 6449 | AC_LC_MESSAGES
|
---|
| 6450 |
|
---|
| 6451 | # Check for available headers.
|
---|
| 6452 | diff -Naur gcc-4.6.3.orig/libstdc++-v3/include/bits/stl_algo.h gcc-4.6.3/libstdc++-v3/include/bits/stl_algo.h
|
---|
| 6453 | --- gcc-4.6.3.orig/libstdc++-v3/include/bits/stl_algo.h 2011-09-27 08:22:07.000000000 +0000
|
---|
| 6454 | +++ gcc-4.6.3/libstdc++-v3/include/bits/stl_algo.h 2012-04-12 22:26:02.694716000 +0000
|
---|
| 6455 | @@ -1811,7 +1811,8 @@
|
---|
| 6456 | for (; __first != __last; ++__first)
|
---|
| 6457 | if (__pred(*__first))
|
---|
| 6458 | {
|
---|
| 6459 | - *__result1 = _GLIBCXX_MOVE(*__first);
|
---|
| 6460 | + if (__result1 != __first)
|
---|
| 6461 | + *__result1 = _GLIBCXX_MOVE(*__first);
|
---|
| 6462 | ++__result1;
|
---|
| 6463 | }
|
---|
| 6464 | else
|
---|
| 6465 | diff -Naur gcc-4.6.3.orig/libstdc++-v3/include/debug/safe_iterator.h gcc-4.6.3/libstdc++-v3/include/debug/safe_iterator.h
|
---|
| 6466 | --- gcc-4.6.3.orig/libstdc++-v3/include/debug/safe_iterator.h 2011-01-21 19:41:13.000000000 +0000
|
---|
| 6467 | +++ gcc-4.6.3/libstdc++-v3/include/debug/safe_iterator.h 2012-03-08 22:31:19.955944000 +0000
|
---|
| 6468 | @@ -1,6 +1,6 @@
|
---|
| 6469 | // Safe iterator implementation -*- C++ -*-
|
---|
| 6470 |
|
---|
| 6471 | -// Copyright (C) 2003, 2004, 2005, 2006, 2009, 2010, 2011
|
---|
| 6472 | +// Copyright (C) 2003, 2004, 2005, 2006, 2009, 2010, 2011, 2012
|
---|
| 6473 | // Free Software Foundation, Inc.
|
---|
| 6474 | //
|
---|
| 6475 | // This file is part of the GNU ISO C++ Library. This library is free
|
---|
| 6476 | @@ -142,6 +142,24 @@
|
---|
| 6477 | ._M_iterator(__x, "other"));
|
---|
| 6478 | }
|
---|
| 6479 |
|
---|
| 6480 | +#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
---|
| 6481 | + /**
|
---|
| 6482 | + * @brief Move construction.
|
---|
| 6483 | + * @post __x is singular and unattached
|
---|
| 6484 | + */
|
---|
| 6485 | + _Safe_iterator(_Safe_iterator&& __x) : _M_current()
|
---|
| 6486 | + {
|
---|
| 6487 | + _GLIBCXX_DEBUG_VERIFY(!__x._M_singular()
|
---|
| 6488 | + || __x._M_current == _Iterator(),
|
---|
| 6489 | + _M_message(__msg_init_copy_singular)
|
---|
| 6490 | + ._M_iterator(*this, "this")
|
---|
| 6491 | + ._M_iterator(__x, "other"));
|
---|
| 6492 | + std::swap(_M_current, __x._M_current);
|
---|
| 6493 | + this->_M_attach(__x._M_sequence);
|
---|
| 6494 | + __x._M_detach();
|
---|
| 6495 | + }
|
---|
| 6496 | +#endif
|
---|
| 6497 | +
|
---|
| 6498 | /**
|
---|
| 6499 | * @brief Converting constructor from a mutable iterator to a
|
---|
| 6500 | * constant iterator.
|
---|
| 6501 | @@ -181,6 +199,27 @@
|
---|
| 6502 | return *this;
|
---|
| 6503 | }
|
---|
| 6504 |
|
---|
| 6505 | +#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
---|
| 6506 | + /**
|
---|
| 6507 | + * @brief Move assignment.
|
---|
| 6508 | + * @post __x is singular and unattached
|
---|
| 6509 | + */
|
---|
| 6510 | + _Safe_iterator&
|
---|
| 6511 | + operator=(_Safe_iterator&& __x)
|
---|
| 6512 | + {
|
---|
| 6513 | + _GLIBCXX_DEBUG_VERIFY(!__x._M_singular()
|
---|
| 6514 | + || __x._M_current == _Iterator(),
|
---|
| 6515 | + _M_message(__msg_copy_singular)
|
---|
| 6516 | + ._M_iterator(*this, "this")
|
---|
| 6517 | + ._M_iterator(__x, "other"));
|
---|
| 6518 | + _M_current = __x._M_current;
|
---|
| 6519 | + _M_attach(__x._M_sequence);
|
---|
| 6520 | + __x._M_detach();
|
---|
| 6521 | + __x._M_current = _Iterator();
|
---|
| 6522 | + return *this;
|
---|
| 6523 | + }
|
---|
| 6524 | +#endif
|
---|
| 6525 | +
|
---|
| 6526 | /**
|
---|
| 6527 | * @brief Iterator dereference.
|
---|
| 6528 | * @pre iterator is dereferenceable
|
---|
| 6529 | @@ -415,7 +454,9 @@
|
---|
| 6530 | /// Is this iterator equal to the sequence's before_begin() iterator if
|
---|
| 6531 | /// any?
|
---|
| 6532 | bool _M_is_before_begin() const
|
---|
| 6533 | - { return _BeforeBeginHelper<_Sequence>::_M_Is(base(), _M_get_sequence()); }
|
---|
| 6534 | + {
|
---|
| 6535 | + return _BeforeBeginHelper<_Sequence>::_M_Is(base(), _M_get_sequence());
|
---|
| 6536 | + }
|
---|
| 6537 | };
|
---|
| 6538 |
|
---|
| 6539 | template<typename _IteratorL, typename _IteratorR, typename _Sequence>
|
---|
| 6540 | diff -Naur gcc-4.6.3.orig/libstdc++-v3/include/ext/concurrence.h gcc-4.6.3/libstdc++-v3/include/ext/concurrence.h
|
---|
| 6541 | --- gcc-4.6.3.orig/libstdc++-v3/include/ext/concurrence.h 2011-01-30 22:39:36.000000000 +0000
|
---|
| 6542 | +++ gcc-4.6.3/libstdc++-v3/include/ext/concurrence.h 2012-07-22 16:46:02.814828000 +0000
|
---|
| 6543 | @@ -1,6 +1,6 @@
|
---|
| 6544 | // Support for concurrent programing -*- C++ -*-
|
---|
| 6545 |
|
---|
| 6546 | -// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
|
---|
| 6547 | +// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012
|
---|
| 6548 | // Free Software Foundation, Inc.
|
---|
| 6549 | //
|
---|
| 6550 | // This file is part of the GNU ISO C++ Library. This library is free
|
---|
| 6551 | @@ -140,6 +140,18 @@
|
---|
| 6552 | }
|
---|
| 6553 | #endif
|
---|
| 6554 |
|
---|
| 6555 | + template<typename _Tp>
|
---|
| 6556 | + static inline void
|
---|
| 6557 | + __copy_gthr_type(_Tp& __to, const _Tp& __from)
|
---|
| 6558 | + {
|
---|
| 6559 | +#if defined __GXX_EXPERIMENTAL_CXX0X__ \
|
---|
| 6560 | + && defined _GLIBCXX_GTHREADS_NO_COPY_ASSIGN_IN_CXX11
|
---|
| 6561 | + __builtin_memcpy(&__to, &__from, sizeof(__to));
|
---|
| 6562 | +#else
|
---|
| 6563 | + __to = __from;
|
---|
| 6564 | +#endif
|
---|
| 6565 | + }
|
---|
| 6566 | +
|
---|
| 6567 | class __mutex
|
---|
| 6568 | {
|
---|
| 6569 | private:
|
---|
| 6570 | @@ -156,7 +168,7 @@
|
---|
| 6571 | {
|
---|
| 6572 | #if defined __GTHREAD_MUTEX_INIT
|
---|
| 6573 | __gthread_mutex_t __tmp = __GTHREAD_MUTEX_INIT;
|
---|
| 6574 | - _M_mutex = __tmp;
|
---|
| 6575 | + __copy_gthr_type(_M_mutex, __tmp);
|
---|
| 6576 | #else
|
---|
| 6577 | __GTHREAD_MUTEX_INIT_FUNCTION(&_M_mutex);
|
---|
| 6578 | #endif
|
---|
| 6579 | @@ -214,7 +226,7 @@
|
---|
| 6580 | {
|
---|
| 6581 | #if defined __GTHREAD_RECURSIVE_MUTEX_INIT
|
---|
| 6582 | __gthread_recursive_mutex_t __tmp = __GTHREAD_RECURSIVE_MUTEX_INIT;
|
---|
| 6583 | - _M_mutex = __tmp;
|
---|
| 6584 | + __copy_gthr_type(_M_mutex, __tmp);
|
---|
| 6585 | #else
|
---|
| 6586 | __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION(&_M_mutex);
|
---|
| 6587 | #endif
|
---|
| 6588 | @@ -270,7 +282,7 @@
|
---|
| 6589 |
|
---|
| 6590 | // matches a gthr-win32.h recursive mutex
|
---|
| 6591 | template<typename _Rm>
|
---|
| 6592 | - static typename __enable_if<sizeof(&_Rm::sema), void>::__type
|
---|
| 6593 | + static typename __enable_if<(bool)sizeof(&_Rm::sema), void>::__type
|
---|
| 6594 | _S_destroy(_Rm* __mx)
|
---|
| 6595 | {
|
---|
| 6596 | __gthread_mutex_t __tmp;
|
---|
| 6597 | @@ -279,7 +291,7 @@
|
---|
| 6598 |
|
---|
| 6599 | // matches a recursive mutex with a member 'actual'
|
---|
| 6600 | template<typename _Rm>
|
---|
| 6601 | - static typename __enable_if<sizeof(&_Rm::actual), void>::__type
|
---|
| 6602 | + static typename __enable_if<(bool)sizeof(&_Rm::actual), void>::__type
|
---|
| 6603 | _S_destroy(_Rm* __mx)
|
---|
| 6604 | { __gthread_mutex_destroy(&__mx->actual); }
|
---|
| 6605 |
|
---|
| 6606 | @@ -332,7 +344,7 @@
|
---|
| 6607 | {
|
---|
| 6608 | #if defined __GTHREAD_COND_INIT
|
---|
| 6609 | __gthread_cond_t __tmp = __GTHREAD_COND_INIT;
|
---|
| 6610 | - _M_cond = __tmp;
|
---|
| 6611 | + __copy_gthr_type(_M_cond, __tmp);
|
---|
| 6612 | #else
|
---|
| 6613 | __GTHREAD_COND_INIT_FUNCTION(&_M_cond);
|
---|
| 6614 | #endif
|
---|
| 6615 | diff -Naur gcc-4.6.3.orig/libstdc++-v3/include/ext/rope gcc-4.6.3/libstdc++-v3/include/ext/rope
|
---|
| 6616 | --- gcc-4.6.3.orig/libstdc++-v3/include/ext/rope 2011-01-30 22:39:36.000000000 +0000
|
---|
| 6617 | +++ gcc-4.6.3/libstdc++-v3/include/ext/rope 2012-07-22 16:46:02.814828000 +0000
|
---|
| 6618 | @@ -1,7 +1,7 @@
|
---|
| 6619 | // SGI's rope class -*- C++ -*-
|
---|
| 6620 |
|
---|
| 6621 | -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
---|
| 6622 | -// Free Software Foundation, Inc.
|
---|
| 6623 | +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
---|
| 6624 | +// 2012 Free Software Foundation, Inc.
|
---|
| 6625 | //
|
---|
| 6626 | // This file is part of the GNU ISO C++ Library. This library is free
|
---|
| 6627 | // software; you can redistribute it and/or modify it under the
|
---|
| 6628 | @@ -445,6 +445,17 @@
|
---|
| 6629 | identity_element(_Rope_Concat_fn<_CharT, _Alloc>)
|
---|
| 6630 | { return rope<_CharT, _Alloc>(); }
|
---|
| 6631 |
|
---|
| 6632 | + static inline void
|
---|
| 6633 | + __copy_gthr_mutex(__gthread_mutex_t& __to, const __gthread_mutex_t& __from)
|
---|
| 6634 | + {
|
---|
| 6635 | +#if defined __GXX_EXPERIMENTAL_CXX0X__ \
|
---|
| 6636 | + && defined _GLIBCXX_GTHREADS_NO_COPY_ASSIGN_IN_CXX11
|
---|
| 6637 | + __builtin_memcpy(&__to, &__from, sizeof(__to));
|
---|
| 6638 | +#else
|
---|
| 6639 | + __to = __from;
|
---|
| 6640 | +#endif
|
---|
| 6641 | + }
|
---|
| 6642 | +
|
---|
| 6643 | // Class _Refcount_Base provides a type, _RC_t, a data member,
|
---|
| 6644 | // _M_ref_count, and member functions _M_incr and _M_decr, which perform
|
---|
| 6645 | // atomic preincrement/predecrement. The constructor initializes
|
---|
| 6646 | @@ -464,7 +475,7 @@
|
---|
| 6647 | {
|
---|
| 6648 | #ifdef __GTHREAD_MUTEX_INIT
|
---|
| 6649 | __gthread_mutex_t __tmp = __GTHREAD_MUTEX_INIT;
|
---|
| 6650 | - _M_ref_count_lock = __tmp;
|
---|
| 6651 | + __copy_gthr_mutex(_M_ref_count_lock, __tmp);
|
---|
| 6652 | #elif defined(__GTHREAD_MUTEX_INIT_FUNCTION)
|
---|
| 6653 | __GTHREAD_MUTEX_INIT_FUNCTION (&_M_ref_count_lock);
|
---|
| 6654 | #else
|
---|
| 6655 | @@ -605,7 +616,7 @@
|
---|
| 6656 | {
|
---|
| 6657 | // Do not copy a POSIX/gthr mutex once in use. However, bits are bits.
|
---|
| 6658 | __gthread_mutex_t __tmp = __GTHREAD_MUTEX_INIT;
|
---|
| 6659 | - _M_c_string_lock = __tmp;
|
---|
| 6660 | + __copy_gthr_mutex(_M_c_string_lock, __tmp);
|
---|
| 6661 | }
|
---|
| 6662 | #else
|
---|
| 6663 | { __GTHREAD_MUTEX_INIT_FUNCTION (&_M_c_string_lock); }
|
---|
| 6664 | diff -Naur gcc-4.6.3.orig/libstdc++-v3/include/std/condition_variable gcc-4.6.3/libstdc++-v3/include/std/condition_variable
|
---|
| 6665 | --- gcc-4.6.3.orig/libstdc++-v3/include/std/condition_variable 2011-12-19 00:34:29.000000000 +0000
|
---|
| 6666 | +++ gcc-4.6.3/libstdc++-v3/include/std/condition_variable 2012-07-05 01:10:10.791368000 +0000
|
---|
| 6667 | @@ -1,6 +1,6 @@
|
---|
| 6668 | // <condition_variable> -*- C++ -*-
|
---|
| 6669 |
|
---|
| 6670 | -// Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
|
---|
| 6671 | +// Copyright (C) 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
|
---|
| 6672 | //
|
---|
| 6673 | // This file is part of the GNU ISO C++ Library. This library is free
|
---|
| 6674 | // software; you can redistribute it and/or modify it under the
|
---|
| 6675 | @@ -171,6 +171,26 @@
|
---|
| 6676 | condition_variable _M_cond;
|
---|
| 6677 | mutex _M_mutex;
|
---|
| 6678 |
|
---|
| 6679 | + // scoped unlock - unlocks in ctor, re-locks in dtor
|
---|
| 6680 | + template<typename _Lock>
|
---|
| 6681 | + struct _Unlock
|
---|
| 6682 | + {
|
---|
| 6683 | + explicit _Unlock(_Lock& __lk) : _M_lock(__lk) { __lk.unlock(); }
|
---|
| 6684 | +
|
---|
| 6685 | + ~_Unlock() noexcept(false)
|
---|
| 6686 | + {
|
---|
| 6687 | + if (uncaught_exception())
|
---|
| 6688 | + __try { _M_lock.lock(); } __catch(...) { }
|
---|
| 6689 | + else
|
---|
| 6690 | + _M_lock.lock();
|
---|
| 6691 | + }
|
---|
| 6692 | +
|
---|
| 6693 | + _Unlock(const _Unlock&) = delete;
|
---|
| 6694 | + _Unlock& operator=(const _Unlock&) = delete;
|
---|
| 6695 | +
|
---|
| 6696 | + _Lock& _M_lock;
|
---|
| 6697 | + };
|
---|
| 6698 | +
|
---|
| 6699 | public:
|
---|
| 6700 | typedef condition_variable::native_handle_type native_handle_type;
|
---|
| 6701 |
|
---|
| 6702 | @@ -198,21 +218,8 @@
|
---|
| 6703 | void
|
---|
| 6704 | wait(_Lock& __lock)
|
---|
| 6705 | {
|
---|
| 6706 | - // scoped unlock - unlocks in ctor, re-locks in dtor
|
---|
| 6707 | - struct _Unlock {
|
---|
| 6708 | - explicit _Unlock(_Lock& __lk) : _M_lock(__lk) { __lk.unlock(); }
|
---|
| 6709 | - ~_Unlock() noexcept(false)
|
---|
| 6710 | - {
|
---|
| 6711 | - if (uncaught_exception())
|
---|
| 6712 | - __try { _M_lock.lock(); } __catch(...) { }
|
---|
| 6713 | - else
|
---|
| 6714 | - _M_lock.lock();
|
---|
| 6715 | - }
|
---|
| 6716 | - _Lock& _M_lock;
|
---|
| 6717 | - };
|
---|
| 6718 | -
|
---|
| 6719 | unique_lock<mutex> __my_lock(_M_mutex);
|
---|
| 6720 | - _Unlock __unlock(__lock);
|
---|
| 6721 | + _Unlock<_Lock> __unlock(__lock);
|
---|
| 6722 | // _M_mutex must be unlocked before re-locking __lock so move
|
---|
| 6723 | // ownership of _M_mutex lock to an object with shorter lifetime.
|
---|
| 6724 | unique_lock<mutex> __my_lock2(std::move(__my_lock));
|
---|
| 6725 | @@ -233,11 +240,12 @@
|
---|
| 6726 | wait_until(_Lock& __lock,
|
---|
| 6727 | const chrono::time_point<_Clock, _Duration>& __atime)
|
---|
| 6728 | {
|
---|
| 6729 | - unique_lock<mutex> __my_lock(_M_mutex);
|
---|
| 6730 | - __lock.unlock();
|
---|
| 6731 | - cv_status __status = _M_cond.wait_until(__my_lock, __atime);
|
---|
| 6732 | - __lock.lock();
|
---|
| 6733 | - return __status;
|
---|
| 6734 | + unique_lock<mutex> __my_lock(_M_mutex);
|
---|
| 6735 | + _Unlock<_Lock> __unlock(__lock);
|
---|
| 6736 | + // _M_mutex must be unlocked before re-locking __lock so move
|
---|
| 6737 | + // ownership of _M_mutex lock to an object with shorter lifetime.
|
---|
| 6738 | + unique_lock<mutex> __my_lock2(std::move(__my_lock));
|
---|
| 6739 | + return _M_cond.wait_until(__my_lock2, __atime);
|
---|
| 6740 | }
|
---|
| 6741 |
|
---|
| 6742 | template<typename _Lock, typename _Clock,
|
---|
| 6743 | diff -Naur gcc-4.6.3.orig/libstdc++-v3/include/std/mutex gcc-4.6.3/libstdc++-v3/include/std/mutex
|
---|
| 6744 | --- gcc-4.6.3.orig/libstdc++-v3/include/std/mutex 2011-01-30 22:39:36.000000000 +0000
|
---|
| 6745 | +++ gcc-4.6.3/libstdc++-v3/include/std/mutex 2012-07-07 18:35:52.084223000 +0000
|
---|
| 6746 | @@ -130,7 +130,7 @@
|
---|
| 6747 | public:
|
---|
| 6748 | // matches a gthr-win32.h recursive mutex
|
---|
| 6749 | template<typename _Rm>
|
---|
| 6750 | - static typename enable_if<sizeof(&_Rm::sema), void>::type
|
---|
| 6751 | + static typename enable_if<(bool)sizeof(&_Rm::sema), void>::type
|
---|
| 6752 | _S_destroy(_Rm* __mx)
|
---|
| 6753 | {
|
---|
| 6754 | __gthread_mutex_t __tmp;
|
---|
| 6755 | @@ -139,7 +139,7 @@
|
---|
| 6756 |
|
---|
| 6757 | // matches a recursive mutex with a member 'actual'
|
---|
| 6758 | template<typename _Rm>
|
---|
| 6759 | - static typename enable_if<sizeof(&_Rm::actual), void>::type
|
---|
| 6760 | + static typename enable_if<(bool)sizeof(&_Rm::actual), void>::type
|
---|
| 6761 | _S_destroy(_Rm* __mx)
|
---|
| 6762 | { __gthread_mutex_destroy(&__mx->actual); }
|
---|
| 6763 |
|
---|
| 6764 | diff -Naur gcc-4.6.3.orig/libstdc++-v3/src/condition_variable.cc gcc-4.6.3/libstdc++-v3/src/condition_variable.cc
|
---|
| 6765 | --- gcc-4.6.3.orig/libstdc++-v3/src/condition_variable.cc 2011-01-30 22:39:36.000000000 +0000
|
---|
| 6766 | +++ gcc-4.6.3/libstdc++-v3/src/condition_variable.cc 2012-07-22 16:46:02.814828000 +0000
|
---|
| 6767 | @@ -1,6 +1,6 @@
|
---|
| 6768 | // condition_variable -*- C++ -*-
|
---|
| 6769 |
|
---|
| 6770 | -// Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
|
---|
| 6771 | +// Copyright (C) 2008, 2009, 2010, 2012 Free Software Foundation, Inc.
|
---|
| 6772 | //
|
---|
| 6773 | // This file is part of the GNU ISO C++ Library. This library is free
|
---|
| 6774 | // software; you can redistribute it and/or modify it under the
|
---|
| 6775 | @@ -34,7 +34,12 @@
|
---|
| 6776 | {
|
---|
| 6777 | #ifdef __GTHREAD_COND_INIT
|
---|
| 6778 | __native_type __tmp = __GTHREAD_COND_INIT;
|
---|
| 6779 | +#if defined __GXX_EXPERIMENTAL_CXX0X__ \
|
---|
| 6780 | + && defined _GLIBCXX_GTHREADS_NO_COPY_ASSIGN_IN_CXX11
|
---|
| 6781 | + __builtin_memcpy(&_M_cond, &__tmp, sizeof(_M_cond));
|
---|
| 6782 | +#else
|
---|
| 6783 | _M_cond = __tmp;
|
---|
| 6784 | +#endif
|
---|
| 6785 | #else
|
---|
| 6786 | int __e = __gthread_cond_init(&_M_cond, 0);
|
---|
| 6787 |
|
---|
| 6788 | diff -Naur gcc-4.6.3.orig/libstdc++-v3/testsuite/22_locale/ctype_base/53678.cc gcc-4.6.3/libstdc++-v3/testsuite/22_locale/ctype_base/53678.cc
|
---|
| 6789 | --- gcc-4.6.3.orig/libstdc++-v3/testsuite/22_locale/ctype_base/53678.cc 1970-01-01 00:00:00.000000000 +0000
|
---|
| 6790 | +++ gcc-4.6.3/libstdc++-v3/testsuite/22_locale/ctype_base/53678.cc 2012-06-20 08:30:55.151768000 +0000
|
---|
| 6791 | @@ -0,0 +1,28 @@
|
---|
| 6792 | +// Copyright (C) 2012 Free Software Foundation, Inc.
|
---|
| 6793 | +//
|
---|
| 6794 | +// This file is part of the GNU ISO C++ Library. This library is free
|
---|
| 6795 | +// software; you can redistribute it and/or modify it under the
|
---|
| 6796 | +// terms of the GNU General Public License as published by the
|
---|
| 6797 | +// Free Software Foundation; either version 3, or (at your option)
|
---|
| 6798 | +// any later version.
|
---|
| 6799 | +
|
---|
| 6800 | +// This library is distributed in the hope that it will be useful,
|
---|
| 6801 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 6802 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 6803 | +// GNU General Public License for more details.
|
---|
| 6804 | +
|
---|
| 6805 | +// You should have received a copy of the GNU General Public License along
|
---|
| 6806 | +// with this library; see the file COPYING3. If not see
|
---|
| 6807 | +// <http://www.gnu.org/licenses/>.
|
---|
| 6808 | +
|
---|
| 6809 | +// { dg-do compile }
|
---|
| 6810 | +
|
---|
| 6811 | +// 22.2.1 The ctype category
|
---|
| 6812 | +
|
---|
| 6813 | +#include <locale>
|
---|
| 6814 | +
|
---|
| 6815 | +// libstdc++/53678
|
---|
| 6816 | +void test01()
|
---|
| 6817 | +{
|
---|
| 6818 | + bool NetBSD __attribute__((unused)) = true;
|
---|
| 6819 | +}
|
---|
| 6820 | diff -Naur gcc-4.6.3.orig/libstdc++-v3/testsuite/23_containers/vector/debug/52433.cc gcc-4.6.3/libstdc++-v3/testsuite/23_containers/vector/debug/52433.cc
|
---|
| 6821 | --- gcc-4.6.3.orig/libstdc++-v3/testsuite/23_containers/vector/debug/52433.cc 1970-01-01 00:00:00.000000000 +0000
|
---|
| 6822 | +++ gcc-4.6.3/libstdc++-v3/testsuite/23_containers/vector/debug/52433.cc 2012-03-08 22:31:19.955944000 +0000
|
---|
| 6823 | @@ -0,0 +1,43 @@
|
---|
| 6824 | +// Copyright (C) 2012 Free Software Foundation, Inc.
|
---|
| 6825 | +//
|
---|
| 6826 | +// This file is part of the GNU ISO C++ Library. This library is free
|
---|
| 6827 | +// software; you can redistribute it and/or modify it under the
|
---|
| 6828 | +// terms of the GNU General Public License as published by the
|
---|
| 6829 | +// Free Software Foundation; either version 3, or (at your option)
|
---|
| 6830 | +// any later version.
|
---|
| 6831 | +//
|
---|
| 6832 | +// This library is distributed in the hope that it will be useful,
|
---|
| 6833 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 6834 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 6835 | +// GNU General Public License for more details.
|
---|
| 6836 | +//
|
---|
| 6837 | +// You should have received a copy of the GNU General Public License along
|
---|
| 6838 | +// with this library; see the file COPYING3. If not see
|
---|
| 6839 | +// <http://www.gnu.org/licenses/>.
|
---|
| 6840 | +//
|
---|
| 6841 | +// { dg-require-debug-mode "" }
|
---|
| 6842 | +// { dg-options "-std=gnu++0x" }
|
---|
| 6843 | +// { dg-do compile }
|
---|
| 6844 | +
|
---|
| 6845 | +// PR libstdc++/52433
|
---|
| 6846 | +
|
---|
| 6847 | +#include <vector>
|
---|
| 6848 | +
|
---|
| 6849 | +struct X
|
---|
| 6850 | +{
|
---|
| 6851 | + std::vector<int>::iterator i;
|
---|
| 6852 | +
|
---|
| 6853 | + X() = default;
|
---|
| 6854 | + X(const X&) = default;
|
---|
| 6855 | + X(X&&) = default;
|
---|
| 6856 | + X& operator=(const X&) = default;
|
---|
| 6857 | + X& operator=(X&&) = default;
|
---|
| 6858 | +};
|
---|
| 6859 | +
|
---|
| 6860 | +X test01()
|
---|
| 6861 | +{
|
---|
| 6862 | + X x;
|
---|
| 6863 | + x = X();
|
---|
| 6864 | + return x;
|
---|
| 6865 | +}
|
---|
| 6866 | +
|
---|
| 6867 | diff -Naur gcc-4.6.3.orig/libstdc++-v3/testsuite/25_algorithms/stable_partition/moveable.cc gcc-4.6.3/libstdc++-v3/testsuite/25_algorithms/stable_partition/moveable.cc
|
---|
| 6868 | --- gcc-4.6.3.orig/libstdc++-v3/testsuite/25_algorithms/stable_partition/moveable.cc 2010-01-12 17:16:25.000000000 +0000
|
---|
| 6869 | +++ gcc-4.6.3/libstdc++-v3/testsuite/25_algorithms/stable_partition/moveable.cc 2012-04-12 22:26:02.694716000 +0000
|
---|
| 6870 | @@ -1,6 +1,6 @@
|
---|
| 6871 | // { dg-options "-std=gnu++0x" }
|
---|
| 6872 |
|
---|
| 6873 | -// Copyright (C) 2009, 2010 Free Software Foundation, Inc.
|
---|
| 6874 | +// Copyright (C) 2009, 2010, 2012 Free Software Foundation, Inc.
|
---|
| 6875 | //
|
---|
| 6876 | // This file is part of the GNU ISO C++ Library. This library is free
|
---|
| 6877 | // software; you can redistribute it and/or modify it under the
|
---|
| 6878 | @@ -39,6 +39,11 @@
|
---|
| 6879 | const int B[] = {2, 4, 6, 8, 10, 12, 14, 16, 1, 3, 5, 7, 9, 11, 13, 15, 17};
|
---|
| 6880 | const int N = sizeof(A) / sizeof(int);
|
---|
| 6881 |
|
---|
| 6882 | +// Check that starting with a true predicate works too. (PR52822)
|
---|
| 6883 | +const int A2[] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17};
|
---|
| 6884 | +const int B2[] = {2, 4, 6, 8, 10, 12, 14, 16, 3, 5, 7, 9, 11, 13, 15, 17};
|
---|
| 6885 | +const int N2 = sizeof(A2) / sizeof(int);
|
---|
| 6886 | +
|
---|
| 6887 | struct Pred
|
---|
| 6888 | {
|
---|
| 6889 | bool
|
---|
| 6890 | @@ -46,7 +51,7 @@
|
---|
| 6891 | { return (x.val % 2) == 0; }
|
---|
| 6892 | };
|
---|
| 6893 |
|
---|
| 6894 | -// 25.2.12 stable_partition()
|
---|
| 6895 | +// 25.2.12 stable_partition(), starting with a false predicate.
|
---|
| 6896 | void
|
---|
| 6897 | test01()
|
---|
| 6898 | {
|
---|
| 6899 | @@ -60,9 +65,24 @@
|
---|
| 6900 | VERIFY( std::equal(s1, s1 + N, B) );
|
---|
| 6901 | }
|
---|
| 6902 |
|
---|
| 6903 | +// 25.2.12 stable_partition(), starting with a true predicate.
|
---|
| 6904 | +void
|
---|
| 6905 | +test02()
|
---|
| 6906 | +{
|
---|
| 6907 | + bool test __attribute__((unused)) = true;
|
---|
| 6908 | +
|
---|
| 6909 | + rvalstruct s1[N2];
|
---|
| 6910 | + std::copy(A2, A2 + N2, s1);
|
---|
| 6911 | + Container con(s1, s1 + N2);
|
---|
| 6912 | +
|
---|
| 6913 | + std::stable_partition(con.begin(), con.end(), Pred());
|
---|
| 6914 | + VERIFY( std::equal(s1, s1 + N2, B2) );
|
---|
| 6915 | +}
|
---|
| 6916 | +
|
---|
| 6917 | int
|
---|
| 6918 | main()
|
---|
| 6919 | {
|
---|
| 6920 | test01();
|
---|
| 6921 | + test02();
|
---|
| 6922 | return 0;
|
---|
| 6923 | }
|
---|
| 6924 | diff -Naur gcc-4.6.3.orig/libstdc++-v3/testsuite/25_algorithms/stable_partition/pr52822.cc gcc-4.6.3/libstdc++-v3/testsuite/25_algorithms/stable_partition/pr52822.cc
|
---|
| 6925 | --- gcc-4.6.3.orig/libstdc++-v3/testsuite/25_algorithms/stable_partition/pr52822.cc 1970-01-01 00:00:00.000000000 +0000
|
---|
| 6926 | +++ gcc-4.6.3/libstdc++-v3/testsuite/25_algorithms/stable_partition/pr52822.cc 2012-04-12 22:26:02.694716000 +0000
|
---|
| 6927 | @@ -0,0 +1,43 @@
|
---|
| 6928 | +// { dg-options "-std=gnu++0x" }
|
---|
| 6929 | +
|
---|
| 6930 | +// Copyright (C) 2012 Free Software Foundation, Inc.
|
---|
| 6931 | +//
|
---|
| 6932 | +// This file is part of the GNU ISO C++ Library. This library is free
|
---|
| 6933 | +// software; you can redistribute it and/or modify it under the
|
---|
| 6934 | +// terms of the GNU General Public License as published by the
|
---|
| 6935 | +// Free Software Foundation; either version 3, or (at your option)
|
---|
| 6936 | +// any later version.
|
---|
| 6937 | +
|
---|
| 6938 | +// This library is distributed in the hope that it will be useful,
|
---|
| 6939 | +// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
|
---|
| 6940 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 6941 | +// GNU General Public License for more details.
|
---|
| 6942 | +
|
---|
| 6943 | +// You should have received a copy of the GNU General Public License along
|
---|
| 6944 | +// with this library; see the file COPYING3. If not see
|
---|
| 6945 | +// <http://www.gnu.org/licenses/>.
|
---|
| 6946 | +
|
---|
| 6947 | +// 25.2.12 [lib.alg.partitions] Partitions.
|
---|
| 6948 | +
|
---|
| 6949 | +#include <algorithm>
|
---|
| 6950 | +#include <vector>
|
---|
| 6951 | +#include <testsuite_hooks.h>
|
---|
| 6952 | +
|
---|
| 6953 | +bool true_vector_pred(const std::vector<int>&) { return true; }
|
---|
| 6954 | +
|
---|
| 6955 | +void
|
---|
| 6956 | +test01()
|
---|
| 6957 | +{
|
---|
| 6958 | + std::vector<std::vector<int> > v(1);
|
---|
| 6959 | + v[0].push_back(7);
|
---|
| 6960 | + VERIFY( v[0].size() == 1 );
|
---|
| 6961 | + std::stable_partition(v.begin(), v.end(), &true_vector_pred);
|
---|
| 6962 | + VERIFY( v[0].size() == 1 );
|
---|
| 6963 | +}
|
---|
| 6964 | +
|
---|
| 6965 | +int
|
---|
| 6966 | +main()
|
---|
| 6967 | +{
|
---|
| 6968 | + test01();
|
---|
| 6969 | + return 0;
|
---|
| 6970 | +}
|
---|
| 6971 | diff -Naur gcc-4.6.3.orig/libstdc++-v3/testsuite/30_threads/condition_variable_any/53830.cc gcc-4.6.3/libstdc++-v3/testsuite/30_threads/condition_variable_any/53830.cc
|
---|
| 6972 | --- gcc-4.6.3.orig/libstdc++-v3/testsuite/30_threads/condition_variable_any/53830.cc 1970-01-01 00:00:00.000000000 +0000
|
---|
| 6973 | +++ gcc-4.6.3/libstdc++-v3/testsuite/30_threads/condition_variable_any/53830.cc 2012-07-05 01:10:10.791368000 +0000
|
---|
| 6974 | @@ -0,0 +1,68 @@
|
---|
| 6975 | +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* powerpc-ibm-aix* } }
|
---|
| 6976 | +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* powerpc-ibm-aix* } }
|
---|
| 6977 | +// { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
|
---|
| 6978 | +// { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
|
---|
| 6979 | +// { dg-require-cstdint "" }
|
---|
| 6980 | +// { dg-require-gthreads "" }
|
---|
| 6981 | +// { dg-require-sched-yield "" }
|
---|
| 6982 | +// { dg-require-nanosleep "" }
|
---|
| 6983 | +
|
---|
| 6984 | +// Copyright (C) 2012 Free Software Foundation, Inc.
|
---|
| 6985 | +//
|
---|
| 6986 | +// This file is part of the GNU ISO C++ Library. This library is free
|
---|
| 6987 | +// software; you can redistribute it and/or modify it under the
|
---|
| 6988 | +// terms of the GNU General Public License as published by the
|
---|
| 6989 | +// Free Software Foundation; either version 3, or (at your option)
|
---|
| 6990 | +// any later version.
|
---|
| 6991 | +
|
---|
| 6992 | +// This library is distributed in the hope that it will be useful,
|
---|
| 6993 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 6994 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 6995 | +// GNU General Public License for more details.
|
---|
| 6996 | +
|
---|
| 6997 | +// You should have received a copy of the GNU General Public License along
|
---|
| 6998 | +// with this library; see the file COPYING3. If not see
|
---|
| 6999 | +// <http://www.gnu.org/licenses/>.
|
---|
| 7000 | +
|
---|
| 7001 | +// PR libstdc++/53830
|
---|
| 7002 | +// Test for deadlock in condition_variable_any::wait_for
|
---|
| 7003 | +
|
---|
| 7004 | +#include <thread>
|
---|
| 7005 | +#include <mutex>
|
---|
| 7006 | +#include <condition_variable>
|
---|
| 7007 | +#include <chrono>
|
---|
| 7008 | +#include <atomic>
|
---|
| 7009 | +
|
---|
| 7010 | +std::mutex mutex;
|
---|
| 7011 | +std::condition_variable_any cv;
|
---|
| 7012 | +
|
---|
| 7013 | +std::atomic<int> barrier(0);
|
---|
| 7014 | +
|
---|
| 7015 | +// waits for data from another thread
|
---|
| 7016 | +void wait_for_data()
|
---|
| 7017 | +{
|
---|
| 7018 | + std::unique_lock<std::mutex> lock(mutex);
|
---|
| 7019 | + barrier = 1;
|
---|
| 7020 | + cv.wait_for(lock, std::chrono::milliseconds(100), []{ return false; });
|
---|
| 7021 | + // read data
|
---|
| 7022 | +}
|
---|
| 7023 | +
|
---|
| 7024 | +// passes data to waiting thread
|
---|
| 7025 | +void provide_data()
|
---|
| 7026 | +{
|
---|
| 7027 | + while (barrier == 0)
|
---|
| 7028 | + std::this_thread::yield();
|
---|
| 7029 | + std::unique_lock<std::mutex> lock(mutex);
|
---|
| 7030 | + // pass data
|
---|
| 7031 | + std::this_thread::sleep_for(std::chrono::seconds(1));
|
---|
| 7032 | + cv.notify_one();
|
---|
| 7033 | +}
|
---|
| 7034 | +
|
---|
| 7035 | +int main()
|
---|
| 7036 | +{
|
---|
| 7037 | + std::thread thread1(wait_for_data);
|
---|
| 7038 | + provide_data();
|
---|
| 7039 | + thread1.join();
|
---|
| 7040 | + return 0;
|
---|
| 7041 | +}
|
---|
| 7042 | +
|
---|
| 7043 | diff -Naur gcc-4.6.3.orig/libstdc++-v3/testsuite/Makefile.am gcc-4.6.3/libstdc++-v3/testsuite/Makefile.am
|
---|
| 7044 | --- gcc-4.6.3.orig/libstdc++-v3/testsuite/Makefile.am 2011-03-02 23:32:56.000000000 +0000
|
---|
| 7045 | +++ gcc-4.6.3/libstdc++-v3/testsuite/Makefile.am 2012-04-09 01:42:09.946040000 +0000
|
---|
| 7046 | @@ -59,6 +59,7 @@
|
---|
| 7047 | @echo 'set target_triplet $(target_triplet)' >>site.tmp
|
---|
| 7048 | @echo 'set libiconv "$(LIBICONV)"' >>site.tmp
|
---|
| 7049 | @echo 'set baseline_dir "$(baseline_dir)"' >> site.tmp
|
---|
| 7050 | + @echo 'set TEST_GCC_EXEC_PREFIX "$(libdir)/gcc/"' >> site.tmp
|
---|
| 7051 | @echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp
|
---|
| 7052 | @test ! -f site.exp || \
|
---|
| 7053 | sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
|
---|
| 7054 | diff -Naur gcc-4.6.3.orig/libstdc++-v3/testsuite/Makefile.in gcc-4.6.3/libstdc++-v3/testsuite/Makefile.in
|
---|
| 7055 | --- gcc-4.6.3.orig/libstdc++-v3/testsuite/Makefile.in 2011-03-08 00:04:05.000000000 +0000
|
---|
| 7056 | +++ gcc-4.6.3/libstdc++-v3/testsuite/Makefile.in 2012-04-09 01:42:09.946040000 +0000
|
---|
| 7057 | @@ -502,6 +502,7 @@
|
---|
| 7058 | @echo 'set target_triplet $(target_triplet)' >>site.tmp
|
---|
| 7059 | @echo 'set libiconv "$(LIBICONV)"' >>site.tmp
|
---|
| 7060 | @echo 'set baseline_dir "$(baseline_dir)"' >> site.tmp
|
---|
| 7061 | + @echo 'set TEST_GCC_EXEC_PREFIX "$(libdir)/gcc/"' >> site.tmp
|
---|
| 7062 | @echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp
|
---|
| 7063 | @test ! -f site.exp || \
|
---|
| 7064 | sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
|
---|