- Timestamp:
- 09/19/13 08:39:26 (11 years ago)
- Branches:
- clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
- Children:
- 2d024b25
- Parents:
- 2e78de4
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
patches/gcc-4.8.1-branch_update-2.patch
r2e78de4 r2ff8f62 1 Submitted By: Jim Gifford (jimat cross-lfs dot org)2 Date: 0 8-28-20131 Submitted By: William Harrington (kb0iic at cross-lfs dot org) 2 Date: 09-19-2013 3 3 Initial Package Version: 4.8.1 4 4 Origin: Upstream … … 8 8 9 9 This patch was made from Revision # 202050. 10 Added fix for BUILD¿CXXFLAGS. 11 Added fix for ISL. 10 12 13 diff -Naur gcc-4.8.1.orig/ChangeLog gcc-4.8.1/ChangeLog 14 --- gcc-4.8.1.orig/ChangeLog 2013-05-31 09:00:41.000000000 +0000 15 +++ gcc-4.8.1/ChangeLog 2013-09-13 19:01:43.959862879 +0000 16 @@ -1,3 +1,12 @@ 17 +2013-07-13 Tobias Grosser <tobias@grosser.es> 18 + 19 + PR tree-optimization/54094 20 + * graphite-clast-to-gimple.c (translate_clast_for_loop): Derive the 21 + scheduling dimension for the parallelism check from the polyhedral 22 + information in the AST. 23 + * graphite-dependences.c (carries_deps): Do not assume the schedule is 24 + in 2D + 1 form. 25 + 26 2013-05-31 Release Manager 27 28 * GCC 4.8.1 released. 11 29 diff -Naur gcc-4.8.1.orig/fixincludes/fixincl.x gcc-4.8.1/fixincludes/fixincl.x 12 --- gcc-4.8.1.orig/fixincludes/fixincl.x 2013-01-1 5 22:07:20.000000000 -060013 +++ gcc-4.8.1/fixincludes/fixincl.x 2013-0 5-31 06:43:36.437119000 -050030 --- gcc-4.8.1.orig/fixincludes/fixincl.x 2013-01-16 04:07:20.000000000 +0000 31 +++ gcc-4.8.1/fixincludes/fixincl.x 2013-09-13 19:01:42.876532387 +0000 14 32 @@ -2,11 +2,11 @@ 15 33 * … … 36 54 (char*)NULL }; 37 55 diff -Naur gcc-4.8.1.orig/fixincludes/inclhack.def gcc-4.8.1/fixincludes/inclhack.def 38 --- gcc-4.8.1.orig/fixincludes/inclhack.def 2013-01-1 5 22:07:20.000000000 -060039 +++ gcc-4.8.1/fixincludes/inclhack.def 2013-0 5-31 06:43:36.437119000 -050056 --- gcc-4.8.1.orig/fixincludes/inclhack.def 2013-01-16 04:07:20.000000000 +0000 57 +++ gcc-4.8.1/fixincludes/inclhack.def 2013-09-13 19:01:42.879865711 +0000 40 58 @@ -3447,7 +3447,7 @@ 41 59 … … 57 75 " inline long double pow(long double __X, int __Y) { return\n" 58 76 diff -Naur gcc-4.8.1.orig/fixincludes/tests/base/iso/math_iso.h gcc-4.8.1/fixincludes/tests/base/iso/math_iso.h 59 --- gcc-4.8.1.orig/fixincludes/tests/base/iso/math_iso.h 2011-08-10 0 3:43:38.000000000 -050060 +++ gcc-4.8.1/fixincludes/tests/base/iso/math_iso.h 2013-0 5-31 06:43:36.437119000 -050077 --- gcc-4.8.1.orig/fixincludes/tests/base/iso/math_iso.h 2011-08-10 08:43:38.000000000 +0000 78 +++ gcc-4.8.1/fixincludes/tests/base/iso/math_iso.h 2013-09-13 19:01:42.879865711 +0000 61 79 @@ -10,7 +10,7 @@ 62 80 … … 68 86 __powl(__X, (long double) (__Y)); } 69 87 #endif 88 diff -Naur gcc-4.8.1.orig/gcc/DATESTAMP gcc-4.8.1/gcc/DATESTAMP 89 --- gcc-4.8.1.orig/gcc/DATESTAMP 2013-05-31 00:16:35.000000000 +0000 90 +++ gcc-4.8.1/gcc/DATESTAMP 2013-09-13 19:01:43.079865187 +0000 91 @@ -1 +1 @@ 92 -20130531 93 +20130828 94 diff -Naur gcc-4.8.1.orig/gcc/Makefile.in gcc-4.8.1/gcc/Makefile.in 95 --- gcc-4.8.1.orig/gcc/Makefile.in 2013-05-21 16:00:49.000000000 +0000 96 +++ gcc-4.8.1/gcc/Makefile.in 2013-09-13 19:01:43.176531600 +0000 97 @@ -2505,7 +2505,7 @@ 98 $(TM_H) coretypes.h $(TREE_PASS_H) $(FLAGS_H) \ 99 tree-iterator.h $(BASIC_BLOCK_H) $(GIMPLE_H) $(TREE_INLINE_H) \ 100 $(VEC_H) langhooks.h alloc-pool.h pointer-set.h $(CFGLOOP_H) \ 101 - $(TARGET_H) $(GIMPLE_PRETTY_PRINT_H) $(DIAGNOSTIC_CORE_H) 102 + $(TARGET_H) $(GIMPLE_PRETTY_PRINT_H) $(DIAGNOSTIC_CORE_H) $(PARAMS_H) 103 tree-optimize.o : tree-optimize.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ 104 $(TREE_H) $(TM_P_H) $(GGC_H) \ 105 $(DIAGNOSTIC_H) $(BASIC_BLOCK_H) $(FLAGS_H) $(TM_H) \ 70 106 diff -Naur gcc-4.8.1.orig/gcc/ada/gcc-interface/ada-tree.h gcc-4.8.1/gcc/ada/gcc-interface/ada-tree.h 71 --- gcc-4.8.1.orig/gcc/ada/gcc-interface/ada-tree.h 2013-02-25 1 3:08:51.000000000 -060072 +++ gcc-4.8.1/gcc/ada/gcc-interface/ada-tree.h 2013-0 6-13 02:51:32.352026000 -0500107 --- gcc-4.8.1.orig/gcc/ada/gcc-interface/ada-tree.h 2013-02-25 19:08:51.000000000 +0000 108 +++ gcc-4.8.1/gcc/ada/gcc-interface/ada-tree.h 2013-09-13 19:01:42.883199036 +0000 73 109 @@ -360,10 +360,6 @@ 74 110 constant CONSTRUCTOR. */ … … 83 119 84 120 diff -Naur gcc-4.8.1.orig/gcc/ada/gcc-interface/decl.c gcc-4.8.1/gcc/ada/gcc-interface/decl.c 85 --- gcc-4.8.1.orig/gcc/ada/gcc-interface/decl.c 2013-05-07 0 3:03:15.000000000 -050086 +++ gcc-4.8.1/gcc/ada/gcc-interface/decl.c 2013-0 6-13 02:51:32.352026000 -0500121 --- gcc-4.8.1.orig/gcc/ada/gcc-interface/decl.c 2013-05-07 08:03:15.000000000 +0000 122 +++ gcc-4.8.1/gcc/ada/gcc-interface/decl.c 2013-09-13 19:01:42.886532361 +0000 87 123 @@ -1019,7 +1019,7 @@ 88 124 save_gnu_tree (gnat_entity, gnu_decl, true); … … 162 198 else 163 199 diff -Naur gcc-4.8.1.orig/gcc/ada/gcc-interface/gigi.h gcc-4.8.1/gcc/ada/gcc-interface/gigi.h 164 --- gcc-4.8.1.orig/gcc/ada/gcc-interface/gigi.h 2013-02-06 07:19:20.000000000 -0600165 +++ gcc-4.8.1/gcc/ada/gcc-interface/gigi.h 2013-0 6-13 02:51:32.352026000 -0500200 --- gcc-4.8.1.orig/gcc/ada/gcc-interface/gigi.h 2013-02-06 13:19:20.000000000 +0000 201 +++ gcc-4.8.1/gcc/ada/gcc-interface/gigi.h 2013-09-13 19:01:42.886532361 +0000 166 202 @@ -177,10 +177,9 @@ 167 203 /* Given GNAT_ENTITY, an object (constant, variable, parameter, exception) … … 193 229 /* Indicate that we need to take the address of T and that it therefore 194 230 diff -Naur gcc-4.8.1.orig/gcc/ada/gcc-interface/trans.c gcc-4.8.1/gcc/ada/gcc-interface/trans.c 195 --- gcc-4.8.1.orig/gcc/ada/gcc-interface/trans.c 2013-05-26 05:04:50.000000000 -0500196 +++ gcc-4.8.1/gcc/ada/gcc-interface/trans.c 2013-0 8-13 10:59:03.399464000 -0500231 --- gcc-4.8.1.orig/gcc/ada/gcc-interface/trans.c 2013-05-26 10:04:50.000000000 +0000 232 +++ gcc-4.8.1/gcc/ada/gcc-interface/trans.c 2013-09-13 19:01:42.889865685 +0000 197 233 @@ -1075,19 +1075,6 @@ 198 234 { … … 259 295 else if (is_true_formal_parm && DECL_BY_COMPONENT_PTR_P (gnu_formal)) 260 296 diff -Naur gcc-4.8.1.orig/gcc/ada/gcc-interface/utils.c gcc-4.8.1/gcc/ada/gcc-interface/utils.c 261 --- gcc-4.8.1.orig/gcc/ada/gcc-interface/utils.c 2013-02-06 07:19:20.000000000 -0600262 +++ gcc-4.8.1/gcc/ada/gcc-interface/utils.c 2013-0 6-13 02:51:32.352026000 -0500297 --- gcc-4.8.1.orig/gcc/ada/gcc-interface/utils.c 2013-02-06 13:19:20.000000000 +0000 298 +++ gcc-4.8.1/gcc/ada/gcc-interface/utils.c 2013-09-13 19:01:42.893199010 +0000 263 299 @@ -4073,33 +4073,25 @@ 264 300 … … 319 355 320 356 diff -Naur gcc-4.8.1.orig/gcc/ada/targparm.ads gcc-4.8.1/gcc/ada/targparm.ads 321 --- gcc-4.8.1.orig/gcc/ada/targparm.ads 2013-02-06 04:35:52.000000000 -0600322 +++ gcc-4.8.1/gcc/ada/targparm.ads 2013-0 6-13 02:51:32.352026000 -0500357 --- gcc-4.8.1.orig/gcc/ada/targparm.ads 2013-02-06 10:35:52.000000000 +0000 358 +++ gcc-4.8.1/gcc/ada/targparm.ads 2013-09-13 19:01:42.893199010 +0000 323 359 @@ -436,7 +436,7 @@ 324 360 -- the source program may not contain explicit 64-bit shifts. In addition, … … 331 367 -- clauses). 332 368 diff -Naur gcc-4.8.1.orig/gcc/asan.c gcc-4.8.1/gcc/asan.c 333 --- gcc-4.8.1.orig/gcc/asan.c 2013-02-28 15:23:23.000000000 -0600334 +++ gcc-4.8.1/gcc/asan.c 2013-0 8-13 12:02:13.543712000 -0500369 --- gcc-4.8.1.orig/gcc/asan.c 2013-02-28 21:23:23.000000000 +0000 370 +++ gcc-4.8.1/gcc/asan.c 2013-09-13 19:01:42.896532334 +0000 335 371 @@ -1675,7 +1675,7 @@ 336 372 access to the last byte of the argument; it uses the result of the … … 366 402 gimple_set_location (stmt, loc); 367 403 diff -Naur gcc-4.8.1.orig/gcc/c-family/c-ada-spec.c gcc-4.8.1/gcc/c-family/c-ada-spec.c 368 --- gcc-4.8.1.orig/gcc/c-family/c-ada-spec.c 2013-01-10 14:38:27.000000000 -0600369 +++ gcc-4.8.1/gcc/c-family/c-ada-spec.c 2013-0 8-09 05:53:01.541722000 -0500404 --- gcc-4.8.1.orig/gcc/c-family/c-ada-spec.c 2013-01-10 20:38:27.000000000 +0000 405 +++ gcc-4.8.1/gcc/c-family/c-ada-spec.c 2013-09-13 19:01:42.896532334 +0000 370 406 @@ -2900,7 +2900,7 @@ 371 407 pp_string (buffer, " -- "); … … 378 414 newline_and_indent (buffer, spc); 379 415 diff -Naur gcc-4.8.1.orig/gcc/collect2.c gcc-4.8.1/gcc/collect2.c 380 --- gcc-4.8.1.orig/gcc/collect2.c 2013-02-0 6 20:53:13.000000000 -0600381 +++ gcc-4.8.1/gcc/collect2.c 2013-0 6-20 12:12:17.412846000 -0500416 --- gcc-4.8.1.orig/gcc/collect2.c 2013-02-07 02:53:13.000000000 +0000 417 +++ gcc-4.8.1/gcc/collect2.c 2013-09-13 19:01:42.899865659 +0000 382 418 @@ -366,8 +366,8 @@ 383 419 … … 524 560 if (response_file) 525 561 diff -Naur gcc-4.8.1.orig/gcc/collect2.h gcc-4.8.1/gcc/collect2.h 526 --- gcc-4.8.1.orig/gcc/collect2.h 2013-01-10 14:38:27.000000000 -0600527 +++ gcc-4.8.1/gcc/collect2.h 2013-0 6-20 12:12:17.412846000 -0500562 --- gcc-4.8.1.orig/gcc/collect2.h 2013-01-10 20:38:27.000000000 +0000 563 +++ gcc-4.8.1/gcc/collect2.h 2013-09-13 19:01:42.899865659 +0000 528 564 @@ -25,8 +25,6 @@ 529 565 extern struct pex_obj *collect_execute (const char *, char **, const char *, … … 536 572 extern void dump_ld_file (const char *, FILE *); 537 573 diff -Naur gcc-4.8.1.orig/gcc/common/config/s390/s390-common.c gcc-4.8.1/gcc/common/config/s390/s390-common.c 538 --- gcc-4.8.1.orig/gcc/common/config/s390/s390-common.c 2013-01-10 14:38:27.000000000 -0600539 +++ gcc-4.8.1/gcc/common/config/s390/s390-common.c 2013-0 8-02 10:41:10.548493000 -0500574 --- gcc-4.8.1.orig/gcc/common/config/s390/s390-common.c 2013-01-10 20:38:27.000000000 +0000 575 +++ gcc-4.8.1/gcc/common/config/s390/s390-common.c 2013-09-13 19:01:42.899865659 +0000 540 576 @@ -42,7 +42,7 @@ 541 577 /* z196 */ PF_IEEE_FLOAT | PF_ZARCH | PF_LONG_DISPLACEMENT … … 548 584 /* Change optimizations to be performed, depending on the 549 585 diff -Naur gcc-4.8.1.orig/gcc/config/aarch64/aarch64-builtins.c gcc-4.8.1/gcc/config/aarch64/aarch64-builtins.c 550 --- gcc-4.8.1.orig/gcc/config/aarch64/aarch64-builtins.c 2013-02-28 1 1:19:33.000000000 -0600551 +++ gcc-4.8.1/gcc/config/aarch64/aarch64-builtins.c 2013-0 7-17 04:06:21.894684000 -0500586 --- gcc-4.8.1.orig/gcc/config/aarch64/aarch64-builtins.c 2013-02-28 17:19:33.000000000 +0000 587 +++ gcc-4.8.1/gcc/config/aarch64/aarch64-builtins.c 2013-09-13 19:01:42.899865659 +0000 552 588 @@ -1154,6 +1154,7 @@ 553 589 return aarch64_simd_expand_args (target, icode, 1, exp, … … 558 594 return aarch64_simd_expand_args (target, icode, 0, exp, 559 595 SIMD_ARG_COPY_TO_REG, 560 diff -Naur gcc-4.8.1.orig/gcc/config/aarch64/aarch64.c gcc-4.8.1/gcc/config/aarch64/aarch64.c561 --- gcc-4.8.1.orig/gcc/config/aarch64/aarch64.c 2013-05-02 12:00:00.000000000 -0500562 +++ gcc-4.8.1/gcc/config/aarch64/aarch64.c 2013-06-03 10:33:09.355099000 -0500563 @@ -3373,7 +3373,7 @@564 output_operand_lossage ("invalid operand for '%%%c'", code);565 return;566 }567 - asm_fprintf (f, "0x%x", UINTVAL (x));568 + asm_fprintf (f, "0x%wx", UINTVAL (x));569 break;570 571 case 'w':572 596 diff -Naur gcc-4.8.1.orig/gcc/config/aarch64/aarch64-linux.h gcc-4.8.1/gcc/config/aarch64/aarch64-linux.h 573 --- gcc-4.8.1.orig/gcc/config/aarch64/aarch64-linux.h 2013-01-10 14:38:27.000000000 -0600574 +++ gcc-4.8.1/gcc/config/aarch64/aarch64-linux.h 2013-0 8-13 08:22:18.234270000 -0500597 --- gcc-4.8.1.orig/gcc/config/aarch64/aarch64-linux.h 2013-01-10 20:38:27.000000000 +0000 598 +++ gcc-4.8.1/gcc/config/aarch64/aarch64-linux.h 2013-09-13 19:01:42.903198984 +0000 575 599 @@ -23,6 +23,8 @@ 576 600 … … 582 606 %{static:-Bstatic} \ 583 607 %{shared:-shared} \ 584 diff -Naur gcc-4.8.1.orig/gcc/config/aarch64/aarch64.md gcc-4.8.1/gcc/config/aarch64/aarch64.md585 --- gcc-4.8.1.orig/gcc/config/aarch64/aarch64.md 2013-04-25 12:00:44.000000000 -0500586 +++ gcc-4.8.1/gcc/config/aarch64/aarch64.md 2013-06-07 06:00:38.802083000 -0500587 @@ -834,7 +834,8 @@588 movi\\t%d0, %1"589 [(set_attr "v8type" "move,move,move,alu,load1,store1,adr,adr,fmov,fmov,fmov,fmov")590 (set_attr "mode" "DI")591 - (set_attr "fp" "*,*,*,*,*,*,*,*,yes,yes,yes,yes")]592 + (set_attr "fp" "*,*,*,*,*,*,*,*,yes,yes,yes,*")593 + (set_attr "simd" "*,*,*,*,*,*,*,*,*,*,*,yes")]594 )595 596 (define_insn "insv_imm<mode>"597 608 diff -Naur gcc-4.8.1.orig/gcc/config/aarch64/aarch64-simd-builtins.def gcc-4.8.1/gcc/config/aarch64/aarch64-simd-builtins.def 598 --- gcc-4.8.1.orig/gcc/config/aarch64/aarch64-simd-builtins.def 2013-02-22 1 0:39:45.000000000 -0600599 +++ gcc-4.8.1/gcc/config/aarch64/aarch64-simd-builtins.def 2013-0 7-17 04:06:21.894684000 -0500609 --- gcc-4.8.1.orig/gcc/config/aarch64/aarch64-simd-builtins.def 2013-02-22 16:39:45.000000000 +0000 610 +++ gcc-4.8.1/gcc/config/aarch64/aarch64-simd-builtins.def 2013-09-13 19:01:42.906532308 +0000 600 611 @@ -256,3 +256,10 @@ 601 612 BUILTIN_VALL (BINOP, uzp2) … … 610 621 + 611 622 diff -Naur gcc-4.8.1.orig/gcc/config/aarch64/aarch64-simd.md gcc-4.8.1/gcc/config/aarch64/aarch64-simd.md 612 --- gcc-4.8.1.orig/gcc/config/aarch64/aarch64-simd.md 2013-04-11 09:14:56.000000000 -0500613 +++ gcc-4.8.1/gcc/config/aarch64/aarch64-simd.md 2013-0 7-17 04:06:21.894684000 -0500623 --- gcc-4.8.1.orig/gcc/config/aarch64/aarch64-simd.md 2013-04-11 14:14:56.000000000 +0000 624 +++ gcc-4.8.1/gcc/config/aarch64/aarch64-simd.md 2013-09-13 19:01:42.906532308 +0000 614 625 @@ -3457,6 +3457,17 @@ 615 626 DONE; … … 648 659 ;; opaque integer modes. 649 660 661 diff -Naur gcc-4.8.1.orig/gcc/config/aarch64/aarch64.c gcc-4.8.1/gcc/config/aarch64/aarch64.c 662 --- gcc-4.8.1.orig/gcc/config/aarch64/aarch64.c 2013-05-02 17:00:00.000000000 +0000 663 +++ gcc-4.8.1/gcc/config/aarch64/aarch64.c 2013-09-13 19:01:42.903198984 +0000 664 @@ -3373,7 +3373,7 @@ 665 output_operand_lossage ("invalid operand for '%%%c'", code); 666 return; 667 } 668 - asm_fprintf (f, "0x%x", UINTVAL (x)); 669 + asm_fprintf (f, "0x%wx", UINTVAL (x)); 670 break; 671 672 case 'w': 673 diff -Naur gcc-4.8.1.orig/gcc/config/aarch64/aarch64.md gcc-4.8.1/gcc/config/aarch64/aarch64.md 674 --- gcc-4.8.1.orig/gcc/config/aarch64/aarch64.md 2013-04-25 17:00:44.000000000 +0000 675 +++ gcc-4.8.1/gcc/config/aarch64/aarch64.md 2013-09-13 19:01:42.906532308 +0000 676 @@ -834,7 +834,8 @@ 677 movi\\t%d0, %1" 678 [(set_attr "v8type" "move,move,move,alu,load1,store1,adr,adr,fmov,fmov,fmov,fmov") 679 (set_attr "mode" "DI") 680 - (set_attr "fp" "*,*,*,*,*,*,*,*,yes,yes,yes,yes")] 681 + (set_attr "fp" "*,*,*,*,*,*,*,*,yes,yes,yes,*") 682 + (set_attr "simd" "*,*,*,*,*,*,*,*,*,*,*,yes")] 683 ) 684 685 (define_insn "insv_imm<mode>" 650 686 diff -Naur gcc-4.8.1.orig/gcc/config/aarch64/arm_neon.h gcc-4.8.1/gcc/config/aarch64/arm_neon.h 651 --- gcc-4.8.1.orig/gcc/config/aarch64/arm_neon.h 2013-04-24 1 0:47:21.000000000 -0500652 +++ gcc-4.8.1/gcc/config/aarch64/arm_neon.h 2013-0 7-17 04:06:21.894684000 -0500687 --- gcc-4.8.1.orig/gcc/config/aarch64/arm_neon.h 2013-04-24 15:47:21.000000000 +0000 688 +++ gcc-4.8.1/gcc/config/aarch64/arm_neon.h 2013-09-13 19:01:42.916532282 +0000 653 689 @@ -8518,28 +8518,6 @@ 654 690 return result; … … 1512 1548 __extension__ static __inline void 1513 1549 diff -Naur gcc-4.8.1.orig/gcc/config/alpha/alpha.c gcc-4.8.1/gcc/config/alpha/alpha.c 1514 --- gcc-4.8.1.orig/gcc/config/alpha/alpha.c 2013-01-10 14:38:27.000000000 -06001515 +++ gcc-4.8.1/gcc/config/alpha/alpha.c 2013-0 6-10 13:36:16.739030000 -05001550 --- gcc-4.8.1.orig/gcc/config/alpha/alpha.c 2013-01-10 20:38:27.000000000 +0000 1551 +++ gcc-4.8.1/gcc/config/alpha/alpha.c 2013-09-13 19:01:42.919865606 +0000 1516 1552 @@ -2700,12 +2700,12 @@ 1517 1553 break; … … 1550 1586 return out; 1551 1587 diff -Naur gcc-4.8.1.orig/gcc/config/alpha/alpha.md gcc-4.8.1/gcc/config/alpha/alpha.md 1552 --- gcc-4.8.1.orig/gcc/config/alpha/alpha.md 2013-02-01 1 0:34:28.000000000 -06001553 +++ gcc-4.8.1/gcc/config/alpha/alpha.md 2013-0 6-07 01:26:42.097053000 -05001588 --- gcc-4.8.1.orig/gcc/config/alpha/alpha.md 2013-02-01 16:34:28.000000000 +0000 1589 +++ gcc-4.8.1/gcc/config/alpha/alpha.md 2013-09-13 19:01:42.923198931 +0000 1554 1590 @@ -23,6 +23,7 @@ 1555 1591 ;; Uses of UNSPEC in this file: … … 1561 1597 UNSPEC_INSXH 1562 1598 diff -Naur gcc-4.8.1.orig/gcc/config/arm/arm.c gcc-4.8.1/gcc/config/arm/arm.c 1563 --- gcc-4.8.1.orig/gcc/config/arm/arm.c 2013-05-24 1 0:15:44.000000000 -05001564 +++ gcc-4.8.1/gcc/config/arm/arm.c 2013-0 8-21 10:57:02.753791000 -05001599 --- gcc-4.8.1.orig/gcc/config/arm/arm.c 2013-05-24 15:15:44.000000000 +0000 1600 +++ gcc-4.8.1/gcc/config/arm/arm.c 2013-09-13 19:01:42.933198905 +0000 1565 1601 @@ -4459,7 +4459,9 @@ 1566 1602 if (((pcum->aapcs_vfp_regs_free >> regno) & mask) == mask) … … 1645 1681 1646 1682 diff -Naur gcc-4.8.1.orig/gcc/config/arm/neon.md gcc-4.8.1/gcc/config/arm/neon.md 1647 --- gcc-4.8.1.orig/gcc/config/arm/neon.md 2013-04-04 09:34:01.000000000 -05001648 +++ gcc-4.8.1/gcc/config/arm/neon.md 2013-0 8-09 01:59:01.329587000 -05001683 --- gcc-4.8.1.orig/gcc/config/arm/neon.md 2013-04-04 14:34:01.000000000 +0000 1684 +++ gcc-4.8.1/gcc/config/arm/neon.md 2013-09-13 19:01:42.936532229 +0000 1649 1685 @@ -244,7 +244,7 @@ 1650 1686 [(set (match_operand:VDQX 0 "neon_struct_or_register_operand") … … 1749 1785 if (!inverse) 1750 1786 emit_insn (base_comparison (mask, operands[4], operands[5], magic_rtx)); 1751 diff -Naur gcc-4.8.1.orig/gcc/config/avr/avr.c gcc-4.8.1/gcc/config/avr/avr.c1752 --- gcc-4.8.1.orig/gcc/config/avr/avr.c 2013-03-12 06:42:26.000000000 -05001753 +++ gcc-4.8.1/gcc/config/avr/avr.c 2013-07-19 06:15:26.382992000 -05001754 @@ -584,7 +584,12 @@1755 {1756 tree args = TYPE_ARG_TYPES (TREE_TYPE (decl));1757 tree ret = TREE_TYPE (TREE_TYPE (decl));1758 - const char *name = IDENTIFIER_POINTER (DECL_NAME (decl));1759 + const char *name;1760 +1761 + name = DECL_ASSEMBLER_NAME_SET_P (decl)1762 + /* Remove the leading '*' added in set_user_assembler_name. */1763 + ? 1 + IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl))1764 + : IDENTIFIER_POINTER (DECL_NAME (decl));1765 1766 /* Silently ignore 'signal' if 'interrupt' is present. AVR-LibC startet1767 using this when it switched from SIGNAL and INTERRUPT to ISR. */1768 @@ -1112,7 +1117,7 @@1769 leaf function and thus X has already been saved. */1770 1771 int irq_state = -1;1772 - HOST_WIDE_INT size_cfa = size;1773 + HOST_WIDE_INT size_cfa = size, neg_size;1774 rtx fp_plus_insns, fp, my_fp;1775 1776 gcc_assert (frame_pointer_needed1777 @@ -1151,6 +1156,7 @@1778 }1779 1780 size = trunc_int_for_mode (size, GET_MODE (my_fp));1781 + neg_size = trunc_int_for_mode (-size, GET_MODE (my_fp));1782 1783 /************ Method 1: Adjust frame pointer ************/1784 1785 @@ -1171,7 +1177,8 @@1786 }1787 1788 insn = emit_move_insn (my_fp, plus_constant (GET_MODE (my_fp),1789 - my_fp, -size));1790 + my_fp, neg_size));1791 +1792 if (frame_pointer_needed)1793 {1794 RTX_FRAME_RELATED_P (insn) = 1;1795 @@ -6225,11 +6232,14 @@1796 the subtrahend in the original insn, provided it is a compile time constant.1797 In all other cases, SIGN is 0.1798 1799 - Return "". */1800 + If OUT_LABEL is true, print the final 0: label which is needed for1801 + saturated addition / subtraction. The only case where OUT_LABEL = false1802 + is useful is for saturated addition / subtraction performed during1803 + fixed-point rounding, cf. `avr_out_round'. */1804 1805 static void1806 avr_out_plus_1 (rtx *xop, int *plen, enum rtx_code code, int *pcc,1807 - enum rtx_code code_sat = UNKNOWN, int sign = 0)1808 + enum rtx_code code_sat, int sign, bool out_label)1809 {1810 /* MODE of the operation. */1811 enum machine_mode mode = GET_MODE (xop[0]);1812 @@ -6668,7 +6678,8 @@1813 "mov %r0+5,%0", xop, plen, 4);1814 }1815 1816 - avr_asm_len ("0:", op, plen, 0);1817 + if (out_label)1818 + avr_asm_len ("0:", op, plen, 0);1819 }1820 1821 1822 @@ -6706,8 +6717,8 @@1823 1824 /* Prepare operands of addition/subtraction to be used with avr_out_plus_1.1825 1826 - INSN is a single_set insn with a binary operation as SET_SRC that is1827 - one of: PLUS, SS_PLUS, US_PLUS, MINUS, SS_MINUS, US_MINUS.1828 + INSN is a single_set insn or an insn pattern with a binary operation as1829 + SET_SRC that is one of: PLUS, SS_PLUS, US_PLUS, MINUS, SS_MINUS, US_MINUS.1830 1831 XOP are the operands of INSN. In the case of 64-bit operations with1832 constant XOP[] has just one element: The summand/subtrahend in XOP[0].1833 @@ -6722,19 +6733,22 @@1834 1835 PLEN and PCC default to NULL.1836 1837 + OUT_LABEL defaults to TRUE. For a description, see AVR_OUT_PLUS_1.1838 +1839 Return "" */1840 1841 const char*1842 -avr_out_plus (rtx insn, rtx *xop, int *plen, int *pcc)1843 +avr_out_plus (rtx insn, rtx *xop, int *plen, int *pcc, bool out_label)1844 {1845 int cc_plus, cc_minus, cc_dummy;1846 int len_plus, len_minus;1847 rtx op[4];1848 - rtx xdest = SET_DEST (single_set (insn));1849 + rtx xpattern = INSN_P (insn) ? single_set (insn) : insn;1850 + rtx xdest = SET_DEST (xpattern);1851 enum machine_mode mode = GET_MODE (xdest);1852 enum machine_mode imode = int_mode_for_mode (mode);1853 int n_bytes = GET_MODE_SIZE (mode);1854 - enum rtx_code code_sat = GET_CODE (SET_SRC (single_set (insn)));1855 + enum rtx_code code_sat = GET_CODE (SET_SRC (xpattern));1856 enum rtx_code code1857 = (PLUS == code_sat || SS_PLUS == code_sat || US_PLUS == code_sat1858 ? PLUS : MINUS);1859 @@ -6749,7 +6763,7 @@1860 1861 if (n_bytes <= 4 && REG_P (xop[2]))1862 {1863 - avr_out_plus_1 (xop, plen, code, pcc, code_sat);1864 + avr_out_plus_1 (xop, plen, code, pcc, code_sat, 0, out_label);1865 return "";1866 }1867 1868 @@ -6776,7 +6790,8 @@1869 /* Saturations and 64-bit operations don't have a clobber operand.1870 For the other cases, the caller will provide a proper XOP[3]. */1871 1872 - op[3] = PARALLEL == GET_CODE (PATTERN (insn)) ? xop[3] : NULL_RTX;1873 + xpattern = INSN_P (insn) ? PATTERN (insn) : insn;1874 + op[3] = PARALLEL == GET_CODE (xpattern) ? xop[3] : NULL_RTX;1875 1876 /* Saturation will need the sign of the original operand. */1877 1878 @@ -6791,8 +6806,8 @@1879 1880 /* Work out the shortest sequence. */1881 1882 - avr_out_plus_1 (op, &len_minus, MINUS, &cc_plus, code_sat, sign);1883 - avr_out_plus_1 (op, &len_plus, PLUS, &cc_minus, code_sat, sign);1884 + avr_out_plus_1 (op, &len_minus, MINUS, &cc_plus, code_sat, sign, out_label);1885 + avr_out_plus_1 (op, &len_plus, PLUS, &cc_minus, code_sat, sign, out_label);1886 1887 if (plen)1888 {1889 @@ -6800,9 +6815,9 @@1890 *pcc = (len_minus <= len_plus) ? cc_minus : cc_plus;1891 }1892 else if (len_minus <= len_plus)1893 - avr_out_plus_1 (op, NULL, MINUS, pcc, code_sat, sign);1894 + avr_out_plus_1 (op, NULL, MINUS, pcc, code_sat, sign, out_label);1895 else1896 - avr_out_plus_1 (op, NULL, PLUS, pcc, code_sat, sign);1897 + avr_out_plus_1 (op, NULL, PLUS, pcc, code_sat, sign, out_label);1898 1899 return "";1900 }1901 @@ -6816,13 +6831,15 @@1902 and return "". If PLEN == NULL, print assembler instructions to perform the1903 operation; otherwise, set *PLEN to the length of the instruction sequence1904 (in words) printed with PLEN == NULL. XOP[3] is either an 8-bit clobber1905 - register or SCRATCH if no clobber register is needed for the operation. */1906 + register or SCRATCH if no clobber register is needed for the operation.1907 + INSN is an INSN_P or a pattern of an insn. */1908 1909 const char*1910 avr_out_bitop (rtx insn, rtx *xop, int *plen)1911 {1912 /* CODE and MODE of the operation. */1913 - enum rtx_code code = GET_CODE (SET_SRC (single_set (insn)));1914 + rtx xpattern = INSN_P (insn) ? single_set (insn) : insn;1915 + enum rtx_code code = GET_CODE (SET_SRC (xpattern));1916 enum machine_mode mode = GET_MODE (xop[0]);1917 1918 /* Number of bytes to operate on. */1919 @@ -7325,6 +7342,67 @@1920 }1921 1922 1923 +/* Output fixed-point rounding. XOP[0] = XOP[1] is the operand to round.1924 + XOP[2] is the rounding point, a CONST_INT. The function prints the1925 + instruction sequence if PLEN = NULL and computes the length in words1926 + of the sequence if PLEN != NULL. Most of this function deals with1927 + preparing operands for calls to `avr_out_plus' and `avr_out_bitop'. */1928 +1929 +const char*1930 +avr_out_round (rtx insn ATTRIBUTE_UNUSED, rtx *xop, int *plen)1931 +{1932 + enum machine_mode mode = GET_MODE (xop[0]);1933 + enum machine_mode imode = int_mode_for_mode (mode);1934 + // The smallest fractional bit not cleared by the rounding is 2^(-RP).1935 + int fbit = (int) GET_MODE_FBIT (mode);1936 + double_int i_add = double_int_zero.set_bit (fbit-1 - INTVAL (xop[2]));1937 + // Lengths of PLUS and AND parts.1938 + int len_add = 0, *plen_add = plen ? &len_add : NULL;1939 + int len_and = 0, *plen_and = plen ? &len_and : NULL;1940 +1941 + // Add-Saturate 1/2 * 2^(-RP). Don't print the label "0:" when printing1942 + // the saturated addition so that we can emit the "rjmp 1f" before the1943 + // "0:" below.1944 +1945 + rtx xadd = const_fixed_from_double_int (i_add, mode);1946 + rtx xpattern, xsrc, op[4];1947 +1948 + xsrc = SIGNED_FIXED_POINT_MODE_P (mode)1949 + ? gen_rtx_SS_PLUS (mode, xop[1], xadd)1950 + : gen_rtx_US_PLUS (mode, xop[1], xadd);1951 + xpattern = gen_rtx_SET (VOIDmode, xop[0], xsrc);1952 +1953 + op[0] = xop[0];1954 + op[1] = xop[1];1955 + op[2] = xadd;1956 + avr_out_plus (xpattern, op, plen_add, NULL, false /* Don't print "0:" */);1957 +1958 + avr_asm_len ("rjmp 1f" CR_TAB1959 + "0:", NULL, plen_add, 1);1960 +1961 + // Keep all bits from RP and higher: ... 2^(-RP)1962 + // Clear all bits from RP+1 and lower: 2^(-RP-1) ...1963 + // Rounding point ^^^^^^^1964 + // Added above ^^^^^^^^^1965 + rtx xreg = simplify_gen_subreg (imode, xop[0], mode, 0);1966 + rtx xmask = immed_double_int_const (-i_add - i_add, imode);1967 +1968 + xpattern = gen_rtx_SET (VOIDmode, xreg, gen_rtx_AND (imode, xreg, xmask));1969 +1970 + op[0] = xreg;1971 + op[1] = xreg;1972 + op[2] = xmask;1973 + op[3] = gen_rtx_SCRATCH (QImode);1974 + avr_out_bitop (xpattern, op, plen_and);1975 + avr_asm_len ("1:", NULL, plen, 0);1976 +1977 + if (plen)1978 + *plen = len_add + len_and;1979 +1980 + return "";1981 +}1982 +1983 +1984 /* Create RTL split patterns for byte sized rotate expressions. This1985 produces a series of move instructions and considers overlap situations.1986 Overlapping non-HImode operands need a scratch register. */1987 @@ -7533,6 +7611,7 @@1988 1989 case ADJUST_LEN_SFRACT: avr_out_fract (insn, op, true, &len); break;1990 case ADJUST_LEN_UFRACT: avr_out_fract (insn, op, false, &len); break;1991 + case ADJUST_LEN_ROUND: avr_out_round (insn, op, &len); break;1992 1993 case ADJUST_LEN_TSTHI: avr_out_tsthi (insn, op, &len); break;1994 case ADJUST_LEN_TSTPSI: avr_out_tstpsi (insn, op, &len); break;1995 1787 diff -Naur gcc-4.8.1.orig/gcc/config/avr/avr-fixed.md gcc-4.8.1/gcc/config/avr/avr-fixed.md 1996 --- gcc-4.8.1.orig/gcc/config/avr/avr-fixed.md 2013-02-08 04:13:37.000000000 -06001997 +++ gcc-4.8.1/gcc/config/avr/avr-fixed.md 2013-0 7-19 06:15:26.382992000 -05001788 --- gcc-4.8.1.orig/gcc/config/avr/avr-fixed.md 2013-02-08 10:13:37.000000000 +0000 1789 +++ gcc-4.8.1/gcc/config/avr/avr-fixed.md 2013-09-13 19:01:42.939865554 +0000 1998 1790 @@ -447,49 +447,18 @@ 1999 1791 ;; "roundqq3_const" "rounduqq3_const" … … 2057 1849 ;; "*roundqq3.libgcc" "*rounduqq3.libgcc" 2058 1850 diff -Naur gcc-4.8.1.orig/gcc/config/avr/avr-mcus.def gcc-4.8.1/gcc/config/avr/avr-mcus.def 2059 --- gcc-4.8.1.orig/gcc/config/avr/avr-mcus.def 2013-02-28 0 3:03:09.000000000 -06002060 +++ gcc-4.8.1/gcc/config/avr/avr-mcus.def 2013-0 7-10 07:36:36.732157000 -05001851 --- gcc-4.8.1.orig/gcc/config/avr/avr-mcus.def 2013-02-28 09:03:09.000000000 +0000 1852 +++ gcc-4.8.1/gcc/config/avr/avr-mcus.def 2013-09-13 19:01:42.939865554 +0000 2061 1853 @@ -168,7 +168,6 @@ 2062 1854 AVR_MCU ("atmega169a", ARCH_AVR5, "__AVR_ATmega169A__", 0, 0, 0x0100, 1, "m169a") … … 2107 1899 AVR_MCU ("at90usb646", ARCH_AVR5, "__AVR_AT90USB646__", 0, 0, 0x0100, 1, "usb646") 2108 1900 AVR_MCU ("at90usb647", ARCH_AVR5, "__AVR_AT90USB647__", 0, 0, 0x0100, 1, "usb647") 2109 diff -Naur gcc-4.8.1.orig/gcc/config/avr/avr.md gcc-4.8.1/gcc/config/avr/avr.md2110 --- gcc-4.8.1.orig/gcc/config/avr/avr.md 2013-02-08 04:13:37.000000000 -06002111 +++ gcc-4.8.1/gcc/config/avr/avr.md 2013-07-19 06:15:26.382992000 -05002112 @@ -140,7 +140,7 @@2113 "out_bitop, plus, addto_sp,2114 tsthi, tstpsi, tstsi, compare, compare64, call,2115 mov8, mov16, mov24, mov32, reload_in16, reload_in24, reload_in32,2116 - ufract, sfract,2117 + ufract, sfract, round,2118 xload, lpm, movmem,2119 ashlqi, ashrqi, lshrqi,2120 ashlhi, ashrhi, lshrhi,2121 diff -Naur gcc-4.8.1.orig/gcc/config/avr/avr.opt gcc-4.8.1/gcc/config/avr/avr.opt2122 --- gcc-4.8.1.orig/gcc/config/avr/avr.opt 2013-03-12 06:42:26.000000000 -05002123 +++ gcc-4.8.1/gcc/config/avr/avr.opt 2013-07-10 06:20:18.855155000 -05002124 @@ -77,4 +77,4 @@2125 2126 Waddr-space-convert2127 Warning C Report Var(avr_warn_addr_space_convert) Init(0)2128 -Warn if the address space of an address is change.2129 +Warn if the address space of an address is changed.2130 1901 diff -Naur gcc-4.8.1.orig/gcc/config/avr/avr-protos.h gcc-4.8.1/gcc/config/avr/avr-protos.h 2131 --- gcc-4.8.1.orig/gcc/config/avr/avr-protos.h 2013-01-14 09:08:45.000000000 -06002132 +++ gcc-4.8.1/gcc/config/avr/avr-protos.h 2013-0 7-19 06:15:26.382992000 -05001902 --- gcc-4.8.1.orig/gcc/config/avr/avr-protos.h 2013-01-14 15:08:45.000000000 +0000 1903 +++ gcc-4.8.1/gcc/config/avr/avr-protos.h 2013-09-13 19:01:42.943198879 +0000 2133 1904 @@ -86,7 +86,8 @@ 2134 1905 extern void avr_output_addr_vec_elt (FILE *stream, int value); … … 2142 1913 extern const char* avr_out_movmem (rtx, rtx*, int*); 2143 1914 diff -Naur gcc-4.8.1.orig/gcc/config/avr/avr-tables.opt gcc-4.8.1/gcc/config/avr/avr-tables.opt 2144 --- gcc-4.8.1.orig/gcc/config/avr/avr-tables.opt 2013-02-28 0 3:03:09.000000000 -06002145 +++ gcc-4.8.1/gcc/config/avr/avr-tables.opt 2013-0 7-10 07:36:36.732157000 -05001915 --- gcc-4.8.1.orig/gcc/config/avr/avr-tables.opt 2013-02-28 09:03:09.000000000 +0000 1916 +++ gcc-4.8.1/gcc/config/avr/avr-tables.opt 2013-09-13 19:01:42.946532203 +0000 2146 1917 @@ -330,479 +330,440 @@ 2147 1918 Enum(avr_mcu) String(atmega169pa) Value(101) … … 2770 2541 +Enum(avr_mcu) String(attiny28) Value(247) 2771 2542 2543 diff -Naur gcc-4.8.1.orig/gcc/config/avr/avr.c gcc-4.8.1/gcc/config/avr/avr.c 2544 --- gcc-4.8.1.orig/gcc/config/avr/avr.c 2013-03-12 11:42:26.000000000 +0000 2545 +++ gcc-4.8.1/gcc/config/avr/avr.c 2013-09-13 19:01:42.939865554 +0000 2546 @@ -584,7 +584,12 @@ 2547 { 2548 tree args = TYPE_ARG_TYPES (TREE_TYPE (decl)); 2549 tree ret = TREE_TYPE (TREE_TYPE (decl)); 2550 - const char *name = IDENTIFIER_POINTER (DECL_NAME (decl)); 2551 + const char *name; 2552 + 2553 + name = DECL_ASSEMBLER_NAME_SET_P (decl) 2554 + /* Remove the leading '*' added in set_user_assembler_name. */ 2555 + ? 1 + IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)) 2556 + : IDENTIFIER_POINTER (DECL_NAME (decl)); 2557 2558 /* Silently ignore 'signal' if 'interrupt' is present. AVR-LibC startet 2559 using this when it switched from SIGNAL and INTERRUPT to ISR. */ 2560 @@ -1112,7 +1117,7 @@ 2561 leaf function and thus X has already been saved. */ 2562 2563 int irq_state = -1; 2564 - HOST_WIDE_INT size_cfa = size; 2565 + HOST_WIDE_INT size_cfa = size, neg_size; 2566 rtx fp_plus_insns, fp, my_fp; 2567 2568 gcc_assert (frame_pointer_needed 2569 @@ -1151,6 +1156,7 @@ 2570 } 2571 2572 size = trunc_int_for_mode (size, GET_MODE (my_fp)); 2573 + neg_size = trunc_int_for_mode (-size, GET_MODE (my_fp)); 2574 2575 /************ Method 1: Adjust frame pointer ************/ 2576 2577 @@ -1171,7 +1177,8 @@ 2578 } 2579 2580 insn = emit_move_insn (my_fp, plus_constant (GET_MODE (my_fp), 2581 - my_fp, -size)); 2582 + my_fp, neg_size)); 2583 + 2584 if (frame_pointer_needed) 2585 { 2586 RTX_FRAME_RELATED_P (insn) = 1; 2587 @@ -6225,11 +6232,14 @@ 2588 the subtrahend in the original insn, provided it is a compile time constant. 2589 In all other cases, SIGN is 0. 2590 2591 - Return "". */ 2592 + If OUT_LABEL is true, print the final 0: label which is needed for 2593 + saturated addition / subtraction. The only case where OUT_LABEL = false 2594 + is useful is for saturated addition / subtraction performed during 2595 + fixed-point rounding, cf. `avr_out_round'. */ 2596 2597 static void 2598 avr_out_plus_1 (rtx *xop, int *plen, enum rtx_code code, int *pcc, 2599 - enum rtx_code code_sat = UNKNOWN, int sign = 0) 2600 + enum rtx_code code_sat, int sign, bool out_label) 2601 { 2602 /* MODE of the operation. */ 2603 enum machine_mode mode = GET_MODE (xop[0]); 2604 @@ -6668,7 +6678,8 @@ 2605 "mov %r0+5,%0", xop, plen, 4); 2606 } 2607 2608 - avr_asm_len ("0:", op, plen, 0); 2609 + if (out_label) 2610 + avr_asm_len ("0:", op, plen, 0); 2611 } 2612 2613 2614 @@ -6706,8 +6717,8 @@ 2615 2616 /* Prepare operands of addition/subtraction to be used with avr_out_plus_1. 2617 2618 - INSN is a single_set insn with a binary operation as SET_SRC that is 2619 - one of: PLUS, SS_PLUS, US_PLUS, MINUS, SS_MINUS, US_MINUS. 2620 + INSN is a single_set insn or an insn pattern with a binary operation as 2621 + SET_SRC that is one of: PLUS, SS_PLUS, US_PLUS, MINUS, SS_MINUS, US_MINUS. 2622 2623 XOP are the operands of INSN. In the case of 64-bit operations with 2624 constant XOP[] has just one element: The summand/subtrahend in XOP[0]. 2625 @@ -6722,19 +6733,22 @@ 2626 2627 PLEN and PCC default to NULL. 2628 2629 + OUT_LABEL defaults to TRUE. For a description, see AVR_OUT_PLUS_1. 2630 + 2631 Return "" */ 2632 2633 const char* 2634 -avr_out_plus (rtx insn, rtx *xop, int *plen, int *pcc) 2635 +avr_out_plus (rtx insn, rtx *xop, int *plen, int *pcc, bool out_label) 2636 { 2637 int cc_plus, cc_minus, cc_dummy; 2638 int len_plus, len_minus; 2639 rtx op[4]; 2640 - rtx xdest = SET_DEST (single_set (insn)); 2641 + rtx xpattern = INSN_P (insn) ? single_set (insn) : insn; 2642 + rtx xdest = SET_DEST (xpattern); 2643 enum machine_mode mode = GET_MODE (xdest); 2644 enum machine_mode imode = int_mode_for_mode (mode); 2645 int n_bytes = GET_MODE_SIZE (mode); 2646 - enum rtx_code code_sat = GET_CODE (SET_SRC (single_set (insn))); 2647 + enum rtx_code code_sat = GET_CODE (SET_SRC (xpattern)); 2648 enum rtx_code code 2649 = (PLUS == code_sat || SS_PLUS == code_sat || US_PLUS == code_sat 2650 ? PLUS : MINUS); 2651 @@ -6749,7 +6763,7 @@ 2652 2653 if (n_bytes <= 4 && REG_P (xop[2])) 2654 { 2655 - avr_out_plus_1 (xop, plen, code, pcc, code_sat); 2656 + avr_out_plus_1 (xop, plen, code, pcc, code_sat, 0, out_label); 2657 return ""; 2658 } 2659 2660 @@ -6776,7 +6790,8 @@ 2661 /* Saturations and 64-bit operations don't have a clobber operand. 2662 For the other cases, the caller will provide a proper XOP[3]. */ 2663 2664 - op[3] = PARALLEL == GET_CODE (PATTERN (insn)) ? xop[3] : NULL_RTX; 2665 + xpattern = INSN_P (insn) ? PATTERN (insn) : insn; 2666 + op[3] = PARALLEL == GET_CODE (xpattern) ? xop[3] : NULL_RTX; 2667 2668 /* Saturation will need the sign of the original operand. */ 2669 2670 @@ -6791,8 +6806,8 @@ 2671 2672 /* Work out the shortest sequence. */ 2673 2674 - avr_out_plus_1 (op, &len_minus, MINUS, &cc_plus, code_sat, sign); 2675 - avr_out_plus_1 (op, &len_plus, PLUS, &cc_minus, code_sat, sign); 2676 + avr_out_plus_1 (op, &len_minus, MINUS, &cc_plus, code_sat, sign, out_label); 2677 + avr_out_plus_1 (op, &len_plus, PLUS, &cc_minus, code_sat, sign, out_label); 2678 2679 if (plen) 2680 { 2681 @@ -6800,9 +6815,9 @@ 2682 *pcc = (len_minus <= len_plus) ? cc_minus : cc_plus; 2683 } 2684 else if (len_minus <= len_plus) 2685 - avr_out_plus_1 (op, NULL, MINUS, pcc, code_sat, sign); 2686 + avr_out_plus_1 (op, NULL, MINUS, pcc, code_sat, sign, out_label); 2687 else 2688 - avr_out_plus_1 (op, NULL, PLUS, pcc, code_sat, sign); 2689 + avr_out_plus_1 (op, NULL, PLUS, pcc, code_sat, sign, out_label); 2690 2691 return ""; 2692 } 2693 @@ -6816,13 +6831,15 @@ 2694 and return "". If PLEN == NULL, print assembler instructions to perform the 2695 operation; otherwise, set *PLEN to the length of the instruction sequence 2696 (in words) printed with PLEN == NULL. XOP[3] is either an 8-bit clobber 2697 - register or SCRATCH if no clobber register is needed for the operation. */ 2698 + register or SCRATCH if no clobber register is needed for the operation. 2699 + INSN is an INSN_P or a pattern of an insn. */ 2700 2701 const char* 2702 avr_out_bitop (rtx insn, rtx *xop, int *plen) 2703 { 2704 /* CODE and MODE of the operation. */ 2705 - enum rtx_code code = GET_CODE (SET_SRC (single_set (insn))); 2706 + rtx xpattern = INSN_P (insn) ? single_set (insn) : insn; 2707 + enum rtx_code code = GET_CODE (SET_SRC (xpattern)); 2708 enum machine_mode mode = GET_MODE (xop[0]); 2709 2710 /* Number of bytes to operate on. */ 2711 @@ -7325,6 +7342,67 @@ 2712 } 2713 2714 2715 +/* Output fixed-point rounding. XOP[0] = XOP[1] is the operand to round. 2716 + XOP[2] is the rounding point, a CONST_INT. The function prints the 2717 + instruction sequence if PLEN = NULL and computes the length in words 2718 + of the sequence if PLEN != NULL. Most of this function deals with 2719 + preparing operands for calls to `avr_out_plus' and `avr_out_bitop'. */ 2720 + 2721 +const char* 2722 +avr_out_round (rtx insn ATTRIBUTE_UNUSED, rtx *xop, int *plen) 2723 +{ 2724 + enum machine_mode mode = GET_MODE (xop[0]); 2725 + enum machine_mode imode = int_mode_for_mode (mode); 2726 + // The smallest fractional bit not cleared by the rounding is 2^(-RP). 2727 + int fbit = (int) GET_MODE_FBIT (mode); 2728 + double_int i_add = double_int_zero.set_bit (fbit-1 - INTVAL (xop[2])); 2729 + // Lengths of PLUS and AND parts. 2730 + int len_add = 0, *plen_add = plen ? &len_add : NULL; 2731 + int len_and = 0, *plen_and = plen ? &len_and : NULL; 2732 + 2733 + // Add-Saturate 1/2 * 2^(-RP). Don't print the label "0:" when printing 2734 + // the saturated addition so that we can emit the "rjmp 1f" before the 2735 + // "0:" below. 2736 + 2737 + rtx xadd = const_fixed_from_double_int (i_add, mode); 2738 + rtx xpattern, xsrc, op[4]; 2739 + 2740 + xsrc = SIGNED_FIXED_POINT_MODE_P (mode) 2741 + ? gen_rtx_SS_PLUS (mode, xop[1], xadd) 2742 + : gen_rtx_US_PLUS (mode, xop[1], xadd); 2743 + xpattern = gen_rtx_SET (VOIDmode, xop[0], xsrc); 2744 + 2745 + op[0] = xop[0]; 2746 + op[1] = xop[1]; 2747 + op[2] = xadd; 2748 + avr_out_plus (xpattern, op, plen_add, NULL, false /* Don't print "0:" */); 2749 + 2750 + avr_asm_len ("rjmp 1f" CR_TAB 2751 + "0:", NULL, plen_add, 1); 2752 + 2753 + // Keep all bits from RP and higher: ... 2^(-RP) 2754 + // Clear all bits from RP+1 and lower: 2^(-RP-1) ... 2755 + // Rounding point ^^^^^^^ 2756 + // Added above ^^^^^^^^^ 2757 + rtx xreg = simplify_gen_subreg (imode, xop[0], mode, 0); 2758 + rtx xmask = immed_double_int_const (-i_add - i_add, imode); 2759 + 2760 + xpattern = gen_rtx_SET (VOIDmode, xreg, gen_rtx_AND (imode, xreg, xmask)); 2761 + 2762 + op[0] = xreg; 2763 + op[1] = xreg; 2764 + op[2] = xmask; 2765 + op[3] = gen_rtx_SCRATCH (QImode); 2766 + avr_out_bitop (xpattern, op, plen_and); 2767 + avr_asm_len ("1:", NULL, plen, 0); 2768 + 2769 + if (plen) 2770 + *plen = len_add + len_and; 2771 + 2772 + return ""; 2773 +} 2774 + 2775 + 2776 /* Create RTL split patterns for byte sized rotate expressions. This 2777 produces a series of move instructions and considers overlap situations. 2778 Overlapping non-HImode operands need a scratch register. */ 2779 @@ -7533,6 +7611,7 @@ 2780 2781 case ADJUST_LEN_SFRACT: avr_out_fract (insn, op, true, &len); break; 2782 case ADJUST_LEN_UFRACT: avr_out_fract (insn, op, false, &len); break; 2783 + case ADJUST_LEN_ROUND: avr_out_round (insn, op, &len); break; 2784 2785 case ADJUST_LEN_TSTHI: avr_out_tsthi (insn, op, &len); break; 2786 case ADJUST_LEN_TSTPSI: avr_out_tstpsi (insn, op, &len); break; 2787 diff -Naur gcc-4.8.1.orig/gcc/config/avr/avr.md gcc-4.8.1/gcc/config/avr/avr.md 2788 --- gcc-4.8.1.orig/gcc/config/avr/avr.md 2013-02-08 10:13:37.000000000 +0000 2789 +++ gcc-4.8.1/gcc/config/avr/avr.md 2013-09-13 19:01:42.943198879 +0000 2790 @@ -140,7 +140,7 @@ 2791 "out_bitop, plus, addto_sp, 2792 tsthi, tstpsi, tstsi, compare, compare64, call, 2793 mov8, mov16, mov24, mov32, reload_in16, reload_in24, reload_in32, 2794 - ufract, sfract, 2795 + ufract, sfract, round, 2796 xload, lpm, movmem, 2797 ashlqi, ashrqi, lshrqi, 2798 ashlhi, ashrhi, lshrhi, 2799 diff -Naur gcc-4.8.1.orig/gcc/config/avr/avr.opt gcc-4.8.1/gcc/config/avr/avr.opt 2800 --- gcc-4.8.1.orig/gcc/config/avr/avr.opt 2013-03-12 11:42:26.000000000 +0000 2801 +++ gcc-4.8.1/gcc/config/avr/avr.opt 2013-09-13 19:01:42.943198879 +0000 2802 @@ -77,4 +77,4 @@ 2803 2804 Waddr-space-convert 2805 Warning C Report Var(avr_warn_addr_space_convert) Init(0) 2806 -Warn if the address space of an address is change. 2807 +Warn if the address space of an address is changed. 2772 2808 diff -Naur gcc-4.8.1.orig/gcc/config/avr/gen-avr-mmcu-texi.c gcc-4.8.1/gcc/config/avr/gen-avr-mmcu-texi.c 2773 --- gcc-4.8.1.orig/gcc/config/avr/gen-avr-mmcu-texi.c 2013-01-14 1 2:09:34.000000000 -06002774 +++ gcc-4.8.1/gcc/config/avr/gen-avr-mmcu-texi.c 2013-0 7-10 07:36:36.732157000 -05002809 --- gcc-4.8.1.orig/gcc/config/avr/gen-avr-mmcu-texi.c 2013-01-14 18:09:34.000000000 +0000 2810 +++ gcc-4.8.1/gcc/config/avr/gen-avr-mmcu-texi.c 2013-09-13 19:01:42.946532203 +0000 2775 2811 @@ -68,6 +68,7 @@ 2776 2812 static void … … 2804 2840 int main (void) 2805 2841 diff -Naur gcc-4.8.1.orig/gcc/config/avr/t-multilib gcc-4.8.1/gcc/config/avr/t-multilib 2806 --- gcc-4.8.1.orig/gcc/config/avr/t-multilib 2013-02-28 0 3:03:09.000000000 -06002807 +++ gcc-4.8.1/gcc/config/avr/t-multilib 2013-0 7-10 07:36:36.732157000 -05002842 --- gcc-4.8.1.orig/gcc/config/avr/t-multilib 2013-02-28 09:03:09.000000000 +0000 2843 +++ gcc-4.8.1/gcc/config/avr/t-multilib 2013-09-13 19:01:42.946532203 +0000 2808 2844 @@ -135,7 +135,6 @@ 2809 2845 mmcu?avr5=mmcu?atmega169a \ … … 2854 2890 mmcu?avr5=mmcu?at90usb646 \ 2855 2891 mmcu?avr5=mmcu?at90usb647 \ 2892 diff -Naur gcc-4.8.1.orig/gcc/config/darwin-protos.h gcc-4.8.1/gcc/config/darwin-protos.h 2893 --- gcc-4.8.1.orig/gcc/config/darwin-protos.h 2013-01-10 20:38:27.000000000 +0000 2894 +++ gcc-4.8.1/gcc/config/darwin-protos.h 2013-09-13 19:01:42.949865528 +0000 2895 @@ -25,6 +25,7 @@ 2896 extern void machopic_output_function_base_name (FILE *); 2897 extern const char *machopic_indirection_name (rtx, bool); 2898 extern const char *machopic_mcount_stub_name (void); 2899 +extern bool machopic_should_output_picbase_label (void); 2900 2901 #ifdef RTX_CODE 2902 2856 2903 diff -Naur gcc-4.8.1.orig/gcc/config/darwin.c gcc-4.8.1/gcc/config/darwin.c 2857 --- gcc-4.8.1.orig/gcc/config/darwin.c 2013-02-11 16:36:23.000000000 -06002858 +++ gcc-4.8.1/gcc/config/darwin.c 2013-0 7-22 03:57:41.322517000 -05002904 --- gcc-4.8.1.orig/gcc/config/darwin.c 2013-02-11 22:36:23.000000000 +0000 2905 +++ gcc-4.8.1/gcc/config/darwin.c 2013-09-13 19:01:42.946532203 +0000 2859 2906 @@ -369,14 +369,13 @@ 2860 2907 … … 2905 2952 2906 2953 /* The suffix attached to non-lazy pointer symbols. */ 2907 diff -Naur gcc-4.8.1.orig/gcc/config/darwin-protos.h gcc-4.8.1/gcc/config/darwin-protos.h2908 --- gcc-4.8.1.orig/gcc/config/darwin-protos.h 2013-01-10 14:38:27.000000000 -06002909 +++ gcc-4.8.1/gcc/config/darwin-protos.h 2013-07-22 03:57:41.322517000 -05002910 @@ -25,6 +25,7 @@2911 extern void machopic_output_function_base_name (FILE *);2912 extern const char *machopic_indirection_name (rtx, bool);2913 extern const char *machopic_mcount_stub_name (void);2914 +extern bool machopic_should_output_picbase_label (void);2915 2916 #ifdef RTX_CODE2917 2918 2954 diff -Naur gcc-4.8.1.orig/gcc/config/i386/bmiintrin.h gcc-4.8.1/gcc/config/i386/bmiintrin.h 2919 --- gcc-4.8.1.orig/gcc/config/i386/bmiintrin.h 2013-01-10 14:38:27.000000000 -06002920 +++ gcc-4.8.1/gcc/config/i386/bmiintrin.h 2013-0 7-19 02:38:07.333150000 -05002955 --- gcc-4.8.1.orig/gcc/config/i386/bmiintrin.h 2013-01-10 20:38:27.000000000 +0000 2956 +++ gcc-4.8.1/gcc/config/i386/bmiintrin.h 2013-09-13 19:01:42.949865528 +0000 2921 2957 @@ -38,7 +38,6 @@ 2922 2958 return __builtin_ctzs (__X); … … 3047 3083 3048 3084 diff -Naur gcc-4.8.1.orig/gcc/config/i386/driver-i386.c gcc-4.8.1/gcc/config/i386/driver-i386.c 3049 --- gcc-4.8.1.orig/gcc/config/i386/driver-i386.c 2013-05-17 1 0:06:36.000000000 -05003050 +++ gcc-4.8.1/gcc/config/i386/driver-i386.c 2013-0 8-28 03:25:13.429539000 -05003085 --- gcc-4.8.1.orig/gcc/config/i386/driver-i386.c 2013-05-17 15:06:36.000000000 +0000 3086 +++ gcc-4.8.1/gcc/config/i386/driver-i386.c 2013-09-13 19:01:42.949865528 +0000 3051 3087 @@ -520,8 +520,7 @@ 3052 3088 if (vendor == signature_AMD_ebx … … 3116 3152 else if (has_sse4_2) 3117 3153 diff -Naur gcc-4.8.1.orig/gcc/config/i386/i386.c gcc-4.8.1/gcc/config/i386/i386.c 3118 --- gcc-4.8.1.orig/gcc/config/i386/i386.c 2013-05-17 1 0:06:36.000000000 -05003119 +++ gcc-4.8.1/gcc/config/i386/i386.c 2013-0 8-23 05:01:34.440607000 -05003154 --- gcc-4.8.1.orig/gcc/config/i386/i386.c 2013-05-17 15:06:36.000000000 +0000 3155 +++ gcc-4.8.1/gcc/config/i386/i386.c 2013-09-13 19:01:42.963198826 +0000 3120 3156 @@ -2438,11 +2438,11 @@ 3121 3157 {&generic32_cost, 16, 7, 16, 7, 16}, … … 3426 3462 # define TARGET_MERGE_DECL_ATTRIBUTES merge_dllimport_decl_attributes 3427 3463 diff -Naur gcc-4.8.1.orig/gcc/config/i386/i386.md gcc-4.8.1/gcc/config/i386/i386.md 3428 --- gcc-4.8.1.orig/gcc/config/i386/i386.md 2013-05-22 07:16:41.000000000 -05003429 +++ gcc-4.8.1/gcc/config/i386/i386.md 2013-0 8-13 07:45:06.811510000 -05003464 --- gcc-4.8.1.orig/gcc/config/i386/i386.md 2013-05-22 12:16:41.000000000 +0000 3465 +++ gcc-4.8.1/gcc/config/i386/i386.md 2013-09-13 19:01:42.969865475 +0000 3430 3466 @@ -222,6 +222,8 @@ 3431 3467 UNSPECV_XEND … … 3536 3572 || GET_CODE (operands[3]) == MINUS) 3537 3573 diff -Naur gcc-4.8.1.orig/gcc/config/i386/predicates.md gcc-4.8.1/gcc/config/i386/predicates.md 3538 --- gcc-4.8.1.orig/gcc/config/i386/predicates.md 2013-01-10 14:38:27.000000000 -06003539 +++ gcc-4.8.1/gcc/config/i386/predicates.md 2013-0 7-03 15:24:19.796040000 -05003574 --- gcc-4.8.1.orig/gcc/config/i386/predicates.md 2013-01-10 20:38:27.000000000 +0000 3575 +++ gcc-4.8.1/gcc/config/i386/predicates.md 2013-09-13 19:01:42.969865475 +0000 3540 3576 @@ -835,19 +835,28 @@ 3541 3577 return false; … … 3580 3616 return true; 3581 3617 diff -Naur gcc-4.8.1.orig/gcc/config/i386/sse.md gcc-4.8.1/gcc/config/i386/sse.md 3582 --- gcc-4.8.1.orig/gcc/config/i386/sse.md 2013-04-29 17:16:04.000000000 -05003583 +++ gcc-4.8.1/gcc/config/i386/sse.md 2013-0 8-14 09:09:59.468272000 -05003618 --- gcc-4.8.1.orig/gcc/config/i386/sse.md 2013-04-29 22:16:04.000000000 +0000 3619 +++ gcc-4.8.1/gcc/config/i386/sse.md 2013-09-13 19:01:42.976532125 +0000 3584 3620 @@ -3603,7 +3603,7 @@ 3585 3621 (vec_select:V4SF … … 3643 3679 ;; 3644 3680 diff -Naur gcc-4.8.1.orig/gcc/config/i386/x86-64.h gcc-4.8.1/gcc/config/i386/x86-64.h 3645 --- gcc-4.8.1.orig/gcc/config/i386/x86-64.h 2013-01-10 14:38:27.000000000 -06003646 +++ gcc-4.8.1/gcc/config/i386/x86-64.h 2013-0 8-23 05:01:34.440607000 -05003681 --- gcc-4.8.1.orig/gcc/config/i386/x86-64.h 2013-01-10 20:38:27.000000000 +0000 3682 +++ gcc-4.8.1/gcc/config/i386/x86-64.h 2013-09-13 19:01:42.976532125 +0000 3647 3683 @@ -103,3 +103,6 @@ 3648 3684 … … 3653 3689 +#define TARGET_SECTION_TYPE_FLAGS x86_64_elf_section_type_flags 3654 3690 diff -Naur gcc-4.8.1.orig/gcc/config/rs6000/default64.h gcc-4.8.1/gcc/config/rs6000/default64.h 3655 --- gcc-4.8.1.orig/gcc/config/rs6000/default64.h 2013-01-10 14:38:27.000000000 -06003656 +++ gcc-4.8.1/gcc/config/rs6000/default64.h 2013-0 6-18 20:18:38.348158000 -05003691 --- gcc-4.8.1.orig/gcc/config/rs6000/default64.h 2013-01-10 20:38:27.000000000 +0000 3692 +++ gcc-4.8.1/gcc/config/rs6000/default64.h 2013-09-13 19:01:42.976532125 +0000 3657 3693 @@ -18,5 +18,10 @@ 3658 3694 along with GCC; see the file COPYING3. If not see … … 3667 3703 +#endif 3668 3704 diff -Naur gcc-4.8.1.orig/gcc/config/rs6000/dfp.md gcc-4.8.1/gcc/config/rs6000/dfp.md 3669 --- gcc-4.8.1.orig/gcc/config/rs6000/dfp.md 2013-01-10 14:38:27.000000000 -06003670 +++ gcc-4.8.1/gcc/config/rs6000/dfp.md 2013-0 8-19 12:55:50.687548000 -05003705 --- gcc-4.8.1.orig/gcc/config/rs6000/dfp.md 2013-01-10 20:38:27.000000000 +0000 3706 +++ gcc-4.8.1/gcc/config/rs6000/dfp.md 2013-09-13 19:01:42.976532125 +0000 3671 3707 @@ -394,11 +394,14 @@ 3672 3708 "") … … 3688 3724 (define_expand "abstd2" 3689 3725 [(set (match_operand:TD 0 "gpc_reg_operand" "") 3726 diff -Naur gcc-4.8.1.orig/gcc/config/rs6000/linux.h gcc-4.8.1/gcc/config/rs6000/linux.h 3727 --- gcc-4.8.1.orig/gcc/config/rs6000/linux.h 2013-01-10 20:38:27.000000000 +0000 3728 +++ gcc-4.8.1/gcc/config/rs6000/linux.h 2013-09-13 19:01:42.979865449 +0000 3729 @@ -79,6 +79,24 @@ 3730 #undef LINK_OS_DEFAULT_SPEC 3731 #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" 3732 3733 +#undef DEFAULT_ASM_ENDIAN 3734 +#if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN) 3735 +#define DEFAULT_ASM_ENDIAN " -mlittle" 3736 +#define LINK_OS_LINUX_EMUL ENDIAN_SELECT(" -m elf32ppclinux", \ 3737 + " -m elf32lppclinux", \ 3738 + " -m elf32lppclinux") 3739 +#else 3740 +#define DEFAULT_ASM_ENDIAN " -mbig" 3741 +#define LINK_OS_LINUX_EMUL ENDIAN_SELECT(" -m elf32ppclinux", \ 3742 + " -m elf32lppclinux", \ 3743 + " -m elf32ppclinux") 3744 +#endif 3745 + 3746 +#undef LINK_OS_LINUX_SPEC 3747 +#define LINK_OS_LINUX_SPEC LINK_OS_LINUX_EMUL " %{!shared: %{!static: \ 3748 + %{rdynamic:-export-dynamic} \ 3749 + -dynamic-linker " GNU_USER_DYNAMIC_LINKER "}}" 3750 + 3751 #define LINK_GCC_C_SEQUENCE_SPEC \ 3752 "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}" 3753 3690 3754 diff -Naur gcc-4.8.1.orig/gcc/config/rs6000/linux64.h gcc-4.8.1/gcc/config/rs6000/linux64.h 3691 --- gcc-4.8.1.orig/gcc/config/rs6000/linux64.h 2013-01-10 14:38:27.000000000 -06003692 +++ gcc-4.8.1/gcc/config/rs6000/linux64.h 2013-0 6-18 20:18:38.348158000 -05003755 --- gcc-4.8.1.orig/gcc/config/rs6000/linux64.h 2013-01-10 20:38:27.000000000 +0000 3756 +++ gcc-4.8.1/gcc/config/rs6000/linux64.h 2013-09-13 19:01:42.976532125 +0000 3693 3757 @@ -180,20 +180,14 @@ 3694 3758 #endif … … 3761 3825 3762 3826 diff -Naur gcc-4.8.1.orig/gcc/config/rs6000/linuxaltivec.h gcc-4.8.1/gcc/config/rs6000/linuxaltivec.h 3763 --- gcc-4.8.1.orig/gcc/config/rs6000/linuxaltivec.h 2013-01-10 14:38:27.000000000 -06003764 +++ gcc-4.8.1/gcc/config/rs6000/linuxaltivec.h 2013-0 6-18 20:18:38.348158000 -05003827 --- gcc-4.8.1.orig/gcc/config/rs6000/linuxaltivec.h 2013-01-10 20:38:27.000000000 +0000 3828 +++ gcc-4.8.1/gcc/config/rs6000/linuxaltivec.h 2013-09-13 19:01:42.976532125 +0000 3765 3829 @@ -20,8 +20,13 @@ 3766 3830 <http://www.gnu.org/licenses/>. */ … … 3777 3841 #undef SUBSUBTARGET_OVERRIDE_OPTIONS 3778 3842 #define SUBSUBTARGET_OVERRIDE_OPTIONS rs6000_altivec_abi = 1 3779 diff -Naur gcc-4.8.1.orig/gcc/config/rs6000/linux.h gcc-4.8.1/gcc/config/rs6000/linux.h3780 --- gcc-4.8.1.orig/gcc/config/rs6000/linux.h 2013-01-10 14:38:27.000000000 -06003781 +++ gcc-4.8.1/gcc/config/rs6000/linux.h 2013-06-18 20:18:38.348158000 -05003782 @@ -79,6 +79,24 @@3783 #undef LINK_OS_DEFAULT_SPEC3784 #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"3785 3786 +#undef DEFAULT_ASM_ENDIAN3787 +#if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN)3788 +#define DEFAULT_ASM_ENDIAN " -mlittle"3789 +#define LINK_OS_LINUX_EMUL ENDIAN_SELECT(" -m elf32ppclinux", \3790 + " -m elf32lppclinux", \3791 + " -m elf32lppclinux")3792 +#else3793 +#define DEFAULT_ASM_ENDIAN " -mbig"3794 +#define LINK_OS_LINUX_EMUL ENDIAN_SELECT(" -m elf32ppclinux", \3795 + " -m elf32lppclinux", \3796 + " -m elf32ppclinux")3797 +#endif3798 +3799 +#undef LINK_OS_LINUX_SPEC3800 +#define LINK_OS_LINUX_SPEC LINK_OS_LINUX_EMUL " %{!shared: %{!static: \3801 + %{rdynamic:-export-dynamic} \3802 + -dynamic-linker " GNU_USER_DYNAMIC_LINKER "}}"3803 +3804 #define LINK_GCC_C_SEQUENCE_SPEC \3805 "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"3806 3807 3843 diff -Naur gcc-4.8.1.orig/gcc/config/rs6000/linuxspe.h gcc-4.8.1/gcc/config/rs6000/linuxspe.h 3808 --- gcc-4.8.1.orig/gcc/config/rs6000/linuxspe.h 2013-01-10 14:38:27.000000000 -06003809 +++ gcc-4.8.1/gcc/config/rs6000/linuxspe.h 2013-0 6-18 20:18:38.348158000 -05003844 --- gcc-4.8.1.orig/gcc/config/rs6000/linuxspe.h 2013-01-10 20:38:27.000000000 +0000 3845 +++ gcc-4.8.1/gcc/config/rs6000/linuxspe.h 2013-09-13 19:01:42.979865449 +0000 3810 3846 @@ -20,8 +20,13 @@ 3811 3847 <http://www.gnu.org/licenses/>. */ … … 3823 3859 #define ASM_DEFAULT_SPEC "-mppc -mspe -me500" 3824 3860 diff -Naur gcc-4.8.1.orig/gcc/config/rs6000/predicates.md gcc-4.8.1/gcc/config/rs6000/predicates.md 3825 --- gcc-4.8.1.orig/gcc/config/rs6000/predicates.md 2013-01-10 14:38:27.000000000 -06003826 +++ gcc-4.8.1/gcc/config/rs6000/predicates.md 2013-0 6-23 19:59:24.817984000 -05003861 --- gcc-4.8.1.orig/gcc/config/rs6000/predicates.md 2013-01-10 20:38:27.000000000 +0000 3862 +++ gcc-4.8.1/gcc/config/rs6000/predicates.md 2013-09-13 19:01:42.979865449 +0000 3827 3863 @@ -464,9 +464,11 @@ 3828 3864 (match_test "easy_altivec_constant (op, mode)"))) … … 3852 3888 3853 3889 diff -Naur gcc-4.8.1.orig/gcc/config/rs6000/rs6000.c gcc-4.8.1/gcc/config/rs6000/rs6000.c 3854 --- gcc-4.8.1.orig/gcc/config/rs6000/rs6000.c 2013-05- 09 20:54:06.000000000 -05003855 +++ gcc-4.8.1/gcc/config/rs6000/rs6000.c 2013-0 8-19 20:05:10.274596000 -05003890 --- gcc-4.8.1.orig/gcc/config/rs6000/rs6000.c 2013-05-10 01:54:06.000000000 +0000 3891 +++ gcc-4.8.1/gcc/config/rs6000/rs6000.c 2013-09-13 19:01:42.986532098 +0000 3856 3892 @@ -2190,7 +2190,8 @@ 3857 3893 int reg_size2 = reg_size; … … 4104 4140 { 4105 4141 diff -Naur gcc-4.8.1.orig/gcc/config/rs6000/rs6000.h gcc-4.8.1/gcc/config/rs6000/rs6000.h 4106 --- gcc-4.8.1.orig/gcc/config/rs6000/rs6000.h 2013-05-06 18:33:49.000000000 -05004107 +++ gcc-4.8.1/gcc/config/rs6000/rs6000.h 2013-0 6-18 20:18:38.348158000 -05004142 --- gcc-4.8.1.orig/gcc/config/rs6000/rs6000.h 2013-05-06 23:33:49.000000000 +0000 4143 +++ gcc-4.8.1/gcc/config/rs6000/rs6000.h 2013-09-13 19:01:42.989865423 +0000 4108 4144 @@ -662,6 +662,11 @@ 4109 4145 instructions for them. Might as well be consistent with bits and bytes. */ … … 4133 4169 mechanism. */ 4134 4170 diff -Naur gcc-4.8.1.orig/gcc/config/rs6000/rs6000.md gcc-4.8.1/gcc/config/rs6000/rs6000.md 4135 --- gcc-4.8.1.orig/gcc/config/rs6000/rs6000.md 2013-02-07 0 2:04:58.000000000 -06004136 +++ gcc-4.8.1/gcc/config/rs6000/rs6000.md 2013-0 6-18 20:18:38.348158000 -05004171 --- gcc-4.8.1.orig/gcc/config/rs6000/rs6000.md 2013-02-07 08:04:58.000000000 +0000 4172 +++ gcc-4.8.1/gcc/config/rs6000/rs6000.md 2013-09-13 19:01:42.993198747 +0000 4137 4173 @@ -1990,6 +1990,8 @@ 4138 4174 [(set_attr "length" "4,4,12") … … 4454 4490 operands[6] = simplify_gen_subreg (DFmode, operands[1], TFmode, lo_word); 4455 4491 diff -Naur gcc-4.8.1.orig/gcc/config/rs6000/rtems.h gcc-4.8.1/gcc/config/rs6000/rtems.h 4456 --- gcc-4.8.1.orig/gcc/config/rs6000/rtems.h 2013-01-10 14:38:27.000000000 -06004457 +++ gcc-4.8.1/gcc/config/rs6000/rtems.h 2013-0 7-31 07:59:09.970550000 -05004492 --- gcc-4.8.1.orig/gcc/config/rs6000/rtems.h 2013-01-10 20:38:27.000000000 +0000 4493 +++ gcc-4.8.1/gcc/config/rs6000/rtems.h 2013-09-13 19:01:42.996532072 +0000 4458 4494 @@ -34,6 +34,9 @@ 4459 4495 } \ … … 4467 4503 4468 4504 diff -Naur gcc-4.8.1.orig/gcc/config/rs6000/spe.md gcc-4.8.1/gcc/config/rs6000/spe.md 4469 --- gcc-4.8.1.orig/gcc/config/rs6000/spe.md 2013-01-10 14:38:27.000000000 -06004470 +++ gcc-4.8.1/gcc/config/rs6000/spe.md 2013-0 6-18 20:18:38.348158000 -05004505 --- gcc-4.8.1.orig/gcc/config/rs6000/spe.md 2013-01-10 20:38:27.000000000 +0000 4506 +++ gcc-4.8.1/gcc/config/rs6000/spe.md 2013-09-13 19:01:42.996532072 +0000 4471 4507 @@ -2604,8 +2604,8 @@ 4472 4508 && TARGET_HARD_FLOAT && TARGET_E500_DOUBLE && TARGET_LONG_DOUBLE_128" … … 4492 4528 operands[5] = simplify_gen_subreg (DFmode, operands[0], TFmode, hi_word); 4493 4529 diff -Naur gcc-4.8.1.orig/gcc/config/rs6000/sysv4.h gcc-4.8.1/gcc/config/rs6000/sysv4.h 4494 --- gcc-4.8.1.orig/gcc/config/rs6000/sysv4.h 2013-01-10 14:38:27.000000000 -06004495 +++ gcc-4.8.1/gcc/config/rs6000/sysv4.h 2013-0 6-18 20:18:38.348158000 -05004530 --- gcc-4.8.1.orig/gcc/config/rs6000/sysv4.h 2013-01-10 20:38:27.000000000 +0000 4531 +++ gcc-4.8.1/gcc/config/rs6000/sysv4.h 2013-09-13 19:01:42.996532072 +0000 4496 4532 @@ -187,12 +187,6 @@ 4497 4533 rs6000_abi_name); \ … … 4578 4614 #define LINK_OS_SPEC "\ 4579 4615 diff -Naur gcc-4.8.1.orig/gcc/config/rs6000/sysv4le.h gcc-4.8.1/gcc/config/rs6000/sysv4le.h 4580 --- gcc-4.8.1.orig/gcc/config/rs6000/sysv4le.h 2013-01-10 14:38:27.000000000 -06004581 +++ gcc-4.8.1/gcc/config/rs6000/sysv4le.h 2013-0 6-18 20:18:38.348158000 -05004616 --- gcc-4.8.1.orig/gcc/config/rs6000/sysv4le.h 2013-01-10 20:38:27.000000000 +0000 4617 +++ gcc-4.8.1/gcc/config/rs6000/sysv4le.h 2013-09-13 19:01:42.999865397 +0000 4582 4618 @@ -25,12 +25,12 @@ 4583 4619 #undef CC1_ENDIAN_DEFAULT_SPEC … … 4599 4635 #define MULTILIB_DEFAULTS { "mlittle", "mcall-sysv" } 4600 4636 diff -Naur gcc-4.8.1.orig/gcc/config/s390/htmintrin.h gcc-4.8.1/gcc/config/s390/htmintrin.h 4601 --- gcc-4.8.1.orig/gcc/config/s390/htmintrin.h 19 69-12-31 18:00:00.000000000 -06004602 +++ gcc-4.8.1/gcc/config/s390/htmintrin.h 2013-0 8-14 14:44:27.951575000 -05004637 --- gcc-4.8.1.orig/gcc/config/s390/htmintrin.h 1970-01-01 00:00:00.000000000 +0000 4638 +++ gcc-4.8.1/gcc/config/s390/htmintrin.h 2013-09-13 19:01:42.999865397 +0000 4603 4639 @@ -0,0 +1,57 @@ 4604 4640 +/* GNU compiler hardware transactional execution intrinsics … … 4660 4696 +#endif /* _HTMINTRIN_H */ 4661 4697 diff -Naur gcc-4.8.1.orig/gcc/config/s390/htmxlintrin.h gcc-4.8.1/gcc/config/s390/htmxlintrin.h 4662 --- gcc-4.8.1.orig/gcc/config/s390/htmxlintrin.h 19 69-12-31 18:00:00.000000000 -06004663 +++ gcc-4.8.1/gcc/config/s390/htmxlintrin.h 2013-0 8-14 14:44:27.951575000 -05004698 --- gcc-4.8.1.orig/gcc/config/s390/htmxlintrin.h 1970-01-01 00:00:00.000000000 +0000 4699 +++ gcc-4.8.1/gcc/config/s390/htmxlintrin.h 2013-09-13 19:01:42.999865397 +0000 4664 4700 @@ -0,0 +1,182 @@ 4665 4701 +/* XL compiler hardware transactional execution intrinsics … … 4846 4882 +#endif /* _HTMXLINTRIN_H */ 4847 4883 diff -Naur gcc-4.8.1.orig/gcc/config/s390/predicates.md gcc-4.8.1/gcc/config/s390/predicates.md 4848 --- gcc-4.8.1.orig/gcc/config/s390/predicates.md 2013-01-10 14:38:27.000000000 -06004849 +++ gcc-4.8.1/gcc/config/s390/predicates.md 2013-0 8-02 10:41:10.548493000 -05004884 --- gcc-4.8.1.orig/gcc/config/s390/predicates.md 2013-01-10 20:38:27.000000000 +0000 4885 +++ gcc-4.8.1/gcc/config/s390/predicates.md 2013-09-13 19:01:42.999865397 +0000 4850 4886 @@ -176,7 +176,11 @@ 4851 4887 { … … 4874 4910 4875 4911 switch (GET_MODE (XEXP (op, 0))) 4912 diff -Naur gcc-4.8.1.orig/gcc/config/s390/s390-modes.def gcc-4.8.1/gcc/config/s390/s390-modes.def 4913 --- gcc-4.8.1.orig/gcc/config/s390/s390-modes.def 2013-01-10 20:38:27.000000000 +0000 4914 +++ gcc-4.8.1/gcc/config/s390/s390-modes.def 2013-09-13 19:01:43.009865370 +0000 4915 @@ -152,6 +152,14 @@ 4916 operands were equal/unequal. The CCZ1 mode ensures the result can be 4917 effectively placed into a register. 4918 4919 +CCRAW 4920 + 4921 +The cc mode generated by a non-compare instruction. The condition 4922 +code mask for the CC consumer is determined by the comparison operator 4923 +(only EQ and NE allowed) and the immediate value given as second 4924 +operand to the operator. For the other CC modes this value used to be 4925 +0. 4926 + 4927 */ 4928 4929 4930 @@ -172,3 +180,4 @@ 4931 CC_MODE (CCT1); 4932 CC_MODE (CCT2); 4933 CC_MODE (CCT3); 4934 +CC_MODE (CCRAW); 4935 diff -Naur gcc-4.8.1.orig/gcc/config/s390/s390-protos.h gcc-4.8.1/gcc/config/s390/s390-protos.h 4936 --- gcc-4.8.1.orig/gcc/config/s390/s390-protos.h 2013-01-10 20:38:27.000000000 +0000 4937 +++ gcc-4.8.1/gcc/config/s390/s390-protos.h 2013-09-13 19:01:43.009865370 +0000 4938 @@ -58,7 +58,7 @@ 4939 extern enum machine_mode s390_tm_ccmode (rtx, rtx, bool); 4940 extern enum machine_mode s390_select_ccmode (enum rtx_code, rtx, rtx); 4941 extern rtx s390_emit_compare (enum rtx_code, rtx, rtx); 4942 -extern void s390_emit_jump (rtx, rtx); 4943 +extern rtx s390_emit_jump (rtx, rtx); 4944 extern bool symbolic_reference_mentioned_p (rtx); 4945 extern bool tls_symbolic_reference_mentioned_p (rtx); 4946 extern bool legitimate_la_operand_p (rtx); 4947 @@ -87,6 +87,7 @@ 4948 rtx, rtx, bool); 4949 extern void s390_expand_atomic (enum machine_mode, enum rtx_code, 4950 rtx, rtx, rtx, bool); 4951 +extern void s390_expand_tbegin (rtx, rtx, rtx, bool); 4952 extern rtx s390_return_addr_rtx (int, rtx); 4953 extern rtx s390_back_chain_rtx (void); 4954 extern rtx s390_emit_call (rtx, rtx, rtx, rtx); 4876 4955 diff -Naur gcc-4.8.1.orig/gcc/config/s390/s390.c gcc-4.8.1/gcc/config/s390/s390.c 4877 --- gcc-4.8.1.orig/gcc/config/s390/s390.c 2013-04-08 0 2:55:57.000000000 -05004878 +++ gcc-4.8.1/gcc/config/s390/s390.c 2013-0 8-02 10:41:10.548493000 -05004956 --- gcc-4.8.1.orig/gcc/config/s390/s390.c 2013-04-08 07:55:57.000000000 +0000 4957 +++ gcc-4.8.1/gcc/config/s390/s390.c 2013-09-13 19:01:43.003198721 +0000 4879 4958 @@ -367,6 +367,10 @@ 4880 4959 const char *some_ld_name; … … 5600 5679 5601 5680 diff -Naur gcc-4.8.1.orig/gcc/config/s390/s390.h gcc-4.8.1/gcc/config/s390/s390.h 5602 --- gcc-4.8.1.orig/gcc/config/s390/s390.h 2013-03-05 06:02:06.000000000 -06005603 +++ gcc-4.8.1/gcc/config/s390/s390.h 2013-0 8-02 10:41:10.548493000 -05005681 --- gcc-4.8.1.orig/gcc/config/s390/s390.h 2013-03-05 12:02:06.000000000 +0000 5682 +++ gcc-4.8.1/gcc/config/s390/s390.h 2013-09-13 19:01:43.003198721 +0000 5604 5683 @@ -34,7 +34,8 @@ 5605 5684 PF_DFP = 16, … … 5681 5760 5682 5761 /* Everything is big-endian. */ 5683 diff -Naur gcc-4.8.1.orig/gcc/config/s390/s390intrin.h gcc-4.8.1/gcc/config/s390/s390intrin.h5684 --- gcc-4.8.1.orig/gcc/config/s390/s390intrin.h 1969-12-31 18:00:00.000000000 -06005685 +++ gcc-4.8.1/gcc/config/s390/s390intrin.h 2013-08-14 14:44:27.951575000 -05005686 @@ -0,0 +1,33 @@5687 +/* S/390 System z specific intrinsics5688 + Copyright (C) 2013 Free Software Foundation, Inc.5689 + Contributed by Andreas Krebbel (Andreas.Krebbel@de.ibm.com)5690 +5691 +This file is part of GCC.5692 +5693 +GCC is free software; you can redistribute it and/or modify it under5694 +the terms of the GNU General Public License as published by the Free5695 +Software Foundation; either version 3, or (at your option) any later5696 +version.5697 +5698 +GCC is distributed in the hope that it will be useful, but WITHOUT ANY5699 +WARRANTY; without even the implied warranty of MERCHANTABILITY or5700 +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License5701 +for more details.5702 +5703 +You should have received a copy of the GNU General Public License5704 +along with GCC; see the file COPYING3. If not see5705 +<http://www.gnu.org/licenses/>. */5706 +5707 +#ifndef _S390INTRIN_H5708 +#define _S390INTRIN_H5709 +5710 +#ifndef __s390__5711 + #error s390intrin.h included on wrong platform/compiler5712 +#endif5713 +5714 +#ifdef __HTM__5715 +#include <htmintrin.h>5716 +#endif5717 +5718 +5719 +#endif /* _S390INTRIN_H*/5720 5762 diff -Naur gcc-4.8.1.orig/gcc/config/s390/s390.md gcc-4.8.1/gcc/config/s390/s390.md 5721 --- gcc-4.8.1.orig/gcc/config/s390/s390.md 2013-01-10 14:38:27.000000000 -06005722 +++ gcc-4.8.1/gcc/config/s390/s390.md 2013-0 8-02 10:41:10.548493000 -05005763 --- gcc-4.8.1.orig/gcc/config/s390/s390.md 2013-01-10 20:38:27.000000000 +0000 5764 +++ gcc-4.8.1/gcc/config/s390/s390.md 2013-09-13 19:01:43.009865370 +0000 5723 5765 @@ -59,11 +59,17 @@ 5724 5766 (define_c_enum "unspec" [ … … 6142 6184 + "ppa\t%0,%1,1" 6143 6185 + [(set_attr "op_type" "RRF")]) 6144 diff -Naur gcc-4.8.1.orig/gcc/config/s390/s390-modes.def gcc-4.8.1/gcc/config/s390/s390-modes.def6145 --- gcc-4.8.1.orig/gcc/config/s390/s390-modes.def 2013-01-10 14:38:27.000000000 -06006146 +++ gcc-4.8.1/gcc/config/s390/s390-modes.def 2013-08-02 10:41:10.548493000 -05006147 @@ -152,6 +152,14 @@6148 operands were equal/unequal. The CCZ1 mode ensures the result can be6149 effectively placed into a register.6150 6151 +CCRAW6152 +6153 +The cc mode generated by a non-compare instruction. The condition6154 +code mask for the CC consumer is determined by the comparison operator6155 +(only EQ and NE allowed) and the immediate value given as second6156 +operand to the operator. For the other CC modes this value used to be6157 +0.6158 +6159 */6160 6161 6162 @@ -172,3 +180,4 @@6163 CC_MODE (CCT1);6164 CC_MODE (CCT2);6165 CC_MODE (CCT3);6166 +CC_MODE (CCRAW);6167 6186 diff -Naur gcc-4.8.1.orig/gcc/config/s390/s390.opt gcc-4.8.1/gcc/config/s390/s390.opt 6168 --- gcc-4.8.1.orig/gcc/config/s390/s390.opt 2013-01-10 14:38:27.000000000 -06006169 +++ gcc-4.8.1/gcc/config/s390/s390.opt 2013-0 8-02 10:41:10.548493000 -05006187 --- gcc-4.8.1.orig/gcc/config/s390/s390.opt 2013-01-10 20:38:27.000000000 +0000 6188 +++ gcc-4.8.1/gcc/config/s390/s390.opt 2013-09-13 19:01:43.009865370 +0000 6170 6189 @@ -104,6 +104,10 @@ 6171 6190 Target Report RejectNegative Negative(mlong-double-128) InverseMask(LONG_DOUBLE_128) … … 6179 6198 Target Report Mask(PACKED_STACK) 6180 6199 Use packed stack layout 6181 diff -Naur gcc-4.8.1.orig/gcc/config/s390/s390-protos.h gcc-4.8.1/gcc/config/s390/s390-protos.h 6182 --- gcc-4.8.1.orig/gcc/config/s390/s390-protos.h 2013-01-10 14:38:27.000000000 -0600 6183 +++ gcc-4.8.1/gcc/config/s390/s390-protos.h 2013-08-02 10:41:10.548493000 -0500 6184 @@ -58,7 +58,7 @@ 6185 extern enum machine_mode s390_tm_ccmode (rtx, rtx, bool); 6186 extern enum machine_mode s390_select_ccmode (enum rtx_code, rtx, rtx); 6187 extern rtx s390_emit_compare (enum rtx_code, rtx, rtx); 6188 -extern void s390_emit_jump (rtx, rtx); 6189 +extern rtx s390_emit_jump (rtx, rtx); 6190 extern bool symbolic_reference_mentioned_p (rtx); 6191 extern bool tls_symbolic_reference_mentioned_p (rtx); 6192 extern bool legitimate_la_operand_p (rtx); 6193 @@ -87,6 +87,7 @@ 6194 rtx, rtx, bool); 6195 extern void s390_expand_atomic (enum machine_mode, enum rtx_code, 6196 rtx, rtx, rtx, bool); 6197 +extern void s390_expand_tbegin (rtx, rtx, rtx, bool); 6198 extern rtx s390_return_addr_rtx (int, rtx); 6199 extern rtx s390_back_chain_rtx (void); 6200 extern rtx s390_emit_call (rtx, rtx, rtx, rtx); 6200 diff -Naur gcc-4.8.1.orig/gcc/config/s390/s390intrin.h gcc-4.8.1/gcc/config/s390/s390intrin.h 6201 --- gcc-4.8.1.orig/gcc/config/s390/s390intrin.h 1970-01-01 00:00:00.000000000 +0000 6202 +++ gcc-4.8.1/gcc/config/s390/s390intrin.h 2013-09-13 19:01:43.006532046 +0000 6203 @@ -0,0 +1,33 @@ 6204 +/* S/390 System z specific intrinsics 6205 + Copyright (C) 2013 Free Software Foundation, Inc. 6206 + Contributed by Andreas Krebbel (Andreas.Krebbel@de.ibm.com) 6207 + 6208 +This file is part of GCC. 6209 + 6210 +GCC is free software; you can redistribute it and/or modify it under 6211 +the terms of the GNU General Public License as published by the Free 6212 +Software Foundation; either version 3, or (at your option) any later 6213 +version. 6214 + 6215 +GCC is distributed in the hope that it will be useful, but WITHOUT ANY 6216 +WARRANTY; without even the implied warranty of MERCHANTABILITY or 6217 +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 6218 +for more details. 6219 + 6220 +You should have received a copy of the GNU General Public License 6221 +along with GCC; see the file COPYING3. If not see 6222 +<http://www.gnu.org/licenses/>. */ 6223 + 6224 +#ifndef _S390INTRIN_H 6225 +#define _S390INTRIN_H 6226 + 6227 +#ifndef __s390__ 6228 + #error s390intrin.h included on wrong platform/compiler 6229 +#endif 6230 + 6231 +#ifdef __HTM__ 6232 +#include <htmintrin.h> 6233 +#endif 6234 + 6235 + 6236 +#endif /* _S390INTRIN_H*/ 6201 6237 diff -Naur gcc-4.8.1.orig/gcc/config/sh/sh.md gcc-4.8.1/gcc/config/sh/sh.md 6202 --- gcc-4.8.1.orig/gcc/config/sh/sh.md 2013-05-06 1 4:53:56.000000000 -05006203 +++ gcc-4.8.1/gcc/config/sh/sh.md 2013-0 6-09 17:02:28.968408000 -05006238 --- gcc-4.8.1.orig/gcc/config/sh/sh.md 2013-05-06 19:53:56.000000000 +0000 6239 +++ gcc-4.8.1/gcc/config/sh/sh.md 2013-09-13 19:01:43.016532020 +0000 6204 6240 @@ -12073,10 +12073,10 @@ 6205 6241 … … 6262 6298 (div:SF (match_operand:SF 1 "arith_reg_operand" "") 6263 6299 diff -Naur gcc-4.8.1.orig/gcc/config/sparc/sparc.c gcc-4.8.1/gcc/config/sparc/sparc.c 6264 --- gcc-4.8.1.orig/gcc/config/sparc/sparc.c 2013-04-15 0 3:31:12.000000000 -05006265 +++ gcc-4.8.1/gcc/config/sparc/sparc.c 2013-0 8-02 16:42:26.734213000 -05006300 --- gcc-4.8.1.orig/gcc/config/sparc/sparc.c 2013-04-15 08:31:12.000000000 +0000 6301 +++ gcc-4.8.1/gcc/config/sparc/sparc.c 2013-09-13 19:01:43.019865344 +0000 6266 6302 @@ -11174,6 +11174,11 @@ 6267 6303 /* Total Store Ordering: all memory transactions with store semantics … … 6277 6313 case SMM_PSO: 6278 6314 diff -Naur gcc-4.8.1.orig/gcc/config.gcc gcc-4.8.1/gcc/config.gcc 6279 --- gcc-4.8.1.orig/gcc/config.gcc 2013-03-13 0 4:47:41.000000000 -05006280 +++ gcc-4.8.1/gcc/config.gcc 2013-0 8-02 10:41:10.548493000 -05006315 --- gcc-4.8.1.orig/gcc/config.gcc 2013-03-13 09:47:41.000000000 +0000 6316 +++ gcc-4.8.1/gcc/config.gcc 2013-09-13 19:01:43.023198669 +0000 6281 6317 @@ -452,6 +452,7 @@ 6282 6318 cpu_type=s390 … … 6325 6361 ;; 6326 6362 diff -Naur gcc-4.8.1.orig/gcc/config.in gcc-4.8.1/gcc/config.in 6327 --- gcc-4.8.1.orig/gcc/config.in 2013-05-31 0 4:09:26.000000000 -05006328 +++ gcc-4.8.1/gcc/config.in 2013-0 6-18 20:18:38.348158000 -05006363 --- gcc-4.8.1.orig/gcc/config.in 2013-05-31 09:09:26.000000000 +0000 6364 +++ gcc-4.8.1/gcc/config.in 2013-09-13 19:01:43.023198669 +0000 6329 6365 @@ -1228,7 +1228,7 @@ 6330 6366 #endif … … 6337 6373 #endif 6338 6374 diff -Naur gcc-4.8.1.orig/gcc/configure gcc-4.8.1/gcc/configure 6339 --- gcc-4.8.1.orig/gcc/configure 2013-05-08 06:36:36.000000000 -0500 6340 +++ gcc-4.8.1/gcc/configure 2013-06-18 20:18:38.348158000 -0500 6341 @@ -23281,33 +23281,7 @@ 6375 --- gcc-4.8.1.orig/gcc/configure 2013-05-08 11:36:36.000000000 +0000 6376 +++ gcc-4.8.1/gcc/configure 2013-09-13 19:01:43.973196178 +0000 6377 @@ -11703,6 +11703,7 @@ 6378 if test x$build != x$host || test "x$coverage_flags" != x 6379 then 6380 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' 6381 + BUILD_CXXFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' 6382 BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)' 6383 fi 6384 6385 @@ -23281,33 +23282,7 @@ 6342 6386 tls_first_major=0 6343 6387 tls_first_minor=0 … … 6374 6418 .section ".tdata","awT",@progbits 6375 6419 .align 3 6376 @@ -23341,6 +2331 5,32 @@6420 @@ -23341,6 +23316,32 @@ 6377 6421 tls_first_minor=14 6378 6422 tls_as_opt="-a64 --fatal-warnings" … … 6407 6451 conftest_s=' 6408 6452 .section ".tdata","awT",@progbits 6409 @@ -26472,6 +2647 2,9 @@6453 @@ -26472,6 +26473,9 @@ 6410 6454 case "$target:$tm_file" in 6411 6455 powerpc64-*-freebsd* | powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*) … … 6418 6462 ;; 6419 6463 diff -Naur gcc-4.8.1.orig/gcc/configure.ac gcc-4.8.1/gcc/configure.ac 6420 --- gcc-4.8.1.orig/gcc/configure.ac 2013-05-08 06:36:36.000000000 -0500 6421 +++ gcc-4.8.1/gcc/configure.ac 2013-06-18 20:18:38.348158000 -0500 6422 @@ -3044,33 +3044,7 @@ 6464 --- gcc-4.8.1.orig/gcc/configure.ac 2013-05-08 11:36:36.000000000 +0000 6465 +++ gcc-4.8.1/gcc/configure.ac 2013-09-13 19:01:43.976529502 +0000 6466 @@ -1887,6 +1887,7 @@ 6467 if test x$build != x$host || test "x$coverage_flags" != x 6468 then 6469 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' 6470 + BUILD_CXXFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' 6471 BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)' 6472 fi 6473 6474 @@ -3044,33 +3045,7 @@ 6423 6475 tls_first_major=0 6424 6476 tls_first_minor=0 … … 6455 6507 .section ".tdata","awT",@progbits 6456 6508 .align 3 6457 @@ -3104,6 +307 8,32 @@6509 @@ -3104,6 +3079,32 @@ 6458 6510 tls_first_minor=14 6459 6511 tls_as_opt="-a64 --fatal-warnings" … … 6488 6540 conftest_s=' 6489 6541 .section ".tdata","awT",@progbits 6490 @@ -4507,6 +450 7,9 @@6542 @@ -4507,6 +4508,9 @@ 6491 6543 case "$target:$tm_file" in 6492 6544 powerpc64-*-freebsd* | powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*) … … 6498 6550 emul_name="-melf64ppc" 6499 6551 ;; 6500 @@ -4611,7 +461 4,7 @@6552 @@ -4611,7 +4615,7 @@ 6501 6553 ]) 6502 6554 if test x"$gcc_cv_ld_large_toc" = xyes; then … … 6508 6560 esac 6509 6561 diff -Naur gcc-4.8.1.orig/gcc/cp/call.c gcc-4.8.1/gcc/cp/call.c 6510 --- gcc-4.8.1.orig/gcc/cp/call.c 2013-05-14 07:51:17.000000000 -05006511 +++ gcc-4.8.1/gcc/cp/call.c 2013-0 7-25 10:07:27.406614000 -05006562 --- gcc-4.8.1.orig/gcc/cp/call.c 2013-05-14 12:51:17.000000000 +0000 6563 +++ gcc-4.8.1/gcc/cp/call.c 2013-09-13 19:01:43.036531967 +0000 6512 6564 @@ -6195,8 +6195,8 @@ 6513 6565 if (convs->check_narrowing) … … 6531 6583 6532 6584 diff -Naur gcc-4.8.1.orig/gcc/cp/class.c gcc-4.8.1/gcc/cp/class.c 6533 --- gcc-4.8.1.orig/gcc/cp/class.c 2013-04-01 1 4:05:21.000000000 -05006534 +++ gcc-4.8.1/gcc/cp/class.c 2013-0 7-05 05:23:08.653887000 -05006585 --- gcc-4.8.1.orig/gcc/cp/class.c 2013-04-01 19:05:21.000000000 +0000 6586 +++ gcc-4.8.1/gcc/cp/class.c 2013-09-13 19:01:43.039865292 +0000 6535 6587 @@ -4574,15 +4574,20 @@ 6536 6588 static void … … 6603 6655 6604 6656 diff -Naur gcc-4.8.1.orig/gcc/cp/cp-tree.h gcc-4.8.1/gcc/cp/cp-tree.h 6605 --- gcc-4.8.1.orig/gcc/cp/cp-tree.h 2013-04-24 1 0:42:20.000000000 -05006606 +++ gcc-4.8.1/gcc/cp/cp-tree.h 2013-0 8-20 07:59:37.559809000 -05006657 --- gcc-4.8.1.orig/gcc/cp/cp-tree.h 2013-04-24 15:42:20.000000000 +0000 6658 +++ gcc-4.8.1/gcc/cp/cp-tree.h 2013-09-13 19:01:43.043198616 +0000 6607 6659 @@ -1211,17 +1211,20 @@ 6608 6660 /* The _DECL for this _TYPE. */ … … 6669 6721 tsubst_flags_t); 6670 6722 diff -Naur gcc-4.8.1.orig/gcc/cp/cvt.c gcc-4.8.1/gcc/cp/cvt.c 6671 --- gcc-4.8.1.orig/gcc/cp/cvt.c 2013-02-20 0 3:02:35.000000000 -06006672 +++ gcc-4.8.1/gcc/cp/cvt.c 2013-0 8-20 07:59:37.559809000 -05006723 --- gcc-4.8.1.orig/gcc/cp/cvt.c 2013-02-20 09:02:35.000000000 +0000 6724 +++ gcc-4.8.1/gcc/cp/cvt.c 2013-09-13 19:01:43.043198616 +0000 6673 6725 @@ -620,6 +620,9 @@ 6674 6726 … … 6724 6776 if (complain) 6725 6777 diff -Naur gcc-4.8.1.orig/gcc/cp/decl.c gcc-4.8.1/gcc/cp/decl.c 6726 --- gcc-4.8.1.orig/gcc/cp/decl.c 2013-05-16 1 0:09:07.000000000 -05006727 +++ gcc-4.8.1/gcc/cp/decl.c 2013-0 7-25 10:07:27.406614000 -05006778 --- gcc-4.8.1.orig/gcc/cp/decl.c 2013-05-16 15:09:07.000000000 +0000 6779 +++ gcc-4.8.1/gcc/cp/decl.c 2013-09-13 19:01:43.049865266 +0000 6728 6780 @@ -10878,7 +10878,7 @@ 6729 6781 DECL, if there is no DECL available. */ … … 6780 6832 DECL_CHAIN (decl) = decls; 6781 6833 diff -Naur gcc-4.8.1.orig/gcc/cp/init.c gcc-4.8.1/gcc/cp/init.c 6782 --- gcc-4.8.1.orig/gcc/cp/init.c 2013-04-25 1 1:25:04.000000000 -05006783 +++ gcc-4.8.1/gcc/cp/init.c 2013-0 7-13 20:06:02.832708000 -05006834 --- gcc-4.8.1.orig/gcc/cp/init.c 2013-04-25 16:25:04.000000000 +0000 6835 +++ gcc-4.8.1/gcc/cp/init.c 2013-09-13 19:01:43.049865266 +0000 6784 6836 @@ -3524,6 +3524,8 @@ 6785 6837 … … 6792 6844 { 6793 6845 diff -Naur gcc-4.8.1.orig/gcc/cp/method.c gcc-4.8.1/gcc/cp/method.c 6794 --- gcc-4.8.1.orig/gcc/cp/method.c 2013-02-12 14:47:15.000000000 -06006795 +++ gcc-4.8.1/gcc/cp/method.c 2013-0 5-31 08:03:45.258613000 -05006846 --- gcc-4.8.1.orig/gcc/cp/method.c 2013-02-12 20:47:15.000000000 +0000 6847 +++ gcc-4.8.1/gcc/cp/method.c 2013-09-13 19:01:43.053198590 +0000 6796 6848 @@ -1340,7 +1340,8 @@ 6797 6849 if (diag && assign_p && move_p … … 6805 6857 "move assignment operator for virtual base %qT", 6806 6858 diff -Naur gcc-4.8.1.orig/gcc/cp/name-lookup.c gcc-4.8.1/gcc/cp/name-lookup.c 6807 --- gcc-4.8.1.orig/gcc/cp/name-lookup.c 2013-02-27 1 2:13:24.000000000 -06006808 +++ gcc-4.8.1/gcc/cp/name-lookup.c 2013-0 8-17 20:07:02.824495000 -05006859 --- gcc-4.8.1.orig/gcc/cp/name-lookup.c 2013-02-27 18:13:24.000000000 +0000 6860 +++ gcc-4.8.1/gcc/cp/name-lookup.c 2013-09-13 19:01:43.053198590 +0000 6809 6861 @@ -3015,8 +3015,10 @@ 6810 6862 if (name == error_mark_node) … … 6821 6873 6822 6874 diff -Naur gcc-4.8.1.orig/gcc/cp/parser.c gcc-4.8.1/gcc/cp/parser.c 6823 --- gcc-4.8.1.orig/gcc/cp/parser.c 2013-05-14 15:37:48.000000000 -05006824 +++ gcc-4.8.1/gcc/cp/parser.c 2013-0 7-25 10:07:27.406614000 -05006875 --- gcc-4.8.1.orig/gcc/cp/parser.c 2013-05-14 20:37:48.000000000 +0000 6876 +++ gcc-4.8.1/gcc/cp/parser.c 2013-09-13 19:01:43.063198564 +0000 6825 6877 @@ -5438,11 +5438,18 @@ 6826 6878 /* Restore the old message. */ … … 6877 6929 int flags = LOOKUP_IMPLICIT; 6878 6930 diff -Naur gcc-4.8.1.orig/gcc/cp/pt.c gcc-4.8.1/gcc/cp/pt.c 6879 --- gcc-4.8.1.orig/gcc/cp/pt.c 2013-05-24 08:25:44.000000000 -05006880 +++ gcc-4.8.1/gcc/cp/pt.c 2013-0 7-25 10:07:27.406614000 -05006931 --- gcc-4.8.1.orig/gcc/cp/pt.c 2013-05-24 13:25:44.000000000 +0000 6932 +++ gcc-4.8.1/gcc/cp/pt.c 2013-09-13 19:01:43.069865213 +0000 6881 6933 @@ -138,6 +138,7 @@ 6882 6934 tree); … … 7152 7204 if (processing_template_decl) 7153 7205 diff -Naur gcc-4.8.1.orig/gcc/cp/semantics.c gcc-4.8.1/gcc/cp/semantics.c 7154 --- gcc-4.8.1.orig/gcc/cp/semantics.c 2013-05-14 07:51:17.000000000 -05007155 +++ gcc-4.8.1/gcc/cp/semantics.c 2013-0 7-30 11:58:28.826601000 -05007206 --- gcc-4.8.1.orig/gcc/cp/semantics.c 2013-05-14 12:51:17.000000000 +0000 7207 +++ gcc-4.8.1/gcc/cp/semantics.c 2013-09-13 19:01:43.073198538 +0000 7156 7208 @@ -155,6 +155,17 @@ 7157 7209 } … … 7243 7295 DECLTYPE_TYPE_EXPR (type) = expr; 7244 7296 diff -Naur gcc-4.8.1.orig/gcc/cp/tree.c gcc-4.8.1/gcc/cp/tree.c 7245 --- gcc-4.8.1.orig/gcc/cp/tree.c 2013-05-24 08:25:51.000000000 -05007246 +++ gcc-4.8.1/gcc/cp/tree.c 2013-0 8-06 20:18:57.648578000 -05007297 --- gcc-4.8.1.orig/gcc/cp/tree.c 2013-05-24 13:25:51.000000000 +0000 7298 +++ gcc-4.8.1/gcc/cp/tree.c 2013-09-13 19:01:43.073198538 +0000 7247 7299 @@ -1220,6 +1220,8 @@ 7248 7300 result = … … 7254 7306 else 7255 7307 { 7256 diff -Naur gcc-4.8.1.orig/gcc/cp/typeck2.c gcc-4.8.1/gcc/cp/typeck2.c7257 --- gcc-4.8.1.orig/gcc/cp/typeck2.c 2013-04-11 11:05:02.000000000 -05007258 +++ gcc-4.8.1/gcc/cp/typeck2.c 2013-07-30 08:30:12.307006000 -05007259 @@ -262,7 +262,7 @@7260 so that we can check again once it is completed. This makes sense7261 only for objects for which we have a declaration or at least a7262 name. */7263 - if (!COMPLETE_TYPE_P (type))7264 + if (!COMPLETE_TYPE_P (type) && (complain & tf_error))7265 {7266 void **slot;7267 struct pending_abstract_type *pat;7268 7308 diff -Naur gcc-4.8.1.orig/gcc/cp/typeck.c gcc-4.8.1/gcc/cp/typeck.c 7269 --- gcc-4.8.1.orig/gcc/cp/typeck.c 2013-05-13 1 4:34:15.000000000 -05007270 +++ gcc-4.8.1/gcc/cp/typeck.c 2013-0 7-09 12:52:34.273079000 -05007309 --- gcc-4.8.1.orig/gcc/cp/typeck.c 2013-05-13 19:34:15.000000000 +0000 7310 +++ gcc-4.8.1/gcc/cp/typeck.c 2013-09-13 19:01:43.079865187 +0000 7271 7311 @@ -8307,7 +8307,8 @@ 7272 7312 && TREE_CODE (retval) == VAR_DECL … … 7289 7329 && DECL_CONTEXT (retval) == current_function_decl 7290 7330 && !TREE_STATIC (retval) 7291 diff -Naur gcc-4.8.1.orig/gcc/DATESTAMP gcc-4.8.1/gcc/DATESTAMP 7292 --- gcc-4.8.1.orig/gcc/DATESTAMP 2013-05-30 19:16:35.000000000 -0500 7293 +++ gcc-4.8.1/gcc/DATESTAMP 2013-08-27 19:16:35.499545000 -0500 7294 @@ -1 +1 @@ 7295 -20130531 7296 +20130828 7331 diff -Naur gcc-4.8.1.orig/gcc/cp/typeck2.c gcc-4.8.1/gcc/cp/typeck2.c 7332 --- gcc-4.8.1.orig/gcc/cp/typeck2.c 2013-04-11 16:05:02.000000000 +0000 7333 +++ gcc-4.8.1/gcc/cp/typeck2.c 2013-09-13 19:01:43.076531862 +0000 7334 @@ -262,7 +262,7 @@ 7335 so that we can check again once it is completed. This makes sense 7336 only for objects for which we have a declaration or at least a 7337 name. */ 7338 - if (!COMPLETE_TYPE_P (type)) 7339 + if (!COMPLETE_TYPE_P (type) && (complain & tf_error)) 7340 { 7341 void **slot; 7342 struct pending_abstract_type *pat; 7297 7343 diff -Naur gcc-4.8.1.orig/gcc/doc/avr-mmcu.texi gcc-4.8.1/gcc/doc/avr-mmcu.texi 7298 --- gcc-4.8.1.orig/gcc/doc/avr-mmcu.texi 2013-02-28 0 3:03:09.000000000 -06007299 +++ gcc-4.8.1/gcc/doc/avr-mmcu.texi 2013-0 7-10 07:36:36.732157000 -05007344 --- gcc-4.8.1.orig/gcc/doc/avr-mmcu.texi 2013-02-28 09:03:09.000000000 +0000 7345 +++ gcc-4.8.1/gcc/doc/avr-mmcu.texi 2013-09-13 19:01:43.079865187 +0000 7300 7346 @@ -38,7 +38,7 @@ 7301 7347 … … 7308 7354 ``Enhanced'' devices with 128@tie{}KiB of program memory. 7309 7355 diff -Naur gcc-4.8.1.orig/gcc/doc/cpp.texi gcc-4.8.1/gcc/doc/cpp.texi 7310 --- gcc-4.8.1.orig/gcc/doc/cpp.texi 2013-01-10 14:38:27.000000000 -06007311 +++ gcc-4.8.1/gcc/doc/cpp.texi 2013-0 6-19 04:03:22.324781000 -05007356 --- gcc-4.8.1.orig/gcc/doc/cpp.texi 2013-01-10 20:38:27.000000000 +0000 7357 +++ gcc-4.8.1/gcc/doc/cpp.texi 2013-09-13 19:01:43.083198511 +0000 7312 7358 @@ -1926,11 +1926,9 @@ 7313 7359 This macro is defined when the C++ compiler is in use. You can use … … 7326 7372 This macro is defined, with value 1, when the Objective-C compiler is in 7327 7373 diff -Naur gcc-4.8.1.orig/gcc/doc/extend.texi gcc-4.8.1/gcc/doc/extend.texi 7328 --- gcc-4.8.1.orig/gcc/doc/extend.texi 2013-03-28 09:07:55.000000000 -05007329 +++ gcc-4.8.1/gcc/doc/extend.texi 2013-0 8-02 10:41:10.548493000 -05007374 --- gcc-4.8.1.orig/gcc/doc/extend.texi 2013-03-28 14:07:55.000000000 +0000 7375 +++ gcc-4.8.1/gcc/doc/extend.texi 2013-09-13 19:01:43.086531836 +0000 7330 7376 @@ -8786,6 +8786,7 @@ 7331 7377 * PowerPC Built-in Functions:: … … 7458 7504 The following built-in functions are supported on the SH1, SH2, SH3 and SH4 7459 7505 diff -Naur gcc-4.8.1.orig/gcc/doc/invoke.texi gcc-4.8.1/gcc/doc/invoke.texi 7460 --- gcc-4.8.1.orig/gcc/doc/invoke.texi 2013-03-29 08:41:29.000000000 -05007461 +++ gcc-4.8.1/gcc/doc/invoke.texi 2013-0 6-19 14:55:50.111258000 -05007506 --- gcc-4.8.1.orig/gcc/doc/invoke.texi 2013-03-29 13:41:29.000000000 +0000 7507 +++ gcc-4.8.1/gcc/doc/invoke.texi 2013-09-13 19:01:43.093198485 +0000 7462 7508 @@ -13726,8 +13726,13 @@ 7463 7509 SSE4.1, SSE4.2, AVX, AES, PCLMUL, FSGSBASE, RDRND and F16C instruction … … 7476 7522 @item k6 7477 7523 diff -Naur gcc-4.8.1.orig/gcc/file-find.c gcc-4.8.1/gcc/file-find.c 7478 --- gcc-4.8.1.orig/gcc/file-find.c 2013-01-10 14:38:27.000000000 -06007479 +++ gcc-4.8.1/gcc/file-find.c 2013-0 6-19 15:59:25.231992000 -05007524 --- gcc-4.8.1.orig/gcc/file-find.c 2013-01-10 20:38:27.000000000 +0000 7525 +++ gcc-4.8.1/gcc/file-find.c 2013-09-13 19:01:43.093198485 +0000 7480 7526 @@ -31,7 +31,7 @@ 7481 7527 } … … 7524 7570 } 7525 7571 diff -Naur gcc-4.8.1.orig/gcc/file-find.h gcc-4.8.1/gcc/file-find.h 7526 --- gcc-4.8.1.orig/gcc/file-find.h 2013-01-10 14:38:27.000000000 -06007527 +++ gcc-4.8.1/gcc/file-find.h 2013-0 6-19 15:59:25.231992000 -05007572 --- gcc-4.8.1.orig/gcc/file-find.h 2013-01-10 20:38:27.000000000 +0000 7573 +++ gcc-4.8.1/gcc/file-find.h 2013-09-13 19:01:43.096531810 +0000 7528 7574 @@ -38,7 +38,7 @@ 7529 7575 }; … … 7536 7582 extern void prefix_from_string (const char *, struct path_prefix *); 7537 7583 diff -Naur gcc-4.8.1.orig/gcc/fortran/interface.c gcc-4.8.1/gcc/fortran/interface.c 7538 --- gcc-4.8.1.orig/gcc/fortran/interface.c 2013-04-26 1 4:20:55.000000000 -05007539 +++ gcc-4.8.1/gcc/fortran/interface.c 2013-0 5-31 13:10:03.669091000 -05007584 --- gcc-4.8.1.orig/gcc/fortran/interface.c 2013-04-26 19:20:55.000000000 +0000 7585 +++ gcc-4.8.1/gcc/fortran/interface.c 2013-09-13 19:01:43.096531810 +0000 7540 7586 @@ -1024,7 +1024,8 @@ 7541 7587 bool type_must_agree, char *errmsg, int err_len) … … 7549 7595 s1->name); 7550 7596 diff -Naur gcc-4.8.1.orig/gcc/fortran/match.c gcc-4.8.1/gcc/fortran/match.c 7551 --- gcc-4.8.1.orig/gcc/fortran/match.c 2013-04-18 1 3:20:22.000000000 -05007552 +++ gcc-4.8.1/gcc/fortran/match.c 2013-0 8-24 04:12:21.843607000 -05007597 --- gcc-4.8.1.orig/gcc/fortran/match.c 2013-04-18 18:20:22.000000000 +0000 7598 +++ gcc-4.8.1/gcc/fortran/match.c 2013-09-13 19:01:43.099865134 +0000 7553 7599 @@ -5142,7 +5142,6 @@ 7554 7600 { … … 7627 7673 assoc_sym->attr.pointer = 1; 7628 7674 diff -Naur gcc-4.8.1.orig/gcc/fortran/module.c gcc-4.8.1/gcc/fortran/module.c 7629 --- gcc-4.8.1.orig/gcc/fortran/module.c 2013-01-29 15:40:51.000000000 -06007630 +++ gcc-4.8.1/gcc/fortran/module.c 2013-0 7-28 09:13:17.566941000 -05007675 --- gcc-4.8.1.orig/gcc/fortran/module.c 2013-01-29 21:40:51.000000000 +0000 7676 +++ gcc-4.8.1/gcc/fortran/module.c 2013-09-13 19:01:43.099865134 +0000 7631 7677 @@ -4465,7 +4465,7 @@ 7632 7678 module_locus locus; … … 7639 7685 "current program unit", st_sym->name, module_name); 7640 7686 diff -Naur gcc-4.8.1.orig/gcc/fortran/resolve.c gcc-4.8.1/gcc/fortran/resolve.c 7641 --- gcc-4.8.1.orig/gcc/fortran/resolve.c 2013-05-07 1 1:36:48.000000000 -05007642 +++ gcc-4.8.1/gcc/fortran/resolve.c 2013-0 6-11 11:18:13.173979000 -05007687 --- gcc-4.8.1.orig/gcc/fortran/resolve.c 2013-05-07 16:36:48.000000000 +0000 7688 +++ gcc-4.8.1/gcc/fortran/resolve.c 2013-09-13 19:01:43.103198459 +0000 7643 7689 @@ -9746,6 +9746,10 @@ 7644 7690 … … 7661 7707 /* Should the lhs be a section, use its array ref for the 7662 7708 diff -Naur gcc-4.8.1.orig/gcc/fortran/simplify.c gcc-4.8.1/gcc/fortran/simplify.c 7663 --- gcc-4.8.1.orig/gcc/fortran/simplify.c 2013-05-07 1 1:36:48.000000000 -05007664 +++ gcc-4.8.1/gcc/fortran/simplify.c 2013-0 7-08 14:10:32.194953000 -05007709 --- gcc-4.8.1.orig/gcc/fortran/simplify.c 2013-05-07 16:36:48.000000000 +0000 7710 +++ gcc-4.8.1/gcc/fortran/simplify.c 2013-09-13 19:01:43.106531784 +0000 7665 7711 @@ -332,13 +332,15 @@ 7666 7712 } … … 7716 7762 7717 7763 diff -Naur gcc-4.8.1.orig/gcc/fortran/trans-array.c gcc-4.8.1/gcc/fortran/trans-array.c 7718 --- gcc-4.8.1.orig/gcc/fortran/trans-array.c 2013-02-21 06:26:44.000000000 -06007719 +++ gcc-4.8.1/gcc/fortran/trans-array.c 2013-0 8-24 07:46:17.832897000 -05007764 --- gcc-4.8.1.orig/gcc/fortran/trans-array.c 2013-02-21 12:26:44.000000000 +0000 7765 +++ gcc-4.8.1/gcc/fortran/trans-array.c 2013-09-13 19:01:43.109865108 +0000 7720 7766 @@ -3674,7 +3674,7 @@ 7721 7767 /* Calculate the lower bound of an array section. */ … … 7853 7899 } 7854 7900 diff -Naur gcc-4.8.1.orig/gcc/fortran/trans-intrinsic.c gcc-4.8.1/gcc/fortran/trans-intrinsic.c 7855 --- gcc-4.8.1.orig/gcc/fortran/trans-intrinsic.c 2013-03-15 05:09:39.000000000 -05007856 +++ gcc-4.8.1/gcc/fortran/trans-intrinsic.c 2013-0 8-11 06:31:41.480740000 -05007901 --- gcc-4.8.1.orig/gcc/fortran/trans-intrinsic.c 2013-03-15 10:09:39.000000000 +0000 7902 +++ gcc-4.8.1/gcc/fortran/trans-intrinsic.c 2013-09-13 19:01:43.113198433 +0000 7857 7903 @@ -5653,8 +5653,7 @@ 7858 7904 … … 7880 7926 } 7881 7927 diff -Naur gcc-4.8.1.orig/gcc/gcc-ar.c gcc-4.8.1/gcc/gcc-ar.c 7882 --- gcc-4.8.1.orig/gcc/gcc-ar.c 2013-01-10 14:38:27.000000000 -06007883 +++ gcc-4.8.1/gcc/gcc-ar.c 2013-0 6-19 15:59:25.231992000 -05007928 --- gcc-4.8.1.orig/gcc/gcc-ar.c 2013-01-10 20:38:27.000000000 +0000 7929 +++ gcc-4.8.1/gcc/gcc-ar.c 2013-09-13 19:01:43.113198433 +0000 7884 7930 @@ -136,7 +136,7 @@ 7885 7931 setup_prefixes (av[0]); … … 7922 7968 7923 7969 /* Create new command line with plugin */ 7924 diff -Naur gcc-4.8.1.orig/gcc/gimple.c gcc-4.8.1/gcc/gimple.c7925 --- gcc-4.8.1.orig/gcc/gimple.c 2013-01-10 14:38:27.000000000 -06007926 +++ gcc-4.8.1/gcc/gimple.c 2013-08-16 04:06:41.868666000 -05007927 @@ -4045,6 +4045,13 @@7928 ret |= visit_addr (stmt, TREE_OPERAND (op, 0), data);7929 }7930 }7931 + else if (visit_addr7932 + && gimple_code (stmt) == GIMPLE_GOTO)7933 + {7934 + tree op = gimple_goto_dest (stmt);7935 + if (TREE_CODE (op) == ADDR_EXPR)7936 + ret |= visit_addr (stmt, TREE_OPERAND (op, 0), data);7937 + }7938 7939 return ret;7940 }7941 7970 diff -Naur gcc-4.8.1.orig/gcc/gimple-ssa-strength-reduction.c gcc-4.8.1/gcc/gimple-ssa-strength-reduction.c 7942 --- gcc-4.8.1.orig/gcc/gimple-ssa-strength-reduction.c 2013-04-15 1 0:00:06.000000000 -05007943 +++ gcc-4.8.1/gcc/gimple-ssa-strength-reduction.c 2013-0 8-06 10:08:59.668112000 -05007971 --- gcc-4.8.1.orig/gcc/gimple-ssa-strength-reduction.c 2013-04-15 15:00:06.000000000 +0000 7972 +++ gcc-4.8.1/gcc/gimple-ssa-strength-reduction.c 2013-09-13 19:01:43.116531757 +0000 7944 7973 @@ -1525,11 +1525,23 @@ 7945 7974 static void … … 7971 8000 gimple_stmt_iterator gsi = gsi_for_stmt (c->cand_stmt); 7972 8001 TREE_OPERAND (mem_ref, 0) 8002 diff -Naur gcc-4.8.1.orig/gcc/gimple.c gcc-4.8.1/gcc/gimple.c 8003 --- gcc-4.8.1.orig/gcc/gimple.c 2013-01-10 20:38:27.000000000 +0000 8004 +++ gcc-4.8.1/gcc/gimple.c 2013-09-13 19:01:43.113198433 +0000 8005 @@ -4045,6 +4045,13 @@ 8006 ret |= visit_addr (stmt, TREE_OPERAND (op, 0), data); 8007 } 8008 } 8009 + else if (visit_addr 8010 + && gimple_code (stmt) == GIMPLE_GOTO) 8011 + { 8012 + tree op = gimple_goto_dest (stmt); 8013 + if (TREE_CODE (op) == ADDR_EXPR) 8014 + ret |= visit_addr (stmt, TREE_OPERAND (op, 0), data); 8015 + } 8016 8017 return ret; 8018 } 8019 diff -Naur gcc-4.8.1.orig/gcc/go/go-gcc.cc gcc-4.8.1/gcc/go/go-gcc.cc 8020 --- gcc-4.8.1.orig/gcc/go/go-gcc.cc 2013-01-10 20:38:27.000000000 +0000 8021 +++ gcc-4.8.1/gcc/go/go-gcc.cc 2013-09-13 19:01:43.166531626 +0000 8022 @@ -287,10 +287,10 @@ 8023 Location, Bstatement**); 8024 8025 Bvariable* 8026 - immutable_struct(const std::string&, bool, Btype*, Location); 8027 + immutable_struct(const std::string&, bool, bool, Btype*, Location); 8028 8029 void 8030 - immutable_struct_set_init(Bvariable*, const std::string&, bool, Btype*, 8031 + immutable_struct_set_init(Bvariable*, const std::string&, bool, bool, Btype*, 8032 Location, Bexpression*); 8033 8034 Bvariable* 8035 @@ -1242,20 +1242,41 @@ 8036 switch (TREE_CODE(type)) 8037 { 8038 case RECORD_TYPE: 8039 - { 8040 - if (go_non_zero_struct == NULL_TREE) 8041 - { 8042 - type = make_node(RECORD_TYPE); 8043 - tree field = build_decl(UNKNOWN_LOCATION, FIELD_DECL, 8044 - get_identifier("dummy"), 8045 - boolean_type_node); 8046 - DECL_CONTEXT(field) = type; 8047 - TYPE_FIELDS(type) = field; 8048 - layout_type(type); 8049 - go_non_zero_struct = type; 8050 - } 8051 - return go_non_zero_struct; 8052 - } 8053 + if (TYPE_FIELDS(type) != NULL_TREE) 8054 + { 8055 + tree ns = make_node(RECORD_TYPE); 8056 + tree field_trees = NULL_TREE; 8057 + tree *pp = &field_trees; 8058 + for (tree field = TYPE_FIELDS(type); 8059 + field != NULL_TREE; 8060 + field = DECL_CHAIN(field)) 8061 + { 8062 + tree ft = TREE_TYPE(field); 8063 + if (field == TYPE_FIELDS(type)) 8064 + ft = non_zero_size_type(ft); 8065 + tree f = build_decl(DECL_SOURCE_LOCATION(field), FIELD_DECL, 8066 + DECL_NAME(field), ft); 8067 + DECL_CONTEXT(f) = ns; 8068 + *pp = f; 8069 + pp = &DECL_CHAIN(f); 8070 + } 8071 + TYPE_FIELDS(ns) = field_trees; 8072 + layout_type(ns); 8073 + return ns; 8074 + } 8075 + 8076 + if (go_non_zero_struct == NULL_TREE) 8077 + { 8078 + type = make_node(RECORD_TYPE); 8079 + tree field = build_decl(UNKNOWN_LOCATION, FIELD_DECL, 8080 + get_identifier("dummy"), 8081 + boolean_type_node); 8082 + DECL_CONTEXT(field) = type; 8083 + TYPE_FIELDS(type) = field; 8084 + layout_type(type); 8085 + go_non_zero_struct = type; 8086 + } 8087 + return go_non_zero_struct; 8088 8089 case ARRAY_TYPE: 8090 { 8091 @@ -1454,8 +1475,8 @@ 8092 // Create a named immutable initialized data structure. 8093 8094 Bvariable* 8095 -Gcc_backend::immutable_struct(const std::string& name, bool, Btype* btype, 8096 - Location location) 8097 +Gcc_backend::immutable_struct(const std::string& name, bool, bool, 8098 + Btype* btype, Location location) 8099 { 8100 tree type_tree = btype->get_tree(); 8101 if (type_tree == error_mark_node) 8102 @@ -1482,7 +1503,7 @@ 8103 8104 void 8105 Gcc_backend::immutable_struct_set_init(Bvariable* var, const std::string&, 8106 - bool is_common, Btype*, 8107 + bool is_hidden, bool is_common, Btype*, 8108 Location, 8109 Bexpression* initializer) 8110 { 8111 @@ -1495,12 +1516,18 @@ 8112 8113 // We can't call make_decl_one_only until we set DECL_INITIAL. 8114 if (!is_common) 8115 - TREE_PUBLIC(decl) = 1; 8116 - else 8117 { 8118 - make_decl_one_only(decl, DECL_ASSEMBLER_NAME(decl)); 8119 - resolve_unique_section(decl, 1, 0); 8120 + if (!is_hidden) 8121 + TREE_PUBLIC(decl) = 1; 8122 } 8123 + else 8124 + make_decl_one_only(decl, DECL_ASSEMBLER_NAME(decl)); 8125 + 8126 + // These variables are often unneeded in the final program, so put 8127 + // them in their own section so that linker GC can discard them. 8128 + resolve_unique_section(decl, 8129 + compute_reloc_for_constant (init_tree), 8130 + 1); 8131 8132 rest_of_decl_compilation(decl, 1, 0); 8133 } 7973 8134 diff -Naur gcc-4.8.1.orig/gcc/go/gofrontend/backend.h gcc-4.8.1/gcc/go/gofrontend/backend.h 7974 --- gcc-4.8.1.orig/gcc/go/gofrontend/backend.h 2012-11-29 1 2:11:17.000000000 -06007975 +++ gcc-4.8.1/gcc/go/gofrontend/backend.h 2013-0 6-18 18:50:42.020320000 -05008135 --- gcc-4.8.1.orig/gcc/go/gofrontend/backend.h 2012-11-29 18:11:17.000000000 +0000 8136 +++ gcc-4.8.1/gcc/go/gofrontend/backend.h 2013-09-13 19:01:43.116531757 +0000 7976 8137 @@ -95,7 +95,10 @@ 7977 8138 … … 8044 8205 // structure defined in some other package. This will be a 8045 8206 diff -Naur gcc-4.8.1.orig/gcc/go/gofrontend/expressions.cc gcc-4.8.1/gcc/go/gofrontend/expressions.cc 8046 --- gcc-4.8.1.orig/gcc/go/gofrontend/expressions.cc 2012-12-21 09:59:27.000000000 -06008047 +++ gcc-4.8.1/gcc/go/gofrontend/expressions.cc 2013-0 6-26 17:42:47.881515000 -05008207 --- gcc-4.8.1.orig/gcc/go/gofrontend/expressions.cc 2012-12-21 15:59:27.000000000 +0000 8208 +++ gcc-4.8.1/gcc/go/gofrontend/expressions.cc 2013-09-13 19:01:43.119865082 +0000 8048 8209 @@ -1090,6 +1090,15 @@ 8049 8210 return this->statement_->type(); … … 9484 9645 Block* b = gogo->finish_block(location); 9485 9646 diff -Naur gcc-4.8.1.orig/gcc/go/gofrontend/expressions.h gcc-4.8.1/gcc/go/gofrontend/expressions.h 9486 --- gcc-4.8.1.orig/gcc/go/gofrontend/expressions.h 2013-01-2 8 18:28:09.000000000 -06009487 +++ gcc-4.8.1/gcc/go/gofrontend/expressions.h 2013-0 6-24 17:11:25.306173000 -05009647 --- gcc-4.8.1.orig/gcc/go/gofrontend/expressions.h 2013-01-29 00:28:09.000000000 +0000 9648 +++ gcc-4.8.1/gcc/go/gofrontend/expressions.h 2013-09-13 19:01:43.123198407 +0000 9488 9649 @@ -16,6 +16,7 @@ 9489 9650 class Traverse; … … 9825 9986 Expression* expr_; 9826 9987 diff -Naur gcc-4.8.1.orig/gcc/go/gofrontend/go.cc gcc-4.8.1/gcc/go/gofrontend/go.cc 9827 --- gcc-4.8.1.orig/gcc/go/gofrontend/go.cc 2012-10-3 0 19:38:49.000000000 -05009828 +++ gcc-4.8.1/gcc/go/gofrontend/go.cc 2013-0 6-20 19:12:07.782178000 -05009988 --- gcc-4.8.1.orig/gcc/go/gofrontend/go.cc 2012-10-31 00:38:49.000000000 +0000 9989 +++ gcc-4.8.1/gcc/go/gofrontend/go.cc 2013-09-13 19:01:43.123198407 +0000 9829 9990 @@ -44,7 +44,7 @@ 9830 9991 GO_EXTERN_C … … 9864 10025 ::gogo->do_exports(); 9865 10026 10027 diff -Naur gcc-4.8.1.orig/gcc/go/gofrontend/gogo-tree.cc gcc-4.8.1/gcc/go/gofrontend/gogo-tree.cc 10028 --- gcc-4.8.1.orig/gcc/go/gofrontend/gogo-tree.cc 2013-01-29 00:28:09.000000000 +0000 10029 +++ gcc-4.8.1/gcc/go/gofrontend/gogo-tree.cc 2013-09-13 19:01:43.126531731 +0000 10030 @@ -755,6 +755,18 @@ 10031 this->build_interface_method_tables(); 10032 10033 Bindings* bindings = this->current_bindings(); 10034 + 10035 + for (Bindings::const_declarations_iterator p = bindings->begin_declarations(); 10036 + p != bindings->end_declarations(); 10037 + ++p) 10038 + { 10039 + // If any function declarations needed a descriptor, make sure 10040 + // we build it. 10041 + Named_object* no = p->second; 10042 + if (no->is_function_declaration()) 10043 + no->func_declaration_value()->build_backend_descriptor(this); 10044 + } 10045 + 10046 size_t count_definitions = bindings->size_definitions(); 10047 size_t count = count_definitions; 10048 10049 @@ -782,6 +794,8 @@ 10050 { 10051 Named_object* no = *p; 10052 10053 + go_assert(i < count); 10054 + 10055 go_assert(!no->is_type_declaration() && !no->is_function_declaration()); 10056 // There is nothing to do for a package. 10057 if (no->is_package()) 10058 @@ -800,6 +814,15 @@ 10059 continue; 10060 } 10061 10062 + // Skip blank named functions and constants. 10063 + if ((no->is_function() && no->func_value()->is_sink()) 10064 + || (no->is_const() && no->const_value()->is_sink())) 10065 + { 10066 + --i; 10067 + --count; 10068 + continue; 10069 + } 10070 + 10071 // There is nothing useful we can output for constants which 10072 // have ideal or non-integral type. 10073 if (no->is_const()) 10074 @@ -1255,14 +1278,47 @@ 10075 if (this->fndecl_ == NULL_TREE) 10076 { 10077 tree functype = type_to_tree(this->type_->get_backend(gogo)); 10078 + 10079 + if (functype != error_mark_node) 10080 + { 10081 + // The type of a function comes back as a pointer to a 10082 + // struct whose first field is the function, but we want the 10083 + // real function type for a function declaration. 10084 + go_assert(POINTER_TYPE_P(functype) 10085 + && TREE_CODE(TREE_TYPE(functype)) == RECORD_TYPE); 10086 + functype = TREE_TYPE(TYPE_FIELDS(TREE_TYPE(functype))); 10087 + go_assert(FUNCTION_POINTER_TYPE_P(functype)); 10088 + functype = TREE_TYPE(functype); 10089 + 10090 + // In the struct, the function type always has a trailing 10091 + // closure argument. For the function body, we only use 10092 + // that trailing arg if this is a function literal or if it 10093 + // is a wrapper created to store in a descriptor. Remove it 10094 + // in that case. 10095 + if (this->enclosing_ == NULL && !this->is_descriptor_wrapper_) 10096 + { 10097 + tree old_params = TYPE_ARG_TYPES(functype); 10098 + go_assert(old_params != NULL_TREE 10099 + && old_params != void_list_node); 10100 + tree new_params = NULL_TREE; 10101 + tree *pp = &new_params; 10102 + while (TREE_CHAIN (old_params) != void_list_node) 10103 + { 10104 + tree p = TREE_VALUE(old_params); 10105 + go_assert(TYPE_P(p)); 10106 + *pp = tree_cons(NULL_TREE, p, NULL_TREE); 10107 + pp = &TREE_CHAIN(*pp); 10108 + old_params = TREE_CHAIN (old_params); 10109 + } 10110 + *pp = void_list_node; 10111 + functype = build_function_type(TREE_TYPE(functype), new_params); 10112 + } 10113 + } 10114 + 10115 if (functype == error_mark_node) 10116 this->fndecl_ = error_mark_node; 10117 else 10118 { 10119 - // The type of a function comes back as a pointer, but we 10120 - // want the real function type for a function declaration. 10121 - go_assert(POINTER_TYPE_P(functype)); 10122 - functype = TREE_TYPE(functype); 10123 tree decl = build_decl(this->location().gcc_location(), FUNCTION_DECL, 10124 id, functype); 10125 10126 @@ -1308,9 +1364,6 @@ 10127 DECL_CONTEXT(resdecl) = decl; 10128 DECL_RESULT(decl) = resdecl; 10129 10130 - if (this->enclosing_ != NULL) 10131 - DECL_STATIC_CHAIN(decl) = 1; 10132 - 10133 // If a function calls the predeclared recover function, we 10134 // can't inline it, because recover behaves differently in a 10135 // function passed directly to defer. If this is a recover 10136 @@ -1333,29 +1386,6 @@ 10137 resolve_unique_section (decl, 0, 1); 10138 10139 go_preserve_from_gc(decl); 10140 - 10141 - if (this->closure_var_ != NULL) 10142 - { 10143 - push_struct_function(decl); 10144 - 10145 - Bvariable* bvar = this->closure_var_->get_backend_variable(gogo, 10146 - no); 10147 - tree closure_decl = var_to_tree(bvar); 10148 - if (closure_decl == error_mark_node) 10149 - this->fndecl_ = error_mark_node; 10150 - else 10151 - { 10152 - DECL_ARTIFICIAL(closure_decl) = 1; 10153 - DECL_IGNORED_P(closure_decl) = 1; 10154 - TREE_USED(closure_decl) = 1; 10155 - DECL_ARG_TYPE(closure_decl) = TREE_TYPE(closure_decl); 10156 - TREE_READONLY(closure_decl) = 1; 10157 - 10158 - DECL_STRUCT_FUNCTION(decl)->static_chain_decl = closure_decl; 10159 - } 10160 - 10161 - pop_cfun(); 10162 - } 10163 } 10164 } 10165 return this->fndecl_; 10166 @@ -1382,15 +1412,44 @@ 10167 } 10168 10169 tree functype = type_to_tree(this->fntype_->get_backend(gogo)); 10170 + 10171 + if (functype != error_mark_node) 10172 + { 10173 + // The type of a function comes back as a pointer to a 10174 + // struct whose first field is the function, but we want the 10175 + // real function type for a function declaration. 10176 + go_assert(POINTER_TYPE_P(functype) 10177 + && TREE_CODE(TREE_TYPE(functype)) == RECORD_TYPE); 10178 + functype = TREE_TYPE(TYPE_FIELDS(TREE_TYPE(functype))); 10179 + go_assert(FUNCTION_POINTER_TYPE_P(functype)); 10180 + functype = TREE_TYPE(functype); 10181 + 10182 + // In the struct, the function type always has a trailing 10183 + // closure argument. Here we are referring to the function 10184 + // code directly, and we know it is not a function literal, 10185 + // and we know it is not a wrapper created to store in a 10186 + // descriptor. Remove that trailing argument. 10187 + tree old_params = TYPE_ARG_TYPES(functype); 10188 + go_assert(old_params != NULL_TREE && old_params != void_list_node); 10189 + tree new_params = NULL_TREE; 10190 + tree *pp = &new_params; 10191 + while (TREE_CHAIN (old_params) != void_list_node) 10192 + { 10193 + tree p = TREE_VALUE(old_params); 10194 + go_assert(TYPE_P(p)); 10195 + *pp = tree_cons(NULL_TREE, p, NULL_TREE); 10196 + pp = &TREE_CHAIN(*pp); 10197 + old_params = TREE_CHAIN (old_params); 10198 + } 10199 + *pp = void_list_node; 10200 + functype = build_function_type(TREE_TYPE(functype), new_params); 10201 + } 10202 + 10203 tree decl; 10204 if (functype == error_mark_node) 10205 decl = error_mark_node; 10206 else 10207 { 10208 - // The type of a function comes back as a pointer, but we 10209 - // want the real function type for a function declaration. 10210 - go_assert(POINTER_TYPE_P(functype)); 10211 - functype = TREE_TYPE(functype); 10212 decl = build_decl(this->location().gcc_location(), FUNCTION_DECL, id, 10213 functype); 10214 TREE_PUBLIC(decl) = 1; 10215 @@ -1599,6 +1658,32 @@ 10216 } 10217 } 10218 } 10219 + 10220 + // The closure variable is passed last, if this is a function 10221 + // literal or a descriptor wrapper. 10222 + if (this->closure_var_ != NULL) 10223 + { 10224 + Bvariable* bvar = 10225 + this->closure_var_->get_backend_variable(gogo, named_function); 10226 + tree var_decl = var_to_tree(bvar); 10227 + if (var_decl != error_mark_node) 10228 + { 10229 + go_assert(TREE_CODE(var_decl) == PARM_DECL); 10230 + *pp = var_decl; 10231 + pp = &DECL_CHAIN(*pp); 10232 + } 10233 + } 10234 + else if (this->enclosing_ != NULL || this->is_descriptor_wrapper_) 10235 + { 10236 + tree parm_decl = build_decl(this->location_.gcc_location(), PARM_DECL, 10237 + get_identifier("$closure"), 10238 + const_ptr_type_node); 10239 + DECL_CONTEXT(parm_decl) = current_function_decl; 10240 + DECL_ARG_TYPE(parm_decl) = const_ptr_type_node; 10241 + *pp = parm_decl; 10242 + pp = &DECL_CHAIN(*pp); 10243 + } 10244 + 10245 *pp = NULL_TREE; 10246 10247 DECL_ARGUMENTS(fndecl) = params; 10248 @@ -1681,6 +1766,13 @@ 10249 10250 DECL_SAVED_TREE(fndecl) = code; 10251 } 10252 + 10253 + // If we created a descriptor for the function, make sure we emit it. 10254 + if (this->descriptor_ != NULL) 10255 + { 10256 + Translate_context context(gogo, NULL, NULL, NULL); 10257 + this->descriptor_->get_tree(&context); 10258 + } 10259 } 10260 10261 // Build the wrappers around function code needed if the function has 10262 @@ -1844,6 +1936,20 @@ 10263 } 10264 } 10265 10266 +// Build the descriptor for a function declaration. This won't 10267 +// necessarily happen if the package has just a declaration for the 10268 +// function and no other reference to it, but we may still need the 10269 +// descriptor for references from other packages. 10270 +void 10271 +Function_declaration::build_backend_descriptor(Gogo* gogo) 10272 +{ 10273 + if (this->descriptor_ != NULL) 10274 + { 10275 + Translate_context context(gogo, NULL, NULL, NULL); 10276 + this->descriptor_->get_tree(&context); 10277 + } 10278 +} 10279 + 10280 // Return the integer type to use for a size. 10281 10282 GO_EXTERN_C 10283 @@ -2437,70 +2543,3 @@ 10284 build2(COMPOUND_EXPR, type_tree, call, tmp)); 10285 } 10286 } 10287 - 10288 -// Return the type of a function trampoline. This is like 10289 -// get_trampoline_type in tree-nested.c. 10290 - 10291 -tree 10292 -Gogo::trampoline_type_tree() 10293 -{ 10294 - static tree type_tree; 10295 - if (type_tree == NULL_TREE) 10296 - { 10297 - unsigned int size; 10298 - unsigned int align; 10299 - go_trampoline_info(&size, &align); 10300 - tree t = build_index_type(build_int_cst(integer_type_node, size - 1)); 10301 - t = build_array_type(char_type_node, t); 10302 - 10303 - type_tree = Gogo::builtin_struct(NULL, "__go_trampoline", NULL_TREE, 1, 10304 - "__data", t); 10305 - t = TYPE_FIELDS(type_tree); 10306 - DECL_ALIGN(t) = align; 10307 - DECL_USER_ALIGN(t) = 1; 10308 - 10309 - go_preserve_from_gc(type_tree); 10310 - } 10311 - return type_tree; 10312 -} 10313 - 10314 -// Make a trampoline which calls FNADDR passing CLOSURE. 10315 - 10316 -tree 10317 -Gogo::make_trampoline(tree fnaddr, tree closure, Location location) 10318 -{ 10319 - tree trampoline_type = Gogo::trampoline_type_tree(); 10320 - tree trampoline_size = TYPE_SIZE_UNIT(trampoline_type); 10321 - 10322 - closure = save_expr(closure); 10323 - 10324 - // We allocate the trampoline using a special function which will 10325 - // mark it as executable. 10326 - static tree trampoline_fndecl; 10327 - tree x = Gogo::call_builtin(&trampoline_fndecl, 10328 - location, 10329 - "__go_allocate_trampoline", 10330 - 2, 10331 - ptr_type_node, 10332 - size_type_node, 10333 - trampoline_size, 10334 - ptr_type_node, 10335 - fold_convert_loc(location.gcc_location(), 10336 - ptr_type_node, closure)); 10337 - if (x == error_mark_node) 10338 - return error_mark_node; 10339 - 10340 - x = save_expr(x); 10341 - 10342 - // Initialize the trampoline. 10343 - tree calldecl = builtin_decl_implicit(BUILT_IN_INIT_HEAP_TRAMPOLINE); 10344 - tree ini = build_call_expr(calldecl, 3, x, fnaddr, closure); 10345 - 10346 - // On some targets the trampoline address needs to be adjusted. For 10347 - // example, when compiling in Thumb mode on the ARM, the address 10348 - // needs to have the low bit set. 10349 - x = build_call_expr(builtin_decl_explicit(BUILT_IN_ADJUST_TRAMPOLINE), 1, x); 10350 - x = fold_convert(TREE_TYPE(fnaddr), x); 10351 - 10352 - return build2(COMPOUND_EXPR, TREE_TYPE(x), ini, x); 10353 -} 9866 10354 diff -Naur gcc-4.8.1.orig/gcc/go/gofrontend/gogo.cc gcc-4.8.1/gcc/go/gofrontend/gogo.cc 9867 --- gcc-4.8.1.orig/gcc/go/gofrontend/gogo.cc 2013-02-10 0 0:02:38.000000000 -06009868 +++ gcc-4.8.1/gcc/go/gofrontend/gogo.cc 2013-0 8-07 14:00:55.550656000 -050010355 --- gcc-4.8.1.orig/gcc/go/gofrontend/gogo.cc 2013-02-10 06:02:38.000000000 +0000 10356 +++ gcc-4.8.1/gcc/go/gofrontend/gogo.cc 2013-09-13 19:01:43.126531731 +0000 9869 10357 @@ -364,7 +364,7 @@ 9870 10358 // Declare "main" as a function which takes no parameters and … … 10305 10793 this->u_.func_value = function; 10306 10794 diff -Naur gcc-4.8.1.orig/gcc/go/gofrontend/gogo.h gcc-4.8.1/gcc/go/gofrontend/gogo.h 10307 --- gcc-4.8.1.orig/gcc/go/gofrontend/gogo.h 2012-12-21 16:23:23.000000000 -060010308 +++ gcc-4.8.1/gcc/go/gofrontend/gogo.h 2013-0 6-24 18:13:14.268180000 -050010795 --- gcc-4.8.1.orig/gcc/go/gofrontend/gogo.h 2012-12-21 22:23:23.000000000 +0000 10796 +++ gcc-4.8.1/gcc/go/gofrontend/gogo.h 2013-09-13 19:01:43.126531731 +0000 10309 10797 @@ -476,6 +476,10 @@ 10310 10798 void … … 10513 11001 10514 11002 // A type declaration. 10515 diff -Naur gcc-4.8.1.orig/gcc/go/gofrontend/gogo-tree.cc gcc-4.8.1/gcc/go/gofrontend/gogo-tree.cc10516 --- gcc-4.8.1.orig/gcc/go/gofrontend/gogo-tree.cc 2013-01-28 18:28:09.000000000 -060010517 +++ gcc-4.8.1/gcc/go/gofrontend/gogo-tree.cc 2013-06-24 18:13:14.268180000 -050010518 @@ -755,6 +755,18 @@10519 this->build_interface_method_tables();10520 10521 Bindings* bindings = this->current_bindings();10522 +10523 + for (Bindings::const_declarations_iterator p = bindings->begin_declarations();10524 + p != bindings->end_declarations();10525 + ++p)10526 + {10527 + // If any function declarations needed a descriptor, make sure10528 + // we build it.10529 + Named_object* no = p->second;10530 + if (no->is_function_declaration())10531 + no->func_declaration_value()->build_backend_descriptor(this);10532 + }10533 +10534 size_t count_definitions = bindings->size_definitions();10535 size_t count = count_definitions;10536 10537 @@ -782,6 +794,8 @@10538 {10539 Named_object* no = *p;10540 10541 + go_assert(i < count);10542 +10543 go_assert(!no->is_type_declaration() && !no->is_function_declaration());10544 // There is nothing to do for a package.10545 if (no->is_package())10546 @@ -800,6 +814,15 @@10547 continue;10548 }10549 10550 + // Skip blank named functions and constants.10551 + if ((no->is_function() && no->func_value()->is_sink())10552 + || (no->is_const() && no->const_value()->is_sink()))10553 + {10554 + --i;10555 + --count;10556 + continue;10557 + }10558 +10559 // There is nothing useful we can output for constants which10560 // have ideal or non-integral type.10561 if (no->is_const())10562 @@ -1255,14 +1278,47 @@10563 if (this->fndecl_ == NULL_TREE)10564 {10565 tree functype = type_to_tree(this->type_->get_backend(gogo));10566 +10567 + if (functype != error_mark_node)10568 + {10569 + // The type of a function comes back as a pointer to a10570 + // struct whose first field is the function, but we want the10571 + // real function type for a function declaration.10572 + go_assert(POINTER_TYPE_P(functype)10573 + && TREE_CODE(TREE_TYPE(functype)) == RECORD_TYPE);10574 + functype = TREE_TYPE(TYPE_FIELDS(TREE_TYPE(functype)));10575 + go_assert(FUNCTION_POINTER_TYPE_P(functype));10576 + functype = TREE_TYPE(functype);10577 +10578 + // In the struct, the function type always has a trailing10579 + // closure argument. For the function body, we only use10580 + // that trailing arg if this is a function literal or if it10581 + // is a wrapper created to store in a descriptor. Remove it10582 + // in that case.10583 + if (this->enclosing_ == NULL && !this->is_descriptor_wrapper_)10584 + {10585 + tree old_params = TYPE_ARG_TYPES(functype);10586 + go_assert(old_params != NULL_TREE10587 + && old_params != void_list_node);10588 + tree new_params = NULL_TREE;10589 + tree *pp = &new_params;10590 + while (TREE_CHAIN (old_params) != void_list_node)10591 + {10592 + tree p = TREE_VALUE(old_params);10593 + go_assert(TYPE_P(p));10594 + *pp = tree_cons(NULL_TREE, p, NULL_TREE);10595 + pp = &TREE_CHAIN(*pp);10596 + old_params = TREE_CHAIN (old_params);10597 + }10598 + *pp = void_list_node;10599 + functype = build_function_type(TREE_TYPE(functype), new_params);10600 + }10601 + }10602 +10603 if (functype == error_mark_node)10604 this->fndecl_ = error_mark_node;10605 else10606 {10607 - // The type of a function comes back as a pointer, but we10608 - // want the real function type for a function declaration.10609 - go_assert(POINTER_TYPE_P(functype));10610 - functype = TREE_TYPE(functype);10611 tree decl = build_decl(this->location().gcc_location(), FUNCTION_DECL,10612 id, functype);10613 10614 @@ -1308,9 +1364,6 @@10615 DECL_CONTEXT(resdecl) = decl;10616 DECL_RESULT(decl) = resdecl;10617 10618 - if (this->enclosing_ != NULL)10619 - DECL_STATIC_CHAIN(decl) = 1;10620 -10621 // If a function calls the predeclared recover function, we10622 // can't inline it, because recover behaves differently in a10623 // function passed directly to defer. If this is a recover10624 @@ -1333,29 +1386,6 @@10625 resolve_unique_section (decl, 0, 1);10626 10627 go_preserve_from_gc(decl);10628 -10629 - if (this->closure_var_ != NULL)10630 - {10631 - push_struct_function(decl);10632 -10633 - Bvariable* bvar = this->closure_var_->get_backend_variable(gogo,10634 - no);10635 - tree closure_decl = var_to_tree(bvar);10636 - if (closure_decl == error_mark_node)10637 - this->fndecl_ = error_mark_node;10638 - else10639 - {10640 - DECL_ARTIFICIAL(closure_decl) = 1;10641 - DECL_IGNORED_P(closure_decl) = 1;10642 - TREE_USED(closure_decl) = 1;10643 - DECL_ARG_TYPE(closure_decl) = TREE_TYPE(closure_decl);10644 - TREE_READONLY(closure_decl) = 1;10645 -10646 - DECL_STRUCT_FUNCTION(decl)->static_chain_decl = closure_decl;10647 - }10648 -10649 - pop_cfun();10650 - }10651 }10652 }10653 return this->fndecl_;10654 @@ -1382,15 +1412,44 @@10655 }10656 10657 tree functype = type_to_tree(this->fntype_->get_backend(gogo));10658 +10659 + if (functype != error_mark_node)10660 + {10661 + // The type of a function comes back as a pointer to a10662 + // struct whose first field is the function, but we want the10663 + // real function type for a function declaration.10664 + go_assert(POINTER_TYPE_P(functype)10665 + && TREE_CODE(TREE_TYPE(functype)) == RECORD_TYPE);10666 + functype = TREE_TYPE(TYPE_FIELDS(TREE_TYPE(functype)));10667 + go_assert(FUNCTION_POINTER_TYPE_P(functype));10668 + functype = TREE_TYPE(functype);10669 +10670 + // In the struct, the function type always has a trailing10671 + // closure argument. Here we are referring to the function10672 + // code directly, and we know it is not a function literal,10673 + // and we know it is not a wrapper created to store in a10674 + // descriptor. Remove that trailing argument.10675 + tree old_params = TYPE_ARG_TYPES(functype);10676 + go_assert(old_params != NULL_TREE && old_params != void_list_node);10677 + tree new_params = NULL_TREE;10678 + tree *pp = &new_params;10679 + while (TREE_CHAIN (old_params) != void_list_node)10680 + {10681 + tree p = TREE_VALUE(old_params);10682 + go_assert(TYPE_P(p));10683 + *pp = tree_cons(NULL_TREE, p, NULL_TREE);10684 + pp = &TREE_CHAIN(*pp);10685 + old_params = TREE_CHAIN (old_params);10686 + }10687 + *pp = void_list_node;10688 + functype = build_function_type(TREE_TYPE(functype), new_params);10689 + }10690 +10691 tree decl;10692 if (functype == error_mark_node)10693 decl = error_mark_node;10694 else10695 {10696 - // The type of a function comes back as a pointer, but we10697 - // want the real function type for a function declaration.10698 - go_assert(POINTER_TYPE_P(functype));10699 - functype = TREE_TYPE(functype);10700 decl = build_decl(this->location().gcc_location(), FUNCTION_DECL, id,10701 functype);10702 TREE_PUBLIC(decl) = 1;10703 @@ -1599,6 +1658,32 @@10704 }10705 }10706 }10707 +10708 + // The closure variable is passed last, if this is a function10709 + // literal or a descriptor wrapper.10710 + if (this->closure_var_ != NULL)10711 + {10712 + Bvariable* bvar =10713 + this->closure_var_->get_backend_variable(gogo, named_function);10714 + tree var_decl = var_to_tree(bvar);10715 + if (var_decl != error_mark_node)10716 + {10717 + go_assert(TREE_CODE(var_decl) == PARM_DECL);10718 + *pp = var_decl;10719 + pp = &DECL_CHAIN(*pp);10720 + }10721 + }10722 + else if (this->enclosing_ != NULL || this->is_descriptor_wrapper_)10723 + {10724 + tree parm_decl = build_decl(this->location_.gcc_location(), PARM_DECL,10725 + get_identifier("$closure"),10726 + const_ptr_type_node);10727 + DECL_CONTEXT(parm_decl) = current_function_decl;10728 + DECL_ARG_TYPE(parm_decl) = const_ptr_type_node;10729 + *pp = parm_decl;10730 + pp = &DECL_CHAIN(*pp);10731 + }10732 +10733 *pp = NULL_TREE;10734 10735 DECL_ARGUMENTS(fndecl) = params;10736 @@ -1681,6 +1766,13 @@10737 10738 DECL_SAVED_TREE(fndecl) = code;10739 }10740 +10741 + // If we created a descriptor for the function, make sure we emit it.10742 + if (this->descriptor_ != NULL)10743 + {10744 + Translate_context context(gogo, NULL, NULL, NULL);10745 + this->descriptor_->get_tree(&context);10746 + }10747 }10748 10749 // Build the wrappers around function code needed if the function has10750 @@ -1844,6 +1936,20 @@10751 }10752 }10753 10754 +// Build the descriptor for a function declaration. This won't10755 +// necessarily happen if the package has just a declaration for the10756 +// function and no other reference to it, but we may still need the10757 +// descriptor for references from other packages.10758 +void10759 +Function_declaration::build_backend_descriptor(Gogo* gogo)10760 +{10761 + if (this->descriptor_ != NULL)10762 + {10763 + Translate_context context(gogo, NULL, NULL, NULL);10764 + this->descriptor_->get_tree(&context);10765 + }10766 +}10767 +10768 // Return the integer type to use for a size.10769 10770 GO_EXTERN_C10771 @@ -2437,70 +2543,3 @@10772 build2(COMPOUND_EXPR, type_tree, call, tmp));10773 }10774 }10775 -10776 -// Return the type of a function trampoline. This is like10777 -// get_trampoline_type in tree-nested.c.10778 -10779 -tree10780 -Gogo::trampoline_type_tree()10781 -{10782 - static tree type_tree;10783 - if (type_tree == NULL_TREE)10784 - {10785 - unsigned int size;10786 - unsigned int align;10787 - go_trampoline_info(&size, &align);10788 - tree t = build_index_type(build_int_cst(integer_type_node, size - 1));10789 - t = build_array_type(char_type_node, t);10790 -10791 - type_tree = Gogo::builtin_struct(NULL, "__go_trampoline", NULL_TREE, 1,10792 - "__data", t);10793 - t = TYPE_FIELDS(type_tree);10794 - DECL_ALIGN(t) = align;10795 - DECL_USER_ALIGN(t) = 1;10796 -10797 - go_preserve_from_gc(type_tree);10798 - }10799 - return type_tree;10800 -}10801 -10802 -// Make a trampoline which calls FNADDR passing CLOSURE.10803 -10804 -tree10805 -Gogo::make_trampoline(tree fnaddr, tree closure, Location location)10806 -{10807 - tree trampoline_type = Gogo::trampoline_type_tree();10808 - tree trampoline_size = TYPE_SIZE_UNIT(trampoline_type);10809 -10810 - closure = save_expr(closure);10811 -10812 - // We allocate the trampoline using a special function which will10813 - // mark it as executable.10814 - static tree trampoline_fndecl;10815 - tree x = Gogo::call_builtin(&trampoline_fndecl,10816 - location,10817 - "__go_allocate_trampoline",10818 - 2,10819 - ptr_type_node,10820 - size_type_node,10821 - trampoline_size,10822 - ptr_type_node,10823 - fold_convert_loc(location.gcc_location(),10824 - ptr_type_node, closure));10825 - if (x == error_mark_node)10826 - return error_mark_node;10827 -10828 - x = save_expr(x);10829 -10830 - // Initialize the trampoline.10831 - tree calldecl = builtin_decl_implicit(BUILT_IN_INIT_HEAP_TRAMPOLINE);10832 - tree ini = build_call_expr(calldecl, 3, x, fnaddr, closure);10833 -10834 - // On some targets the trampoline address needs to be adjusted. For10835 - // example, when compiling in Thumb mode on the ARM, the address10836 - // needs to have the low bit set.10837 - x = build_call_expr(builtin_decl_explicit(BUILT_IN_ADJUST_TRAMPOLINE), 1, x);10838 - x = fold_convert(TREE_TYPE(fnaddr), x);10839 -10840 - return build2(COMPOUND_EXPR, TREE_TYPE(x), ini, x);10841 -}10842 11003 diff -Naur gcc-4.8.1.orig/gcc/go/gofrontend/parse.cc gcc-4.8.1/gcc/go/gofrontend/parse.cc 10843 --- gcc-4.8.1.orig/gcc/go/gofrontend/parse.cc 2012-12-13 16:20:23.000000000 -060010844 +++ gcc-4.8.1/gcc/go/gofrontend/parse.cc 2013-0 8-17 13:04:58.702541000 -050011004 --- gcc-4.8.1.orig/gcc/go/gofrontend/parse.cc 2012-12-13 22:20:23.000000000 +0000 11005 +++ gcc-4.8.1/gcc/go/gofrontend/parse.cc 2013-09-13 19:01:43.129865056 +0000 10845 11006 @@ -1457,6 +1457,16 @@ 10846 11007 … … 10946 11107 if (!any_new) 10947 11108 diff -Naur gcc-4.8.1.orig/gcc/go/gofrontend/runtime.def gcc-4.8.1/gcc/go/gofrontend/runtime.def 10948 --- gcc-4.8.1.orig/gcc/go/gofrontend/runtime.def 2012-11-29 1 2:11:17.000000000 -060010949 +++ gcc-4.8.1/gcc/go/gofrontend/runtime.def 2013-0 6-18 18:50:42.020320000 -050011109 --- gcc-4.8.1.orig/gcc/go/gofrontend/runtime.def 2012-11-29 18:11:17.000000000 +0000 11110 +++ gcc-4.8.1/gcc/go/gofrontend/runtime.def 2013-09-13 19:01:43.129865056 +0000 10950 11111 @@ -224,11 +224,6 @@ 10951 11112 DEF_GO_RUNTIME(NEW_NOPOINTERS, "__go_new_nopointers", P1(UINTPTR), R1(POINTER)) … … 10961 11122 10962 11123 diff -Naur gcc-4.8.1.orig/gcc/go/gofrontend/statements.cc gcc-4.8.1/gcc/go/gofrontend/statements.cc 10963 --- gcc-4.8.1.orig/gcc/go/gofrontend/statements.cc 2012-12-21 09:59:27.000000000 -060010964 +++ gcc-4.8.1/gcc/go/gofrontend/statements.cc 2013-0 8-07 14:00:55.550656000 -050011124 --- gcc-4.8.1.orig/gcc/go/gofrontend/statements.cc 2012-12-21 15:59:27.000000000 +0000 11125 +++ gcc-4.8.1/gcc/go/gofrontend/statements.cc 2013-09-13 19:01:43.133198380 +0000 10965 11126 @@ -569,7 +569,10 @@ 10966 11127 Assignment_statement::do_determine_types() … … 11264 11425 void 11265 11426 diff -Naur gcc-4.8.1.orig/gcc/go/gofrontend/statements.h gcc-4.8.1/gcc/go/gofrontend/statements.h 11266 --- gcc-4.8.1.orig/gcc/go/gofrontend/statements.h 2013-01-2 8 18:28:09.000000000 -060011267 +++ gcc-4.8.1/gcc/go/gofrontend/statements.h 2013-0 6-24 17:11:25.306173000 -050011427 --- gcc-4.8.1.orig/gcc/go/gofrontend/statements.h 2013-01-29 00:28:09.000000000 +0000 11428 +++ gcc-4.8.1/gcc/go/gofrontend/statements.h 2013-09-13 19:01:43.133198380 +0000 11268 11429 @@ -207,6 +207,13 @@ 11269 11430 static Return_statement* … … 11346 11507 Named_object* var_; 11347 11508 diff -Naur gcc-4.8.1.orig/gcc/go/gofrontend/types.cc gcc-4.8.1/gcc/go/gofrontend/types.cc 11348 --- gcc-4.8.1.orig/gcc/go/gofrontend/types.cc 2013-0 1-31 18:23:22.000000000 -060011349 +++ gcc-4.8.1/gcc/go/gofrontend/types.cc 2013-0 8-23 16:04:55.544713000 -050011509 --- gcc-4.8.1.orig/gcc/go/gofrontend/types.cc 2013-02-01 00:23:22.000000000 +0000 11510 +++ gcc-4.8.1/gcc/go/gofrontend/types.cc 2013-09-13 19:01:43.136531705 +0000 11350 11511 @@ -1298,8 +1298,8 @@ 11351 11512 // converting INITIALIZER. … … 11691 11852 &sub_is_method, 11692 11853 diff -Naur gcc-4.8.1.orig/gcc/go/gofrontend/types.h gcc-4.8.1/gcc/go/gofrontend/types.h 11693 --- gcc-4.8.1.orig/gcc/go/gofrontend/types.h 2013-0 1-31 18:23:22.000000000 -060011694 +++ gcc-4.8.1/gcc/go/gofrontend/types.h 2013-0 8-23 16:04:55.544713000 -050011854 --- gcc-4.8.1.orig/gcc/go/gofrontend/types.h 2013-02-01 00:23:22.000000000 +0000 11855 +++ gcc-4.8.1/gcc/go/gofrontend/types.h 2013-09-13 19:01:43.139865030 +0000 11695 11856 @@ -523,6 +523,14 @@ 11696 11857 static Type* … … 11756 11917 Type* 11757 11918 type() const 11758 diff -Naur gcc-4.8.1.orig/gcc/go/go-gcc.cc gcc-4.8.1/gcc/go/go-gcc.cc 11759 --- gcc-4.8.1.orig/gcc/go/go-gcc.cc 2013-01-10 14:38:27.000000000 -0600 11760 +++ gcc-4.8.1/gcc/go/go-gcc.cc 2013-08-06 11:40:25.449651000 -0500 11761 @@ -287,10 +287,10 @@ 11762 Location, Bstatement**); 11763 11764 Bvariable* 11765 - immutable_struct(const std::string&, bool, Btype*, Location); 11766 + immutable_struct(const std::string&, bool, bool, Btype*, Location); 11767 11768 void 11769 - immutable_struct_set_init(Bvariable*, const std::string&, bool, Btype*, 11770 + immutable_struct_set_init(Bvariable*, const std::string&, bool, bool, Btype*, 11771 Location, Bexpression*); 11772 11773 Bvariable* 11774 @@ -1242,20 +1242,41 @@ 11775 switch (TREE_CODE(type)) 11776 { 11777 case RECORD_TYPE: 11778 - { 11779 - if (go_non_zero_struct == NULL_TREE) 11780 - { 11781 - type = make_node(RECORD_TYPE); 11782 - tree field = build_decl(UNKNOWN_LOCATION, FIELD_DECL, 11783 - get_identifier("dummy"), 11784 - boolean_type_node); 11785 - DECL_CONTEXT(field) = type; 11786 - TYPE_FIELDS(type) = field; 11787 - layout_type(type); 11788 - go_non_zero_struct = type; 11789 - } 11790 - return go_non_zero_struct; 11791 - } 11792 + if (TYPE_FIELDS(type) != NULL_TREE) 11793 + { 11794 + tree ns = make_node(RECORD_TYPE); 11795 + tree field_trees = NULL_TREE; 11796 + tree *pp = &field_trees; 11797 + for (tree field = TYPE_FIELDS(type); 11798 + field != NULL_TREE; 11799 + field = DECL_CHAIN(field)) 11800 + { 11801 + tree ft = TREE_TYPE(field); 11802 + if (field == TYPE_FIELDS(type)) 11803 + ft = non_zero_size_type(ft); 11804 + tree f = build_decl(DECL_SOURCE_LOCATION(field), FIELD_DECL, 11805 + DECL_NAME(field), ft); 11806 + DECL_CONTEXT(f) = ns; 11807 + *pp = f; 11808 + pp = &DECL_CHAIN(f); 11809 + } 11810 + TYPE_FIELDS(ns) = field_trees; 11811 + layout_type(ns); 11812 + return ns; 11813 + } 11814 + 11815 + if (go_non_zero_struct == NULL_TREE) 11816 + { 11817 + type = make_node(RECORD_TYPE); 11818 + tree field = build_decl(UNKNOWN_LOCATION, FIELD_DECL, 11819 + get_identifier("dummy"), 11820 + boolean_type_node); 11821 + DECL_CONTEXT(field) = type; 11822 + TYPE_FIELDS(type) = field; 11823 + layout_type(type); 11824 + go_non_zero_struct = type; 11825 + } 11826 + return go_non_zero_struct; 11827 11828 case ARRAY_TYPE: 11829 { 11830 @@ -1454,8 +1475,8 @@ 11831 // Create a named immutable initialized data structure. 11832 11833 Bvariable* 11834 -Gcc_backend::immutable_struct(const std::string& name, bool, Btype* btype, 11835 - Location location) 11836 +Gcc_backend::immutable_struct(const std::string& name, bool, bool, 11837 + Btype* btype, Location location) 11919 diff -Naur gcc-4.8.1.orig/gcc/graphite-clast-to-gimple.c gcc-4.8.1/gcc/graphite-clast-to-gimple.c 11920 --- gcc-4.8.1.orig/gcc/graphite-clast-to-gimple.c 2013-01-10 20:38:27.000000000 +0000 11921 +++ gcc-4.8.1/gcc/graphite-clast-to-gimple.c 2013-09-13 19:01:43.959862879 +0000 11922 @@ -1170,8 +1170,11 @@ 11923 redirect_edge_succ_nodup (next_e, after); 11924 set_immediate_dominator (CDI_DOMINATORS, next_e->dest, next_e->src); 11925 11926 + isl_set *domain = isl_set_from_cloog_domain (stmt->domain); 11927 + int scheduling_dim = isl_set_n_dim (domain); 11928 + 11929 if (flag_loop_parallelize_all 11930 - && loop_is_parallel_p (loop, bb_pbb_mapping, level)) 11931 + && loop_is_parallel_p (loop, bb_pbb_mapping, scheduling_dim)) 11932 loop->can_be_parallel = true; 11933 11934 return last_e; 11935 diff -Naur gcc-4.8.1.orig/gcc/graphite-dependences.c gcc-4.8.1/gcc/graphite-dependences.c 11936 --- gcc-4.8.1.orig/gcc/graphite-dependences.c 2013-01-10 20:38:27.000000000 +0000 11937 +++ gcc-4.8.1/gcc/graphite-dependences.c 2013-09-13 19:01:43.963196204 +0000 11938 @@ -297,7 +297,7 @@ 11939 int depth) 11838 11940 { 11839 tree type_tree = btype->get_tree(); 11840 if (type_tree == error_mark_node) 11841 @@ -1482,7 +1503,7 @@ 11842 11843 void 11844 Gcc_backend::immutable_struct_set_init(Bvariable* var, const std::string&, 11845 - bool is_common, Btype*, 11846 + bool is_hidden, bool is_common, Btype*, 11847 Location, 11848 Bexpression* initializer) 11849 { 11850 @@ -1495,12 +1516,18 @@ 11851 11852 // We can't call make_decl_one_only until we set DECL_INITIAL. 11853 if (!is_common) 11854 - TREE_PUBLIC(decl) = 1; 11855 - else 11856 { 11857 - make_decl_one_only(decl, DECL_ASSEMBLER_NAME(decl)); 11858 - resolve_unique_section(decl, 1, 0); 11859 + if (!is_hidden) 11860 + TREE_PUBLIC(decl) = 1; 11861 } 11862 + else 11863 + make_decl_one_only(decl, DECL_ASSEMBLER_NAME(decl)); 11864 + 11865 + // These variables are often unneeded in the final program, so put 11866 + // them in their own section so that linker GC can discard them. 11867 + resolve_unique_section(decl, 11868 + compute_reloc_for_constant (init_tree), 11869 + 1); 11870 11871 rest_of_decl_compilation(decl, 1, 0); 11872 } 11941 bool res; 11942 - int idx, i; 11943 + int i; 11944 isl_space *space; 11945 isl_map *lex, *x; 11946 isl_constraint *ineq; 11947 @@ -312,13 +312,12 @@ 11948 space = isl_map_get_space (x); 11949 ineq = isl_inequality_alloc (isl_local_space_from_space (space)); 11950 11951 - idx = 2 * depth + 1; 11952 - for (i = 0; i < idx; i++) 11953 + for (i = 0; i < depth - 1; i++) 11954 lex = isl_map_equate (lex, isl_dim_in, i, isl_dim_out, i); 11955 11956 /* in + 1 <= out */ 11957 - ineq = isl_constraint_set_coefficient_si (ineq, isl_dim_out, idx, 1); 11958 - ineq = isl_constraint_set_coefficient_si (ineq, isl_dim_in, idx, -1); 11959 + ineq = isl_constraint_set_coefficient_si (ineq, isl_dim_out, depth - 1, 1); 11960 + ineq = isl_constraint_set_coefficient_si (ineq, isl_dim_in, depth - 1, -1); 11961 ineq = isl_constraint_set_constant_si (ineq, -1); 11962 lex = isl_map_add_constraint (lex, ineq); 11963 x = isl_map_intersect (x, lex); 11873 11964 diff -Naur gcc-4.8.1.orig/gcc/ipa-cp.c gcc-4.8.1/gcc/ipa-cp.c 11874 --- gcc-4.8.1.orig/gcc/ipa-cp.c 2013-05-09 06:56:32.000000000 -050011875 +++ gcc-4.8.1/gcc/ipa-cp.c 2013-0 6-12 08:17:03.426963000 -050011965 --- gcc-4.8.1.orig/gcc/ipa-cp.c 2013-05-09 11:56:32.000000000 +0000 11966 +++ gcc-4.8.1/gcc/ipa-cp.c 2013-09-13 19:01:43.166531626 +0000 11876 11967 @@ -1507,7 +1507,8 @@ 11877 11968 tree otr_type; … … 11895 11986 TREE_CODE (t) == ADDR_EXPR 11896 11987 diff -Naur gcc-4.8.1.orig/gcc/ipa-prop.c gcc-4.8.1/gcc/ipa-prop.c 11897 --- gcc-4.8.1.orig/gcc/ipa-prop.c 2013-05-23 08:25:23.000000000 -050011898 +++ gcc-4.8.1/gcc/ipa-prop.c 2013-0 6-24 07:57:52.158957000 -050011988 --- gcc-4.8.1.orig/gcc/ipa-prop.c 2013-05-23 13:25:23.000000000 +0000 11989 +++ gcc-4.8.1/gcc/ipa-prop.c 2013-09-13 19:01:43.169864951 +0000 11899 11990 @@ -678,13 +678,19 @@ 11900 11991 bool modified = false; … … 11922 12013 return !modified; 11923 12014 diff -Naur gcc-4.8.1.orig/gcc/ira.c gcc-4.8.1/gcc/ira.c 11924 --- gcc-4.8.1.orig/gcc/ira.c 2013-05-23 05:36:55.000000000 -050011925 +++ gcc-4.8.1/gcc/ira.c 2013-0 6-20 16:15:52.020104000 -050012015 --- gcc-4.8.1.orig/gcc/ira.c 2013-05-23 10:36:55.000000000 +0000 12016 +++ gcc-4.8.1/gcc/ira.c 2013-09-13 19:01:43.169864951 +0000 11926 12017 @@ -2863,6 +2863,28 @@ 11927 12018 } … … 12020 12111 12021 12112 diff -Naur gcc-4.8.1.orig/gcc/lra-assigns.c gcc-4.8.1/gcc/lra-assigns.c 12022 --- gcc-4.8.1.orig/gcc/lra-assigns.c 2013-02-15 1 3:17:02.000000000 -060012023 +++ gcc-4.8.1/gcc/lra-assigns.c 2013-0 7-19 15:47:57.560539000 -050012113 --- gcc-4.8.1.orig/gcc/lra-assigns.c 2013-02-15 19:17:02.000000000 +0000 12114 +++ gcc-4.8.1/gcc/lra-assigns.c 2013-09-13 19:01:43.173198275 +0000 12024 12115 @@ -116,6 +116,11 @@ 12025 12116 /* Map regno to the corresponding regno assignment info. */ … … 12068 12159 /* This is a very rare event. We can not assign a hard 12069 12160 diff -Naur gcc-4.8.1.orig/gcc/lra-constraints.c gcc-4.8.1/gcc/lra-constraints.c 12070 --- gcc-4.8.1.orig/gcc/lra-constraints.c 2013-05-02 1 4:16:29.000000000 -050012071 +++ gcc-4.8.1/gcc/lra-constraints.c 2013-0 8-15 03:03:32.168856000 -050012161 --- gcc-4.8.1.orig/gcc/lra-constraints.c 2013-05-02 19:16:29.000000000 +0000 12162 +++ gcc-4.8.1/gcc/lra-constraints.c 2013-09-13 19:01:43.173198275 +0000 12072 12163 @@ -1388,7 +1388,7 @@ 12073 12164 for (nalt = 0; nalt < n_alternatives; nalt++) … … 12088 12179 bitmap_set_bit (&live_regs, reg->regno); 12089 12180 /* It is quite important to remove dead move insns because it 12090 diff -Naur gcc-4.8.1.orig/gcc/Makefile.in gcc-4.8.1/gcc/Makefile.in12091 --- gcc-4.8.1.orig/gcc/Makefile.in 2013-05-21 11:00:49.000000000 -050012092 +++ gcc-4.8.1/gcc/Makefile.in 2013-07-08 04:14:34.834106000 -050012093 @@ -2505,7 +2505,7 @@12094 $(TM_H) coretypes.h $(TREE_PASS_H) $(FLAGS_H) \12095 tree-iterator.h $(BASIC_BLOCK_H) $(GIMPLE_H) $(TREE_INLINE_H) \12096 $(VEC_H) langhooks.h alloc-pool.h pointer-set.h $(CFGLOOP_H) \12097 - $(TARGET_H) $(GIMPLE_PRETTY_PRINT_H) $(DIAGNOSTIC_CORE_H)12098 + $(TARGET_H) $(GIMPLE_PRETTY_PRINT_H) $(DIAGNOSTIC_CORE_H) $(PARAMS_H)12099 tree-optimize.o : tree-optimize.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \12100 $(TREE_H) $(TM_P_H) $(GGC_H) \12101 $(DIAGNOSTIC_H) $(BASIC_BLOCK_H) $(FLAGS_H) $(TM_H) \12102 12181 diff -Naur gcc-4.8.1.orig/gcc/omp-low.c gcc-4.8.1/gcc/omp-low.c 12103 --- gcc-4.8.1.orig/gcc/omp-low.c 2013-05-16 05:45:55.000000000 -050012104 +++ gcc-4.8.1/gcc/omp-low.c 2013-0 8-28 05:10:43.062839000 -050012182 --- gcc-4.8.1.orig/gcc/omp-low.c 2013-05-16 10:45:55.000000000 +0000 12183 +++ gcc-4.8.1/gcc/omp-low.c 2013-09-13 19:01:43.179864925 +0000 12105 12184 @@ -836,6 +836,7 @@ 12106 12185 DECL_ARTIFICIAL (copy) = DECL_ARTIFICIAL (var); … … 12112 12191 12113 12192 diff -Naur gcc-4.8.1.orig/gcc/passes.c gcc-4.8.1/gcc/passes.c 12114 --- gcc-4.8.1.orig/gcc/passes.c 2013-02-20 09:19:13.000000000 -060012115 +++ gcc-4.8.1/gcc/passes.c 2013-0 8-28 03:29:48.447578000 -050012193 --- gcc-4.8.1.orig/gcc/passes.c 2013-02-20 15:19:13.000000000 +0000 12194 +++ gcc-4.8.1/gcc/passes.c 2013-09-13 19:01:43.179864925 +0000 12116 12195 @@ -1531,15 +1531,15 @@ 12117 12196 /* Perform simple scalar cleanup which is constant/copy propagation. */ … … 12135 12214 debug information here. */ 12136 12215 diff -Naur gcc-4.8.1.orig/gcc/recog.c gcc-4.8.1/gcc/recog.c 12137 --- gcc-4.8.1.orig/gcc/recog.c 2013-01-10 14:38:27.000000000 -060012138 +++ gcc-4.8.1/gcc/recog.c 2013-0 8-05 15:24:39.437775000 -050012216 --- gcc-4.8.1.orig/gcc/recog.c 2013-01-10 20:38:27.000000000 +0000 12217 +++ gcc-4.8.1/gcc/recog.c 2013-09-13 19:01:43.183198249 +0000 12139 12218 @@ -1949,9 +1949,6 @@ 12140 12219 (strictp ? strict_memory_address_addr_space_p … … 12279 12358 add_to_hard_reg_set (reg_set, mode, regno); 12280 12359 diff -Naur gcc-4.8.1.orig/gcc/simplify-rtx.c gcc-4.8.1/gcc/simplify-rtx.c 12281 --- gcc-4.8.1.orig/gcc/simplify-rtx.c 2013-03-05 0 0:04:14.000000000 -060012282 +++ gcc-4.8.1/gcc/simplify-rtx.c 2013-0 7-08 03:15:01.706973000 -050012360 --- gcc-4.8.1.orig/gcc/simplify-rtx.c 2013-03-05 06:04:14.000000000 +0000 12361 +++ gcc-4.8.1/gcc/simplify-rtx.c 2013-09-13 19:01:43.183198249 +0000 12283 12362 @@ -2784,6 +2784,7 @@ 12284 12363 HOST_WIDE_INT mask = INTVAL (trueop1) << count; … … 12290 12369 plus_constant (mode, XEXP (op0, 0), 12291 12370 diff -Naur gcc-4.8.1.orig/gcc/testsuite/c-c++-common/gomp/pr58257.c gcc-4.8.1/gcc/testsuite/c-c++-common/gomp/pr58257.c 12292 --- gcc-4.8.1.orig/gcc/testsuite/c-c++-common/gomp/pr58257.c 19 69-12-31 18:00:00.000000000 -060012293 +++ gcc-4.8.1/gcc/testsuite/c-c++-common/gomp/pr58257.c 2013-0 8-28 05:10:43.062839000 -050012371 --- gcc-4.8.1.orig/gcc/testsuite/c-c++-common/gomp/pr58257.c 1970-01-01 00:00:00.000000000 +0000 12372 +++ gcc-4.8.1/gcc/testsuite/c-c++-common/gomp/pr58257.c 2013-09-13 19:01:43.186531574 +0000 12294 12373 @@ -0,0 +1,15 @@ 12295 12374 +/* PR middle-end/58257 */ … … 12308 12387 + return a[0][0]; 12309 12388 +} 12310 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.c-torture/compile/pr58164.c gcc-4.8.1/gcc/testsuite/gcc.c-torture/compile/pr58164.c12311 --- gcc-4.8.1.orig/gcc/testsuite/gcc.c-torture/compile/pr58164.c 1969-12-31 18:00:00.000000000 -060012312 +++ gcc-4.8.1/gcc/testsuite/gcc.c-torture/compile/pr58164.c 2013-08-16 04:06:41.868666000 -050012313 @@ -0,0 +1,8 @@12314 +/* PR tree-optimization/58164 */12315 +12316 +int12317 +foo (void)12318 +{12319 + int x = 0;12320 + goto *&x;12321 +}12322 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.c-torture/execute/nest-align-1.x gcc-4.8.1/gcc/testsuite/gcc.c-torture/execute/nest-align-1.x12323 --- gcc-4.8.1.orig/gcc/testsuite/gcc.c-torture/execute/nest-align-1.x 1969-12-31 18:00:00.000000000 -060012324 +++ gcc-4.8.1/gcc/testsuite/gcc.c-torture/execute/nest-align-1.x 2013-07-10 16:06:27.116312000 -050012325 @@ -0,0 +1,5 @@12326 +# Force bigger stack alignment for PowerPC EABI targets.12327 +if { [istarget "powerpc-*-eabi*"] } {12328 + set additional_flags "-mno-eabi"12329 +}12330 +return 012331 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.c-torture/execute/pr57568.c gcc-4.8.1/gcc/testsuite/gcc.c-torture/execute/pr57568.c12332 --- gcc-4.8.1.orig/gcc/testsuite/gcc.c-torture/execute/pr57568.c 1969-12-31 18:00:00.000000000 -060012333 +++ gcc-4.8.1/gcc/testsuite/gcc.c-torture/execute/pr57568.c 2013-06-09 13:33:32.138968000 -050012334 @@ -0,0 +1,12 @@12335 +/* PR target/57568 */12336 +12337 +extern void abort (void);12338 +int a[6][9] = { }, b = 1, *c = &a[3][5];12339 +12340 +int12341 +main ()12342 +{12343 + if (b && (*c = *c + *c))12344 + abort ();12345 + return 0;12346 +}12347 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.c-torture/execute/pr57829.c gcc-4.8.1/gcc/testsuite/gcc.c-torture/execute/pr57829.c12348 --- gcc-4.8.1.orig/gcc/testsuite/gcc.c-torture/execute/pr57829.c 1969-12-31 18:00:00.000000000 -060012349 +++ gcc-4.8.1/gcc/testsuite/gcc.c-torture/execute/pr57829.c 2013-07-08 03:15:01.706973000 -050012350 @@ -0,0 +1,31 @@12351 +/* PR rtl-optimization/57829 */12352 +12353 +__attribute__((noinline, noclone))12354 +int12355 +f1 (int k)12356 +{12357 + return 2 | ((k - 1) >> ((int) sizeof (int) * __CHAR_BIT__ - 1));12358 +}12359 +12360 +__attribute__((noinline, noclone))12361 +long int12362 +f2 (long int k)12363 +{12364 + return 2L | ((k - 1L) >> ((int) sizeof (long int) * __CHAR_BIT__ - 1));12365 +}12366 +12367 +__attribute__((noinline, noclone))12368 +int12369 +f3 (int k)12370 +{12371 + k &= 63;12372 + return 4 | ((k + 2) >> 5);12373 +}12374 +12375 +int12376 +main ()12377 +{12378 + if (f1 (1) != 2 || f2 (1L) != 2L || f3 (63) != 6 || f3 (1) != 4)12379 + __builtin_abort ();12380 + return 0;12381 +}12382 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.c-torture/execute/pr58209.c gcc-4.8.1/gcc/testsuite/gcc.c-torture/execute/pr58209.c12383 --- gcc-4.8.1.orig/gcc/testsuite/gcc.c-torture/execute/pr58209.c 1969-12-31 18:00:00.000000000 -060012384 +++ gcc-4.8.1/gcc/testsuite/gcc.c-torture/execute/pr58209.c 2013-08-23 02:35:01.611004000 -050012385 @@ -0,0 +1,32 @@12386 +/* PR tree-optimization/58209 */12387 +12388 +extern void abort (void);12389 +typedef __INTPTR_TYPE__ T;12390 +T buf[1024];12391 +12392 +T *12393 +foo (T n)12394 +{12395 + if (n == 0)12396 + return (T *) buf;12397 + T s = (T) foo (n - 1);12398 + return (T *) (s + sizeof (T));12399 +}12400 +12401 +T *12402 +bar (T n)12403 +{12404 + if (n == 0)12405 + return buf;12406 + return foo (n - 1) + 1;12407 +}12408 +12409 +int12410 +main ()12411 +{12412 + int i;12413 + for (i = 0; i < 27; i++)12414 + if (foo (i) != buf + i || bar (i) != buf + i)12415 + abort ();12416 + return 0;12417 +}12418 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.dg/asan/pr56417.c gcc-4.8.1/gcc/testsuite/gcc.dg/asan/pr56417.c12419 --- gcc-4.8.1.orig/gcc/testsuite/gcc.dg/asan/pr56417.c 1969-12-31 18:00:00.000000000 -060012420 +++ gcc-4.8.1/gcc/testsuite/gcc.dg/asan/pr56417.c 2013-08-13 12:02:13.543712000 -050012421 @@ -0,0 +1,9 @@12422 +/* PR sanitizer/56417 */12423 +/* { dg-do compile } */12424 +/* { dg-options "-w" } */12425 +12426 +int12427 +foo (void)12428 +{12429 + return __builtin_strlen (&foo);12430 +}12431 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.dg/ipa/pr57358.c gcc-4.8.1/gcc/testsuite/gcc.dg/ipa/pr57358.c12432 --- gcc-4.8.1.orig/gcc/testsuite/gcc.dg/ipa/pr57358.c 1969-12-31 18:00:00.000000000 -060012433 +++ gcc-4.8.1/gcc/testsuite/gcc.dg/ipa/pr57358.c 2013-06-24 07:57:52.158957000 -050012434 @@ -0,0 +1,9 @@12435 +/* { dg-do compile } */12436 +/* { dg-options "-O2" } */12437 +12438 +struct t { void (*func)(void*); };12439 +void test_func(struct t* a) __attribute__((optimize("O0")));12440 +void test_func(struct t* a)12441 +{12442 + a->func(0);12443 +}12444 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.dg/pr56977.c gcc-4.8.1/gcc/testsuite/gcc.dg/pr56977.c12445 --- gcc-4.8.1.orig/gcc/testsuite/gcc.dg/pr56977.c 1969-12-31 18:00:00.000000000 -060012446 +++ gcc-4.8.1/gcc/testsuite/gcc.dg/pr56977.c 2013-08-28 03:29:48.447578000 -050012447 @@ -0,0 +1,10 @@12448 +/* { dg-do compile } */12449 +/* { dg-options "-Og" } */12450 +12451 +__attribute__((__error__("error"))) void error ();12452 +12453 +void f (int i) {12454 + if (__builtin_constant_p (i)) {12455 + error ();12456 + }12457 +}12458 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.dg/pr57518.c gcc-4.8.1/gcc/testsuite/gcc.dg/pr57518.c12459 --- gcc-4.8.1.orig/gcc/testsuite/gcc.dg/pr57518.c 1969-12-31 18:00:00.000000000 -060012460 +++ gcc-4.8.1/gcc/testsuite/gcc.dg/pr57518.c 2013-06-20 16:15:52.020104000 -050012461 @@ -0,0 +1,15 @@12462 +/* PR rtl-optimization/57130 */12463 +12464 +/* { dg-do compile } */12465 +/* { dg-options "-O2 -fdump-rtl-ira" } */12466 +/* { dg-final { scan-rtl-dump-not "REG_EQUIV.*mem.*\"ip\"" "ira" } } */12467 +12468 +char ip[10];12469 +int total;12470 +12471 +void foo() {12472 + int t;12473 +12474 + t = ip[2];12475 + total = t & 0x3;12476 +}12477 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.dg/pr57980.c gcc-4.8.1/gcc/testsuite/gcc.dg/pr57980.c12478 --- gcc-4.8.1.orig/gcc/testsuite/gcc.dg/pr57980.c 1969-12-31 18:00:00.000000000 -060012479 +++ gcc-4.8.1/gcc/testsuite/gcc.dg/pr57980.c 2013-08-13 08:34:08.741199000 -050012480 @@ -0,0 +1,19 @@12481 +/* PR tree-optimization/57980 */12482 +/* { dg-do compile } */12483 +/* { dg-options "-O -foptimize-sibling-calls -w" } */12484 +12485 +typedef int V __attribute__ ((vector_size (2 * sizeof (int))));12486 +extern V f (void);12487 +12488 +V12489 +bar (void)12490 +{12491 + return -f ();12492 +}12493 +12494 +V12495 +foo (void)12496 +{12497 + V v = { };12498 + return v - f ();12499 +}12500 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.dg/pr58145-1.c gcc-4.8.1/gcc/testsuite/gcc.dg/pr58145-1.c12501 --- gcc-4.8.1.orig/gcc/testsuite/gcc.dg/pr58145-1.c 1969-12-31 18:00:00.000000000 -060012502 +++ gcc-4.8.1/gcc/testsuite/gcc.dg/pr58145-1.c 2013-08-14 15:36:12.151519000 -050012503 @@ -0,0 +1,37 @@12504 +/* PR tree-optimization/58145 */12505 +/* { dg-do compile { target { int32plus } } } */12506 +/* { dg-options "-O2 -fdump-tree-optimized" } */12507 +12508 +struct S { unsigned int data : 32; };12509 +struct T { unsigned int data; };12510 +volatile struct S s2;12511 +12512 +void12513 +f1 (int val)12514 +{12515 + struct S s = { .data = val };12516 + *(volatile struct S *) 0x880000UL = s;12517 +}12518 +12519 +void12520 +f2 (int val)12521 +{12522 + struct T t = { .data = val };12523 + *(volatile struct T *) 0x880000UL = t;12524 +}12525 +12526 +void12527 +f3 (int val)12528 +{12529 + *(volatile unsigned int *) 0x880000UL = val;12530 +}12531 +12532 +void12533 +f4 (int val)12534 +{12535 + struct S s = { .data = val };12536 + s2 = s;12537 +}12538 +12539 +/* { dg-final { scan-tree-dump-times " ={v} " 4 "optimized" } } */12540 +/* { dg-final { cleanup-tree-dump "optimized" } } */12541 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.dg/pr58145-2.c gcc-4.8.1/gcc/testsuite/gcc.dg/pr58145-2.c12542 --- gcc-4.8.1.orig/gcc/testsuite/gcc.dg/pr58145-2.c 1969-12-31 18:00:00.000000000 -060012543 +++ gcc-4.8.1/gcc/testsuite/gcc.dg/pr58145-2.c 2013-08-14 15:36:12.151519000 -050012544 @@ -0,0 +1,51 @@12545 +/* PR tree-optimization/58145 */12546 +/* { dg-do compile { target { int32plus } } } */12547 +/* { dg-options "-O2 -fdump-tree-optimized" } */12548 +12549 +struct S { unsigned int data : 32; };12550 +struct T { unsigned int data; };12551 +volatile struct S s2;12552 +12553 +static inline void12554 +f1 (int val)12555 +{12556 + struct S s = { .data = val };12557 + *(volatile struct S *) 0x880000UL = s;12558 +}12559 +12560 +static inline void12561 +f2 (int val)12562 +{12563 + struct T t = { .data = val };12564 + *(volatile struct T *) 0x880000UL = t;12565 +}12566 +12567 +static inline void12568 +f3 (int val)12569 +{12570 + *(volatile unsigned int *) 0x880000UL = val;12571 +}12572 +12573 +static inline void12574 +f4 (int val)12575 +{12576 + struct S s = { .data = val };12577 + s2 = s;12578 +}12579 +12580 +void12581 +f5 (void)12582 +{12583 + int i;12584 + for (i = 0; i < 100; i++)12585 + f1 (0);12586 + for (i = 0; i < 100; i++)12587 + f2 (0);12588 + for (i = 0; i < 100; i++)12589 + f3 (0);12590 + for (i = 0; i < 100; i++)12591 + f4 (0);12592 +}12593 +12594 +/* { dg-final { scan-tree-dump-times " ={v} " 4 "optimized" } } */12595 +/* { dg-final { cleanup-tree-dump "optimized" } } */12596 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.dg/torture/pr58041.c gcc-4.8.1/gcc/testsuite/gcc.dg/torture/pr58041.c12597 --- gcc-4.8.1.orig/gcc/testsuite/gcc.dg/torture/pr58041.c 1969-12-31 18:00:00.000000000 -060012598 +++ gcc-4.8.1/gcc/testsuite/gcc.dg/torture/pr58041.c 2013-08-06 12:35:11.119492000 -050012599 @@ -0,0 +1,33 @@12600 +/* { dg-do run } */12601 +12602 +typedef long long V12603 + __attribute__ ((vector_size (2 * sizeof (long long)), may_alias));12604 +12605 +struct s12606 +{12607 + char u;12608 + V v[2];12609 +} __attribute__((packed,aligned(1)));12610 +12611 +__attribute__((noinline, noclone))12612 +long long foo(struct s *x, int y, V *z)12613 +{12614 + V a = x->v[y];12615 + x->v[y] = *z;12616 + return a[1];12617 +}12618 +12619 +struct s a = {0,{{0,0},{0,0}}};12620 +int main()12621 +{12622 + V v1 = {0,1};12623 + V v2 = {0,2};12624 +12625 + if (foo(&a,0,&v1) != 0)12626 + __builtin_abort();12627 + if (foo(&a,0,&v2) != 1)12628 + __builtin_abort();12629 + if (foo(&a,1,&v1) != 0)12630 + __builtin_abort();12631 + return 0;12632 +}12633 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/arm/lp1189445.c gcc-4.8.1/gcc/testsuite/gcc.target/arm/lp1189445.c12634 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/arm/lp1189445.c 1969-12-31 18:00:00.000000000 -060012635 +++ gcc-4.8.1/gcc/testsuite/gcc.target/arm/lp1189445.c 2013-08-09 01:59:01.329587000 -050012636 @@ -0,0 +1,18 @@12637 +/* { dg-do compile } */12638 +/* { dg-require-effective-target arm_neon } */12639 +/* { dg-add-options arm_neon } */12640 +/* { dg-options "-O3" } */12641 +12642 +int id;12643 +int12644 +test (const long int *data)12645 +{12646 + int i, retval;12647 + retval = id;12648 + for (i = 0; i < id; i++)12649 + {12650 + retval &= (data[i] <= 0);12651 + }12652 +12653 + return (retval);12654 +}12655 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/arm/pr58041.c gcc-4.8.1/gcc/testsuite/gcc.target/arm/pr58041.c12656 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/arm/pr58041.c 1969-12-31 18:00:00.000000000 -060012657 +++ gcc-4.8.1/gcc/testsuite/gcc.target/arm/pr58041.c 2013-08-06 10:08:59.668112000 -050012658 @@ -0,0 +1,30 @@12659 +/* { dg-do compile } */12660 +/* { dg-options "-Os -mno-unaligned-access" } */12661 +/* { dg-final { scan-assembler "ldrb" } } */12662 +/* { dg-final { scan-assembler "strb" } } */12663 +12664 +struct s12665 +{12666 + char u;12667 + long long v[2];12668 +} __attribute__((packed,aligned(1)));12669 +12670 +__attribute__((noinline, noclone))12671 +long long foo(struct s *x, int y, long long z)12672 +{12673 + long long a = x->v[y];12674 + x->v[y] = z;12675 + return a;12676 +}12677 +12678 +struct s a = {0,{0,0}};12679 +int main()12680 +{12681 + if (foo(&a,0,1) != 0)12682 + __builtin_abort();12683 + if (foo(&a,0,2) != 1)12684 + __builtin_abort();12685 + if (foo(&a,1,1) != 0)12686 + __builtin_abort();12687 + return 0;12688 +}12689 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/arm/thumb1-Os-mult.c gcc-4.8.1/gcc/testsuite/gcc.target/arm/thumb1-Os-mult.c12690 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/arm/thumb1-Os-mult.c 1969-12-31 18:00:00.000000000 -060012691 +++ gcc-4.8.1/gcc/testsuite/gcc.target/arm/thumb1-Os-mult.c 2013-07-25 00:27:55.786383000 -050012692 @@ -0,0 +1,12 @@12693 +/* { dg-require-effective-target arm_thumb1_ok } */12694 +/* { dg-do compile } */12695 +/* { dg-options "-Os" } */12696 +/* { dg-skip-if "" { ! { arm_thumb1 } } } */12697 +12698 +int12699 +mymul3 (int x)12700 +{12701 + return x * 0x555;12702 +}12703 +12704 +/* { dg-final { scan-assembler "mul\[\\t \]*r.,\[\\t \]*r." } } */12705 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/avr/torture/builtins-4-roundfx.c gcc-4.8.1/gcc/testsuite/gcc.target/avr/torture/builtins-4-roundfx.c12706 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/avr/torture/builtins-4-roundfx.c 2013-02-08 04:13:37.000000000 -060012707 +++ gcc-4.8.1/gcc/testsuite/gcc.target/avr/torture/builtins-4-roundfx.c 2013-07-19 06:15:26.382992000 -050012708 @@ -72,11 +72,11 @@12709 12710 static void test2hr (void)12711 {12712 - TEST2 (hr, 1, 0x7f, 0x40);12713 - TEST2 (hr, 2, 0x7f, 0b1100000);12714 - TEST2 (hr, 3, 0x7f, 0b1110000);12715 - TEST2 (hr, 4, 0x7f, 0b1111000);12716 -12717 + TEST2 (hr, 1, 0x7f, 0x7f);12718 + TEST2 (hr, 2, 0x70, 0x7f);12719 + TEST2 (hr, 3, 0x78, 0x7f);12720 + TEST2 (hr, 4, 0x7f, 0x7f);12721 +12722 TEST2 (uhr, 1, 0x7f, 0x80);12723 TEST2 (uhr, 2, 0x7f, 0x80);12724 TEST2 (uhr, 3, 0x7f, 0x80);12725 @@ -85,10 +85,13 @@12726 12727 void test2k (void)12728 {12729 - TEST2 (k, 1, 0x7fffffff, 0x7fff8000 | 0b100000000000000);12730 - TEST2 (k, 2, 0x7fffffff, 0x7fff8000 | 0b110000000000000);12731 - TEST2 (k, 3, 0x7fffffff, 0x7fff8000 | 0b111000000000000);12732 - TEST2 (k, 4, 0x7fffffff, 0x7fff8000 | 0b111100000000000);12733 + TEST2 (k, 1, 0x7fffff00, 0x7fffffff);12734 + TEST2 (k, 2, 0x7ffffff0, 0x7fffffff);12735 + TEST2 (k, 2, 0x7ffff000, 0x7fffffff);12736 + TEST2 (k, 3, 0x7ffff000, 0x7ffff000);12737 + TEST2 (k, 3, 0x7ffff800, 0x7fffffff);12738 + TEST2 (k, 3, 0x7ffff7ff, 0x7ffff000);12739 + TEST2 (k, 4, 0x7ffff7ff, 0x7ffff800);12740 12741 TEST2 (uk, 1, 0x7fffffff, 1ul << 31);12742 TEST2 (uk, 2, 0x7fffffff, 1ul << 31);12743 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/bmi-1.c gcc-4.8.1/gcc/testsuite/gcc.target/i386/bmi-1.c12744 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/bmi-1.c 2010-11-10 16:02:23.000000000 -060012745 +++ gcc-4.8.1/gcc/testsuite/gcc.target/i386/bmi-1.c 2013-07-19 02:38:07.333150000 -050012746 @@ -1,11 +1,11 @@12747 /* { dg-do compile } */12748 /* { dg-options "-O2 -mbmi " } */12749 -/* { dg-final { scan-assembler "andn\[^\\n]*(%|)eax" } } */12750 -/* { dg-final { scan-assembler "bextr\[^\\n]*(%|)eax" } } */12751 -/* { dg-final { scan-assembler "blsi\[^\\n]*(%|)eax" } } */12752 -/* { dg-final { scan-assembler "blsmsk\[^\\n]*(%|)eax" } } */12753 -/* { dg-final { scan-assembler "blsr\[^\\n]*(%|)eax" } } */12754 -/* { dg-final { scan-assembler "tzcntl\[^\\n]*(%|)eax" } } */12755 +/* { dg-final { scan-assembler "andn\[^\\n]*eax" } } */12756 +/* { dg-final { scan-assembler-times "bextr\[ \\t]+\[^\\n]*eax" 2 } } */12757 +/* { dg-final { scan-assembler-times "blsi\[^\\n]*eax" 2 } } */12758 +/* { dg-final { scan-assembler-times "blsmsk\[^\\n]*eax" 2 } } */12759 +/* { dg-final { scan-assembler-times "blsr\[^\\n]*eax" 2 } } */12760 +/* { dg-final { scan-assembler-times "tzcntl\[^\\n]*eax" 2 } } */12761 12762 #include <x86intrin.h>12763 12764 @@ -22,25 +22,57 @@12765 }12766 12767 unsigned int12768 +func_bextr32_3args (unsigned int X,12769 + unsigned int Y,12770 + unsigned int Z)12771 +{12772 + return _bextr_u32(X, Y, Z);12773 +}12774 +12775 +unsigned int12776 func_blsi32 (unsigned int X)12777 {12778 return __blsi_u32(X);12779 }12780 12781 unsigned int12782 +func_blsi32_2 (unsigned int X)12783 +{12784 + return _blsi_u32(X);12785 +}12786 +12787 +unsigned int12788 func_blsmsk32 (unsigned int X)12789 {12790 return __blsmsk_u32(X);12791 }12792 12793 unsigned int12794 +func_blsmsk32_2 (unsigned int X)12795 +{12796 + return _blsmsk_u32(X);12797 +}12798 +12799 +unsigned int12800 func_blsr32 (unsigned int X)12801 {12802 return __blsr_u32(X);12803 }12804 12805 unsigned int12806 +func_blsr32_2 (unsigned int X)12807 +{12808 + return _blsr_u32(X);12809 +}12810 +12811 +unsigned int12812 func_tzcnt32 (unsigned int X)12813 {12814 return __tzcnt_u32(X);12815 }12816 +12817 +unsigned int12818 +func_tzcnt32_2 (unsigned int X)12819 +{12820 + return _tzcnt_u32(X);12821 +}12822 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/bmi2-bzhi-1.c gcc-4.8.1/gcc/testsuite/gcc.target/i386/bmi2-bzhi-1.c12823 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/bmi2-bzhi-1.c 1969-12-31 18:00:00.000000000 -060012824 +++ gcc-4.8.1/gcc/testsuite/gcc.target/i386/bmi2-bzhi-1.c 2013-06-27 11:45:44.733142000 -050012825 @@ -0,0 +1,31 @@12826 +/* PR target/57623 */12827 +/* { dg-do assemble { target bmi2 } } */12828 +/* { dg-options "-O2 -mbmi2" } */12829 +12830 +#include <x86intrin.h>12831 +12832 +unsigned int12833 +f1 (unsigned int x, unsigned int *y)12834 +{12835 + return _bzhi_u32 (x, *y);12836 +}12837 +12838 +unsigned int12839 +f2 (unsigned int *x, unsigned int y)12840 +{12841 + return _bzhi_u32 (*x, y);12842 +}12843 +12844 +#ifdef __x86_64__12845 +unsigned long long12846 +f3 (unsigned long long x, unsigned long long *y)12847 +{12848 + return _bzhi_u64 (x, *y);12849 +}12850 +12851 +unsigned long long12852 +f4 (unsigned long long *x, unsigned long long y)12853 +{12854 + return _bzhi_u64 (*x, y);12855 +}12856 +#endif12857 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/bmi-2.c gcc-4.8.1/gcc/testsuite/gcc.target/i386/bmi-2.c12858 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/bmi-2.c 2011-07-09 14:25:11.000000000 -050012859 +++ gcc-4.8.1/gcc/testsuite/gcc.target/i386/bmi-2.c 2013-07-19 02:38:07.333150000 -050012860 @@ -1,11 +1,11 @@12861 /* { dg-do compile { target { ! { ia32 } } } } */12862 /* { dg-options "-O2 -mbmi " } */12863 -/* { dg-final { scan-assembler "andn\[^\\n]*(%|)rax" } } */12864 -/* { dg-final { scan-assembler "bextr\[^\\n]*(%|)rax" } } */12865 -/* { dg-final { scan-assembler "blsi\[^\\n]*(%|)rax" } } */12866 -/* { dg-final { scan-assembler "blsmsk\[^\\n]*(%|)rax" } } */12867 -/* { dg-final { scan-assembler "blsr\[^\\n]*(%|)rax" } } */12868 -/* { dg-final { scan-assembler "tzcntq\[^\\n]*(%|)rax" } } */12869 +/* { dg-final { scan-assembler "andn\[^\\n]*rax" } } */12870 +/* { dg-final { scan-assembler-times "bextr\[ \\t]+\[^\\n]*rax" 2 } } */12871 +/* { dg-final { scan-assembler-times "blsi\[^\\n]*rax" 2 } } */12872 +/* { dg-final { scan-assembler-times "blsmsk\[^\\n]*rax" 2 } } */12873 +/* { dg-final { scan-assembler-times "blsr\[^\\n]*rax" 2 } } */12874 +/* { dg-final { scan-assembler-times "tzcntq\[^\\n]*rax" 2 } } */12875 12876 #include <x86intrin.h>12877 12878 @@ -22,25 +22,57 @@12879 }12880 12881 unsigned long long12882 +func_bextr64_3args (unsigned long long X,12883 + unsigned long long Y,12884 + unsigned long long Z)12885 +{12886 + return _bextr_u64 (X, Y, Z);12887 +}12888 +12889 +unsigned long long12890 func_blsi64 (unsigned long long X)12891 {12892 return __blsi_u64 (X);12893 }12894 12895 unsigned long long12896 +func_blsi64_2 (unsigned long long X)12897 +{12898 + return _blsi_u64 (X);12899 +}12900 +12901 +unsigned long long12902 func_blsmsk64 (unsigned long long X)12903 {12904 return __blsmsk_u64 (X);12905 }12906 12907 unsigned long long12908 +func_blsmsk64_2 (unsigned long long X)12909 +{12910 + return _blsmsk_u64 (X);12911 +}12912 +12913 +unsigned long long12914 func_blsr64 (unsigned long long X)12915 {12916 return __blsr_u64 (X);12917 }12918 12919 unsigned long long12920 +func_blsr64_2 (unsigned long long X)12921 +{12922 + return _blsr_u64 (X);12923 +}12924 +12925 +unsigned long long12926 func_tzcnt64 (unsigned long long X)12927 {12928 return __tzcnt_u64 (X);12929 }12930 +12931 +unsigned long long12932 +func_tzcnt64_2 (unsigned long long X)12933 +{12934 + return _tzcnt_u64 (X);12935 +}12936 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/bmi-bextr-3.c gcc-4.8.1/gcc/testsuite/gcc.target/i386/bmi-bextr-3.c12937 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/bmi-bextr-3.c 1969-12-31 18:00:00.000000000 -060012938 +++ gcc-4.8.1/gcc/testsuite/gcc.target/i386/bmi-bextr-3.c 2013-06-27 11:49:38.157989000 -050012939 @@ -0,0 +1,31 @@12940 +/* PR target/57623 */12941 +/* { dg-do assemble { target bmi } } */12942 +/* { dg-options "-O2 -mbmi" } */12943 +12944 +#include <x86intrin.h>12945 +12946 +unsigned int12947 +f1 (unsigned int x, unsigned int *y)12948 +{12949 + return __bextr_u32 (x, *y);12950 +}12951 +12952 +unsigned int12953 +f2 (unsigned int *x, unsigned int y)12954 +{12955 + return __bextr_u32 (*x, y);12956 +}12957 +12958 +#ifdef __x86_64__12959 +unsigned long long12960 +f3 (unsigned long long x, unsigned long long *y)12961 +{12962 + return __bextr_u64 (x, *y);12963 +}12964 +12965 +unsigned long long12966 +f4 (unsigned long long *x, unsigned long long y)12967 +{12968 + return __bextr_u64 (*x, y);12969 +}12970 +#endif12971 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/movabs-1.c gcc-4.8.1/gcc/testsuite/gcc.target/i386/movabs-1.c12972 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/movabs-1.c 1969-12-31 18:00:00.000000000 -060012973 +++ gcc-4.8.1/gcc/testsuite/gcc.target/i386/movabs-1.c 2013-08-13 07:45:06.811510000 -050012974 @@ -0,0 +1,10 @@12975 +/* { dg-do assemble } */12976 +/* { dg-options "-O2 -masm=intel" } */12977 +/* { dg-require-effective-target lp64 } */12978 +/* { dg-require-effective-target masm_intel } */12979 +12980 +void12981 +foo (void)12982 +{12983 + *(volatile long*)0xFFFF800000000000 = -1;12984 +}12985 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/pr57459.c gcc-4.8.1/gcc/testsuite/gcc.target/i386/pr57459.c12986 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/pr57459.c 1969-12-31 18:00:00.000000000 -060012987 +++ gcc-4.8.1/gcc/testsuite/gcc.target/i386/pr57459.c 2013-08-13 11:40:33.972568000 -050012988 @@ -0,0 +1,60 @@12989 +/* PR rtl-optimization/57459 */12990 +/* { dg-do run } */12991 +/* { dg-options "-fno-inline -O2 -minline-all-stringops -fno-omit-frame-pointer" } */12992 +12993 +int total1[10], total2[10], total3[10], total4[10], total5[10], a[20];12994 +int len;12995 +12996 +void stackclean() {12997 + void *ptr = __builtin_alloca(20000);12998 + __builtin_memset(ptr, 0, 20000);12999 +}13000 +13001 +void foo(const char *s) {13002 + int r1 = a[1];13003 + int r2 = a[2];13004 + int r3 = a[3];13005 + int r4 = a[4];13006 + int r5 = a[5];13007 +13008 + len = __builtin_strlen(s);13009 +13010 + if (s != 0)13011 + return;13012 +13013 + while (r1) {13014 + total1[r1] = r1;13015 + r1--;13016 + }13017 +13018 + while (r2) {13019 + total2[r2] = r2;13020 + r2--;13021 + }13022 +13023 + while (r3) {13024 + total3[r3] = r3;13025 + r3--;13026 + }13027 +13028 + while (r4) {13029 + total4[r4] = r4;13030 + r4--;13031 + }13032 +13033 + while (r5) {13034 + total5[r5] = r5;13035 + r5--;13036 + }13037 +}13038 +13039 +extern void abort (void);13040 +13041 +int main() {13042 + stackclean();13043 + foo("abcdefgh");13044 + if (len != 8)13045 + abort ();13046 + return 0;13047 +}13048 +13049 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/pr57655.c gcc-4.8.1/gcc/testsuite/gcc.target/i386/pr57655.c13050 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/pr57655.c 1969-12-31 18:00:00.000000000 -060013051 +++ gcc-4.8.1/gcc/testsuite/gcc.target/i386/pr57655.c 2013-06-21 08:30:30.950078000 -050013052 @@ -0,0 +1,10 @@13053 +/* { dg-do compile } */13054 +/* { dg-options "-mavx -mvzeroupper -mno-fp-ret-in-387" }13055 +13056 +/* { dg-error "x87 register return with x87 disabled" "" { target { ! ia32 } } 8 } */13057 +13058 +long double13059 +foo (long double x)13060 +{13061 + return __builtin_ilogbl (x);13062 +}13063 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/pr57736.c gcc-4.8.1/gcc/testsuite/gcc.target/i386/pr57736.c13064 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/pr57736.c 1969-12-31 18:00:00.000000000 -060013065 +++ gcc-4.8.1/gcc/testsuite/gcc.target/i386/pr57736.c 2013-06-28 15:26:27.574295000 -050013066 @@ -0,0 +1,41 @@13067 +/* PR target/57736 */13068 +/* { dg-do compile } */13069 +/* { dg-options "-O2" } */13070 +13071 +#include <x86intrin.h>13072 +13073 +unsigned long long13074 +f1 (void)13075 +{13076 + return __rdtsc ();13077 +}13078 +13079 +unsigned long long13080 +f2 (unsigned int *x)13081 +{13082 + return __rdtscp (x);13083 +}13084 +13085 +unsigned long long13086 +f3 (unsigned int x)13087 +{13088 + return __rdpmc (x);13089 +}13090 +13091 +void13092 +f4 (void)13093 +{13094 + __rdtsc ();13095 +}13096 +13097 +void13098 +f5 (unsigned int *x)13099 +{13100 + __rdtscp (x);13101 +}13102 +13103 +void13104 +f6 (unsigned int x)13105 +{13106 + __rdpmc (x);13107 +}13108 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/pr57777.c gcc-4.8.1/gcc/testsuite/gcc.target/i386/pr57777.c13109 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/pr57777.c 1969-12-31 18:00:00.000000000 -060013110 +++ gcc-4.8.1/gcc/testsuite/gcc.target/i386/pr57777.c 2013-07-03 15:24:19.796040000 -050013111 @@ -0,0 +1,13 @@13112 +/* PR target/57777 */13113 +/* { dg-do assemble { target avx2 } } */13114 +/* { dg-options "-O3 -mavx2" } */13115 +/* { dg-additional-options "-fpic" { target fpic } } */13116 +13117 +void13118 +foo (unsigned long *x, int *y)13119 +{13120 + static unsigned long b[2] = { 0x0UL, 0x9908b0dfUL };13121 + int c;13122 + for (c = 0; c < 512; c++)13123 + x[c] = b[x[c] & 1UL];13124 +}13125 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/pr58218.c gcc-4.8.1/gcc/testsuite/gcc.target/i386/pr58218.c13126 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/pr58218.c 1969-12-31 18:00:00.000000000 -060013127 +++ gcc-4.8.1/gcc/testsuite/gcc.target/i386/pr58218.c 2013-08-23 05:01:34.440607000 -050013128 @@ -0,0 +1,5 @@13129 +/* PR target/58218 */13130 +/* { dg-do assemble { target lp64 } } */13131 +/* { dg-options "-mcmodel=medium" } */13132 +13133 +struct { float x[16385]; } a = { { 0.f, } };13134 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/powerpc/20020118-1.c gcc-4.8.1/gcc/testsuite/gcc.target/powerpc/20020118-1.c13135 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/powerpc/20020118-1.c 2009-04-28 03:38:37.000000000 -050013136 +++ gcc-4.8.1/gcc/testsuite/gcc.target/powerpc/20020118-1.c 2013-07-10 16:06:27.116312000 -050013137 @@ -1,6 +1,8 @@13138 /* { dg-do run { target powerpc*-*-* } }*/13139 /* VxWorks only guarantees 64 bits of alignment (STACK_BOUNDARY == 64). */13140 /* { dg-skip-if "" { "powerpc*-*-vxworks*" } { "*" } { "" } } */13141 +/* Force 128-bit stack alignment for eabi targets. */13142 +/* { dg-options "-mno-eabi" { target powerpc*-*-eabi* } } */13143 13144 /* Test local alignment. Test new target macro STARTING_FRAME_PHASE. */13145 /* Origin: Aldy Hernandez <aldyh@redhat.com>. */13146 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/powerpc/altivec-consts.c gcc-4.8.1/gcc/testsuite/gcc.target/powerpc/altivec-consts.c13147 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/powerpc/altivec-consts.c 2009-01-13 11:52:32.000000000 -060013148 +++ gcc-4.8.1/gcc/testsuite/gcc.target/powerpc/altivec-consts.c 2013-06-23 19:59:24.817984000 -050013149 @@ -11,31 +11,24 @@13150 typedef __attribute__ ((vector_size (16))) unsigned short v8hi;13151 typedef __attribute__ ((vector_size (16))) unsigned int v4si;13152 13153 -char w[16] __attribute__((aligned(16)));13154 -13155 -13156 13157 -/* Emulate the vspltis? instructions on a 16-byte array of chars. */13158 +typedef __attribute__((aligned(16))) char c16[16];13159 +typedef __attribute__((aligned(16))) short s8[8];13160 +typedef __attribute__((aligned(16))) int i4[4];13161 13162 -void vspltisb (char *v, int val)13163 -{13164 - int i;13165 - for (i = 0; i < 16; i++)13166 - v[i] = val;13167 -}13168 +#define V16QI(V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12,V13,V14,V15,V16) \13169 + v16qi v = {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12,V13,V14,V15,V16}; \13170 + static c16 w = {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12,V13,V14,V15,V16}; \13171 + check_v16qi (v, w);13172 13173 -void vspltish (char *v, int val)13174 -{13175 - int i;13176 - for (i = 0; i < 16; i += 2)13177 - v[i] = val >> 7, v[i + 1] = val;13178 -}13179 +#define V8HI(V1,V2,V3,V4,V5,V6,V7,V8) \13180 + v8hi v = {V1,V2,V3,V4,V5,V6,V7,V8}; \13181 + static s8 w = {V1,V2,V3,V4,V5,V6,V7,V8}; \13182 + check_v8hi (v, w);13183 13184 -void vspltisw (char *v, int val)13185 -{13186 - int i;13187 - for (i = 0; i < 16; i += 4)13188 - v[i] = v[i + 1] = v[i + 2] = val >> 7, v[i + 3] = val;13189 -}13190 +#define V4SI(V1,V2,V3,V4) \13191 + v4si v = {V1,V2,V3,V4}; \13192 + static i4 w = {V1,V2,V3,V4}; \13193 + check_v4si (v, w);13194 13195 13196 13197 /* Use three different check functions for each mode-instruction pair.13198 @@ -48,13 +41,13 @@13199 abort ();13200 }13201 13202 -void __attribute__ ((noinline)) check_v8hi (v8hi v1, char *v2)13203 +void __attribute__ ((noinline)) check_v8hi (v8hi v1, short *v2)13204 {13205 if (memcmp (&v1, v2, 16))13206 abort ();13207 }13208 13209 -void __attribute__ ((noinline)) check_v4si (v4si v1, char *v2)13210 +void __attribute__ ((noinline)) check_v4si (v4si v1, int *v2)13211 {13212 if (memcmp (&v1, v2, 16))13213 abort ();13214 @@ -65,72 +58,52 @@13215 13216 void v16qi_vspltisb ()13217 {13218 - v16qi v = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15 };13219 - vspltisb (w, 15);13220 - check_v16qi (v, w);13221 + V16QI (15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15);13222 }13223 13224 void v16qi_vspltisb_neg ()13225 {13226 - v16qi v = { -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5 };13227 - vspltisb (w, -5);13228 - check_v16qi (v, w);13229 + V16QI (-5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5);13230 }13231 13232 void v16qi_vspltisb_addself ()13233 {13234 - v16qi v = { 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30 };13235 - vspltisb (w, 30);13236 - check_v16qi (v, w);13237 + V16QI (30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30);13238 }13239 13240 void v16qi_vspltisb_neg_addself ()13241 {13242 - v16qi v = { -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24 };13243 - vspltisb (w, -24);13244 - check_v16qi (v, w);13245 + V16QI (-24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24);13246 }13247 13248 void v16qi_vspltish ()13249 {13250 - v16qi v = { 0, 15, 0, 15, 0, 15, 0, 15, 0, 15, 0, 15, 0, 15, 0, 15 };13251 - vspltish (w, 15);13252 - check_v16qi (v, w);13253 + V16QI (0, 15, 0, 15, 0, 15, 0, 15, 0, 15, 0, 15, 0, 15, 0, 15);13254 }13255 13256 void v16qi_vspltish_addself ()13257 {13258 - v16qi v = { 0, 30, 0, 30, 0, 30, 0, 30, 0, 30, 0, 30, 0, 30, 0, 30 };13259 - vspltish (w, 30);13260 - check_v16qi (v, w);13261 + V16QI (0, 30, 0, 30, 0, 30, 0, 30, 0, 30, 0, 30, 0, 30, 0, 30);13262 }13263 13264 void v16qi_vspltish_neg ()13265 {13266 - v16qi v = { -1, -5, -1, -5, -1, -5, -1, -5, -1, -5, -1, -5, -1, -5, -1, -5 };13267 - vspltish (w, -5);13268 - check_v16qi (v, w);13269 + V16QI (-1, -5, -1, -5, -1, -5, -1, -5, -1, -5, -1, -5, -1, -5, -1, -5);13270 }13271 13272 void v16qi_vspltisw ()13273 {13274 - v16qi v = { 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15 };13275 - vspltisw (w, 15);13276 - check_v16qi (v, w);13277 + V16QI (0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15);13278 }13279 13280 void v16qi_vspltisw_addself ()13281 {13282 - v16qi v = { 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30 };13283 - vspltisw (w, 30);13284 - check_v16qi (v, w);13285 + V16QI (0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30);13286 }13287 13288 void v16qi_vspltisw_neg ()13289 {13290 - v16qi v = { -1, -1, -1, -5, -1, -1, -1, -5, -1, -1, -1, -5, -1, -1, -1, -5 };13291 - vspltisw (w, -5);13292 - check_v16qi (v, w);13293 + V16QI (-1, -1, -1, -5, -1, -1, -1, -5, -1, -1, -1, -5, -1, -1, -1, -5);13294 }13295 13296 13297 13298 @@ -138,144 +111,104 @@13299 13300 void v8hi_vspltisb ()13301 {13302 - v8hi v = { 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F };13303 - vspltisb (w, 15);13304 - check_v8hi (v, w);13305 + V8HI (0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F);13306 }13307 13308 void v8hi_vspltisb_addself ()13309 {13310 - v8hi v = { 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E };13311 - vspltisb (w, 30);13312 - check_v8hi (v, w);13313 + V8HI (0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E);13314 }13315 13316 void v8hi_vspltisb_neg ()13317 {13318 - v8hi v = { 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB };13319 - vspltisb (w, -5);13320 - check_v8hi (v, w);13321 + V8HI (0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB);13322 }13323 13324 void v8hi_vspltish ()13325 {13326 - v8hi v = { 15, 15, 15, 15, 15, 15, 15, 15 };13327 - vspltish (w, 15);13328 - check_v8hi (v, w);13329 + V8HI (15, 15, 15, 15, 15, 15, 15, 15);13330 }13331 13332 void v8hi_vspltish_neg ()13333 {13334 - v8hi v = { -5, -5, -5, -5, -5, -5, -5, -5 };13335 - vspltish (w, -5);13336 - check_v8hi (v, w);13337 + V8HI (-5, -5, -5, -5, -5, -5, -5, -5);13338 }13339 13340 void v8hi_vspltish_addself ()13341 {13342 - v8hi v = { 30, 30, 30, 30, 30, 30, 30, 30 };13343 - vspltish (w, 30);13344 - check_v8hi (v, w);13345 + V8HI (30, 30, 30, 30, 30, 30, 30, 30);13346 }13347 13348 void v8hi_vspltish_neg_addself ()13349 {13350 - v8hi v = { -24, -24, -24, -24, -24, -24, -24, -24 };13351 - vspltish (w, -24);13352 - check_v8hi (v, w);13353 + V8HI (-24, -24, -24, -24, -24, -24, -24, -24);13354 }13355 13356 void v8hi_vspltisw ()13357 {13358 - v8hi v = { 0, 15, 0, 15, 0, 15, 0, 15 };13359 - vspltisw (w, 15);13360 - check_v8hi (v, w);13361 + V8HI (0, 15, 0, 15, 0, 15, 0, 15);13362 }13363 13364 void v8hi_vspltisw_addself ()13365 {13366 - v8hi v = { 0, 30, 0, 30, 0, 30, 0, 30 };13367 - vspltisw (w, 30);13368 - check_v8hi (v, w);13369 + V8HI (0, 30, 0, 30, 0, 30, 0, 30);13370 }13371 13372 void v8hi_vspltisw_neg ()13373 {13374 - v8hi v = { -1, -5, -1, -5, -1, -5, -1, -5 };13375 - vspltisw (w, -5);13376 - check_v8hi (v, w);13377 + V8HI (-1, -5, -1, -5, -1, -5, -1, -5);13378 }13379 13380 /* V4SI tests. */13381 13382 void v4si_vspltisb ()13383 {13384 - v4si v = { 0x0F0F0F0F, 0x0F0F0F0F, 0x0F0F0F0F, 0x0F0F0F0F };13385 - vspltisb (w, 15);13386 - check_v4si (v, w);13387 + V4SI (0x0F0F0F0F, 0x0F0F0F0F, 0x0F0F0F0F, 0x0F0F0F0F);13388 }13389 13390 void v4si_vspltisb_addself ()13391 {13392 - v4si v = { 0x1E1E1E1E, 0x1E1E1E1E, 0x1E1E1E1E, 0x1E1E1E1E };13393 - vspltisb (w, 30);13394 - check_v4si (v, w);13395 + V4SI (0x1E1E1E1E, 0x1E1E1E1E, 0x1E1E1E1E, 0x1E1E1E1E);13396 }13397 13398 void v4si_vspltisb_neg ()13399 {13400 - v4si v = { 0xFBFBFBFB, 0xFBFBFBFB, 0xFBFBFBFB, 0xFBFBFBFB };13401 - vspltisb (w, -5);13402 - check_v4si (v, w);13403 + V4SI (0xFBFBFBFB, 0xFBFBFBFB, 0xFBFBFBFB, 0xFBFBFBFB);13404 }13405 13406 void v4si_vspltish ()13407 {13408 - v4si v = { 0x000F000F, 0x000F000F, 0x000F000F, 0x000F000F };13409 - vspltish (w, 15);13410 - check_v4si (v, w);13411 + V4SI (0x000F000F, 0x000F000F, 0x000F000F, 0x000F000F);13412 }13413 13414 void v4si_vspltish_addself ()13415 {13416 - v4si v = { 0x001E001E, 0x001E001E, 0x001E001E, 0x001E001E };13417 - vspltish (w, 30);13418 - check_v4si (v, w);13419 + V4SI (0x001E001E, 0x001E001E, 0x001E001E, 0x001E001E);13420 }13421 13422 void v4si_vspltish_neg ()13423 {13424 - v4si v = { 0xFFFBFFFB, 0xFFFBFFFB, 0xFFFBFFFB, 0xFFFBFFFB };13425 - vspltish (w, -5);13426 - check_v4si (v, w);13427 + V4SI (0xFFFBFFFB, 0xFFFBFFFB, 0xFFFBFFFB, 0xFFFBFFFB);13428 }13429 13430 void v4si_vspltisw ()13431 {13432 - v4si v = { 15, 15, 15, 15 };13433 - vspltisw (w, 15);13434 - check_v4si (v, w);13435 + V4SI (15, 15, 15, 15);13436 }13437 13438 void v4si_vspltisw_neg ()13439 {13440 - v4si v = { -5, -5, -5, -5 };13441 - vspltisw (w, -5);13442 - check_v4si (v, w);13443 + V4SI (-5, -5, -5, -5);13444 }13445 13446 void v4si_vspltisw_addself ()13447 {13448 - v4si v = { 30, 30, 30, 30 };13449 - vspltisw (w, 30);13450 - check_v4si (v, w);13451 + V4SI (30, 30, 30, 30);13452 }13453 13454 void v4si_vspltisw_neg_addself ()13455 {13456 - v4si v = { -24, -24, -24, -24 };13457 - vspltisw (w, -24);13458 - check_v4si (v, w);13459 + V4SI (-24, -24, -24, -24);13460 }13461 13462 13463 13464 @@ -316,3 +249,5 @@13465 v4si_vspltisw_neg_addself ();13466 return 0;13467 }13468 +13469 +/* { dg-final { scan-assembler-not "lvx" { target { ! powerpc*le-*-* } } } } */13470 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/powerpc/le-altivec-consts.c gcc-4.8.1/gcc/testsuite/gcc.target/powerpc/le-altivec-consts.c13471 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/powerpc/le-altivec-consts.c 1969-12-31 18:00:00.000000000 -060013472 +++ gcc-4.8.1/gcc/testsuite/gcc.target/powerpc/le-altivec-consts.c 2013-06-23 19:59:24.817984000 -050013473 @@ -0,0 +1,253 @@13474 +/* { dg-do run { target { powerpc*-*-* && vmx_hw } } } */13475 +/* { dg-do compile { target { powerpc*-*-* && { ! vmx_hw } } } } */13476 +/* { dg-require-effective-target powerpc_altivec_ok } */13477 +/* { dg-options "-maltivec -mabi=altivec -O2" } */13478 +13479 +/* Check that "easy" AltiVec constants are correctly synthesized. */13480 +13481 +extern void abort (void);13482 +13483 +typedef __attribute__ ((vector_size (16))) unsigned char v16qi;13484 +typedef __attribute__ ((vector_size (16))) unsigned short v8hi;13485 +typedef __attribute__ ((vector_size (16))) unsigned int v4si;13486 +13487 +typedef __attribute__((aligned(16))) char c16[16];13488 +typedef __attribute__((aligned(16))) short s8[8];13489 +typedef __attribute__((aligned(16))) int i4[4];13490 +13491 +#define V16QI(V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12,V13,V14,V15,V16) \13492 + v16qi v = {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12,V13,V14,V15,V16}; \13493 + static c16 w = {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12,V13,V14,V15,V16}; \13494 + check_v16qi (v, w);13495 +13496 +#define V8HI(V1,V2,V3,V4,V5,V6,V7,V8) \13497 + v8hi v = {V1,V2,V3,V4,V5,V6,V7,V8}; \13498 + static s8 w = {V1,V2,V3,V4,V5,V6,V7,V8}; \13499 + check_v8hi (v, w);13500 +13501 +#define V4SI(V1,V2,V3,V4) \13502 + v4si v = {V1,V2,V3,V4}; \13503 + static i4 w = {V1,V2,V3,V4}; \13504 + check_v4si (v, w);13505 +13506 +13507 13508 +/* Use three different check functions for each mode-instruction pair.13509 + The callers have no typecasting and no addressable vectors, to make13510 + the test more robust. */13511 +13512 +void __attribute__ ((noinline)) check_v16qi (v16qi v1, char *v2)13513 +{13514 + if (memcmp (&v1, v2, 16))13515 + abort ();13516 +}13517 +13518 +void __attribute__ ((noinline)) check_v8hi (v8hi v1, short *v2)13519 +{13520 + if (memcmp (&v1, v2, 16))13521 + abort ();13522 +}13523 +13524 +void __attribute__ ((noinline)) check_v4si (v4si v1, int *v2)13525 +{13526 + if (memcmp (&v1, v2, 16))13527 + abort ();13528 +}13529 +13530 +13531 13532 +/* V16QI tests. */13533 +13534 +void v16qi_vspltisb ()13535 +{13536 + V16QI (15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15);13537 +}13538 +13539 +void v16qi_vspltisb_neg ()13540 +{13541 + V16QI (-5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5);13542 +}13543 +13544 +void v16qi_vspltisb_addself ()13545 +{13546 + V16QI (30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30);13547 +}13548 +13549 +void v16qi_vspltisb_neg_addself ()13550 +{13551 + V16QI (-24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24);13552 +}13553 +13554 +void v16qi_vspltish ()13555 +{13556 + V16QI (15, 0, 15, 0, 15, 0, 15, 0, 15, 0, 15, 0, 15, 0, 15, 0);13557 +}13558 +13559 +void v16qi_vspltish_addself ()13560 +{13561 + V16QI (30, 0, 30, 0, 30, 0, 30, 0, 30, 0, 30, 0, 30, 0, 30, 0);13562 +}13563 +13564 +void v16qi_vspltish_neg ()13565 +{13566 + V16QI (-5, -1, -5, -1, -5, -1, -5, -1, -5, -1, -5, -1, -5, -1, -5, -1);13567 +}13568 +13569 +void v16qi_vspltisw ()13570 +{13571 + V16QI (15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0);13572 +}13573 +13574 +void v16qi_vspltisw_addself ()13575 +{13576 + V16QI (30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0);13577 +}13578 +13579 +void v16qi_vspltisw_neg ()13580 +{13581 + V16QI (-5, -1, -1, -1, -5, -1, -1, -1, -5, -1, -1, -1, -5, -1, -1, -1);13582 +}13583 +13584 +13585 13586 +/* V8HI tests. */13587 +13588 +void v8hi_vspltisb ()13589 +{13590 + V8HI (0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F);13591 +}13592 +13593 +void v8hi_vspltisb_addself ()13594 +{13595 + V8HI (0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E);13596 +}13597 +13598 +void v8hi_vspltisb_neg ()13599 +{13600 + V8HI (0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB);13601 +}13602 +13603 +void v8hi_vspltish ()13604 +{13605 + V8HI (15, 15, 15, 15, 15, 15, 15, 15);13606 +}13607 +13608 +void v8hi_vspltish_neg ()13609 +{13610 + V8HI (-5, -5, -5, -5, -5, -5, -5, -5);13611 +}13612 +13613 +void v8hi_vspltish_addself ()13614 +{13615 + V8HI (30, 30, 30, 30, 30, 30, 30, 30);13616 +}13617 +13618 +void v8hi_vspltish_neg_addself ()13619 +{13620 + V8HI (-24, -24, -24, -24, -24, -24, -24, -24);13621 +}13622 +13623 +void v8hi_vspltisw ()13624 +{13625 + V8HI (15, 0, 15, 0, 15, 0, 15, 0);13626 +}13627 +13628 +void v8hi_vspltisw_addself ()13629 +{13630 + V8HI (30, 0, 30, 0, 30, 0, 30, 0);13631 +}13632 +13633 +void v8hi_vspltisw_neg ()13634 +{13635 + V8HI (-5, -1, -5, -1, -5, -1, -5, -1);13636 +}13637 +13638 +/* V4SI tests. */13639 +13640 +void v4si_vspltisb ()13641 +{13642 + V4SI (0x0F0F0F0F, 0x0F0F0F0F, 0x0F0F0F0F, 0x0F0F0F0F);13643 +}13644 +13645 +void v4si_vspltisb_addself ()13646 +{13647 + V4SI (0x1E1E1E1E, 0x1E1E1E1E, 0x1E1E1E1E, 0x1E1E1E1E);13648 +}13649 +13650 +void v4si_vspltisb_neg ()13651 +{13652 + V4SI (0xFBFBFBFB, 0xFBFBFBFB, 0xFBFBFBFB, 0xFBFBFBFB);13653 +}13654 +13655 +void v4si_vspltish ()13656 +{13657 + V4SI (0x000F000F, 0x000F000F, 0x000F000F, 0x000F000F);13658 +}13659 +13660 +void v4si_vspltish_addself ()13661 +{13662 + V4SI (0x001E001E, 0x001E001E, 0x001E001E, 0x001E001E);13663 +}13664 +13665 +void v4si_vspltish_neg ()13666 +{13667 + V4SI (0xFFFBFFFB, 0xFFFBFFFB, 0xFFFBFFFB, 0xFFFBFFFB);13668 +}13669 +13670 +void v4si_vspltisw ()13671 +{13672 + V4SI (15, 15, 15, 15);13673 +}13674 +13675 +void v4si_vspltisw_neg ()13676 +{13677 + V4SI (-5, -5, -5, -5);13678 +}13679 +13680 +void v4si_vspltisw_addself ()13681 +{13682 + V4SI (30, 30, 30, 30);13683 +}13684 +13685 +void v4si_vspltisw_neg_addself ()13686 +{13687 + V4SI (-24, -24, -24, -24);13688 +}13689 +13690 +13691 13692 +13693 +int main ()13694 +{13695 + v16qi_vspltisb ();13696 + v16qi_vspltisb_neg ();13697 + v16qi_vspltisb_addself ();13698 + v16qi_vspltisb_neg_addself ();13699 + v16qi_vspltish ();13700 + v16qi_vspltish_addself ();13701 + v16qi_vspltish_neg ();13702 + v16qi_vspltisw ();13703 + v16qi_vspltisw_addself ();13704 + v16qi_vspltisw_neg ();13705 +13706 + v8hi_vspltisb ();13707 + v8hi_vspltisb_addself ();13708 + v8hi_vspltisb_neg ();13709 + v8hi_vspltish ();13710 + v8hi_vspltish_neg ();13711 + v8hi_vspltish_addself ();13712 + v8hi_vspltish_neg_addself ();13713 + v8hi_vspltisw ();13714 + v8hi_vspltisw_addself ();13715 + v8hi_vspltisw_neg ();13716 +13717 + v4si_vspltisb ();13718 + v4si_vspltisb_addself ();13719 + v4si_vspltisb_neg ();13720 + v4si_vspltish ();13721 + v4si_vspltish_addself ();13722 + v4si_vspltish_neg ();13723 + v4si_vspltisw ();13724 + v4si_vspltisw_neg ();13725 + v4si_vspltisw_addself ();13726 + v4si_vspltisw_neg_addself ();13727 + return 0;13728 +}13729 +13730 +/* { dg-final { scan-assembler-not "lvx" { target { powerpc*le-*-* } } } } */13731 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/powerpc/ppc-spe64-1.c gcc-4.8.1/gcc/testsuite/gcc.target/powerpc/ppc-spe64-1.c13732 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/powerpc/ppc-spe64-1.c 2009-01-12 21:11:48.000000000 -060013733 +++ gcc-4.8.1/gcc/testsuite/gcc.target/powerpc/ppc-spe64-1.c 2013-07-08 14:39:20.298935000 -050013734 @@ -4,4 +4,4 @@13735 /* { dg-options "-m64" } */13736 13737 /* { dg-error "-m64 not supported in this configuration" "SPE not 64-bit" { target *-*-* } 0 } */13738 -/* { dg-error "64-bit E500 not supported" "64-bit E500" { target *-*-* } 0 } */13739 +/* { dg-error "64-bit SPE not supported" "64-bit SPE" { target *-*-* } 0 } */13740 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/powerpc/pr47197.c gcc-4.8.1/gcc/testsuite/gcc.target/powerpc/pr47197.c13741 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/powerpc/pr47197.c 2012-04-24 10:51:58.000000000 -050013742 +++ gcc-4.8.1/gcc/testsuite/gcc.target/powerpc/pr47197.c 2013-07-08 14:38:40.579938000 -050013743 @@ -1,4 +1,5 @@13744 /* { dg-do compile } */13745 +/* { dg-require-effective-target powerpc_altivec_ok } */13746 /* { dg-options "-maltivec" } */13747 13748 /* Compile-only test to ensure that expressions can be passed to13749 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/powerpc/tfmode_off.c gcc-4.8.1/gcc/testsuite/gcc.target/powerpc/tfmode_off.c13750 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/powerpc/tfmode_off.c 2012-11-07 15:03:08.000000000 -060013751 +++ gcc-4.8.1/gcc/testsuite/gcc.target/powerpc/tfmode_off.c 2013-07-08 15:21:45.963328000 -050013752 @@ -1,5 +1,6 @@13753 /* { dg-do assemble } */13754 /* { dg-skip-if "" { powerpc-ibm-aix* } { "*" } { "" } } */13755 +/* { dg-skip-if "no TFmode" { powerpc-*-eabi* } { "*" } { "" } } */13756 /* { dg-options "-O2 -fno-align-functions -mtraceback=no -save-temps" } */13757 13758 typedef float TFmode __attribute__ ((mode (TF)));13759 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/sh/pr56547-1.c gcc-4.8.1/gcc/testsuite/gcc.target/sh/pr56547-1.c13760 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/sh/pr56547-1.c 1969-12-31 18:00:00.000000000 -060013761 +++ gcc-4.8.1/gcc/testsuite/gcc.target/sh/pr56547-1.c 2013-06-09 17:02:28.968408000 -050013762 @@ -0,0 +1,19 @@13763 +/* Verify that the fmac insn is used for the expression 'a * b + a' and13764 + 'a * a + a'.13765 + This assumes that the default compiler setting is -ffp-contract=fast. */13766 +/* { dg-do compile { target "sh*-*-*" } } */13767 +/* { dg-options "-O1" } */13768 +/* { dg-skip-if "" { "sh*-*-*" } { "-m1" "-m2" "-m3" "-m4al" "*nofpu" "-m4-340*" "-m4-400*" "-m4-500*" "-m5*" } { "" } } */13769 +/* { dg-final { scan-assembler-times "fmac" 2 } } */13770 +13771 +float13772 +test_00 (float a, float b)13773 +{13774 + return a * b + a;13775 +}13776 +13777 +float13778 +test_01 (float a)13779 +{13780 + return a * a + a;13781 +}13782 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/sh/pr56547-2.c gcc-4.8.1/gcc/testsuite/gcc.target/sh/pr56547-2.c13783 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/sh/pr56547-2.c 1969-12-31 18:00:00.000000000 -060013784 +++ gcc-4.8.1/gcc/testsuite/gcc.target/sh/pr56547-2.c 2013-06-09 17:02:28.968408000 -050013785 @@ -0,0 +1,18 @@13786 +/* Verify that the fmac insn is used for the expression 'a * b + a' and13787 + 'a * a + a' when -ffast-math is specified. */13788 +/* { dg-do compile { target "sh*-*-*" } } */13789 +/* { dg-options "-O1 -ffast-math" } */13790 +/* { dg-skip-if "" { "sh*-*-*" } { "-m1" "-m2" "-m3" "-m4al" "*nofpu" "-m4-340*" "-m4-400*" "-m4-500*" "-m5*" } { "" } } */13791 +/* { dg-final { scan-assembler-times "fmac" 2 } } */13792 +13793 +float13794 +test_00 (float a, float b)13795 +{13796 + return a * b + a;13797 +}13798 +13799 +float13800 +test_01 (float a)13801 +{13802 + return a * a + a;13803 +}13804 12389 diff -Naur gcc-4.8.1.orig/gcc/testsuite/g++.dg/cpp0x/constexpr-value4.C gcc-4.8.1/gcc/testsuite/g++.dg/cpp0x/constexpr-value4.C 13805 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/cpp0x/constexpr-value4.C 19 69-12-31 18:00:00.000000000 -060013806 +++ gcc-4.8.1/gcc/testsuite/g++.dg/cpp0x/constexpr-value4.C 2013-0 7-30 11:58:28.826601000 -050012390 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/cpp0x/constexpr-value4.C 1970-01-01 00:00:00.000000000 +0000 12391 +++ gcc-4.8.1/gcc/testsuite/g++.dg/cpp0x/constexpr-value4.C 2013-09-13 19:01:43.196531548 +0000 13807 12392 @@ -0,0 +1,16 @@ 13808 12393 +// PR c++/57901 … … 13823 12408 +constexpr auto t = fn (Z()); // error! (GCC 4.8.1) 13824 12409 diff -Naur gcc-4.8.1.orig/gcc/testsuite/g++.dg/cpp0x/decltype55.C gcc-4.8.1/gcc/testsuite/g++.dg/cpp0x/decltype55.C 13825 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/cpp0x/decltype55.C 19 69-12-31 18:00:00.000000000 -060013826 +++ gcc-4.8.1/gcc/testsuite/g++.dg/cpp0x/decltype55.C 2013-0 6-21 03:42:56.865320000 -050012410 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/cpp0x/decltype55.C 1970-01-01 00:00:00.000000000 +0000 12411 +++ gcc-4.8.1/gcc/testsuite/g++.dg/cpp0x/decltype55.C 2013-09-13 19:01:43.196531548 +0000 13827 12412 @@ -0,0 +1,20 @@ 13828 12413 +// PR c++/53211 … … 13847 12432 +} 13848 12433 diff -Naur gcc-4.8.1.orig/gcc/testsuite/g++.dg/cpp0x/defaulted44.C gcc-4.8.1/gcc/testsuite/g++.dg/cpp0x/defaulted44.C 13849 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/cpp0x/defaulted44.C 19 69-12-31 18:00:00.000000000 -060013850 +++ gcc-4.8.1/gcc/testsuite/g++.dg/cpp0x/defaulted44.C 2013-0 5-31 08:03:45.258613000 -050012434 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/cpp0x/defaulted44.C 1970-01-01 00:00:00.000000000 +0000 12435 +++ gcc-4.8.1/gcc/testsuite/g++.dg/cpp0x/defaulted44.C 2013-09-13 19:01:43.196531548 +0000 13851 12436 @@ -0,0 +1,24 @@ 13852 12437 +// PR c++/57319 … … 13875 12460 +} 13876 12461 diff -Naur gcc-4.8.1.orig/gcc/testsuite/g++.dg/cpp0x/defaulted45.C gcc-4.8.1/gcc/testsuite/g++.dg/cpp0x/defaulted45.C 13877 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/cpp0x/defaulted45.C 19 69-12-31 18:00:00.000000000 -060013878 +++ gcc-4.8.1/gcc/testsuite/g++.dg/cpp0x/defaulted45.C 2013-0 7-13 20:06:02.832708000 -050012462 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/cpp0x/defaulted45.C 1970-01-01 00:00:00.000000000 +0000 12463 +++ gcc-4.8.1/gcc/testsuite/g++.dg/cpp0x/defaulted45.C 2013-09-13 19:01:43.196531548 +0000 13879 12464 @@ -0,0 +1,20 @@ 13880 12465 +// { dg-do run } … … 13899 12484 +} 13900 12485 diff -Naur gcc-4.8.1.orig/gcc/testsuite/g++.dg/cpp0x/initlist71.C gcc-4.8.1/gcc/testsuite/g++.dg/cpp0x/initlist71.C 13901 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/cpp0x/initlist71.C 19 69-12-31 18:00:00.000000000 -060013902 +++ gcc-4.8.1/gcc/testsuite/g++.dg/cpp0x/initlist71.C 2013-0 5-31 08:03:23.182211000 -050012486 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/cpp0x/initlist71.C 1970-01-01 00:00:00.000000000 +0000 12487 +++ gcc-4.8.1/gcc/testsuite/g++.dg/cpp0x/initlist71.C 2013-09-13 19:01:43.196531548 +0000 13903 12488 @@ -0,0 +1,9 @@ 13904 12489 +// PR c++/56930 … … 13912 12497 +} 13913 12498 diff -Naur gcc-4.8.1.orig/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-auto3.C gcc-4.8.1/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-auto3.C 13914 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-auto3.C 19 69-12-31 18:00:00.000000000 -060013915 +++ gcc-4.8.1/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-auto3.C 2013-0 7-09 12:52:48.262064000 -050012499 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-auto3.C 1970-01-01 00:00:00.000000000 +0000 12500 +++ gcc-4.8.1/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-auto3.C 2013-09-13 19:01:43.196531548 +0000 13916 12501 @@ -0,0 +1,24 @@ 13917 12502 +// PR c++/57526 … … 13940 12525 +} 13941 12526 diff -Naur gcc-4.8.1.orig/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg5.C gcc-4.8.1/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg5.C 13942 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg5.C 19 69-12-31 18:00:00.000000000 -060013943 +++ gcc-4.8.1/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg5.C 2013-0 8-17 20:07:02.824495000 -050012527 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg5.C 1970-01-01 00:00:00.000000000 +0000 12528 +++ gcc-4.8.1/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg5.C 2013-09-13 19:01:43.196531548 +0000 13944 12529 @@ -0,0 +1,30 @@ 13945 12530 +// PR c++/58083 … … 13974 12559 +} 13975 12560 diff -Naur gcc-4.8.1.orig/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-return1.C gcc-4.8.1/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-return1.C 13976 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-return1.C 19 69-12-31 18:00:00.000000000 -060013977 +++ gcc-4.8.1/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-return1.C 2013-0 7-09 12:52:34.273079000 -050012561 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-return1.C 1970-01-01 00:00:00.000000000 +0000 12562 +++ gcc-4.8.1/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-return1.C 2013-09-13 19:01:43.196531548 +0000 13978 12563 @@ -0,0 +1,26 @@ 13979 12564 +// PR c++/57437 … … 14004 12589 +} 14005 12590 diff -Naur gcc-4.8.1.orig/gcc/testsuite/g++.dg/cpp0x/noexcept21.C gcc-4.8.1/gcc/testsuite/g++.dg/cpp0x/noexcept21.C 14006 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/cpp0x/noexcept21.C 19 69-12-31 18:00:00.000000000 -060014007 +++ gcc-4.8.1/gcc/testsuite/g++.dg/cpp0x/noexcept21.C 2013-0 7-05 05:23:08.653887000 -050012591 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/cpp0x/noexcept21.C 1970-01-01 00:00:00.000000000 +0000 12592 +++ gcc-4.8.1/gcc/testsuite/g++.dg/cpp0x/noexcept21.C 2013-09-13 19:01:43.196531548 +0000 14008 12593 @@ -0,0 +1,87 @@ 14009 12594 +// PR c++/57645 … … 14095 12680 +SA( noexcept(ExplicitH()) ); 14096 12681 diff -Naur gcc-4.8.1.orig/gcc/testsuite/g++.dg/cpp0x/pr57981.C gcc-4.8.1/gcc/testsuite/g++.dg/cpp0x/pr57981.C 14097 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/cpp0x/pr57981.C 19 69-12-31 18:00:00.000000000 -060014098 +++ gcc-4.8.1/gcc/testsuite/g++.dg/cpp0x/pr57981.C 2013-0 8-20 07:14:43.110616000 -050012682 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/cpp0x/pr57981.C 1970-01-01 00:00:00.000000000 +0000 12683 +++ gcc-4.8.1/gcc/testsuite/g++.dg/cpp0x/pr57981.C 2013-09-13 19:01:43.196531548 +0000 14099 12684 @@ -0,0 +1,17 @@ 14100 12685 +// { dg-options "-std=c++11 -Wall -Wextra" } … … 14116 12701 +} 14117 12702 diff -Naur gcc-4.8.1.orig/gcc/testsuite/g++.dg/cpp0x/ref-qual14.C gcc-4.8.1/gcc/testsuite/g++.dg/cpp0x/ref-qual14.C 14118 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/cpp0x/ref-qual14.C 19 69-12-31 18:00:00.000000000 -060014119 +++ gcc-4.8.1/gcc/testsuite/g++.dg/cpp0x/ref-qual14.C 2013-0 8-06 20:18:57.648578000 -050012703 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/cpp0x/ref-qual14.C 1970-01-01 00:00:00.000000000 +0000 12704 +++ gcc-4.8.1/gcc/testsuite/g++.dg/cpp0x/ref-qual14.C 2013-09-13 19:01:43.199864872 +0000 14120 12705 @@ -0,0 +1,18 @@ 14121 12706 +// PR c++/57825 … … 14138 12723 +{}; 14139 12724 diff -Naur gcc-4.8.1.orig/gcc/testsuite/g++.dg/debug/template2.C gcc-4.8.1/gcc/testsuite/g++.dg/debug/template2.C 14140 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/debug/template2.C 19 69-12-31 18:00:00.000000000 -060014141 +++ gcc-4.8.1/gcc/testsuite/g++.dg/debug/template2.C 2013-0 7-09 12:52:01.982983000 -050012725 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/debug/template2.C 1970-01-01 00:00:00.000000000 +0000 12726 +++ gcc-4.8.1/gcc/testsuite/g++.dg/debug/template2.C 2013-09-13 19:01:43.199864872 +0000 14142 12727 @@ -0,0 +1,14 @@ 14143 12728 +// PR c++/57545 … … 14156 12741 +}; 14157 12742 diff -Naur gcc-4.8.1.orig/gcc/testsuite/g++.dg/expr/const1.C gcc-4.8.1/gcc/testsuite/g++.dg/expr/const1.C 14158 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/expr/const1.C 19 69-12-31 18:00:00.000000000 -060014159 +++ gcc-4.8.1/gcc/testsuite/g++.dg/expr/const1.C 2013-0 7-09 12:51:47.995955000 -050012743 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/expr/const1.C 1970-01-01 00:00:00.000000000 +0000 12744 +++ gcc-4.8.1/gcc/testsuite/g++.dg/expr/const1.C 2013-09-13 19:01:43.199864872 +0000 14160 12745 @@ -0,0 +1,9 @@ 14161 12746 +// PR c++/57551 … … 14169 12754 +} 14170 12755 diff -Naur gcc-4.8.1.orig/gcc/testsuite/g++.dg/ext/pr57362.C gcc-4.8.1/gcc/testsuite/g++.dg/ext/pr57362.C 14171 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/ext/pr57362.C 19 69-12-31 18:00:00.000000000 -060014172 +++ gcc-4.8.1/gcc/testsuite/g++.dg/ext/pr57362.C 2013-0 7-31 15:11:51.667843000 -050012756 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/ext/pr57362.C 1970-01-01 00:00:00.000000000 +0000 12757 +++ gcc-4.8.1/gcc/testsuite/g++.dg/ext/pr57362.C 2013-09-13 19:01:43.199864872 +0000 14173 12758 @@ -0,0 +1,199 @@ 14174 12759 +/* { dg-do compile { target i?86-*-* x86_64-*-* } } */ … … 14372 12957 +/* { dg-prune-output "No dispatcher found for" } */ 14373 12958 diff -Naur gcc-4.8.1.orig/gcc/testsuite/g++.dg/opt/pr58006.C gcc-4.8.1/gcc/testsuite/g++.dg/opt/pr58006.C 14374 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/opt/pr58006.C 19 69-12-31 18:00:00.000000000 -060014375 +++ gcc-4.8.1/gcc/testsuite/g++.dg/opt/pr58006.C 2013-0 8-18 10:24:12.566692000 -050012959 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/opt/pr58006.C 1970-01-01 00:00:00.000000000 +0000 12960 +++ gcc-4.8.1/gcc/testsuite/g++.dg/opt/pr58006.C 2013-09-13 19:01:43.199864872 +0000 14376 12961 @@ -0,0 +1,22 @@ 14377 12962 +// PR tree-optimization/58006 … … 14398 12983 +} 14399 12984 diff -Naur gcc-4.8.1.orig/gcc/testsuite/g++.dg/opt/pr58165.C gcc-4.8.1/gcc/testsuite/g++.dg/opt/pr58165.C 14400 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/opt/pr58165.C 19 69-12-31 18:00:00.000000000 -060014401 +++ gcc-4.8.1/gcc/testsuite/g++.dg/opt/pr58165.C 2013-0 8-16 04:04:52.452768000 -050012985 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/opt/pr58165.C 1970-01-01 00:00:00.000000000 +0000 12986 +++ gcc-4.8.1/gcc/testsuite/g++.dg/opt/pr58165.C 2013-09-13 19:01:43.199864872 +0000 14402 12987 @@ -0,0 +1,14 @@ 14403 12988 +// PR tree-optimization/58165 … … 14416 13001 +} 14417 13002 diff -Naur gcc-4.8.1.orig/gcc/testsuite/g++.dg/parse/ref-qual2.C gcc-4.8.1/gcc/testsuite/g++.dg/parse/ref-qual2.C 14418 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/parse/ref-qual2.C 19 69-12-31 18:00:00.000000000 -060014419 +++ gcc-4.8.1/gcc/testsuite/g++.dg/parse/ref-qual2.C 2013-0 7-09 12:52:17.034866000 -050013003 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/parse/ref-qual2.C 1970-01-01 00:00:00.000000000 +0000 13004 +++ gcc-4.8.1/gcc/testsuite/g++.dg/parse/ref-qual2.C 2013-09-13 19:01:43.199864872 +0000 14420 13005 @@ -0,0 +1,6 @@ 14421 13006 +// PR c++/57532 … … 14426 13011 +} 14427 13012 diff -Naur gcc-4.8.1.orig/gcc/testsuite/g++.dg/pr57878.C gcc-4.8.1/gcc/testsuite/g++.dg/pr57878.C 14428 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/pr57878.C 19 69-12-31 18:00:00.000000000 -060014429 +++ gcc-4.8.1/gcc/testsuite/g++.dg/pr57878.C 2013-0 8-20 06:56:29.733502000 -050013013 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/pr57878.C 1970-01-01 00:00:00.000000000 +0000 13014 +++ gcc-4.8.1/gcc/testsuite/g++.dg/pr57878.C 2013-09-13 19:01:43.199864872 +0000 14430 13015 @@ -0,0 +1,226 @@ 14431 13016 +/* { dg-do compile { target i?86-*-* x86_64-*-* } } */ … … 14656 13241 +} 14657 13242 diff -Naur gcc-4.8.1.orig/gcc/testsuite/g++.dg/template/abstract1.C gcc-4.8.1/gcc/testsuite/g++.dg/template/abstract1.C 14658 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/template/abstract1.C 19 69-12-31 18:00:00.000000000 -060014659 +++ gcc-4.8.1/gcc/testsuite/g++.dg/template/abstract1.C 2013-0 7-30 08:30:12.307006000 -050013243 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/template/abstract1.C 1970-01-01 00:00:00.000000000 +0000 13244 +++ gcc-4.8.1/gcc/testsuite/g++.dg/template/abstract1.C 2013-09-13 19:01:43.199864872 +0000 14660 13245 @@ -0,0 +1,12 @@ 14661 13246 +// PR c++/58022 … … 14672 13257 +class bar { virtual void baz()=0; }; 14673 13258 diff -Naur gcc-4.8.1.orig/gcc/testsuite/g++.dg/template/access27.C gcc-4.8.1/gcc/testsuite/g++.dg/template/access27.C 14674 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/template/access27.C 19 69-12-31 18:00:00.000000000 -060014675 +++ gcc-4.8.1/gcc/testsuite/g++.dg/template/access27.C 2013-0 7-08 22:26:58.213071000 -050013259 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/template/access27.C 1970-01-01 00:00:00.000000000 +0000 13260 +++ gcc-4.8.1/gcc/testsuite/g++.dg/template/access27.C 2013-09-13 19:01:43.199864872 +0000 14676 13261 @@ -0,0 +1,17 @@ 14677 13262 +// PR c++/57550 … … 14693 13278 +template void Handler::SetPrimitiveHandlers<double>(); 14694 13279 diff -Naur gcc-4.8.1.orig/gcc/testsuite/g++.dg/template/arg9.C gcc-4.8.1/gcc/testsuite/g++.dg/template/arg9.C 14695 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/template/arg9.C 19 69-12-31 18:00:00.000000000 -060014696 +++ gcc-4.8.1/gcc/testsuite/g++.dg/template/arg9.C 2013-0 7-03 15:22:16.527771000 -050013280 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/template/arg9.C 1970-01-01 00:00:00.000000000 +0000 13281 +++ gcc-4.8.1/gcc/testsuite/g++.dg/template/arg9.C 2013-09-13 19:01:43.199864872 +0000 14697 13282 @@ -0,0 +1,8 @@ 14698 13283 +// PR c++/57771 … … 14705 13290 +S <reinterpret_cast <int> (4>>2)> s2; 14706 13291 diff -Naur gcc-4.8.1.orig/gcc/testsuite/g++.dg/template/delete2.C gcc-4.8.1/gcc/testsuite/g++.dg/template/delete2.C 14707 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/template/delete2.C 19 69-12-31 18:00:00.000000000 -060014708 +++ gcc-4.8.1/gcc/testsuite/g++.dg/template/delete2.C 2013-0 8-20 07:59:37.559809000 -050013292 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/template/delete2.C 1970-01-01 00:00:00.000000000 +0000 13293 +++ gcc-4.8.1/gcc/testsuite/g++.dg/template/delete2.C 2013-09-13 19:01:43.203198197 +0000 14709 13294 @@ -0,0 +1,26 @@ 14710 13295 +// PR c++/58119 … … 14735 13320 +} 14736 13321 diff -Naur gcc-4.8.1.orig/gcc/testsuite/g++.dg/template/using23.C gcc-4.8.1/gcc/testsuite/g++.dg/template/using23.C 14737 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/template/using23.C 19 69-12-31 18:00:00.000000000 -060014738 +++ gcc-4.8.1/gcc/testsuite/g++.dg/template/using23.C 2013-0 7-09 12:51:35.112170000 -050013322 --- gcc-4.8.1.orig/gcc/testsuite/g++.dg/template/using23.C 1970-01-01 00:00:00.000000000 +0000 13323 +++ gcc-4.8.1/gcc/testsuite/g++.dg/template/using23.C 2013-09-13 19:01:43.203198197 +0000 14739 13324 @@ -0,0 +1,15 @@ 14740 13325 +// PR c++/57831 … … 14753 13338 +}; 14754 13339 +template struct B< A >; 13340 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.c-torture/compile/pr58164.c gcc-4.8.1/gcc/testsuite/gcc.c-torture/compile/pr58164.c 13341 --- gcc-4.8.1.orig/gcc/testsuite/gcc.c-torture/compile/pr58164.c 1970-01-01 00:00:00.000000000 +0000 13342 +++ gcc-4.8.1/gcc/testsuite/gcc.c-torture/compile/pr58164.c 2013-09-13 19:01:43.186531574 +0000 13343 @@ -0,0 +1,8 @@ 13344 +/* PR tree-optimization/58164 */ 13345 + 13346 +int 13347 +foo (void) 13348 +{ 13349 + int x = 0; 13350 + goto *&x; 13351 +} 13352 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.c-torture/execute/nest-align-1.x gcc-4.8.1/gcc/testsuite/gcc.c-torture/execute/nest-align-1.x 13353 --- gcc-4.8.1.orig/gcc/testsuite/gcc.c-torture/execute/nest-align-1.x 1970-01-01 00:00:00.000000000 +0000 13354 +++ gcc-4.8.1/gcc/testsuite/gcc.c-torture/execute/nest-align-1.x 2013-09-13 19:01:43.186531574 +0000 13355 @@ -0,0 +1,5 @@ 13356 +# Force bigger stack alignment for PowerPC EABI targets. 13357 +if { [istarget "powerpc-*-eabi*"] } { 13358 + set additional_flags "-mno-eabi" 13359 +} 13360 +return 0 13361 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.c-torture/execute/pr57568.c gcc-4.8.1/gcc/testsuite/gcc.c-torture/execute/pr57568.c 13362 --- gcc-4.8.1.orig/gcc/testsuite/gcc.c-torture/execute/pr57568.c 1970-01-01 00:00:00.000000000 +0000 13363 +++ gcc-4.8.1/gcc/testsuite/gcc.c-torture/execute/pr57568.c 2013-09-13 19:01:43.186531574 +0000 13364 @@ -0,0 +1,12 @@ 13365 +/* PR target/57568 */ 13366 + 13367 +extern void abort (void); 13368 +int a[6][9] = { }, b = 1, *c = &a[3][5]; 13369 + 13370 +int 13371 +main () 13372 +{ 13373 + if (b && (*c = *c + *c)) 13374 + abort (); 13375 + return 0; 13376 +} 13377 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.c-torture/execute/pr57829.c gcc-4.8.1/gcc/testsuite/gcc.c-torture/execute/pr57829.c 13378 --- gcc-4.8.1.orig/gcc/testsuite/gcc.c-torture/execute/pr57829.c 1970-01-01 00:00:00.000000000 +0000 13379 +++ gcc-4.8.1/gcc/testsuite/gcc.c-torture/execute/pr57829.c 2013-09-13 19:01:43.186531574 +0000 13380 @@ -0,0 +1,31 @@ 13381 +/* PR rtl-optimization/57829 */ 13382 + 13383 +__attribute__((noinline, noclone)) 13384 +int 13385 +f1 (int k) 13386 +{ 13387 + return 2 | ((k - 1) >> ((int) sizeof (int) * __CHAR_BIT__ - 1)); 13388 +} 13389 + 13390 +__attribute__((noinline, noclone)) 13391 +long int 13392 +f2 (long int k) 13393 +{ 13394 + return 2L | ((k - 1L) >> ((int) sizeof (long int) * __CHAR_BIT__ - 1)); 13395 +} 13396 + 13397 +__attribute__((noinline, noclone)) 13398 +int 13399 +f3 (int k) 13400 +{ 13401 + k &= 63; 13402 + return 4 | ((k + 2) >> 5); 13403 +} 13404 + 13405 +int 13406 +main () 13407 +{ 13408 + if (f1 (1) != 2 || f2 (1L) != 2L || f3 (63) != 6 || f3 (1) != 4) 13409 + __builtin_abort (); 13410 + return 0; 13411 +} 13412 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.c-torture/execute/pr58209.c gcc-4.8.1/gcc/testsuite/gcc.c-torture/execute/pr58209.c 13413 --- gcc-4.8.1.orig/gcc/testsuite/gcc.c-torture/execute/pr58209.c 1970-01-01 00:00:00.000000000 +0000 13414 +++ gcc-4.8.1/gcc/testsuite/gcc.c-torture/execute/pr58209.c 2013-09-13 19:01:43.186531574 +0000 13415 @@ -0,0 +1,32 @@ 13416 +/* PR tree-optimization/58209 */ 13417 + 13418 +extern void abort (void); 13419 +typedef __INTPTR_TYPE__ T; 13420 +T buf[1024]; 13421 + 13422 +T * 13423 +foo (T n) 13424 +{ 13425 + if (n == 0) 13426 + return (T *) buf; 13427 + T s = (T) foo (n - 1); 13428 + return (T *) (s + sizeof (T)); 13429 +} 13430 + 13431 +T * 13432 +bar (T n) 13433 +{ 13434 + if (n == 0) 13435 + return buf; 13436 + return foo (n - 1) + 1; 13437 +} 13438 + 13439 +int 13440 +main () 13441 +{ 13442 + int i; 13443 + for (i = 0; i < 27; i++) 13444 + if (foo (i) != buf + i || bar (i) != buf + i) 13445 + abort (); 13446 + return 0; 13447 +} 13448 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.dg/asan/pr56417.c gcc-4.8.1/gcc/testsuite/gcc.dg/asan/pr56417.c 13449 --- gcc-4.8.1.orig/gcc/testsuite/gcc.dg/asan/pr56417.c 1970-01-01 00:00:00.000000000 +0000 13450 +++ gcc-4.8.1/gcc/testsuite/gcc.dg/asan/pr56417.c 2013-09-13 19:01:43.186531574 +0000 13451 @@ -0,0 +1,9 @@ 13452 +/* PR sanitizer/56417 */ 13453 +/* { dg-do compile } */ 13454 +/* { dg-options "-w" } */ 13455 + 13456 +int 13457 +foo (void) 13458 +{ 13459 + return __builtin_strlen (&foo); 13460 +} 13461 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.dg/graphite/pr54094.c gcc-4.8.1/gcc/testsuite/gcc.dg/graphite/pr54094.c 13462 --- gcc-4.8.1.orig/gcc/testsuite/gcc.dg/graphite/pr54094.c 1970-01-01 00:00:00.000000000 +0000 13463 +++ gcc-4.8.1/gcc/testsuite/gcc.dg/graphite/pr54094.c 2013-09-13 19:01:43.963196204 +0000 13464 @@ -0,0 +1,10 @@ 13465 +/* { dg-options "-O2 -floop-parallelize-all -floop-nest-optimize" } */ 13466 +void dwt_deinterleave_h(int *a, int *b, int dn, int sn, int cas) 13467 +{ 13468 + int i; 13469 + for (i=0; i<sn; i++) 13470 + b[i]=a[2*i+cas]; 13471 + for (i=0; i<dn; i++) 13472 + b[sn+i]=a[(2*i+1-cas)]; 13473 +} 13474 + 13475 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.dg/ipa/pr57358.c gcc-4.8.1/gcc/testsuite/gcc.dg/ipa/pr57358.c 13476 --- gcc-4.8.1.orig/gcc/testsuite/gcc.dg/ipa/pr57358.c 1970-01-01 00:00:00.000000000 +0000 13477 +++ gcc-4.8.1/gcc/testsuite/gcc.dg/ipa/pr57358.c 2013-09-13 19:01:43.186531574 +0000 13478 @@ -0,0 +1,9 @@ 13479 +/* { dg-do compile } */ 13480 +/* { dg-options "-O2" } */ 13481 + 13482 +struct t { void (*func)(void*); }; 13483 +void test_func(struct t* a) __attribute__((optimize("O0"))); 13484 +void test_func(struct t* a) 13485 +{ 13486 + a->func(0); 13487 +} 13488 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.dg/pr56977.c gcc-4.8.1/gcc/testsuite/gcc.dg/pr56977.c 13489 --- gcc-4.8.1.orig/gcc/testsuite/gcc.dg/pr56977.c 1970-01-01 00:00:00.000000000 +0000 13490 +++ gcc-4.8.1/gcc/testsuite/gcc.dg/pr56977.c 2013-09-13 19:01:43.186531574 +0000 13491 @@ -0,0 +1,10 @@ 13492 +/* { dg-do compile } */ 13493 +/* { dg-options "-Og" } */ 13494 + 13495 +__attribute__((__error__("error"))) void error (); 13496 + 13497 +void f (int i) { 13498 + if (__builtin_constant_p (i)) { 13499 + error (); 13500 + } 13501 +} 13502 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.dg/pr57518.c gcc-4.8.1/gcc/testsuite/gcc.dg/pr57518.c 13503 --- gcc-4.8.1.orig/gcc/testsuite/gcc.dg/pr57518.c 1970-01-01 00:00:00.000000000 +0000 13504 +++ gcc-4.8.1/gcc/testsuite/gcc.dg/pr57518.c 2013-09-13 19:01:43.186531574 +0000 13505 @@ -0,0 +1,15 @@ 13506 +/* PR rtl-optimization/57130 */ 13507 + 13508 +/* { dg-do compile } */ 13509 +/* { dg-options "-O2 -fdump-rtl-ira" } */ 13510 +/* { dg-final { scan-rtl-dump-not "REG_EQUIV.*mem.*\"ip\"" "ira" } } */ 13511 + 13512 +char ip[10]; 13513 +int total; 13514 + 13515 +void foo() { 13516 + int t; 13517 + 13518 + t = ip[2]; 13519 + total = t & 0x3; 13520 +} 13521 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.dg/pr57980.c gcc-4.8.1/gcc/testsuite/gcc.dg/pr57980.c 13522 --- gcc-4.8.1.orig/gcc/testsuite/gcc.dg/pr57980.c 1970-01-01 00:00:00.000000000 +0000 13523 +++ gcc-4.8.1/gcc/testsuite/gcc.dg/pr57980.c 2013-09-13 19:01:43.186531574 +0000 13524 @@ -0,0 +1,19 @@ 13525 +/* PR tree-optimization/57980 */ 13526 +/* { dg-do compile } */ 13527 +/* { dg-options "-O -foptimize-sibling-calls -w" } */ 13528 + 13529 +typedef int V __attribute__ ((vector_size (2 * sizeof (int)))); 13530 +extern V f (void); 13531 + 13532 +V 13533 +bar (void) 13534 +{ 13535 + return -f (); 13536 +} 13537 + 13538 +V 13539 +foo (void) 13540 +{ 13541 + V v = { }; 13542 + return v - f (); 13543 +} 13544 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.dg/pr58145-1.c gcc-4.8.1/gcc/testsuite/gcc.dg/pr58145-1.c 13545 --- gcc-4.8.1.orig/gcc/testsuite/gcc.dg/pr58145-1.c 1970-01-01 00:00:00.000000000 +0000 13546 +++ gcc-4.8.1/gcc/testsuite/gcc.dg/pr58145-1.c 2013-09-13 19:01:43.186531574 +0000 13547 @@ -0,0 +1,37 @@ 13548 +/* PR tree-optimization/58145 */ 13549 +/* { dg-do compile { target { int32plus } } } */ 13550 +/* { dg-options "-O2 -fdump-tree-optimized" } */ 13551 + 13552 +struct S { unsigned int data : 32; }; 13553 +struct T { unsigned int data; }; 13554 +volatile struct S s2; 13555 + 13556 +void 13557 +f1 (int val) 13558 +{ 13559 + struct S s = { .data = val }; 13560 + *(volatile struct S *) 0x880000UL = s; 13561 +} 13562 + 13563 +void 13564 +f2 (int val) 13565 +{ 13566 + struct T t = { .data = val }; 13567 + *(volatile struct T *) 0x880000UL = t; 13568 +} 13569 + 13570 +void 13571 +f3 (int val) 13572 +{ 13573 + *(volatile unsigned int *) 0x880000UL = val; 13574 +} 13575 + 13576 +void 13577 +f4 (int val) 13578 +{ 13579 + struct S s = { .data = val }; 13580 + s2 = s; 13581 +} 13582 + 13583 +/* { dg-final { scan-tree-dump-times " ={v} " 4 "optimized" } } */ 13584 +/* { dg-final { cleanup-tree-dump "optimized" } } */ 13585 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.dg/pr58145-2.c gcc-4.8.1/gcc/testsuite/gcc.dg/pr58145-2.c 13586 --- gcc-4.8.1.orig/gcc/testsuite/gcc.dg/pr58145-2.c 1970-01-01 00:00:00.000000000 +0000 13587 +++ gcc-4.8.1/gcc/testsuite/gcc.dg/pr58145-2.c 2013-09-13 19:01:43.186531574 +0000 13588 @@ -0,0 +1,51 @@ 13589 +/* PR tree-optimization/58145 */ 13590 +/* { dg-do compile { target { int32plus } } } */ 13591 +/* { dg-options "-O2 -fdump-tree-optimized" } */ 13592 + 13593 +struct S { unsigned int data : 32; }; 13594 +struct T { unsigned int data; }; 13595 +volatile struct S s2; 13596 + 13597 +static inline void 13598 +f1 (int val) 13599 +{ 13600 + struct S s = { .data = val }; 13601 + *(volatile struct S *) 0x880000UL = s; 13602 +} 13603 + 13604 +static inline void 13605 +f2 (int val) 13606 +{ 13607 + struct T t = { .data = val }; 13608 + *(volatile struct T *) 0x880000UL = t; 13609 +} 13610 + 13611 +static inline void 13612 +f3 (int val) 13613 +{ 13614 + *(volatile unsigned int *) 0x880000UL = val; 13615 +} 13616 + 13617 +static inline void 13618 +f4 (int val) 13619 +{ 13620 + struct S s = { .data = val }; 13621 + s2 = s; 13622 +} 13623 + 13624 +void 13625 +f5 (void) 13626 +{ 13627 + int i; 13628 + for (i = 0; i < 100; i++) 13629 + f1 (0); 13630 + for (i = 0; i < 100; i++) 13631 + f2 (0); 13632 + for (i = 0; i < 100; i++) 13633 + f3 (0); 13634 + for (i = 0; i < 100; i++) 13635 + f4 (0); 13636 +} 13637 + 13638 +/* { dg-final { scan-tree-dump-times " ={v} " 4 "optimized" } } */ 13639 +/* { dg-final { cleanup-tree-dump "optimized" } } */ 13640 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.dg/torture/pr58041.c gcc-4.8.1/gcc/testsuite/gcc.dg/torture/pr58041.c 13641 --- gcc-4.8.1.orig/gcc/testsuite/gcc.dg/torture/pr58041.c 1970-01-01 00:00:00.000000000 +0000 13642 +++ gcc-4.8.1/gcc/testsuite/gcc.dg/torture/pr58041.c 2013-09-13 19:01:43.189864898 +0000 13643 @@ -0,0 +1,33 @@ 13644 +/* { dg-do run } */ 13645 + 13646 +typedef long long V 13647 + __attribute__ ((vector_size (2 * sizeof (long long)), may_alias)); 13648 + 13649 +struct s 13650 +{ 13651 + char u; 13652 + V v[2]; 13653 +} __attribute__((packed,aligned(1))); 13654 + 13655 +__attribute__((noinline, noclone)) 13656 +long long foo(struct s *x, int y, V *z) 13657 +{ 13658 + V a = x->v[y]; 13659 + x->v[y] = *z; 13660 + return a[1]; 13661 +} 13662 + 13663 +struct s a = {0,{{0,0},{0,0}}}; 13664 +int main() 13665 +{ 13666 + V v1 = {0,1}; 13667 + V v2 = {0,2}; 13668 + 13669 + if (foo(&a,0,&v1) != 0) 13670 + __builtin_abort(); 13671 + if (foo(&a,0,&v2) != 1) 13672 + __builtin_abort(); 13673 + if (foo(&a,1,&v1) != 0) 13674 + __builtin_abort(); 13675 + return 0; 13676 +} 13677 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/arm/lp1189445.c gcc-4.8.1/gcc/testsuite/gcc.target/arm/lp1189445.c 13678 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/arm/lp1189445.c 1970-01-01 00:00:00.000000000 +0000 13679 +++ gcc-4.8.1/gcc/testsuite/gcc.target/arm/lp1189445.c 2013-09-13 19:01:43.189864898 +0000 13680 @@ -0,0 +1,18 @@ 13681 +/* { dg-do compile } */ 13682 +/* { dg-require-effective-target arm_neon } */ 13683 +/* { dg-add-options arm_neon } */ 13684 +/* { dg-options "-O3" } */ 13685 + 13686 +int id; 13687 +int 13688 +test (const long int *data) 13689 +{ 13690 + int i, retval; 13691 + retval = id; 13692 + for (i = 0; i < id; i++) 13693 + { 13694 + retval &= (data[i] <= 0); 13695 + } 13696 + 13697 + return (retval); 13698 +} 13699 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/arm/pr58041.c gcc-4.8.1/gcc/testsuite/gcc.target/arm/pr58041.c 13700 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/arm/pr58041.c 1970-01-01 00:00:00.000000000 +0000 13701 +++ gcc-4.8.1/gcc/testsuite/gcc.target/arm/pr58041.c 2013-09-13 19:01:43.189864898 +0000 13702 @@ -0,0 +1,30 @@ 13703 +/* { dg-do compile } */ 13704 +/* { dg-options "-Os -mno-unaligned-access" } */ 13705 +/* { dg-final { scan-assembler "ldrb" } } */ 13706 +/* { dg-final { scan-assembler "strb" } } */ 13707 + 13708 +struct s 13709 +{ 13710 + char u; 13711 + long long v[2]; 13712 +} __attribute__((packed,aligned(1))); 13713 + 13714 +__attribute__((noinline, noclone)) 13715 +long long foo(struct s *x, int y, long long z) 13716 +{ 13717 + long long a = x->v[y]; 13718 + x->v[y] = z; 13719 + return a; 13720 +} 13721 + 13722 +struct s a = {0,{0,0}}; 13723 +int main() 13724 +{ 13725 + if (foo(&a,0,1) != 0) 13726 + __builtin_abort(); 13727 + if (foo(&a,0,2) != 1) 13728 + __builtin_abort(); 13729 + if (foo(&a,1,1) != 0) 13730 + __builtin_abort(); 13731 + return 0; 13732 +} 13733 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/arm/thumb1-Os-mult.c gcc-4.8.1/gcc/testsuite/gcc.target/arm/thumb1-Os-mult.c 13734 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/arm/thumb1-Os-mult.c 1970-01-01 00:00:00.000000000 +0000 13735 +++ gcc-4.8.1/gcc/testsuite/gcc.target/arm/thumb1-Os-mult.c 2013-09-13 19:01:43.189864898 +0000 13736 @@ -0,0 +1,12 @@ 13737 +/* { dg-require-effective-target arm_thumb1_ok } */ 13738 +/* { dg-do compile } */ 13739 +/* { dg-options "-Os" } */ 13740 +/* { dg-skip-if "" { ! { arm_thumb1 } } } */ 13741 + 13742 +int 13743 +mymul3 (int x) 13744 +{ 13745 + return x * 0x555; 13746 +} 13747 + 13748 +/* { dg-final { scan-assembler "mul\[\\t \]*r.,\[\\t \]*r." } } */ 13749 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/avr/torture/builtins-4-roundfx.c gcc-4.8.1/gcc/testsuite/gcc.target/avr/torture/builtins-4-roundfx.c 13750 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/avr/torture/builtins-4-roundfx.c 2013-02-08 10:13:37.000000000 +0000 13751 +++ gcc-4.8.1/gcc/testsuite/gcc.target/avr/torture/builtins-4-roundfx.c 2013-09-13 19:01:43.189864898 +0000 13752 @@ -72,11 +72,11 @@ 13753 13754 static void test2hr (void) 13755 { 13756 - TEST2 (hr, 1, 0x7f, 0x40); 13757 - TEST2 (hr, 2, 0x7f, 0b1100000); 13758 - TEST2 (hr, 3, 0x7f, 0b1110000); 13759 - TEST2 (hr, 4, 0x7f, 0b1111000); 13760 - 13761 + TEST2 (hr, 1, 0x7f, 0x7f); 13762 + TEST2 (hr, 2, 0x70, 0x7f); 13763 + TEST2 (hr, 3, 0x78, 0x7f); 13764 + TEST2 (hr, 4, 0x7f, 0x7f); 13765 + 13766 TEST2 (uhr, 1, 0x7f, 0x80); 13767 TEST2 (uhr, 2, 0x7f, 0x80); 13768 TEST2 (uhr, 3, 0x7f, 0x80); 13769 @@ -85,10 +85,13 @@ 13770 13771 void test2k (void) 13772 { 13773 - TEST2 (k, 1, 0x7fffffff, 0x7fff8000 | 0b100000000000000); 13774 - TEST2 (k, 2, 0x7fffffff, 0x7fff8000 | 0b110000000000000); 13775 - TEST2 (k, 3, 0x7fffffff, 0x7fff8000 | 0b111000000000000); 13776 - TEST2 (k, 4, 0x7fffffff, 0x7fff8000 | 0b111100000000000); 13777 + TEST2 (k, 1, 0x7fffff00, 0x7fffffff); 13778 + TEST2 (k, 2, 0x7ffffff0, 0x7fffffff); 13779 + TEST2 (k, 2, 0x7ffff000, 0x7fffffff); 13780 + TEST2 (k, 3, 0x7ffff000, 0x7ffff000); 13781 + TEST2 (k, 3, 0x7ffff800, 0x7fffffff); 13782 + TEST2 (k, 3, 0x7ffff7ff, 0x7ffff000); 13783 + TEST2 (k, 4, 0x7ffff7ff, 0x7ffff800); 13784 13785 TEST2 (uk, 1, 0x7fffffff, 1ul << 31); 13786 TEST2 (uk, 2, 0x7fffffff, 1ul << 31); 13787 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/bmi-1.c gcc-4.8.1/gcc/testsuite/gcc.target/i386/bmi-1.c 13788 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/bmi-1.c 2010-11-10 22:02:23.000000000 +0000 13789 +++ gcc-4.8.1/gcc/testsuite/gcc.target/i386/bmi-1.c 2013-09-13 19:01:43.189864898 +0000 13790 @@ -1,11 +1,11 @@ 13791 /* { dg-do compile } */ 13792 /* { dg-options "-O2 -mbmi " } */ 13793 -/* { dg-final { scan-assembler "andn\[^\\n]*(%|)eax" } } */ 13794 -/* { dg-final { scan-assembler "bextr\[^\\n]*(%|)eax" } } */ 13795 -/* { dg-final { scan-assembler "blsi\[^\\n]*(%|)eax" } } */ 13796 -/* { dg-final { scan-assembler "blsmsk\[^\\n]*(%|)eax" } } */ 13797 -/* { dg-final { scan-assembler "blsr\[^\\n]*(%|)eax" } } */ 13798 -/* { dg-final { scan-assembler "tzcntl\[^\\n]*(%|)eax" } } */ 13799 +/* { dg-final { scan-assembler "andn\[^\\n]*eax" } } */ 13800 +/* { dg-final { scan-assembler-times "bextr\[ \\t]+\[^\\n]*eax" 2 } } */ 13801 +/* { dg-final { scan-assembler-times "blsi\[^\\n]*eax" 2 } } */ 13802 +/* { dg-final { scan-assembler-times "blsmsk\[^\\n]*eax" 2 } } */ 13803 +/* { dg-final { scan-assembler-times "blsr\[^\\n]*eax" 2 } } */ 13804 +/* { dg-final { scan-assembler-times "tzcntl\[^\\n]*eax" 2 } } */ 13805 13806 #include <x86intrin.h> 13807 13808 @@ -22,25 +22,57 @@ 13809 } 13810 13811 unsigned int 13812 +func_bextr32_3args (unsigned int X, 13813 + unsigned int Y, 13814 + unsigned int Z) 13815 +{ 13816 + return _bextr_u32(X, Y, Z); 13817 +} 13818 + 13819 +unsigned int 13820 func_blsi32 (unsigned int X) 13821 { 13822 return __blsi_u32(X); 13823 } 13824 13825 unsigned int 13826 +func_blsi32_2 (unsigned int X) 13827 +{ 13828 + return _blsi_u32(X); 13829 +} 13830 + 13831 +unsigned int 13832 func_blsmsk32 (unsigned int X) 13833 { 13834 return __blsmsk_u32(X); 13835 } 13836 13837 unsigned int 13838 +func_blsmsk32_2 (unsigned int X) 13839 +{ 13840 + return _blsmsk_u32(X); 13841 +} 13842 + 13843 +unsigned int 13844 func_blsr32 (unsigned int X) 13845 { 13846 return __blsr_u32(X); 13847 } 13848 13849 unsigned int 13850 +func_blsr32_2 (unsigned int X) 13851 +{ 13852 + return _blsr_u32(X); 13853 +} 13854 + 13855 +unsigned int 13856 func_tzcnt32 (unsigned int X) 13857 { 13858 return __tzcnt_u32(X); 13859 } 13860 + 13861 +unsigned int 13862 +func_tzcnt32_2 (unsigned int X) 13863 +{ 13864 + return _tzcnt_u32(X); 13865 +} 13866 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/bmi-2.c gcc-4.8.1/gcc/testsuite/gcc.target/i386/bmi-2.c 13867 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/bmi-2.c 2011-07-09 19:25:11.000000000 +0000 13868 +++ gcc-4.8.1/gcc/testsuite/gcc.target/i386/bmi-2.c 2013-09-13 19:01:43.189864898 +0000 13869 @@ -1,11 +1,11 @@ 13870 /* { dg-do compile { target { ! { ia32 } } } } */ 13871 /* { dg-options "-O2 -mbmi " } */ 13872 -/* { dg-final { scan-assembler "andn\[^\\n]*(%|)rax" } } */ 13873 -/* { dg-final { scan-assembler "bextr\[^\\n]*(%|)rax" } } */ 13874 -/* { dg-final { scan-assembler "blsi\[^\\n]*(%|)rax" } } */ 13875 -/* { dg-final { scan-assembler "blsmsk\[^\\n]*(%|)rax" } } */ 13876 -/* { dg-final { scan-assembler "blsr\[^\\n]*(%|)rax" } } */ 13877 -/* { dg-final { scan-assembler "tzcntq\[^\\n]*(%|)rax" } } */ 13878 +/* { dg-final { scan-assembler "andn\[^\\n]*rax" } } */ 13879 +/* { dg-final { scan-assembler-times "bextr\[ \\t]+\[^\\n]*rax" 2 } } */ 13880 +/* { dg-final { scan-assembler-times "blsi\[^\\n]*rax" 2 } } */ 13881 +/* { dg-final { scan-assembler-times "blsmsk\[^\\n]*rax" 2 } } */ 13882 +/* { dg-final { scan-assembler-times "blsr\[^\\n]*rax" 2 } } */ 13883 +/* { dg-final { scan-assembler-times "tzcntq\[^\\n]*rax" 2 } } */ 13884 13885 #include <x86intrin.h> 13886 13887 @@ -22,25 +22,57 @@ 13888 } 13889 13890 unsigned long long 13891 +func_bextr64_3args (unsigned long long X, 13892 + unsigned long long Y, 13893 + unsigned long long Z) 13894 +{ 13895 + return _bextr_u64 (X, Y, Z); 13896 +} 13897 + 13898 +unsigned long long 13899 func_blsi64 (unsigned long long X) 13900 { 13901 return __blsi_u64 (X); 13902 } 13903 13904 unsigned long long 13905 +func_blsi64_2 (unsigned long long X) 13906 +{ 13907 + return _blsi_u64 (X); 13908 +} 13909 + 13910 +unsigned long long 13911 func_blsmsk64 (unsigned long long X) 13912 { 13913 return __blsmsk_u64 (X); 13914 } 13915 13916 unsigned long long 13917 +func_blsmsk64_2 (unsigned long long X) 13918 +{ 13919 + return _blsmsk_u64 (X); 13920 +} 13921 + 13922 +unsigned long long 13923 func_blsr64 (unsigned long long X) 13924 { 13925 return __blsr_u64 (X); 13926 } 13927 13928 unsigned long long 13929 +func_blsr64_2 (unsigned long long X) 13930 +{ 13931 + return _blsr_u64 (X); 13932 +} 13933 + 13934 +unsigned long long 13935 func_tzcnt64 (unsigned long long X) 13936 { 13937 return __tzcnt_u64 (X); 13938 } 13939 + 13940 +unsigned long long 13941 +func_tzcnt64_2 (unsigned long long X) 13942 +{ 13943 + return _tzcnt_u64 (X); 13944 +} 13945 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/bmi-bextr-3.c gcc-4.8.1/gcc/testsuite/gcc.target/i386/bmi-bextr-3.c 13946 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/bmi-bextr-3.c 1970-01-01 00:00:00.000000000 +0000 13947 +++ gcc-4.8.1/gcc/testsuite/gcc.target/i386/bmi-bextr-3.c 2013-09-13 19:01:43.189864898 +0000 13948 @@ -0,0 +1,31 @@ 13949 +/* PR target/57623 */ 13950 +/* { dg-do assemble { target bmi } } */ 13951 +/* { dg-options "-O2 -mbmi" } */ 13952 + 13953 +#include <x86intrin.h> 13954 + 13955 +unsigned int 13956 +f1 (unsigned int x, unsigned int *y) 13957 +{ 13958 + return __bextr_u32 (x, *y); 13959 +} 13960 + 13961 +unsigned int 13962 +f2 (unsigned int *x, unsigned int y) 13963 +{ 13964 + return __bextr_u32 (*x, y); 13965 +} 13966 + 13967 +#ifdef __x86_64__ 13968 +unsigned long long 13969 +f3 (unsigned long long x, unsigned long long *y) 13970 +{ 13971 + return __bextr_u64 (x, *y); 13972 +} 13973 + 13974 +unsigned long long 13975 +f4 (unsigned long long *x, unsigned long long y) 13976 +{ 13977 + return __bextr_u64 (*x, y); 13978 +} 13979 +#endif 13980 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/bmi2-bzhi-1.c gcc-4.8.1/gcc/testsuite/gcc.target/i386/bmi2-bzhi-1.c 13981 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/bmi2-bzhi-1.c 1970-01-01 00:00:00.000000000 +0000 13982 +++ gcc-4.8.1/gcc/testsuite/gcc.target/i386/bmi2-bzhi-1.c 2013-09-13 19:01:43.189864898 +0000 13983 @@ -0,0 +1,31 @@ 13984 +/* PR target/57623 */ 13985 +/* { dg-do assemble { target bmi2 } } */ 13986 +/* { dg-options "-O2 -mbmi2" } */ 13987 + 13988 +#include <x86intrin.h> 13989 + 13990 +unsigned int 13991 +f1 (unsigned int x, unsigned int *y) 13992 +{ 13993 + return _bzhi_u32 (x, *y); 13994 +} 13995 + 13996 +unsigned int 13997 +f2 (unsigned int *x, unsigned int y) 13998 +{ 13999 + return _bzhi_u32 (*x, y); 14000 +} 14001 + 14002 +#ifdef __x86_64__ 14003 +unsigned long long 14004 +f3 (unsigned long long x, unsigned long long *y) 14005 +{ 14006 + return _bzhi_u64 (x, *y); 14007 +} 14008 + 14009 +unsigned long long 14010 +f4 (unsigned long long *x, unsigned long long y) 14011 +{ 14012 + return _bzhi_u64 (*x, y); 14013 +} 14014 +#endif 14015 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/movabs-1.c gcc-4.8.1/gcc/testsuite/gcc.target/i386/movabs-1.c 14016 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/movabs-1.c 1970-01-01 00:00:00.000000000 +0000 14017 +++ gcc-4.8.1/gcc/testsuite/gcc.target/i386/movabs-1.c 2013-09-13 19:01:43.189864898 +0000 14018 @@ -0,0 +1,10 @@ 14019 +/* { dg-do assemble } */ 14020 +/* { dg-options "-O2 -masm=intel" } */ 14021 +/* { dg-require-effective-target lp64 } */ 14022 +/* { dg-require-effective-target masm_intel } */ 14023 + 14024 +void 14025 +foo (void) 14026 +{ 14027 + *(volatile long*)0xFFFF800000000000 = -1; 14028 +} 14029 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/pr57459.c gcc-4.8.1/gcc/testsuite/gcc.target/i386/pr57459.c 14030 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/pr57459.c 1970-01-01 00:00:00.000000000 +0000 14031 +++ gcc-4.8.1/gcc/testsuite/gcc.target/i386/pr57459.c 2013-09-13 19:01:43.189864898 +0000 14032 @@ -0,0 +1,60 @@ 14033 +/* PR rtl-optimization/57459 */ 14034 +/* { dg-do run } */ 14035 +/* { dg-options "-fno-inline -O2 -minline-all-stringops -fno-omit-frame-pointer" } */ 14036 + 14037 +int total1[10], total2[10], total3[10], total4[10], total5[10], a[20]; 14038 +int len; 14039 + 14040 +void stackclean() { 14041 + void *ptr = __builtin_alloca(20000); 14042 + __builtin_memset(ptr, 0, 20000); 14043 +} 14044 + 14045 +void foo(const char *s) { 14046 + int r1 = a[1]; 14047 + int r2 = a[2]; 14048 + int r3 = a[3]; 14049 + int r4 = a[4]; 14050 + int r5 = a[5]; 14051 + 14052 + len = __builtin_strlen(s); 14053 + 14054 + if (s != 0) 14055 + return; 14056 + 14057 + while (r1) { 14058 + total1[r1] = r1; 14059 + r1--; 14060 + } 14061 + 14062 + while (r2) { 14063 + total2[r2] = r2; 14064 + r2--; 14065 + } 14066 + 14067 + while (r3) { 14068 + total3[r3] = r3; 14069 + r3--; 14070 + } 14071 + 14072 + while (r4) { 14073 + total4[r4] = r4; 14074 + r4--; 14075 + } 14076 + 14077 + while (r5) { 14078 + total5[r5] = r5; 14079 + r5--; 14080 + } 14081 +} 14082 + 14083 +extern void abort (void); 14084 + 14085 +int main() { 14086 + stackclean(); 14087 + foo("abcdefgh"); 14088 + if (len != 8) 14089 + abort (); 14090 + return 0; 14091 +} 14092 + 14093 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/pr57655.c gcc-4.8.1/gcc/testsuite/gcc.target/i386/pr57655.c 14094 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/pr57655.c 1970-01-01 00:00:00.000000000 +0000 14095 +++ gcc-4.8.1/gcc/testsuite/gcc.target/i386/pr57655.c 2013-09-13 19:01:43.193198223 +0000 14096 @@ -0,0 +1,10 @@ 14097 +/* { dg-do compile } */ 14098 +/* { dg-options "-mavx -mvzeroupper -mno-fp-ret-in-387" } 14099 + 14100 +/* { dg-error "x87 register return with x87 disabled" "" { target { ! ia32 } } 8 } */ 14101 + 14102 +long double 14103 +foo (long double x) 14104 +{ 14105 + return __builtin_ilogbl (x); 14106 +} 14107 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/pr57736.c gcc-4.8.1/gcc/testsuite/gcc.target/i386/pr57736.c 14108 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/pr57736.c 1970-01-01 00:00:00.000000000 +0000 14109 +++ gcc-4.8.1/gcc/testsuite/gcc.target/i386/pr57736.c 2013-09-13 19:01:43.193198223 +0000 14110 @@ -0,0 +1,41 @@ 14111 +/* PR target/57736 */ 14112 +/* { dg-do compile } */ 14113 +/* { dg-options "-O2" } */ 14114 + 14115 +#include <x86intrin.h> 14116 + 14117 +unsigned long long 14118 +f1 (void) 14119 +{ 14120 + return __rdtsc (); 14121 +} 14122 + 14123 +unsigned long long 14124 +f2 (unsigned int *x) 14125 +{ 14126 + return __rdtscp (x); 14127 +} 14128 + 14129 +unsigned long long 14130 +f3 (unsigned int x) 14131 +{ 14132 + return __rdpmc (x); 14133 +} 14134 + 14135 +void 14136 +f4 (void) 14137 +{ 14138 + __rdtsc (); 14139 +} 14140 + 14141 +void 14142 +f5 (unsigned int *x) 14143 +{ 14144 + __rdtscp (x); 14145 +} 14146 + 14147 +void 14148 +f6 (unsigned int x) 14149 +{ 14150 + __rdpmc (x); 14151 +} 14152 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/pr57777.c gcc-4.8.1/gcc/testsuite/gcc.target/i386/pr57777.c 14153 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/pr57777.c 1970-01-01 00:00:00.000000000 +0000 14154 +++ gcc-4.8.1/gcc/testsuite/gcc.target/i386/pr57777.c 2013-09-13 19:01:43.193198223 +0000 14155 @@ -0,0 +1,13 @@ 14156 +/* PR target/57777 */ 14157 +/* { dg-do assemble { target avx2 } } */ 14158 +/* { dg-options "-O3 -mavx2" } */ 14159 +/* { dg-additional-options "-fpic" { target fpic } } */ 14160 + 14161 +void 14162 +foo (unsigned long *x, int *y) 14163 +{ 14164 + static unsigned long b[2] = { 0x0UL, 0x9908b0dfUL }; 14165 + int c; 14166 + for (c = 0; c < 512; c++) 14167 + x[c] = b[x[c] & 1UL]; 14168 +} 14169 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/pr58218.c gcc-4.8.1/gcc/testsuite/gcc.target/i386/pr58218.c 14170 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/i386/pr58218.c 1970-01-01 00:00:00.000000000 +0000 14171 +++ gcc-4.8.1/gcc/testsuite/gcc.target/i386/pr58218.c 2013-09-13 19:01:43.193198223 +0000 14172 @@ -0,0 +1,5 @@ 14173 +/* PR target/58218 */ 14174 +/* { dg-do assemble { target lp64 } } */ 14175 +/* { dg-options "-mcmodel=medium" } */ 14176 + 14177 +struct { float x[16385]; } a = { { 0.f, } }; 14178 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/powerpc/20020118-1.c gcc-4.8.1/gcc/testsuite/gcc.target/powerpc/20020118-1.c 14179 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/powerpc/20020118-1.c 2009-04-28 08:38:37.000000000 +0000 14180 +++ gcc-4.8.1/gcc/testsuite/gcc.target/powerpc/20020118-1.c 2013-09-13 19:01:43.193198223 +0000 14181 @@ -1,6 +1,8 @@ 14182 /* { dg-do run { target powerpc*-*-* } }*/ 14183 /* VxWorks only guarantees 64 bits of alignment (STACK_BOUNDARY == 64). */ 14184 /* { dg-skip-if "" { "powerpc*-*-vxworks*" } { "*" } { "" } } */ 14185 +/* Force 128-bit stack alignment for eabi targets. */ 14186 +/* { dg-options "-mno-eabi" { target powerpc*-*-eabi* } } */ 14187 14188 /* Test local alignment. Test new target macro STARTING_FRAME_PHASE. */ 14189 /* Origin: Aldy Hernandez <aldyh@redhat.com>. */ 14190 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/powerpc/altivec-consts.c gcc-4.8.1/gcc/testsuite/gcc.target/powerpc/altivec-consts.c 14191 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/powerpc/altivec-consts.c 2009-01-13 17:52:32.000000000 +0000 14192 +++ gcc-4.8.1/gcc/testsuite/gcc.target/powerpc/altivec-consts.c 2013-09-13 19:01:43.193198223 +0000 14193 @@ -11,31 +11,24 @@ 14194 typedef __attribute__ ((vector_size (16))) unsigned short v8hi; 14195 typedef __attribute__ ((vector_size (16))) unsigned int v4si; 14196 14197 -char w[16] __attribute__((aligned(16))); 14198 - 14199 - 14200 14201 -/* Emulate the vspltis? instructions on a 16-byte array of chars. */ 14202 +typedef __attribute__((aligned(16))) char c16[16]; 14203 +typedef __attribute__((aligned(16))) short s8[8]; 14204 +typedef __attribute__((aligned(16))) int i4[4]; 14205 14206 -void vspltisb (char *v, int val) 14207 -{ 14208 - int i; 14209 - for (i = 0; i < 16; i++) 14210 - v[i] = val; 14211 -} 14212 +#define V16QI(V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12,V13,V14,V15,V16) \ 14213 + v16qi v = {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12,V13,V14,V15,V16}; \ 14214 + static c16 w = {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12,V13,V14,V15,V16}; \ 14215 + check_v16qi (v, w); 14216 14217 -void vspltish (char *v, int val) 14218 -{ 14219 - int i; 14220 - for (i = 0; i < 16; i += 2) 14221 - v[i] = val >> 7, v[i + 1] = val; 14222 -} 14223 +#define V8HI(V1,V2,V3,V4,V5,V6,V7,V8) \ 14224 + v8hi v = {V1,V2,V3,V4,V5,V6,V7,V8}; \ 14225 + static s8 w = {V1,V2,V3,V4,V5,V6,V7,V8}; \ 14226 + check_v8hi (v, w); 14227 14228 -void vspltisw (char *v, int val) 14229 -{ 14230 - int i; 14231 - for (i = 0; i < 16; i += 4) 14232 - v[i] = v[i + 1] = v[i + 2] = val >> 7, v[i + 3] = val; 14233 -} 14234 +#define V4SI(V1,V2,V3,V4) \ 14235 + v4si v = {V1,V2,V3,V4}; \ 14236 + static i4 w = {V1,V2,V3,V4}; \ 14237 + check_v4si (v, w); 14238 14239 14240 14241 /* Use three different check functions for each mode-instruction pair. 14242 @@ -48,13 +41,13 @@ 14243 abort (); 14244 } 14245 14246 -void __attribute__ ((noinline)) check_v8hi (v8hi v1, char *v2) 14247 +void __attribute__ ((noinline)) check_v8hi (v8hi v1, short *v2) 14248 { 14249 if (memcmp (&v1, v2, 16)) 14250 abort (); 14251 } 14252 14253 -void __attribute__ ((noinline)) check_v4si (v4si v1, char *v2) 14254 +void __attribute__ ((noinline)) check_v4si (v4si v1, int *v2) 14255 { 14256 if (memcmp (&v1, v2, 16)) 14257 abort (); 14258 @@ -65,72 +58,52 @@ 14259 14260 void v16qi_vspltisb () 14261 { 14262 - v16qi v = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15 }; 14263 - vspltisb (w, 15); 14264 - check_v16qi (v, w); 14265 + V16QI (15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15); 14266 } 14267 14268 void v16qi_vspltisb_neg () 14269 { 14270 - v16qi v = { -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5 }; 14271 - vspltisb (w, -5); 14272 - check_v16qi (v, w); 14273 + V16QI (-5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5); 14274 } 14275 14276 void v16qi_vspltisb_addself () 14277 { 14278 - v16qi v = { 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30 }; 14279 - vspltisb (w, 30); 14280 - check_v16qi (v, w); 14281 + V16QI (30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30); 14282 } 14283 14284 void v16qi_vspltisb_neg_addself () 14285 { 14286 - v16qi v = { -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24 }; 14287 - vspltisb (w, -24); 14288 - check_v16qi (v, w); 14289 + V16QI (-24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24); 14290 } 14291 14292 void v16qi_vspltish () 14293 { 14294 - v16qi v = { 0, 15, 0, 15, 0, 15, 0, 15, 0, 15, 0, 15, 0, 15, 0, 15 }; 14295 - vspltish (w, 15); 14296 - check_v16qi (v, w); 14297 + V16QI (0, 15, 0, 15, 0, 15, 0, 15, 0, 15, 0, 15, 0, 15, 0, 15); 14298 } 14299 14300 void v16qi_vspltish_addself () 14301 { 14302 - v16qi v = { 0, 30, 0, 30, 0, 30, 0, 30, 0, 30, 0, 30, 0, 30, 0, 30 }; 14303 - vspltish (w, 30); 14304 - check_v16qi (v, w); 14305 + V16QI (0, 30, 0, 30, 0, 30, 0, 30, 0, 30, 0, 30, 0, 30, 0, 30); 14306 } 14307 14308 void v16qi_vspltish_neg () 14309 { 14310 - v16qi v = { -1, -5, -1, -5, -1, -5, -1, -5, -1, -5, -1, -5, -1, -5, -1, -5 }; 14311 - vspltish (w, -5); 14312 - check_v16qi (v, w); 14313 + V16QI (-1, -5, -1, -5, -1, -5, -1, -5, -1, -5, -1, -5, -1, -5, -1, -5); 14314 } 14315 14316 void v16qi_vspltisw () 14317 { 14318 - v16qi v = { 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15 }; 14319 - vspltisw (w, 15); 14320 - check_v16qi (v, w); 14321 + V16QI (0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15); 14322 } 14323 14324 void v16qi_vspltisw_addself () 14325 { 14326 - v16qi v = { 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30 }; 14327 - vspltisw (w, 30); 14328 - check_v16qi (v, w); 14329 + V16QI (0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30); 14330 } 14331 14332 void v16qi_vspltisw_neg () 14333 { 14334 - v16qi v = { -1, -1, -1, -5, -1, -1, -1, -5, -1, -1, -1, -5, -1, -1, -1, -5 }; 14335 - vspltisw (w, -5); 14336 - check_v16qi (v, w); 14337 + V16QI (-1, -1, -1, -5, -1, -1, -1, -5, -1, -1, -1, -5, -1, -1, -1, -5); 14338 } 14339 14340 14341 14342 @@ -138,144 +111,104 @@ 14343 14344 void v8hi_vspltisb () 14345 { 14346 - v8hi v = { 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F }; 14347 - vspltisb (w, 15); 14348 - check_v8hi (v, w); 14349 + V8HI (0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F); 14350 } 14351 14352 void v8hi_vspltisb_addself () 14353 { 14354 - v8hi v = { 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E }; 14355 - vspltisb (w, 30); 14356 - check_v8hi (v, w); 14357 + V8HI (0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E); 14358 } 14359 14360 void v8hi_vspltisb_neg () 14361 { 14362 - v8hi v = { 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB }; 14363 - vspltisb (w, -5); 14364 - check_v8hi (v, w); 14365 + V8HI (0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB); 14366 } 14367 14368 void v8hi_vspltish () 14369 { 14370 - v8hi v = { 15, 15, 15, 15, 15, 15, 15, 15 }; 14371 - vspltish (w, 15); 14372 - check_v8hi (v, w); 14373 + V8HI (15, 15, 15, 15, 15, 15, 15, 15); 14374 } 14375 14376 void v8hi_vspltish_neg () 14377 { 14378 - v8hi v = { -5, -5, -5, -5, -5, -5, -5, -5 }; 14379 - vspltish (w, -5); 14380 - check_v8hi (v, w); 14381 + V8HI (-5, -5, -5, -5, -5, -5, -5, -5); 14382 } 14383 14384 void v8hi_vspltish_addself () 14385 { 14386 - v8hi v = { 30, 30, 30, 30, 30, 30, 30, 30 }; 14387 - vspltish (w, 30); 14388 - check_v8hi (v, w); 14389 + V8HI (30, 30, 30, 30, 30, 30, 30, 30); 14390 } 14391 14392 void v8hi_vspltish_neg_addself () 14393 { 14394 - v8hi v = { -24, -24, -24, -24, -24, -24, -24, -24 }; 14395 - vspltish (w, -24); 14396 - check_v8hi (v, w); 14397 + V8HI (-24, -24, -24, -24, -24, -24, -24, -24); 14398 } 14399 14400 void v8hi_vspltisw () 14401 { 14402 - v8hi v = { 0, 15, 0, 15, 0, 15, 0, 15 }; 14403 - vspltisw (w, 15); 14404 - check_v8hi (v, w); 14405 + V8HI (0, 15, 0, 15, 0, 15, 0, 15); 14406 } 14407 14408 void v8hi_vspltisw_addself () 14409 { 14410 - v8hi v = { 0, 30, 0, 30, 0, 30, 0, 30 }; 14411 - vspltisw (w, 30); 14412 - check_v8hi (v, w); 14413 + V8HI (0, 30, 0, 30, 0, 30, 0, 30); 14414 } 14415 14416 void v8hi_vspltisw_neg () 14417 { 14418 - v8hi v = { -1, -5, -1, -5, -1, -5, -1, -5 }; 14419 - vspltisw (w, -5); 14420 - check_v8hi (v, w); 14421 + V8HI (-1, -5, -1, -5, -1, -5, -1, -5); 14422 } 14423 14424 /* V4SI tests. */ 14425 14426 void v4si_vspltisb () 14427 { 14428 - v4si v = { 0x0F0F0F0F, 0x0F0F0F0F, 0x0F0F0F0F, 0x0F0F0F0F }; 14429 - vspltisb (w, 15); 14430 - check_v4si (v, w); 14431 + V4SI (0x0F0F0F0F, 0x0F0F0F0F, 0x0F0F0F0F, 0x0F0F0F0F); 14432 } 14433 14434 void v4si_vspltisb_addself () 14435 { 14436 - v4si v = { 0x1E1E1E1E, 0x1E1E1E1E, 0x1E1E1E1E, 0x1E1E1E1E }; 14437 - vspltisb (w, 30); 14438 - check_v4si (v, w); 14439 + V4SI (0x1E1E1E1E, 0x1E1E1E1E, 0x1E1E1E1E, 0x1E1E1E1E); 14440 } 14441 14442 void v4si_vspltisb_neg () 14443 { 14444 - v4si v = { 0xFBFBFBFB, 0xFBFBFBFB, 0xFBFBFBFB, 0xFBFBFBFB }; 14445 - vspltisb (w, -5); 14446 - check_v4si (v, w); 14447 + V4SI (0xFBFBFBFB, 0xFBFBFBFB, 0xFBFBFBFB, 0xFBFBFBFB); 14448 } 14449 14450 void v4si_vspltish () 14451 { 14452 - v4si v = { 0x000F000F, 0x000F000F, 0x000F000F, 0x000F000F }; 14453 - vspltish (w, 15); 14454 - check_v4si (v, w); 14455 + V4SI (0x000F000F, 0x000F000F, 0x000F000F, 0x000F000F); 14456 } 14457 14458 void v4si_vspltish_addself () 14459 { 14460 - v4si v = { 0x001E001E, 0x001E001E, 0x001E001E, 0x001E001E }; 14461 - vspltish (w, 30); 14462 - check_v4si (v, w); 14463 + V4SI (0x001E001E, 0x001E001E, 0x001E001E, 0x001E001E); 14464 } 14465 14466 void v4si_vspltish_neg () 14467 { 14468 - v4si v = { 0xFFFBFFFB, 0xFFFBFFFB, 0xFFFBFFFB, 0xFFFBFFFB }; 14469 - vspltish (w, -5); 14470 - check_v4si (v, w); 14471 + V4SI (0xFFFBFFFB, 0xFFFBFFFB, 0xFFFBFFFB, 0xFFFBFFFB); 14472 } 14473 14474 void v4si_vspltisw () 14475 { 14476 - v4si v = { 15, 15, 15, 15 }; 14477 - vspltisw (w, 15); 14478 - check_v4si (v, w); 14479 + V4SI (15, 15, 15, 15); 14480 } 14481 14482 void v4si_vspltisw_neg () 14483 { 14484 - v4si v = { -5, -5, -5, -5 }; 14485 - vspltisw (w, -5); 14486 - check_v4si (v, w); 14487 + V4SI (-5, -5, -5, -5); 14488 } 14489 14490 void v4si_vspltisw_addself () 14491 { 14492 - v4si v = { 30, 30, 30, 30 }; 14493 - vspltisw (w, 30); 14494 - check_v4si (v, w); 14495 + V4SI (30, 30, 30, 30); 14496 } 14497 14498 void v4si_vspltisw_neg_addself () 14499 { 14500 - v4si v = { -24, -24, -24, -24 }; 14501 - vspltisw (w, -24); 14502 - check_v4si (v, w); 14503 + V4SI (-24, -24, -24, -24); 14504 } 14505 14506 14507 14508 @@ -316,3 +249,5 @@ 14509 v4si_vspltisw_neg_addself (); 14510 return 0; 14511 } 14512 + 14513 +/* { dg-final { scan-assembler-not "lvx" { target { ! powerpc*le-*-* } } } } */ 14514 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/powerpc/le-altivec-consts.c gcc-4.8.1/gcc/testsuite/gcc.target/powerpc/le-altivec-consts.c 14515 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/powerpc/le-altivec-consts.c 1970-01-01 00:00:00.000000000 +0000 14516 +++ gcc-4.8.1/gcc/testsuite/gcc.target/powerpc/le-altivec-consts.c 2013-09-13 19:01:43.193198223 +0000 14517 @@ -0,0 +1,253 @@ 14518 +/* { dg-do run { target { powerpc*-*-* && vmx_hw } } } */ 14519 +/* { dg-do compile { target { powerpc*-*-* && { ! vmx_hw } } } } */ 14520 +/* { dg-require-effective-target powerpc_altivec_ok } */ 14521 +/* { dg-options "-maltivec -mabi=altivec -O2" } */ 14522 + 14523 +/* Check that "easy" AltiVec constants are correctly synthesized. */ 14524 + 14525 +extern void abort (void); 14526 + 14527 +typedef __attribute__ ((vector_size (16))) unsigned char v16qi; 14528 +typedef __attribute__ ((vector_size (16))) unsigned short v8hi; 14529 +typedef __attribute__ ((vector_size (16))) unsigned int v4si; 14530 + 14531 +typedef __attribute__((aligned(16))) char c16[16]; 14532 +typedef __attribute__((aligned(16))) short s8[8]; 14533 +typedef __attribute__((aligned(16))) int i4[4]; 14534 + 14535 +#define V16QI(V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12,V13,V14,V15,V16) \ 14536 + v16qi v = {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12,V13,V14,V15,V16}; \ 14537 + static c16 w = {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12,V13,V14,V15,V16}; \ 14538 + check_v16qi (v, w); 14539 + 14540 +#define V8HI(V1,V2,V3,V4,V5,V6,V7,V8) \ 14541 + v8hi v = {V1,V2,V3,V4,V5,V6,V7,V8}; \ 14542 + static s8 w = {V1,V2,V3,V4,V5,V6,V7,V8}; \ 14543 + check_v8hi (v, w); 14544 + 14545 +#define V4SI(V1,V2,V3,V4) \ 14546 + v4si v = {V1,V2,V3,V4}; \ 14547 + static i4 w = {V1,V2,V3,V4}; \ 14548 + check_v4si (v, w); 14549 + 14550 + 14551 14552 +/* Use three different check functions for each mode-instruction pair. 14553 + The callers have no typecasting and no addressable vectors, to make 14554 + the test more robust. */ 14555 + 14556 +void __attribute__ ((noinline)) check_v16qi (v16qi v1, char *v2) 14557 +{ 14558 + if (memcmp (&v1, v2, 16)) 14559 + abort (); 14560 +} 14561 + 14562 +void __attribute__ ((noinline)) check_v8hi (v8hi v1, short *v2) 14563 +{ 14564 + if (memcmp (&v1, v2, 16)) 14565 + abort (); 14566 +} 14567 + 14568 +void __attribute__ ((noinline)) check_v4si (v4si v1, int *v2) 14569 +{ 14570 + if (memcmp (&v1, v2, 16)) 14571 + abort (); 14572 +} 14573 + 14574 + 14575 14576 +/* V16QI tests. */ 14577 + 14578 +void v16qi_vspltisb () 14579 +{ 14580 + V16QI (15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15); 14581 +} 14582 + 14583 +void v16qi_vspltisb_neg () 14584 +{ 14585 + V16QI (-5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5); 14586 +} 14587 + 14588 +void v16qi_vspltisb_addself () 14589 +{ 14590 + V16QI (30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30); 14591 +} 14592 + 14593 +void v16qi_vspltisb_neg_addself () 14594 +{ 14595 + V16QI (-24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24); 14596 +} 14597 + 14598 +void v16qi_vspltish () 14599 +{ 14600 + V16QI (15, 0, 15, 0, 15, 0, 15, 0, 15, 0, 15, 0, 15, 0, 15, 0); 14601 +} 14602 + 14603 +void v16qi_vspltish_addself () 14604 +{ 14605 + V16QI (30, 0, 30, 0, 30, 0, 30, 0, 30, 0, 30, 0, 30, 0, 30, 0); 14606 +} 14607 + 14608 +void v16qi_vspltish_neg () 14609 +{ 14610 + V16QI (-5, -1, -5, -1, -5, -1, -5, -1, -5, -1, -5, -1, -5, -1, -5, -1); 14611 +} 14612 + 14613 +void v16qi_vspltisw () 14614 +{ 14615 + V16QI (15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0); 14616 +} 14617 + 14618 +void v16qi_vspltisw_addself () 14619 +{ 14620 + V16QI (30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0); 14621 +} 14622 + 14623 +void v16qi_vspltisw_neg () 14624 +{ 14625 + V16QI (-5, -1, -1, -1, -5, -1, -1, -1, -5, -1, -1, -1, -5, -1, -1, -1); 14626 +} 14627 + 14628 + 14629 14630 +/* V8HI tests. */ 14631 + 14632 +void v8hi_vspltisb () 14633 +{ 14634 + V8HI (0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F); 14635 +} 14636 + 14637 +void v8hi_vspltisb_addself () 14638 +{ 14639 + V8HI (0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E); 14640 +} 14641 + 14642 +void v8hi_vspltisb_neg () 14643 +{ 14644 + V8HI (0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB); 14645 +} 14646 + 14647 +void v8hi_vspltish () 14648 +{ 14649 + V8HI (15, 15, 15, 15, 15, 15, 15, 15); 14650 +} 14651 + 14652 +void v8hi_vspltish_neg () 14653 +{ 14654 + V8HI (-5, -5, -5, -5, -5, -5, -5, -5); 14655 +} 14656 + 14657 +void v8hi_vspltish_addself () 14658 +{ 14659 + V8HI (30, 30, 30, 30, 30, 30, 30, 30); 14660 +} 14661 + 14662 +void v8hi_vspltish_neg_addself () 14663 +{ 14664 + V8HI (-24, -24, -24, -24, -24, -24, -24, -24); 14665 +} 14666 + 14667 +void v8hi_vspltisw () 14668 +{ 14669 + V8HI (15, 0, 15, 0, 15, 0, 15, 0); 14670 +} 14671 + 14672 +void v8hi_vspltisw_addself () 14673 +{ 14674 + V8HI (30, 0, 30, 0, 30, 0, 30, 0); 14675 +} 14676 + 14677 +void v8hi_vspltisw_neg () 14678 +{ 14679 + V8HI (-5, -1, -5, -1, -5, -1, -5, -1); 14680 +} 14681 + 14682 +/* V4SI tests. */ 14683 + 14684 +void v4si_vspltisb () 14685 +{ 14686 + V4SI (0x0F0F0F0F, 0x0F0F0F0F, 0x0F0F0F0F, 0x0F0F0F0F); 14687 +} 14688 + 14689 +void v4si_vspltisb_addself () 14690 +{ 14691 + V4SI (0x1E1E1E1E, 0x1E1E1E1E, 0x1E1E1E1E, 0x1E1E1E1E); 14692 +} 14693 + 14694 +void v4si_vspltisb_neg () 14695 +{ 14696 + V4SI (0xFBFBFBFB, 0xFBFBFBFB, 0xFBFBFBFB, 0xFBFBFBFB); 14697 +} 14698 + 14699 +void v4si_vspltish () 14700 +{ 14701 + V4SI (0x000F000F, 0x000F000F, 0x000F000F, 0x000F000F); 14702 +} 14703 + 14704 +void v4si_vspltish_addself () 14705 +{ 14706 + V4SI (0x001E001E, 0x001E001E, 0x001E001E, 0x001E001E); 14707 +} 14708 + 14709 +void v4si_vspltish_neg () 14710 +{ 14711 + V4SI (0xFFFBFFFB, 0xFFFBFFFB, 0xFFFBFFFB, 0xFFFBFFFB); 14712 +} 14713 + 14714 +void v4si_vspltisw () 14715 +{ 14716 + V4SI (15, 15, 15, 15); 14717 +} 14718 + 14719 +void v4si_vspltisw_neg () 14720 +{ 14721 + V4SI (-5, -5, -5, -5); 14722 +} 14723 + 14724 +void v4si_vspltisw_addself () 14725 +{ 14726 + V4SI (30, 30, 30, 30); 14727 +} 14728 + 14729 +void v4si_vspltisw_neg_addself () 14730 +{ 14731 + V4SI (-24, -24, -24, -24); 14732 +} 14733 + 14734 + 14735 14736 + 14737 +int main () 14738 +{ 14739 + v16qi_vspltisb (); 14740 + v16qi_vspltisb_neg (); 14741 + v16qi_vspltisb_addself (); 14742 + v16qi_vspltisb_neg_addself (); 14743 + v16qi_vspltish (); 14744 + v16qi_vspltish_addself (); 14745 + v16qi_vspltish_neg (); 14746 + v16qi_vspltisw (); 14747 + v16qi_vspltisw_addself (); 14748 + v16qi_vspltisw_neg (); 14749 + 14750 + v8hi_vspltisb (); 14751 + v8hi_vspltisb_addself (); 14752 + v8hi_vspltisb_neg (); 14753 + v8hi_vspltish (); 14754 + v8hi_vspltish_neg (); 14755 + v8hi_vspltish_addself (); 14756 + v8hi_vspltish_neg_addself (); 14757 + v8hi_vspltisw (); 14758 + v8hi_vspltisw_addself (); 14759 + v8hi_vspltisw_neg (); 14760 + 14761 + v4si_vspltisb (); 14762 + v4si_vspltisb_addself (); 14763 + v4si_vspltisb_neg (); 14764 + v4si_vspltish (); 14765 + v4si_vspltish_addself (); 14766 + v4si_vspltish_neg (); 14767 + v4si_vspltisw (); 14768 + v4si_vspltisw_neg (); 14769 + v4si_vspltisw_addself (); 14770 + v4si_vspltisw_neg_addself (); 14771 + return 0; 14772 +} 14773 + 14774 +/* { dg-final { scan-assembler-not "lvx" { target { powerpc*le-*-* } } } } */ 14775 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/powerpc/ppc-spe64-1.c gcc-4.8.1/gcc/testsuite/gcc.target/powerpc/ppc-spe64-1.c 14776 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/powerpc/ppc-spe64-1.c 2009-01-13 03:11:48.000000000 +0000 14777 +++ gcc-4.8.1/gcc/testsuite/gcc.target/powerpc/ppc-spe64-1.c 2013-09-13 19:01:43.193198223 +0000 14778 @@ -4,4 +4,4 @@ 14779 /* { dg-options "-m64" } */ 14780 14781 /* { dg-error "-m64 not supported in this configuration" "SPE not 64-bit" { target *-*-* } 0 } */ 14782 -/* { dg-error "64-bit E500 not supported" "64-bit E500" { target *-*-* } 0 } */ 14783 +/* { dg-error "64-bit SPE not supported" "64-bit SPE" { target *-*-* } 0 } */ 14784 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/powerpc/pr47197.c gcc-4.8.1/gcc/testsuite/gcc.target/powerpc/pr47197.c 14785 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/powerpc/pr47197.c 2012-04-24 15:51:58.000000000 +0000 14786 +++ gcc-4.8.1/gcc/testsuite/gcc.target/powerpc/pr47197.c 2013-09-13 19:01:43.193198223 +0000 14787 @@ -1,4 +1,5 @@ 14788 /* { dg-do compile } */ 14789 +/* { dg-require-effective-target powerpc_altivec_ok } */ 14790 /* { dg-options "-maltivec" } */ 14791 14792 /* Compile-only test to ensure that expressions can be passed to 14793 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/powerpc/tfmode_off.c gcc-4.8.1/gcc/testsuite/gcc.target/powerpc/tfmode_off.c 14794 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/powerpc/tfmode_off.c 2012-11-07 21:03:08.000000000 +0000 14795 +++ gcc-4.8.1/gcc/testsuite/gcc.target/powerpc/tfmode_off.c 2013-09-13 19:01:43.193198223 +0000 14796 @@ -1,5 +1,6 @@ 14797 /* { dg-do assemble } */ 14798 /* { dg-skip-if "" { powerpc-ibm-aix* } { "*" } { "" } } */ 14799 +/* { dg-skip-if "no TFmode" { powerpc-*-eabi* } { "*" } { "" } } */ 14800 /* { dg-options "-O2 -fno-align-functions -mtraceback=no -save-temps" } */ 14801 14802 typedef float TFmode __attribute__ ((mode (TF))); 14803 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/sh/pr56547-1.c gcc-4.8.1/gcc/testsuite/gcc.target/sh/pr56547-1.c 14804 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/sh/pr56547-1.c 1970-01-01 00:00:00.000000000 +0000 14805 +++ gcc-4.8.1/gcc/testsuite/gcc.target/sh/pr56547-1.c 2013-09-13 19:01:43.196531548 +0000 14806 @@ -0,0 +1,19 @@ 14807 +/* Verify that the fmac insn is used for the expression 'a * b + a' and 14808 + 'a * a + a'. 14809 + This assumes that the default compiler setting is -ffp-contract=fast. */ 14810 +/* { dg-do compile { target "sh*-*-*" } } */ 14811 +/* { dg-options "-O1" } */ 14812 +/* { dg-skip-if "" { "sh*-*-*" } { "-m1" "-m2" "-m3" "-m4al" "*nofpu" "-m4-340*" "-m4-400*" "-m4-500*" "-m5*" } { "" } } */ 14813 +/* { dg-final { scan-assembler-times "fmac" 2 } } */ 14814 + 14815 +float 14816 +test_00 (float a, float b) 14817 +{ 14818 + return a * b + a; 14819 +} 14820 + 14821 +float 14822 +test_01 (float a) 14823 +{ 14824 + return a * a + a; 14825 +} 14826 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gcc.target/sh/pr56547-2.c gcc-4.8.1/gcc/testsuite/gcc.target/sh/pr56547-2.c 14827 --- gcc-4.8.1.orig/gcc/testsuite/gcc.target/sh/pr56547-2.c 1970-01-01 00:00:00.000000000 +0000 14828 +++ gcc-4.8.1/gcc/testsuite/gcc.target/sh/pr56547-2.c 2013-09-13 19:01:43.196531548 +0000 14829 @@ -0,0 +1,18 @@ 14830 +/* Verify that the fmac insn is used for the expression 'a * b + a' and 14831 + 'a * a + a' when -ffast-math is specified. */ 14832 +/* { dg-do compile { target "sh*-*-*" } } */ 14833 +/* { dg-options "-O1 -ffast-math" } */ 14834 +/* { dg-skip-if "" { "sh*-*-*" } { "-m1" "-m2" "-m3" "-m4al" "*nofpu" "-m4-340*" "-m4-400*" "-m4-500*" "-m5*" } { "" } } */ 14835 +/* { dg-final { scan-assembler-times "fmac" 2 } } */ 14836 + 14837 +float 14838 +test_00 (float a, float b) 14839 +{ 14840 + return a * b + a; 14841 +} 14842 + 14843 +float 14844 +test_01 (float a) 14845 +{ 14846 + return a * a + a; 14847 +} 14755 14848 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gfortran.dg/defined_assignment_6.f90 gcc-4.8.1/gcc/testsuite/gfortran.dg/defined_assignment_6.f90 14756 --- gcc-4.8.1.orig/gcc/testsuite/gfortran.dg/defined_assignment_6.f90 19 69-12-31 18:00:00.000000000 -060014757 +++ gcc-4.8.1/gcc/testsuite/gfortran.dg/defined_assignment_6.f90 2013-0 6-04 02:11:12.753416000 -050014849 --- gcc-4.8.1.orig/gcc/testsuite/gfortran.dg/defined_assignment_6.f90 1970-01-01 00:00:00.000000000 +0000 14850 +++ gcc-4.8.1/gcc/testsuite/gfortran.dg/defined_assignment_6.f90 2013-09-13 19:01:43.203198197 +0000 14758 14851 @@ -0,0 +1,36 @@ 14759 14852 +! { dg-do compile } … … 14794 14887 +end module 14795 14888 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gfortran.dg/defined_assignment_7.f90 gcc-4.8.1/gcc/testsuite/gfortran.dg/defined_assignment_7.f90 14796 --- gcc-4.8.1.orig/gcc/testsuite/gfortran.dg/defined_assignment_7.f90 19 69-12-31 18:00:00.000000000 -060014797 +++ gcc-4.8.1/gcc/testsuite/gfortran.dg/defined_assignment_7.f90 2013-0 6-11 11:18:13.173979000 -050014889 --- gcc-4.8.1.orig/gcc/testsuite/gfortran.dg/defined_assignment_7.f90 1970-01-01 00:00:00.000000000 +0000 14890 +++ gcc-4.8.1/gcc/testsuite/gfortran.dg/defined_assignment_7.f90 2013-09-13 19:01:43.203198197 +0000 14798 14891 @@ -0,0 +1,29 @@ 14799 14892 +! { dg-compile } … … 14827 14920 +end module 14828 14921 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gfortran.dg/dot_product_2.f90 gcc-4.8.1/gcc/testsuite/gfortran.dg/dot_product_2.f90 14829 --- gcc-4.8.1.orig/gcc/testsuite/gfortran.dg/dot_product_2.f90 19 69-12-31 18:00:00.000000000 -060014830 +++ gcc-4.8.1/gcc/testsuite/gfortran.dg/dot_product_2.f90 2013-0 7-08 14:10:32.194953000 -050014922 --- gcc-4.8.1.orig/gcc/testsuite/gfortran.dg/dot_product_2.f90 1970-01-01 00:00:00.000000000 +0000 14923 +++ gcc-4.8.1/gcc/testsuite/gfortran.dg/dot_product_2.f90 2013-09-13 19:01:43.203198197 +0000 14831 14924 @@ -0,0 +1,38 @@ 14832 14925 +! { dg-do compile } … … 14869 14962 +! { dg-final { cleanup-tree-dump "original" } } 14870 14963 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gfortran.dg/inline_sum_5.f90 gcc-4.8.1/gcc/testsuite/gfortran.dg/inline_sum_5.f90 14871 --- gcc-4.8.1.orig/gcc/testsuite/gfortran.dg/inline_sum_5.f90 19 69-12-31 18:00:00.000000000 -060014872 +++ gcc-4.8.1/gcc/testsuite/gfortran.dg/inline_sum_5.f90 2013-0 8-24 07:46:17.832897000 -050014964 --- gcc-4.8.1.orig/gcc/testsuite/gfortran.dg/inline_sum_5.f90 1970-01-01 00:00:00.000000000 +0000 14965 +++ gcc-4.8.1/gcc/testsuite/gfortran.dg/inline_sum_5.f90 2013-09-13 19:01:43.203198197 +0000 14873 14966 @@ -0,0 +1,33 @@ 14874 14967 +! { dg-do run } … … 14906 14999 + 14907 15000 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gfortran.dg/select_type_34.f90 gcc-4.8.1/gcc/testsuite/gfortran.dg/select_type_34.f90 14908 --- gcc-4.8.1.orig/gcc/testsuite/gfortran.dg/select_type_34.f90 19 69-12-31 18:00:00.000000000 -060014909 +++ gcc-4.8.1/gcc/testsuite/gfortran.dg/select_type_34.f90 2013-0 8-24 04:12:21.843607000 -050015001 --- gcc-4.8.1.orig/gcc/testsuite/gfortran.dg/select_type_34.f90 1970-01-01 00:00:00.000000000 +0000 15002 +++ gcc-4.8.1/gcc/testsuite/gfortran.dg/select_type_34.f90 2013-09-13 19:01:43.203198197 +0000 14910 15003 @@ -0,0 +1,10 @@ 14911 15004 +! { dg-do compile } … … 14920 15013 +end 14921 15014 diff -Naur gcc-4.8.1.orig/gcc/testsuite/gfortran.dg/transfer_intrinsic_6.f90 gcc-4.8.1/gcc/testsuite/gfortran.dg/transfer_intrinsic_6.f90 14922 --- gcc-4.8.