source: patches/gcc-4.6.3-branch_update-1.patch@ 06b2d12

clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 06b2d12 was 06b2d12, checked in by William Harrington <kb0iic@…>, 12 years ago

delete old patches and add new patches.

  • Property mode set to 100644
File size: 251.9 KB
  • boehm-gc/configure

    Submitted By: Jim Gifford (jim at cross-lfs dot org)
    Date: 08-25-2012
    Initial Package Version: 4.6.3
    Origin: Upstream
    Upstream Status: Applied
    Description: This is a branch update for gcc-4.6.3, and should be
                 rechecked periodically.
    
    This patch was made from Revision # 190659.
    
    diff -Naur gcc-4.6.3.orig/boehm-gc/configure gcc-4.6.3/boehm-gc/configure
    old new  
    1524615246fi
    1524715247done
    1524815248
     15249for ac_func in pthread_get_stackaddr_np
     15250do :
     15251  ac_fn_c_check_func "$LINENO" "pthread_get_stackaddr_np" "ac_cv_func_pthread_get_stackaddr_np"
     15252if test "x$ac_cv_func_pthread_get_stackaddr_np" = x""yes; then :
     15253  cat >>confdefs.h <<_ACEOF
     15254#define HAVE_PTHREAD_GET_STACKADDR_NP 1
     15255_ACEOF
     15256
     15257fi
     15258done
     15259
    1524915260LIBS="$oldLIBS"
    1525015261
    1525115262# Configuration of machine-dependent code
  • boehm-gc/configure.ac

    diff -Naur gcc-4.6.3.orig/boehm-gc/configure.ac gcc-4.6.3/boehm-gc/configure.ac
    old new  
    392392oldLIBS="$LIBS"
    393393LIBS="$LIBS $THREADLIBS"
    394394AC_CHECK_FUNCS([pthread_getattr_np])
     395AC_CHECK_FUNCS([pthread_get_stackaddr_np])
    395396LIBS="$oldLIBS"
    396397
    397398# Configuration of machine-dependent code
  • boehm-gc/include/gc_config.h.in

    diff -Naur gcc-4.6.3.orig/boehm-gc/include/gc_config.h.in gcc-4.6.3/boehm-gc/include/gc_config.h.in
    old new  
    8787/* Define to 1 if you have the `pthread_getattr_np' function. */
    8888#undef HAVE_PTHREAD_GETATTR_NP
    8989
     90/* Define to 1 if you have the `pthread_get_stackaddr_np_np' function. */
     91#undef HAVE_PTHREAD_GET_STACKADDR_NP
     92
    9093/* Define to 1 if you have the <stdint.h> header file. */
    9194#undef HAVE_STDINT_H
    9295
  • boehm-gc/include/private/gcconfig.h

    diff -Naur gcc-4.6.3.orig/boehm-gc/include/private/gcconfig.h gcc-4.6.3/boehm-gc/include/private/gcconfig.h
    old new  
    13311331         These aren't used when dyld support is enabled (it is by default) */
    13321332#     define DATASTART ((ptr_t) get_etext())
    13331333#     define DATAEND    ((ptr_t) get_end())
    1334 #     define STACKBOTTOM ((ptr_t) 0xc0000000)
     1334#     ifdef HAVE_PTHREAD_GET_STACKADDR_NP
     1335#       define STACKBOTTOM (ptr_t)pthread_get_stackaddr_np(pthread_self())
     1336#     else
     1337#       define STACKBOTTOM ((ptr_t) 0xc0000000)
     1338#     endif
    13351339#     define USE_MMAP
    13361340#     define USE_MMAP_ANON
    13371341#     define USE_ASM_PUSH_REGS
     
    20112015         These aren't used when dyld support is enabled (it is by default) */
    20122016#     define DATASTART ((ptr_t) get_etext())
    20132017#     define DATAEND    ((ptr_t) get_end())
    2014 #     define STACKBOTTOM ((ptr_t) 0x7fff5fc00000)
     2018#     ifdef HAVE_PTHREAD_GET_STACKADDR_NP
     2019#       define STACKBOTTOM (ptr_t)pthread_get_stackaddr_np(pthread_self())
     2020#     else
     2021#       define STACKBOTTOM ((ptr_t) 0x7fff5fc00000)
     2022#     endif
    20152023#     define USE_MMAP
    20162024#     define USE_MMAP_ANON
    20172025#     ifdef GC_DARWIN_THREADS
  • gcc/DATESTAMP

    diff -Naur gcc-4.6.3.orig/gcc/DATESTAMP gcc-4.6.3/gcc/DATESTAMP
    old new  
    1 20120301
     120120825
  • gcc/ada/gcc-interface/decl.c

    diff -Naur gcc-4.6.3.orig/gcc/ada/gcc-interface/decl.c gcc-4.6.3/gcc/ada/gcc-interface/decl.c
    old new  
    120120  /* The value of the qualifier.  */
    121121  tree qual;
    122122
    123   /* The record associated with this variant.  */
    124   tree record;
     123  /* The type of the variant after transformation.  */
     124  tree new_type;
    125125} variant_desc;
    126126
    127127DEF_VEC_O(variant_desc);
     
    31573157                      {
    31583158                        tree old_variant = v->type;
    31593159                        tree new_variant = make_node (RECORD_TYPE);
     3160                        tree suffix
     3161                          = concat_name (DECL_NAME (gnu_variant_part),
     3162                                         IDENTIFIER_POINTER
     3163                                         (DECL_NAME (v->field)));
    31603164                        TYPE_NAME (new_variant)
    3161                           = DECL_NAME (TYPE_NAME (old_variant));
     3165                          = concat_name (TYPE_NAME (gnu_type),
     3166                                         IDENTIFIER_POINTER (suffix));
    31623167                        copy_and_substitute_in_size (new_variant, old_variant,
    31633168                                                     gnu_subst_list);
    3164                         v->record = new_variant;
     3169                        v->new_type = new_variant;
    31653170                      }
    31663171                }
    31673172              else
     
    32653270                            if (selected_variant)
    32663271                              gnu_cont_type = gnu_type;
    32673272                            else
    3268                               gnu_cont_type = v->record;
     3273                              gnu_cont_type = v->new_type;
    32693274                          }
    32703275                        else
    32713276                          /* The front-end may pass us "ghost" components if
     
    77047709          v->type = variant_type;
    77057710          v->field = gnu_field;
    77067711          v->qual = qual;
    7707           v->record = NULL_TREE;
     7712          v->new_type = NULL_TREE;
    77087713
    77097714          /* Recurse on the variant subpart of the variant, if any.  */
    77107715          variant_subpart = get_variant_part (variant_type);
     
    84578462
    84588463  /* First create the type of the variant part from that of the old one.  */
    84598464  new_union_type = make_node (QUAL_UNION_TYPE);
    8460   TYPE_NAME (new_union_type) = DECL_NAME (TYPE_NAME (old_union_type));
     8465  TYPE_NAME (new_union_type)
     8466    = concat_name (TYPE_NAME (record_type),
     8467                   IDENTIFIER_POINTER (DECL_NAME (old_variant_part)));
    84618468
    84628469  /* If the position of the variant part is constant, subtract it from the
    84638470     size of the type of the parent to get the new size.  This manual CSE
     
    84918498        continue;
    84928499
    84938500      /* Retrieve the list of fields already added to the new variant.  */
    8494       new_variant = v->record;
     8501      new_variant = v->new_type;
    84958502      field_list = TYPE_FIELDS (new_variant);
    84968503
    84978504      /* If the old variant had a variant subpart, we need to create a new
  • gcc/c-typeck.c

    diff -Naur gcc-4.6.3.orig/gcc/c-typeck.c gcc-4.6.3/gcc/c-typeck.c
    old new  
    43154315    ret = fold_build3_loc (colon_loc, COND_EXPR, result_type, ifexp, op1, op2);
    43164316  else
    43174317    {
     4318      if (int_operands)
     4319        {
     4320          op1 = remove_c_maybe_const_expr (op1);
     4321          op2 = remove_c_maybe_const_expr (op2);
     4322        }
    43184323      ret = build3 (COND_EXPR, result_type, ifexp, op1, op2);
    43194324      if (int_operands)
    43204325        ret = note_integer_operands (ret);
  • gcc/cgraph.c

    diff -Naur gcc-4.6.3.orig/gcc/cgraph.c gcc-4.6.3/gcc/cgraph.c
    old new  
    17001700  free_nodes = node;
    17011701}
    17021702
    1703 /* Remove the node from cgraph.  */
     1703/* Remove the node from cgraph and all inline clones inlined into it.
     1704   Skip however removal of FORBIDDEN_NODE and return true if it needs to be
     1705   removed.  This allows to call the function from outer loop walking clone
     1706   tree.  */
    17041707
    1705 void
    1706 cgraph_remove_node_and_inline_clones (struct cgraph_node *node)
     1708bool
     1709cgraph_remove_node_and_inline_clones (struct cgraph_node *node, struct cgraph_node *forbidden_node)
    17071710{
    17081711  struct cgraph_edge *e, *next;
     1712  bool found = false;
     1713
     1714  if (node == forbidden_node)
     1715    return true;
    17091716  for (e = node->callees; e; e = next)
    17101717    {
    17111718      next = e->next_callee;
    17121719      if (!e->inline_failed)
    1713         cgraph_remove_node_and_inline_clones (e->callee);
     1720        found |= cgraph_remove_node_and_inline_clones (e->callee, forbidden_node);
    17141721    }
    17151722  cgraph_remove_node (node);
     1723  return found;
    17161724}
    17171725
    17181726/* Notify finalize_compilation_unit that given node is reachable.  */
  • gcc/cgraph.h

    diff -Naur gcc-4.6.3.orig/gcc/cgraph.h gcc-4.6.3/gcc/cgraph.h
    old new  
    547547void cgraph_insert_node_to_hashtable (struct cgraph_node *node);
    548548void cgraph_remove_edge (struct cgraph_edge *);
    549549void cgraph_remove_node (struct cgraph_node *);
    550 void cgraph_remove_node_and_inline_clones (struct cgraph_node *);
     550bool cgraph_remove_node_and_inline_clones (struct cgraph_node *, struct cgraph_node *);
    551551void cgraph_release_function_body (struct cgraph_node *);
    552552void cgraph_node_remove_callees (struct cgraph_node *node);
    553553struct cgraph_edge *cgraph_create_edge (struct cgraph_node *,
  • gcc/cgraphunit.c

    diff -Naur gcc-4.6.3.orig/gcc/cgraphunit.c gcc-4.6.3/gcc/cgraphunit.c
    old new  
    21572157            first_clone->ipa_transforms_to_apply);
    21582158  first_clone->ipa_transforms_to_apply = NULL;
    21592159
     2160  /* When doing recursive inlining, the clone may become unnecessary.
     2161     This is possible i.e. in the case when the recursive function is proved to be
     2162     non-throwing and the recursion happens only in the EH landing pad.
     2163     We can not remove the clone until we are done with saving the body.
     2164     Remove it now.  */
     2165  if (!first_clone->callers)
     2166    {
     2167      cgraph_remove_node_and_inline_clones (first_clone, NULL);
     2168      first_clone = NULL;
     2169    }
    21602170#ifdef ENABLE_CHECKING
    2161   verify_cgraph_node (first_clone);
     2171  else
     2172    verify_cgraph_node (first_clone);
    21622173#endif
    21632174  return first_clone;
    21642175}
  • gcc/combine.c

    diff -Naur gcc-4.6.3.orig/gcc/combine.c gcc-4.6.3/gcc/combine.c
    old new  
    17881788  if (set == 0)
    17891789    return 0;
    17901790
     1791  /* The simplification in expand_field_assignment may call back to
     1792     get_last_value, so set safe guard here.  */
     1793  subst_low_luid = DF_INSN_LUID (insn);
     1794
    17911795  set = expand_field_assignment (set);
    17921796  src = SET_SRC (set), dest = SET_DEST (set);
    17931797
  • gcc/config/alpha/alpha.c

    diff -Naur gcc-4.6.3.orig/gcc/config/alpha/alpha.c gcc-4.6.3/gcc/config/alpha/alpha.c
    old new  
    24692469    {
    24702470    case EQ:  case LE:  case LT:  case LEU:  case LTU:
    24712471    case UNORDERED:
    2472       /* We have these compares: */
     2472      /* We have these compares. */
    24732473      cmp_code = code, branch_code = NE;
    24742474      break;
    24752475
     
    27062706      switch (code)
    27072707        {
    27082708        case EQ: case LE: case LT: case LEU: case LTU:
     2709        case UNORDERED:
    27092710          /* We have these compares.  */
    27102711          cmp_code = code, code = NE;
    27112712          break;
    27122713
    27132714        case NE:
    2714           /* This must be reversed.  */
    2715           cmp_code = EQ, code = EQ;
     2715        case ORDERED:
     2716          /* These must be reversed.  */
     2717          cmp_code = reverse_condition (code), code = EQ;
    27162718          break;
    27172719
    27182720        case GE: case GT: case GEU: case GTU:
     
    27322734          gcc_unreachable ();
    27332735        }
    27342736
     2737      if (cmp_mode == DImode)
     2738        {
     2739          if (!reg_or_0_operand (op0, DImode))
     2740            op0 = force_reg (DImode, op0);
     2741          if (!reg_or_8bit_operand (op1, DImode))
     2742            op1 = force_reg (DImode, op1);
     2743        }
     2744
    27352745      tem = gen_reg_rtx (cmp_mode);
    27362746      emit_insn (gen_rtx_SET (VOIDmode, tem,
    27372747                              gen_rtx_fmt_ee (cmp_code, cmp_mode,
     
    27432753      local_fast_math = 1;
    27442754    }
    27452755
     2756  if (cmp_mode == DImode)
     2757    {
     2758      if (!reg_or_0_operand (op0, DImode))
     2759        op0 = force_reg (DImode, op0);
     2760      if (!reg_or_8bit_operand (op1, DImode))
     2761        op1 = force_reg (DImode, op1);
     2762    }
     2763
    27462764  /* We may be able to use a conditional move directly.
    27472765     This avoids emitting spurious compares.  */
    27482766  if (signed_comparison_operator (cmp, VOIDmode)
     
    27612779  switch (code)
    27622780    {
    27632781    case EQ:  case LE:  case LT:  case LEU:  case LTU:
     2782    case UNORDERED:
    27642783      /* We have these compares: */
    27652784      break;
    27662785
    27672786    case NE:
    2768       /* This must be reversed.  */
     2787    case ORDERED:
     2788      /* These must be reversed.  */
    27692789      code = reverse_condition (code);
    27702790      cmov_code = EQ;
    27712791      break;
     
    96289648    }
    96299649}
    96309650
    9631 /* Insert an unop between a noreturn function call and GP load.  */
     9651/* Insert an unop between sibcall or noreturn function call and GP load.  */
    96329652
    96339653static void
    9634 alpha_pad_noreturn (void)
     9654alpha_pad_function_end (void)
    96359655{
    96369656  rtx insn, next;
    96379657
    96389658  for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
    96399659    {
    9640       if (!CALL_P (insn)
    9641           || !find_reg_note (insn, REG_NORETURN, NULL_RTX))
    9642         continue;
     9660      if (! (CALL_P (insn)
     9661             && (SIBLING_CALL_P (insn)
     9662                 || find_reg_note (insn, REG_NORETURN, NULL_RTX))))
     9663        continue;
    96439664
    96449665      next = next_active_insn (insn);
    96459666
     
    96609681static void
    96619682alpha_reorg (void)
    96629683{
    9663   /* Workaround for a linker error that triggers when an
    9664      exception handler immediatelly follows a noreturn function.
     9684  /* Workaround for a linker error that triggers when an exception
     9685     handler immediatelly follows a sibcall or a noreturn function.
     9686
     9687In the sibcall case:
     9688
     9689     The instruction stream from an object file:
     9690
     9691 1d8:   00 00 fb 6b     jmp     (t12)
     9692 1dc:   00 00 ba 27     ldah    gp,0(ra)
     9693 1e0:   00 00 bd 23     lda     gp,0(gp)
     9694 1e4:   00 00 7d a7     ldq     t12,0(gp)
     9695 1e8:   00 40 5b 6b     jsr     ra,(t12),1ec <__funcZ+0x1ec>
     9696
     9697     was converted in the final link pass to:
     9698
     9699   12003aa88:   67 fa ff c3     br      120039428 <...>
     9700   12003aa8c:   00 00 fe 2f     unop
     9701   12003aa90:   00 00 fe 2f     unop
     9702   12003aa94:   48 83 7d a7     ldq     t12,-31928(gp)
     9703   12003aa98:   00 40 5b 6b     jsr     ra,(t12),12003aa9c <__func+0x1ec>
     9704
     9705And in the noreturn case:
    96659706
    96669707     The instruction stream from an object file:
    96679708
     
    96819722
    96829723     GP load instructions were wrongly cleared by the linker relaxation
    96839724     pass.  This workaround prevents removal of GP loads by inserting
    9684      an unop instruction between a noreturn function call and
     9725     an unop instruction between a sibcall or noreturn function call and
    96859726     exception handler prologue.  */
    96869727
    96879728  if (current_function_has_exception_handlers ())
    9688     alpha_pad_noreturn ();
     9729    alpha_pad_function_end ();
    96899730
    96909731  if (alpha_tp != ALPHA_TP_PROG || flag_exceptions)
    96919732    alpha_handle_trap_shadows ();
  • gcc/config/alpha/linux-unwind.h

    diff -Naur gcc-4.6.3.orig/gcc/config/alpha/linux-unwind.h gcc-4.6.3/gcc/config/alpha/linux-unwind.h
    old new  
    11/* DWARF2 EH unwinding support for Alpha Linux.
    2    Copyright (C) 2004, 2005, 2009, 2011 Free Software Foundation, Inc.
     2   Copyright (C) 2004, 2005, 2009, 2011, 2012 Free Software Foundation, Inc.
    33
    44This file is part of GCC.
    55
     
    4949  else if (pc[1] == 0x201f015f)         /* lda $0,NR_rt_sigreturn */
    5050    {
    5151      struct rt_sigframe {
    52         struct siginfo info;
     52        siginfo_t info;
    5353        struct ucontext uc;
    5454      } *rt_ = context->cfa;
    5555      sc = &rt_->uc.uc_mcontext;
  • gcc/config/arm/arm.c

    diff -Naur gcc-4.6.3.orig/gcc/config/arm/arm.c gcc-4.6.3/gcc/config/arm/arm.c
    old new  
    243243static bool fa726te_sched_adjust_cost (rtx, rtx, rtx, int *);
    244244static enum machine_mode arm_preferred_simd_mode (enum machine_mode);
    245245static bool arm_class_likely_spilled_p (reg_class_t);
     246static HOST_WIDE_INT arm_vector_alignment (const_tree type);
    246247static bool arm_vector_alignment_reachable (const_tree type, bool is_packed);
    247248static bool arm_builtin_support_vector_misalignment (enum machine_mode mode,
    248249                                                     const_tree type,
     
    579580#undef TARGET_CLASS_LIKELY_SPILLED_P
    580581#define TARGET_CLASS_LIKELY_SPILLED_P arm_class_likely_spilled_p
    581582
     583#undef TARGET_VECTOR_ALIGNMENT
     584#define TARGET_VECTOR_ALIGNMENT arm_vector_alignment
     585
    582586#undef TARGET_VECTORIZE_VECTOR_ALIGNMENT_REACHABLE
    583587#define TARGET_VECTORIZE_VECTOR_ALIGNMENT_REACHABLE \
    584588  arm_vector_alignment_reachable
     
    20052009                           global_options_set.x_param_values);
    20062010
    20072011  /* ARM EABI defaults to strict volatile bitfields.  */
    2008   if (TARGET_AAPCS_BASED && flag_strict_volatile_bitfields < 0)
     2012  if (TARGET_AAPCS_BASED && flag_strict_volatile_bitfields < 0
     2013      && abi_version_at_least(2))
    20092014    flag_strict_volatile_bitfields = 1;
    20102015
    20112016  /* Enable sw prefetching at -O3 for CPUS that have prefetch, and we have deemed
     
    46924697  return gen_rtx_REG (mode, pcum->nregs);
    46934698}
    46944699
     4700/* The AAPCS sets the maximum alignment of a vector to 64 bits.  */
     4701static HOST_WIDE_INT
     4702arm_vector_alignment (const_tree type)
     4703{
     4704  HOST_WIDE_INT align = tree_low_cst (TYPE_SIZE (type), 0);
     4705
     4706  if (TARGET_AAPCS_BASED)
     4707    align = MIN (align, 64);
     4708
     4709  return align;
     4710}
     4711
    46954712static unsigned int
    46964713arm_function_arg_boundary (enum machine_mode mode, const_tree type)
    46974714{
     
    2342223439        }
    2342323440    }
    2342423441
    23425   arm_process_output_memory_barrier (emit, NULL);
     23442  /* Note: label is before barrier so that in cmp failure case we still get
     23443     a barrier to stop subsequent loads floating upwards past the ldrex
     23444     PR target/48126.  */
    2342623445  arm_output_asm_insn (emit, 1, operands, "%sLSYB%%=:", LOCAL_LABEL_PREFIX);
     23446  arm_process_output_memory_barrier (emit, NULL);
    2342723447}
    2342823448
    2342923449static rtx
  • gcc/config/arm/arm.h

    diff -Naur gcc-4.6.3.orig/gcc/config/arm/arm.h gcc-4.6.3/gcc/config/arm/arm.h
    old new  
    294294#define TARGET_HAVE_DMB         (arm_arch7)
    295295
    296296/* Nonzero if this chip implements a memory barrier via CP15.  */
    297 #define TARGET_HAVE_DMB_MCR     (arm_arch6k && ! TARGET_HAVE_DMB)
     297#define TARGET_HAVE_DMB_MCR     (arm_arch6 && ! TARGET_HAVE_DMB \
     298                                 && ! TARGET_THUMB1)
    298299
    299300/* Nonzero if this chip implements a memory barrier instruction.  */
    300301#define TARGET_HAVE_MEMORY_BARRIER (TARGET_HAVE_DMB || TARGET_HAVE_DMB_MCR)
  • gcc/config/avr/avr-stdint.h

    diff -Naur gcc-4.6.3.orig/gcc/config/avr/avr-stdint.h gcc-4.6.3/gcc/config/avr/avr-stdint.h
    old new  
     1/* Definitions for <stdint.h> types on systems using newlib.
     2   Copyright (C) 2012 Free Software Foundation, Inc.
     3
     4This file is part of GCC.
     5
     6GCC is free software; you can redistribute it and/or modify
     7it under the terms of the GNU General Public License as published by
     8the Free Software Foundation; either version 3, or (at your option)
     9any later version.
     10
     11GCC is distributed in the hope that it will be useful,
     12but WITHOUT ANY WARRANTY; without even the implied warranty of
     13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     14GNU General Public License for more details.
     15
     16You should have received a copy of the GNU General Public License
     17along with GCC; see the file COPYING3.  If not see
     18<http://www.gnu.org/licenses/>.  */
     19
     20/*
     21   The intention of this file is to supply definitions that work with
     22   avr-gcc's -mint8 that sets int to an 8-bit type.
     23
     24   This file is intended to yield the same results as newlib-stdint.h,
     25   but there are some differences to newlib-stdint.h:
     26
     27   - AVR is an 8-bit architecture that cannot access 16-bit values
     28     atomically, this SIG_ATOMIC_TYPE is "char".
     29
     30   - For the same reason, [u]int_fast8_t is defined as 8-bit type.
     31
     32*/
     33   
     34#define SIG_ATOMIC_TYPE "char"
     35
     36#define INT8_TYPE "signed char"
     37#define INT16_TYPE (INT_TYPE_SIZE == 16 ? "short int" : "long int")
     38#define INT32_TYPE (INT_TYPE_SIZE == 16 ? "long int" : "long long int")
     39#define INT64_TYPE (INT_TYPE_SIZE == 16 ? "long long int" : 0)
     40#define UINT8_TYPE "unsigned char"
     41#define UINT16_TYPE (INT_TYPE_SIZE == 16 ? "short unsigned int" : "long unsigned int")
     42#define UINT32_TYPE (INT_TYPE_SIZE == 16 ? "long unsigned int" : "long long unsigned int")
     43#define UINT64_TYPE (INT_TYPE_SIZE == 16 ? "long long unsigned int" : 0)
     44
     45#define INT_LEAST8_TYPE INT8_TYPE
     46#define INT_LEAST16_TYPE INT16_TYPE
     47#define INT_LEAST32_TYPE INT32_TYPE
     48#define INT_LEAST64_TYPE INT64_TYPE
     49#define UINT_LEAST8_TYPE UINT8_TYPE
     50#define UINT_LEAST16_TYPE UINT16_TYPE
     51#define UINT_LEAST32_TYPE UINT32_TYPE
     52#define UINT_LEAST64_TYPE UINT64_TYPE
     53
     54#define INT_FAST8_TYPE INT8_TYPE
     55#define INT_FAST16_TYPE (INT_TYPE_SIZE == 16 ? "int" : INT16_TYPE)
     56#define INT_FAST32_TYPE INT32_TYPE
     57#define INT_FAST64_TYPE INT64_TYPE
     58#define UINT_FAST8_TYPE UINT8_TYPE
     59#define UINT_FAST16_TYPE (INT_TYPE_SIZE == 16 ? "unsigned int" : UINT16_TYPE)
     60#define UINT_FAST32_TYPE UINT32_TYPE
     61#define UINT_FAST64_TYPE UINT64_TYPE
     62
     63#define INTPTR_TYPE PTRDIFF_TYPE
     64#ifndef UINTPTR_TYPE
     65#define UINTPTR_TYPE SIZE_TYPE
     66#endif
  • gcc/config/avr/avr.c

    diff -Naur gcc-4.6.3.orig/gcc/config/avr/avr.c gcc-4.6.3/gcc/config/avr/avr.c
    old new  
    18791879            }
    18801880          else if (test_hard_reg_class (STACK_REG, src))
    18811881            {
    1882               *l = 2;
    1883               return AVR_HAVE_8BIT_SP
    1884                 ? (AS2 (in,%A0,__SP_L__) CR_TAB
    1885                    AS1 (clr,%B0))
    1886                 : (AS2 (in,%A0,__SP_L__) CR_TAB
    1887                    AS2 (in,%B0,__SP_H__));
     1882              *l = 2;   
     1883              return (AS2 (in,%A0,__SP_L__) CR_TAB
     1884                      AS2 (in,%B0,__SP_H__));
    18881885            }
    18891886
    18901887          if (AVR_HAVE_MOVW)
     
    51775174
    51785175  default_file_start ();
    51795176
    5180   fputs ("__SREG__ = 0x3f\n", asm_out_file);
    5181   if (!AVR_HAVE_8BIT_SP)
    5182     fputs ("__SP_H__ = 0x3e\n", asm_out_file);
    5183   fputs ("__SP_L__ = 0x3d\n", asm_out_file);
     5177  fputs ("__SREG__ = 0x3f\n"
     5178         "__SP_H__ = 0x3e\n"
     5179         "__SP_L__ = 0x3d\n", asm_out_file);
    51845180 
    51855181  fputs ("__tmp_reg__ = 0\n"
    51865182         "__zero_reg__ = 1\n", asm_out_file);
  • gcc/config/avr/avr.md

    diff -Naur gcc-4.6.3.orig/gcc/config/avr/avr.md gcc-4.6.3/gcc/config/avr/avr.md
    old new  
    299299  [(set (match_operand:HI 0 "stack_register_operand" "=q")
    300300        (unspec_volatile:HI [(match_operand:HI 1 "register_operand"  "r")]
    301301                            UNSPECV_WRITE_SP_IRQ_OFF))]
    302   "!AVR_HAVE_8BIT_SP"
     302  ""
    303303  "out __SP_H__, %B1
    304304        out __SP_L__, %A1"
    305305  [(set_attr "length" "2")
     
    309309  [(set (match_operand:HI 0 "stack_register_operand" "=q")
    310310        (unspec_volatile:HI [(match_operand:HI 1 "register_operand"  "r")]
    311311                            UNSPECV_WRITE_SP_IRQ_ON))]
    312   "!AVR_HAVE_8BIT_SP"
     312  ""
    313313  "cli
    314314        out __SP_H__, %B1
    315315        sei
  • gcc/config/avr/libgcc.S

    diff -Naur gcc-4.6.3.orig/gcc/config/avr/libgcc.S gcc-4.6.3/gcc/config/avr/libgcc.S
    old new  
    582582        push r17
    583583        push r28
    584584        push r29
    585 #if defined (__AVR_HAVE_8BIT_SP__)
    586 ;; FIXME: __AVR_HAVE_8BIT_SP__ is set on device level, not on core level
    587 ;;        so this lines are dead code.  To make it work, devices without
    588 ;;        SP_H must get their own multilib(s), see PR51345.
    589         in      r28,__SP_L__
    590         sub     r28,r26
    591         clr     r29
    592         out     __SP_L__,r28
    593 #else
    594585        in      r28,__SP_L__
    595586        in      r29,__SP_H__
    596587        sub     r28,r26
     
    600591        out     __SP_H__,r29
    601592        out     __SREG__,__tmp_reg__
    602593        out     __SP_L__,r28
    603 #endif
    604594#if defined (__AVR_HAVE_EIJMP_EICALL__)
    605595        eijmp
    606596#else
     
    635625        ldd     r16,Y+4
    636626        ldd     r17,Y+3
    637627        ldd     r26,Y+2
    638 #if defined (__AVR_HAVE_8BIT_SP__)
    639 ;; FIXME: __AVR_HAVE_8BIT_SP__ is set on device level, not on core level
    640 ;;        so this lines are dead code.  To make it work, devices without
    641 ;;        SP_H must get their own multilib(s).
    642         ldd     r29,Y+1
    643         add     r28,r30
    644         out     __SP_L__,r28
    645         mov     r28, r26
    646 #else
    647628        ldd     r27,Y+1
    648629        add     r28,r30
    649630        adc     r29,__zero_reg__
     
    654635        out     __SP_L__,r28
    655636        mov_l   r28, r26
    656637        mov_h   r29, r27
    657 #endif
    658638        ret
    659639.endfunc
    660640#endif /* defined (L_epilogue) */
  • gcc/config/bfin/linux-unwind.h

    diff -Naur gcc-4.6.3.orig/gcc/config/bfin/linux-unwind.h gcc-4.6.3/gcc/config/bfin/linux-unwind.h
    old new  
    11/* DWARF2 EH unwinding support for Blackfin.
    2    Copyright (C) 2007, 2009 Free Software Foundation, Inc.
     2   Copyright (C) 2007, 2009, 2012 Free Software Foundation, Inc.
    33
    44This file is part of GCC.
    55
     
    4848    {
    4949      struct rt_sigframe {
    5050        int sig;
    51         struct siginfo *pinfo;
     51        siginfo_t *pinfo;
    5252        void *puc;
    5353        char retcode[8];
    54         struct siginfo info;
     54        siginfo_t info;
    5555        struct ucontext uc;
    5656      } *rt_ = context->cfa;
    5757
  • gcc/config/h8300/h8300.c

    diff -Naur gcc-4.6.3.orig/gcc/config/h8300/h8300.c gcc-4.6.3/gcc/config/h8300/h8300.c
    old new  
    416416    }
    417417
    418418  /* This target defaults to strict volatile bitfields.  */
    419   if (flag_strict_volatile_bitfields < 0)
     419  if (flag_strict_volatile_bitfields < 0 && abi_version_at_least(2))
    420420    flag_strict_volatile_bitfields = 1;
    421421}
    422422
  • gcc/config/host-linux.c

    diff -Naur gcc-4.6.3.orig/gcc/config/host-linux.c gcc-4.6.3/gcc/config/host-linux.c
    old new  
    8484# define TRY_EMPTY_VM_SPACE     0x60000000
    8585#elif defined(__mc68000__)
    8686# define TRY_EMPTY_VM_SPACE     0x40000000
     87#elif defined(__ARM_EABI__)
     88# define TRY_EMPTY_VM_SPACE     0x60000000
    8789#else
    8890# define TRY_EMPTY_VM_SPACE     0
    8991#endif
  • gcc/config/i386/driver-i386.c

    diff -Naur gcc-4.6.3.orig/gcc/config/i386/driver-i386.c gcc-4.6.3/gcc/config/i386/driver-i386.c
    old new  
    397397  unsigned int has_pclmul = 0, has_abm = 0, has_lwp = 0;
    398398  unsigned int has_fma = 0, has_fma4 = 0, has_xop = 0;
    399399  unsigned int has_bmi = 0, has_tbm = 0;
     400  unsigned int has_rdrnd = 0, has_f16c = 0, has_fsgsbase = 0;
    400401
    401402  bool arch;
    402403
     
    444445  has_aes = ecx & bit_AES;
    445446  has_pclmul = ecx & bit_PCLMUL;
    446447  has_fma = ecx & bit_FMA;
     448  has_f16c = ecx & bit_F16C;
     449  has_rdrnd = ecx & bit_RDRND;
    447450
    448451  has_cmpxchg8b = edx & bit_CMPXCHG8B;
    449452  has_cmov = edx & bit_CMOV;
     
    451454  has_sse = edx & bit_SSE;
    452455  has_sse2 = edx & bit_SSE2;
    453456
     457  if (max_level >= 7)
     458    {
     459      __cpuid_count (7, 0, eax, ebx, ecx, edx);
     460
     461      has_fsgsbase = ebx & bit_FSGSBASE;
     462    }
     463
    454464  /* Check cpuid level of extended features.  */
    455465  __cpuid (0x80000000, ext_level, ebx, ecx, edx);
    456466
     
    711721      const char *avx = has_avx ? " -mavx" : " -mno-avx";
    712722      const char *sse4_2 = has_sse4_2 ? " -msse4.2" : " -mno-sse4.2";
    713723      const char *sse4_1 = has_sse4_1 ? " -msse4.1" : " -mno-sse4.1";
     724      const char *rdrnd = has_rdrnd ? " -mrdrnd" : " -mno-rdrnd";
     725      const char *f16c = has_f16c ? " -mf16c" : " -mno-f16c";
     726      const char *fsgsbase = has_fsgsbase ? " -mfsgsbase" : " -mno-fsgsbase";
    714727
    715728      options = concat (options, cx16, sahf, movbe, ase, pclmul,
    716729                        popcnt, abm, lwp, fma, fma4, xop, bmi, tbm,
    717                         avx, sse4_2, sse4_1, NULL);
     730                        avx, sse4_2, sse4_1, rdrnd, f16c, fsgsbase, NULL);
    718731    }
    719732
    720733done:
  • gcc/config/i386/i386-protos.h

    diff -Naur gcc-4.6.3.orig/gcc/config/i386/i386-protos.h gcc-4.6.3/gcc/config/i386/i386-protos.h
    old new  
    5959extern bool constant_address_p (rtx);
    6060extern bool legitimate_pic_operand_p (rtx);
    6161extern bool legitimate_pic_address_disp_p (rtx);
    62 
     62extern bool ix86_legitimize_reload_address (rtx, enum machine_mode,
     63                                            int, int, int);
    6364extern void print_reg (rtx, int, FILE*);
    6465extern void ix86_print_operand (FILE *, rtx, int);
    6566
  • gcc/config/i386/i386.c

    diff -Naur gcc-4.6.3.orig/gcc/config/i386/i386.c gcc-4.6.3/gcc/config/i386/i386.c
    old new  
    4646#include "target.h"
    4747#include "target-def.h"
    4848#include "langhooks.h"
     49#include "reload.h"
    4950#include "cgraph.h"
    5051#include "gimple.h"
    5152#include "dwarf2.h"
     
    20942095/* Feature tests against the various architecture variations, used to create
    20952096   ix86_arch_features based on the processor mask.  */
    20962097static unsigned int initial_ix86_arch_features[X86_ARCH_LAST] = {
    2097   /* X86_ARCH_CMOVE: Conditional move was added for pentiumpro.  */
     2098  /* X86_ARCH_CMOV: Conditional move was added for pentiumpro.  */
    20982099  ~(m_386 | m_486 | m_PENT | m_K6),
    20992100
    21002101  /* X86_ARCH_CMPXCHG: Compare and exchange was added for 80486.  */
     
    38113812           -mtune (rather than -march) points us to a processor that has them.
    38123813           However, the VIA C3 gives a SIGILL, so we only do that for i686 and
    38133814           higher processors.  */
    3814         if (TARGET_CMOVE
     3815        if (TARGET_CMOV
    38153816            && (processor_alias_table[i].flags & (PTA_PREFETCH_SSE | PTA_SSE)))
    38163817          x86_prefetch_sse = true;
    38173818        break;
     
    41814182      target_flags |= MASK_ACCUMULATE_OUTGOING_ARGS;
    41824183    }
    41834184
    4184   /* For sane SSE instruction set generation we need fcomi instruction.
    4185      It is safe to enable all CMOVE instructions.  Also, RDRAND intrinsic
    4186      expands to a sequence that includes conditional move. */
    4187   if (TARGET_SSE || TARGET_RDRND)
    4188     TARGET_CMOVE = 1;
    4189 
    41904185  /* Figure out what ASM_GENERATE_INTERNAL_LABEL builds as a prefix.  */
    41914186  {
    41924187    char *p;
     
    1216812163  return false;
    1216912164}
    1217012165
     12166/* Our implementation of LEGITIMIZE_RELOAD_ADDRESS.  Returns a value to
     12167   replace the input X, or the original X if no replacement is called for.
     12168   The output parameter *WIN is 1 if the calling macro should goto WIN,
     12169   0 if it should not.  */
     12170
     12171bool
     12172ix86_legitimize_reload_address (rtx x,
     12173                                enum machine_mode mode ATTRIBUTE_UNUSED,
     12174                                int opnum, int type,
     12175                                int ind_levels ATTRIBUTE_UNUSED)
     12176{
     12177  /* Reload can generate:
     12178
     12179     (plus:DI (plus:DI (unspec:DI [(const_int 0 [0])] UNSPEC_TP)
     12180                       (reg:DI 97))
     12181              (reg:DI 2 cx))
     12182
     12183     This RTX is rejected from ix86_legitimate_address_p due to
     12184     non-strictness of base register 97.  Following this rejection,
     12185     reload pushes all three components into separate registers,
     12186     creating invalid memory address RTX.
     12187
     12188     Following code reloads only the invalid part of the
     12189     memory address RTX.  */
     12190
     12191  if (GET_CODE (x) == PLUS
     12192      && REG_P (XEXP (x, 1))
     12193      && GET_CODE (XEXP (x, 0)) == PLUS
     12194      && REG_P (XEXP (XEXP (x, 0), 1)))
     12195    {
     12196      rtx base, index;
     12197      bool something_reloaded = false;
     12198
     12199      base = XEXP (XEXP (x, 0), 1);     
     12200      if (!REG_OK_FOR_BASE_STRICT_P (base))
     12201        {
     12202          push_reload (base, NULL_RTX, &XEXP (XEXP (x, 0), 1), NULL,
     12203                       BASE_REG_CLASS, GET_MODE (x), VOIDmode, 0, 0,
     12204                       opnum, (enum reload_type)type);
     12205          something_reloaded = true;
     12206        }
     12207
     12208      index = XEXP (x, 1);
     12209      if (!REG_OK_FOR_INDEX_STRICT_P (index))
     12210        {
     12211          push_reload (index, NULL_RTX, &XEXP (x, 1), NULL,
     12212                       INDEX_REG_CLASS, GET_MODE (x), VOIDmode, 0, 0,
     12213                       opnum, (enum reload_type)type);
     12214          something_reloaded = true;
     12215        }
     12216
     12217      gcc_assert (something_reloaded);
     12218      return true;
     12219    }
     12220
     12221  return false;
     12222}
     12223
    1217112224/* Recognizes RTL expressions that are valid memory addresses for an
    1217212225   instruction.  The MODE argument is the machine mode for the MEM
    1217312226   expression that wants to use this address.
     
    2717727230      arg_adjust = 0;
    2717827231      if (optimize
    2717927232          || target == 0
    27180           || GET_MODE (target) != tmode
    27181           || !insn_p->operand[0].predicate (target, tmode))
     27233          || !register_operand (target, tmode)
     27234          || GET_MODE (target) != tmode)
    2718227235        target = gen_reg_rtx (tmode);
    2718327236    }
    2718427237
     
    3137731430          tmp = gen_reg_rtx (GET_MODE_INNER (mode));
    3137831431          ix86_expand_vector_extract (true, tmp, target, 1 - elt);
    3137931432          if (elt == 0)
    31380             tmp = gen_rtx_VEC_CONCAT (mode, tmp, val);
    31381           else
    3138231433            tmp = gen_rtx_VEC_CONCAT (mode, val, tmp);
     31434          else
     31435            tmp = gen_rtx_VEC_CONCAT (mode, tmp, val);
    3138331436          emit_insn (gen_rtx_SET (VOIDmode, target, tmp));
    3138431437          return;
    3138531438        }
     
    3139331446      tmp = gen_reg_rtx (GET_MODE_INNER (mode));
    3139431447      ix86_expand_vector_extract (false, tmp, target, 1 - elt);
    3139531448      if (elt == 0)
    31396         tmp = gen_rtx_VEC_CONCAT (mode, tmp, val);
    31397       else
    3139831449        tmp = gen_rtx_VEC_CONCAT (mode, val, tmp);
     31450      else
     31451        tmp = gen_rtx_VEC_CONCAT (mode, tmp, val);
    3139931452      emit_insn (gen_rtx_SET (VOIDmode, target, tmp));
    3140031453      return;
    3140131454
     
    3282332876        return ix86_cost->cond_not_taken_branch_cost;
    3282432877
    3282532878      case vec_perm:
    32826         return 1;
     32879      case vec_promote_demote:
     32880        return ix86_cost->vec_stmt_cost;
    3282732881
    3282832882      default:
    3282932883        gcc_unreachable ();
  • gcc/config/i386/i386.h

    diff -Naur gcc-4.6.3.orig/gcc/config/i386/i386.h gcc-4.6.3/gcc/config/i386/i386.h
    old new  
    424424
    425425/* Feature tests against the various architecture variations.  */
    426426enum ix86_arch_indices {
    427   X86_ARCH_CMOVE,               /* || TARGET_SSE */
     427  X86_ARCH_CMOV,
    428428  X86_ARCH_CMPXCHG,
    429429  X86_ARCH_CMPXCHG8B,
    430430  X86_ARCH_XADD,
     
    435435
    436436extern unsigned char ix86_arch_features[X86_ARCH_LAST];
    437437
    438 #define TARGET_CMOVE            ix86_arch_features[X86_ARCH_CMOVE]
     438#define TARGET_CMOV             ix86_arch_features[X86_ARCH_CMOV]
    439439#define TARGET_CMPXCHG          ix86_arch_features[X86_ARCH_CMPXCHG]
    440440#define TARGET_CMPXCHG8B        ix86_arch_features[X86_ARCH_CMPXCHG8B]
    441441#define TARGET_XADD             ix86_arch_features[X86_ARCH_XADD]
    442442#define TARGET_BSWAP            ix86_arch_features[X86_ARCH_BSWAP]
    443443
     444/* For sane SSE instruction set generation we need fcomi instruction.
     445   It is safe to enable all CMOVE instructions.  Also, RDRAND intrinsic
     446   expands to a sequence that includes conditional move. */
     447#define TARGET_CMOVE            (TARGET_CMOV || TARGET_SSE || TARGET_RDRND)
     448
    444449#define TARGET_FISTTP           (TARGET_SSE3 && TARGET_80387)
    445450
    446451extern int x86_prefetch_sse;
     
    16681673
    16691674#define LEGITIMATE_CONSTANT_P(X)  legitimate_constant_p (X)
    16701675
     1676/* Try a machine-dependent way of reloading an illegitimate address
     1677   operand.  If we find one, push the reload and jump to WIN.  This
     1678   macro is used in only one place: `find_reloads_address' in reload.c.  */
     1679
     1680#define LEGITIMIZE_RELOAD_ADDRESS(X, MODE, OPNUM, TYPE, INDL, WIN)      \
     1681do {                                                                    \
     1682  if (ix86_legitimize_reload_address ((X), (MODE), (OPNUM),             \
     1683                                      (int)(TYPE), (INDL)))             \
     1684    goto WIN;                                                           \
     1685} while (0)
     1686
    16711687/* If defined, a C expression to determine the base term of address X.
    16721688   This macro is used in only one place: `find_base_term' in alias.c.
    16731689
  • gcc/config/i386/i386.md

    diff -Naur gcc-4.6.3.orig/gcc/config/i386/i386.md gcc-4.6.3/gcc/config/i386/i386.md
    old new  
    233233
    234234  ;; For BMI support
    235235  UNSPEC_BEXTR
    236 
    237   ;; For RDRAND support
    238   UNSPEC_RDRAND
    239236])
    240237
    241238(define_c_enum "unspecv" [
     
    270267  UNSPECV_WRFSBASE
    271268  UNSPECV_WRGSBASE
    272269  UNSPECV_SPLIT_STACK_RETURN
     270
     271  ;; For RDRAND support
     272  UNSPECV_RDRAND
    273273])
    274274
    275275;; Constants to represent pcomtrue/pcomfalse variants
     
    1634916349(define_insn "*x86_mov<mode>cc_0_m1_neg"
    1635016350  [(set (match_operand:SWI48 0 "register_operand" "=r")
    1635116351        (neg:SWI48 (match_operator 1 "ix86_carry_flag_operator"
    16352                     [(reg FLAGS_REG) (const_int 0)])))]
     16352                    [(reg FLAGS_REG) (const_int 0)])))
     16353   (clobber (reg:CC FLAGS_REG))]
    1635316354  ""
    1635416355  "sbb{<imodesuffix>}\t%0, %0"
    1635516356  [(set_attr "type" "alu")
     
    1835718358
    1835818359(define_insn "rdrand<mode>_1"
    1835918360  [(set (match_operand:SWI248 0 "register_operand" "=r")
    18360         (unspec:SWI248 [(const_int 0)] UNSPEC_RDRAND))
     18361        (unspec_volatile:SWI248 [(const_int 0)] UNSPECV_RDRAND))
    1836118362   (set (reg:CCC FLAGS_REG)
    18362         (unspec:CCC [(const_int 0)] UNSPEC_RDRAND))]
     18363        (unspec_volatile:CCC [(const_int 0)] UNSPECV_RDRAND))]
    1836318364  "TARGET_RDRND"
    1836418365  "rdrand\t%0"
    1836518366  [(set_attr "type" "other")
  • gcc/config/i386/linux-unwind.h

    diff -Naur gcc-4.6.3.orig/gcc/config/i386/linux-unwind.h gcc-4.6.3/gcc/config/i386/linux-unwind.h
    old new  
    11/* DWARF2 EH unwinding support for AMD x86-64 and x86.
    2    Copyright (C) 2004, 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
     2   Copyright (C) 2004, 2005, 2006, 2009, 2010, 2012 Free Software Foundation,
     3   Inc.
    34
    45This file is part of GCC.
    56
     
    133134    {
    134135      struct rt_sigframe {
    135136        int sig;
    136         struct siginfo *pinfo;
     137        siginfo_t *pinfo;
    137138        void *puc;
    138         struct siginfo info;
     139        siginfo_t info;
    139140        struct ucontext uc;
    140141      } *rt_ = context->cfa;
    141142      /* The void * cast is necessary to avoid an aliasing warning.
  • gcc/config/i386/sse.md

    diff -Naur gcc-4.6.3.orig/gcc/config/i386/sse.md gcc-4.6.3/gcc/config/i386/sse.md
    old new  
    392392  DONE;
    393393})
    394394
    395 (define_expand "avx_movu<ssemodesuffix><avxmodesuffix>"
    396   [(set (match_operand:AVXMODEF2P 0 "nonimmediate_operand" "")
    397         (unspec:AVXMODEF2P
    398           [(match_operand:AVXMODEF2P 1 "nonimmediate_operand" "")]
    399           UNSPEC_MOVU))]
    400   "AVX_VEC_FLOAT_MODE_P (<MODE>mode)"
    401 {
    402   if (MEM_P (operands[0]) && MEM_P (operands[1]))
    403     operands[1] = force_reg (<MODE>mode, operands[1]);
    404 })
    405 
    406 (define_insn "*avx_movu<ssemodesuffix><avxmodesuffix>"
     395(define_insn "avx_movu<ssemodesuffix><avxmodesuffix>"
    407396  [(set (match_operand:AVXMODEF2P 0 "nonimmediate_operand" "=x,m")
    408397        (unspec:AVXMODEF2P
    409398          [(match_operand:AVXMODEF2P 1 "nonimmediate_operand" "xm,x")]
     
    429418   (set_attr "prefix" "maybe_vex")
    430419   (set_attr "mode" "TI")])
    431420
    432 (define_expand "<sse>_movu<ssemodesuffix>"
    433   [(set (match_operand:SSEMODEF2P 0 "nonimmediate_operand" "")
    434         (unspec:SSEMODEF2P
    435           [(match_operand:SSEMODEF2P 1 "nonimmediate_operand" "")]
    436           UNSPEC_MOVU))]
    437   "SSE_VEC_FLOAT_MODE_P (<MODE>mode)"
    438 {
    439   if (MEM_P (operands[0]) && MEM_P (operands[1]))
    440     operands[1] = force_reg (<MODE>mode, operands[1]);
    441 })
    442 
    443 (define_insn "*<sse>_movu<ssemodesuffix>"
     421(define_insn "<sse>_movu<ssemodesuffix>"
    444422  [(set (match_operand:SSEMODEF2P 0 "nonimmediate_operand" "=x,m")
    445423        (unspec:SSEMODEF2P
    446424          [(match_operand:SSEMODEF2P 1 "nonimmediate_operand" "xm,x")]
     
    452430   (set_attr "movu" "1")
    453431   (set_attr "mode" "<MODE>")])
    454432
    455 (define_expand "avx_movdqu<avxmodesuffix>"
    456   [(set (match_operand:AVXMODEQI 0 "nonimmediate_operand" "")
    457         (unspec:AVXMODEQI
    458           [(match_operand:AVXMODEQI 1 "nonimmediate_operand" "")]
    459           UNSPEC_MOVU))]
    460   "TARGET_AVX"
    461 {
    462   if (MEM_P (operands[0]) && MEM_P (operands[1]))
    463     operands[1] = force_reg (<MODE>mode, operands[1]);
    464 })
    465 
    466 (define_insn "*avx_movdqu<avxmodesuffix>"
     433(define_insn "avx_movdqu<avxmodesuffix>"
    467434  [(set (match_operand:AVXMODEQI 0 "nonimmediate_operand" "=x,m")
    468435        (unspec:AVXMODEQI
    469436          [(match_operand:AVXMODEQI 1 "nonimmediate_operand" "xm,x")]
     
    475442   (set_attr "prefix" "vex")
    476443   (set_attr "mode" "<avxvecmode>")])
    477444
    478 (define_expand "sse2_movdqu"
    479   [(set (match_operand:V16QI 0 "nonimmediate_operand" "")
    480         (unspec:V16QI [(match_operand:V16QI 1 "nonimmediate_operand" "")]
    481                       UNSPEC_MOVU))]
    482   "TARGET_SSE2"
    483 {
    484   if (MEM_P (operands[0]) && MEM_P (operands[1]))
    485     operands[1] = force_reg (V16QImode, operands[1]);
    486 })
    487 
    488 (define_insn "*sse2_movdqu"
     445(define_insn "sse2_movdqu"
    489446  [(set (match_operand:V16QI 0 "nonimmediate_operand" "=x,m")
    490447        (unspec:V16QI [(match_operand:V16QI 1 "nonimmediate_operand" "xm,x")]
    491448                      UNSPEC_MOVU))]
     
    13241281                (parallel [(const_int 0)]))
    13251282              (vec_select:DF (match_dup 1) (parallel [(const_int 1)])))
    13261283            (plusminus:DF
    1327               (vec_select:DF (match_dup 1) (parallel [(const_int 2)]))
    1328               (vec_select:DF (match_dup 1) (parallel [(const_int 3)]))))
    1329           (vec_concat:V2DF
    1330             (plusminus:DF
    13311284              (vec_select:DF
    13321285                (match_operand:V4DF 2 "nonimmediate_operand" "xm")
    13331286                (parallel [(const_int 0)]))
    1334               (vec_select:DF (match_dup 2) (parallel [(const_int 1)])))
     1287              (vec_select:DF (match_dup 2) (parallel [(const_int 1)]))))
     1288          (vec_concat:V2DF
     1289            (plusminus:DF
     1290              (vec_select:DF (match_dup 1) (parallel [(const_int 2)]))
     1291              (vec_select:DF (match_dup 1) (parallel [(const_int 3)])))
    13351292            (plusminus:DF
    13361293              (vec_select:DF (match_dup 2) (parallel [(const_int 2)]))
    13371294              (vec_select:DF (match_dup 2) (parallel [(const_int 3)]))))))]
     
    50585015          (vec_select:DF (match_dup 0) (parallel [(const_int 1)]))))]
    50595016  "TARGET_SSE2 && reload_completed"
    50605017  [(set (match_dup 0) (match_dup 1))]
    5061   "operands[0] = adjust_address (operands[0], DFmode, 8);")
     5018  "operands[0] = adjust_address (operands[0], DFmode, 0);")
    50625019
    50635020;; Not sure these two are ever used, but it doesn't hurt to have
    50645021;; them. -aoliva
     
    1209512052          (unspec:V8SF [(match_operand:V8HI 1 "register_operand" "x")]
    1209612053                       UNSPEC_VCVTPH2PS)
    1209712054          (parallel [(const_int 0) (const_int 1)
    12098                      (const_int 1) (const_int 2)])))]
     12055                     (const_int 2) (const_int 3)])))]
    1209912056  "TARGET_F16C"
    1210012057  "vcvtph2ps\t{%1, %0|%0, %1}"
    1210112058  [(set_attr "type" "ssecvt")
  • gcc/config/ia64/linux-unwind.h

    diff -Naur gcc-4.6.3.orig/gcc/config/ia64/linux-unwind.h gcc-4.6.3/gcc/config/ia64/linux-unwind.h
    old new  
    11/* DWARF2 EH unwinding support for IA64 Linux.
    2    Copyright (C) 2004, 2005, 2009 Free Software Foundation, Inc.
     2   Copyright (C) 2004, 2005, 2009, 2012 Free Software Foundation, Inc.
    33
    44   This file is part of GCC.
    55
     
    4747      struct sigframe {
    4848        char scratch[16];
    4949        unsigned long sig_number;
    50         struct siginfo *info;
     50        siginfo_t *info;
    5151        struct sigcontext *sc;
    5252      } *frame_ = (struct sigframe *)context->psp;
    5353      struct sigcontext *sc = frame_->sc;
     
    137137      struct sigframe {
    138138        char scratch[16];
    139139        unsigned long sig_number;
    140         struct siginfo *info;
     140        siginfo_t *info;
    141141        struct sigcontext *sc;
    142142      } *frame = (struct sigframe *)context->psp;
    143143      struct sigcontext *sc = frame->sc;
  • gcc/config/m32c/m32c.c

    diff -Naur gcc-4.6.3.orig/gcc/config/m32c/m32c.c gcc-4.6.3/gcc/config/m32c/m32c.c
    old new  
    447447    flag_ivopts = 0;
    448448
    449449  /* This target defaults to strict volatile bitfields.  */
    450   if (flag_strict_volatile_bitfields < 0)
     450  if (flag_strict_volatile_bitfields < 0 && abi_version_at_least(2))
    451451    flag_strict_volatile_bitfields = 1;
    452452
    453453  /* r8c/m16c have no 16-bit indirect call, so thunks are involved.
  • gcc/config/mips/linux-unwind.h

    diff -Naur gcc-4.6.3.orig/gcc/config/mips/linux-unwind.h gcc-4.6.3/gcc/config/mips/linux-unwind.h
    old new  
    11/* DWARF2 EH unwinding support for MIPS Linux.
    2    Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
     2   Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2012 Free Software
     3   Foundation, Inc.
    34
    45This file is part of GCC.
    56
     
    7576      struct rt_sigframe {
    7677        u_int32_t ass[4];  /* Argument save space for o32.  */
    7778        u_int32_t trampoline[2];
    78         struct siginfo info;
     79        siginfo_t info;
    7980        _sig_ucontext_t uc;
    8081      } *rt_ = context->cfa;
    8182      sc = &rt_->uc.uc_mcontext;
  • gcc/config/mn10300/mn10300.c

    diff -Naur gcc-4.6.3.orig/gcc/config/mn10300/mn10300.c gcc-4.6.3/gcc/config/mn10300/mn10300.c
    old new  
    25052505   may access it using GOTOFF instead of GOT.  */
    25062506
    25072507static void
    2508 mn10300_encode_section_info (tree decl, rtx rtl, int first ATTRIBUTE_UNUSED)
     2508mn10300_encode_section_info (tree decl, rtx rtl, int first)
    25092509{
    25102510  rtx symbol;
    25112511
     2512  default_encode_section_info (decl, rtl, first);
     2513
    25122514  if (! MEM_P (rtl))
    25132515    return;
     2516
    25142517  symbol = XEXP (rtl, 0);
    25152518  if (GET_CODE (symbol) != SYMBOL_REF)
    25162519    return;
  • gcc/config/pa/linux-unwind.h

    diff -Naur gcc-4.6.3.orig/gcc/config/pa/linux-unwind.h gcc-4.6.3/gcc/config/pa/linux-unwind.h
    old new  
    11/* DWARF2 EH unwinding support for PA Linux.
    2    Copyright (C) 2004, 2005, 2009 Free Software Foundation, Inc.
     2   Copyright (C) 2004, 2005, 2009, 2012 Free Software Foundation, Inc.
    33
    44This file is part of GCC.
    55
     
    6363  int i;
    6464  struct sigcontext *sc;
    6565  struct rt_sigframe {
    66     struct siginfo info;
     66    siginfo_t info;
    6767    struct ucontext uc;
    6868  } *frame;
    6969
  • gcc/config/pa/pa-protos.h

    diff -Naur gcc-4.6.3.orig/gcc/config/pa/pa-protos.h gcc-4.6.3/gcc/config/pa/pa-protos.h
    old new  
    136136extern int cint_ok_for_move (HOST_WIDE_INT);
    137137extern void hppa_expand_prologue (void);
    138138extern void hppa_expand_epilogue (void);
     139extern bool pa_can_use_return_insn (void);
    139140extern int ior_mask_p (unsigned HOST_WIDE_INT);
    140141extern void compute_zdepdi_operands (unsigned HOST_WIDE_INT,
    141142                                     unsigned *);
  • gcc/config/pa/pa.c

    diff -Naur gcc-4.6.3.orig/gcc/config/pa/pa.c gcc-4.6.3/gcc/config/pa/pa.c
    old new  
    185185static void pa_conditional_register_usage (void);
    186186static enum machine_mode pa_c_mode_for_suffix (char);
    187187static section *pa_function_section (tree, enum node_frequency, bool, bool);
     188static unsigned int pa_section_type_flags (tree, const char *, int);
    188189
    189190/* The following extra sections are only used for SOM.  */
    190191static GTY(()) section *som_readonly_data_section;
     
    400401#undef TARGET_ASM_FUNCTION_SECTION
    401402#define TARGET_ASM_FUNCTION_SECTION pa_function_section
    402403
     404#undef TARGET_SECTION_TYPE_FLAGS
     405#define TARGET_SECTION_TYPE_FLAGS pa_section_type_flags
     406
    403407struct gcc_target targetm = TARGET_INITIALIZER;
    404408
    405409
  • gcc/config/pa/pa.h

     /* Parse the -mfixed-range= option string.  */
    @@ -4442,6 +4446,24 @@
         }
     }
     
    +bool
    +pa_can_use_return_insn (void)
    +{
    +  if (!reload_completed)
    +    return false;
    +
    +  if (frame_pointer_needed)
    +    return false;
    +
    +  if (df_regs_ever_live_p (2))
    +    return false;
    +
    +  if (crtl->profile)
    +    return false;
    +
    +  return compute_frame_size (get_frame_size (), 0) == 0;
    +}
    +
     rtx
     hppa_pic_save_rtx (void)
     {
    @@ -4586,7 +4608,7 @@
       rtx saved_rp;
       rtx ins;
     
    -  /* Instruction stream at the normal return address for the export stub:
    +  /* The instruction stream at the return address of a PA1.X export stub is:
     
     	0x4bc23fd1 | stub+8:   ldw -18(sr0,sp),rp
     	0x004010a1 | stub+12:  ldsid (sr0,rp),r1
    @@ -4594,10 +4616,16 @@
     	0xe0400002 | stub+20:  be,n 0(sr0,rp)
     
          0xe0400002 must be specified as -532676606 so that it won't be
    -     rejected as an invalid immediate operand on 64-bit hosts.  */
    +     rejected as an invalid immediate operand on 64-bit hosts.
     
    -  HOST_WIDE_INT insns[4] = {0x4bc23fd1, 0x004010a1, 0x00011820, -532676606};
    -  int i;
    +     The instruction stream at the return address of a PA2.0 export stub is:
    +
    +	0x4bc23fd1 | stub+8:   ldw -18(sr0,sp),rp
    +	0xe840d002 | stub+12:  bve,n (rp)
    +  */
    +
    +  HOST_WIDE_INT insns[4];
    +  int i, len;
     
       if (count != 0)
         return NULL_RTX;
    @@ -4620,11 +4648,26 @@
       ins = copy_to_reg (gen_rtx_AND (Pmode, rp, MASK_RETURN_ADDR));
       label = gen_label_rtx ();
     
    +  if (TARGET_PA_20)
    +    {
    +      insns[0] = 0x4bc23fd1;
    +      insns[1] = -398405630;
    +      len = 2;
    +    }
    +  else
    +    {
    +      insns[0] = 0x4bc23fd1;
    +      insns[1] = 0x004010a1;
    +      insns[2] = 0x00011820;
    +      insns[3] = -532676606;
    +      len = 4;
    +    }
    +
       /* Check the instruction stream at the normal return address for the
          export stub.  If it is an export stub, than our return address is
          really in -24[frameaddr].  */
     
    -  for (i = 0; i < 3; i++)
    +  for (i = 0; i < len; i++)
         {
           rtx op0 = gen_rtx_MEM (SImode, plus_constant (ins, i * 4)); 
           rtx op1 = GEN_INT (insns[i]);
    @@ -7501,7 +7544,7 @@
         return 24;
       else
         {
    -      if (!TARGET_LONG_CALLS && distance < 240000)
    +      if (!TARGET_LONG_CALLS && distance < MAX_PCREL17F_OFFSET)
     	return 8;
     
           if (TARGET_LONG_ABS_CALL && !flag_pic)
    @@ -7714,7 +7757,7 @@
       /* pc-relative branch.  */
       if (!TARGET_LONG_CALLS
           && ((TARGET_PA_20 && !sibcall && distance < 7600000)
    -	  || distance < 240000))
    +	  || distance < MAX_PCREL17F_OFFSET))
         length += 8;
     
       /* 64-bit plabel sequence.  */
    @@ -8073,7 +8116,7 @@
       if (TARGET_FAST_INDIRECT_CALLS
           || (!TARGET_PORTABLE_RUNTIME
     	  && ((TARGET_PA_20 && !TARGET_SOM && distance < 7600000)
    -	      || distance < 240000)))
    +	      || distance < MAX_PCREL17F_OFFSET)))
         return 8;
     
       if (flag_pic)
    @@ -10392,4 +10435,23 @@
       return default_function_section (decl, freq, startup, exit);
     }
     
    +/* Implement TARGET_SECTION_TYPE_FLAGS.  */
    +
    +static unsigned int
    +pa_section_type_flags (tree decl, const char *name, int reloc)
    +{
    +  unsigned int flags;
    +
    +  flags = default_section_type_flags (decl, name, reloc);
    +
    +  /* Function labels are placed in the constant pool.  This can
    +     cause a section conflict if decls are put in ".data.rel.ro"
    +     or ".data.rel.ro.local" using the __attribute__ construct.  */
    +  if (strcmp (name, ".data.rel.ro") == 0
    +      || strcmp (name, ".data.rel.ro.local") == 0)
    +    flags |= SECTION_WRITE | SECTION_RELRO;
    +
    +  return flags;
    +}
    +
     #include "gt-pa.h"
    diff -Naur gcc-4.6.3.orig/gcc/config/pa/pa.h gcc-4.6.3/gcc/config/pa/pa.h
    old new  
    15631563#undef TARGET_HAVE_TLS
    15641564#define TARGET_HAVE_TLS true
    15651565#endif
     1566
     1567/* The maximum offset in bytes for a PA 1.X pc-relative call to the
     1568   head of the preceding stub table.  The selected offsets have been
     1569   chosen so that approximately one call stub is allocated for every
     1570   86.7 instructions.  A long branch stub is two instructions when
     1571   not generating PIC code.  For HP-UX and ELF targets, PIC stubs are
     1572   seven and four instructions, respectively.  */ 
     1573#define MAX_PCREL17F_OFFSET \
     1574  (flag_pic ? (TARGET_HPUX ? 198164 : 221312) : 240000)
  • gcc/config/pa/pa.md

    diff -Naur gcc-4.6.3.orig/gcc/config/pa/pa.md gcc-4.6.3/gcc/config/pa/pa.md
    old new  
    63486348  ""
    63496349  "*
    63506350{
    6351   int x = INTVAL (operands[1]);
     6351  unsigned HOST_WIDE_INT x = UINTVAL (operands[1]);
    63526352  operands[2] = GEN_INT (4 + exact_log2 ((x >> 4) + 1));
    63536353  operands[1] = GEN_INT ((x & 0xf) - 0x10);
    63546354  return \"{zvdepi %1,%2,%0|depwi,z %1,%%sar,%2,%0}\";
     
    63666366  "exact_log2 (INTVAL (operands[1]) + 1) > 0"
    63676367  "*
    63686368{
    6369   int x = INTVAL (operands[1]);
     6369  HOST_WIDE_INT x = INTVAL (operands[1]);
    63706370  operands[2] = GEN_INT (exact_log2 (x + 1));
    63716371  return \"{vdepi -1,%2,%0|depwi -1,%%sar,%2,%0}\";
    63726372}"
     
    63836383  "INTVAL (operands[1]) == -2"
    63846384  "*
    63856385{
    6386   int x = INTVAL (operands[1]);
     6386  HOST_WIDE_INT x = INTVAL (operands[1]);
    63876387  operands[2] = GEN_INT (exact_log2 ((~x) + 1));
    63886388  return \"{vdepi 0,%2,%0|depwi 0,%%sar,%2,%0}\";
    63896389}"
     
    64476447  "TARGET_64BIT"
    64486448  "*
    64496449{
    6450   int x = INTVAL (operands[1]);
     6450  unsigned HOST_WIDE_INT x = UINTVAL (operands[1]);
    64516451  operands[2] = GEN_INT (4 + exact_log2 ((x >> 4) + 1));
    64526452  operands[1] = GEN_INT ((x & 0x1f) - 0x20);
    64536453  return \"depdi,z %1,%%sar,%2,%0\";
     
    64656465  "TARGET_64BIT && exact_log2 (INTVAL (operands[1]) + 1) > 0"
    64666466  "*
    64676467{
    6468   int x = INTVAL (operands[1]);
     6468  HOST_WIDE_INT x = INTVAL (operands[1]);
    64696469  operands[2] = GEN_INT (exact_log2 (x + 1));
    64706470  return \"depdi -1,%%sar,%2,%0\";
    64716471}"
     
    64826482  "TARGET_64BIT && INTVAL (operands[1]) == -2"
    64836483  "*
    64846484{
    6485   int x = INTVAL (operands[1]);
     6485  HOST_WIDE_INT x = INTVAL (operands[1]);
    64866486  operands[2] = GEN_INT (exact_log2 ((~x) + 1));
    64876487  return \"depdi 0,%%sar,%2,%0\";
    64886488}"
     
    66716671
    66726672
    66736673;; Unconditional and other jump instructions.
    66746674
     6675;; Trivial return used when no epilogue is needed.
     6676(define_insn "return"
     6677  [(return)
     6678   (use (reg:SI 2))]
     6679  "pa_can_use_return_insn ()"
     6680  "*
     6681{
     6682  if (TARGET_PA_20)
     6683    return \"bve%* (%%r2)\";
     6684  return \"bv%* %%r0(%%r2)\";
     6685}"
     6686  [(set_attr "type" "branch")
     6687   (set_attr "length" "4")])
     6688
    66756689;; This is used for most returns.
    66766690(define_insn "return_internal"
  • gcc/config/pa/predicates.md

       [(return)
    @@ -6719,11 +6733,8 @@
       rtx x;
     
       /* Try to use the trivial return first.  Else use the full epilogue.  */
    -  if (reload_completed
    -      && !frame_pointer_needed
    -      && !df_regs_ever_live_p (2)
    -      && (compute_frame_size (get_frame_size (), 0) ? 0 : 1))
    -    x = gen_return_internal ();
    +  if (pa_can_use_return_insn ())
    +    x = gen_return ();
       else
         {
           hppa_expand_epilogue ();
    diff -Naur gcc-4.6.3.orig/gcc/config/pa/predicates.md gcc-4.6.3/gcc/config/pa/predicates.md
    old new  
    421421  (ior (match_operand 0 "register_operand")
    422422       (match_operand 0 "cint_ior_operand")))
    423423
    424 ;; True iff OP is a CONST_INT of the forms 0...0xxxx or
    425 ;; 0...01...1xxxx. Such values can be the left hand side x in (x <<
    426 ;; r), using the zvdepi instruction.
     424;; True iff OP is a CONST_INT of the forms 0...0xxxx, 0...01...1xxxx,
     425;; or 1...1xxxx. Such values can be the left hand side x in (x << r),
     426;; using the zvdepi instruction.
    427427
    428428(define_predicate "lhs_lshift_cint_operand"
    429429  (match_code "const_int")
  • gcc/config/rs6000/altivec.md

    diff -Naur gcc-4.6.3.orig/gcc/config/rs6000/altivec.md gcc-4.6.3/gcc/config/rs6000/altivec.md
    old new  
    23942394
    23952395(define_insn "altivec_stvlx"
    23962396  [(parallel
    2397     [(set (match_operand:V4SI 0 "memory_operand" "=Z")
    2398           (match_operand:V4SI 1 "register_operand" "v"))
     2397    [(set (match_operand:V16QI 0 "memory_operand" "=Z")
     2398          (match_operand:V16QI 1 "register_operand" "v"))
    23992399     (unspec [(const_int 0)] UNSPEC_STVLX)])]
    24002400  "TARGET_ALTIVEC && rs6000_cpu == PROCESSOR_CELL"
    24012401  "stvlx %1,%y0"
     
    24032403
    24042404(define_insn "altivec_stvlxl"
    24052405  [(parallel
    2406     [(set (match_operand:V4SI 0 "memory_operand" "=Z")
    2407           (match_operand:V4SI 1 "register_operand" "v"))
     2406    [(set (match_operand:V16QI 0 "memory_operand" "=Z")
     2407          (match_operand:V16QI 1 "register_operand" "v"))
    24082408     (unspec [(const_int 0)] UNSPEC_STVLXL)])]
    24092409  "TARGET_ALTIVEC && rs6000_cpu == PROCESSOR_CELL"
    24102410  "stvlxl %1,%y0"
     
    24122412
    24132413(define_insn "altivec_stvrx"
    24142414  [(parallel
    2415     [(set (match_operand:V4SI 0 "memory_operand" "=Z")
    2416           (match_operand:V4SI 1 "register_operand" "v"))
     2415    [(set (match_operand:V16QI 0 "memory_operand" "=Z")
     2416          (match_operand:V16QI 1 "register_operand" "v"))
    24172417     (unspec [(const_int 0)] UNSPEC_STVRX)])]
    24182418  "TARGET_ALTIVEC && rs6000_cpu == PROCESSOR_CELL"
    24192419  "stvrx %1,%y0"
     
    24212421
    24222422(define_insn "altivec_stvrxl"
    24232423  [(parallel
    2424     [(set (match_operand:V4SI 0 "memory_operand" "=Z")
    2425           (match_operand:V4SI 1 "register_operand" "v"))
     2424    [(set (match_operand:V16QI 0 "memory_operand" "=Z")
     2425          (match_operand:V16QI 1 "register_operand" "v"))
    24262426     (unspec [(const_int 0)] UNSPEC_STVRXL)])]
    24272427  "TARGET_ALTIVEC && rs6000_cpu == PROCESSOR_CELL"
    24282428  "stvrxl %1,%y0"
  • gcc/config/rs6000/rs6000.c

    diff -Naur gcc-4.6.3.orig/gcc/config/rs6000/rs6000.c gcc-4.6.3/gcc/config/rs6000/rs6000.c
    old new  
    36953695      case vec_to_scalar:
    36963696      case scalar_to_vec:
    36973697      case cond_branch_not_taken:
    3698       case vec_perm:
    36993698        return 1;
    37003699
    37013700      case cond_branch_taken:
    37023701        return 3;
    37033702
     3703      case vec_perm:
     3704        if (TARGET_VSX)
     3705          return 4;
     3706        else
     3707          return 1;
     3708
     3709      case vec_promote_demote:
     3710        if (TARGET_VSX)
     3711          return 5;
     3712        else
     3713          return 1;
     3714
    37043715      case unaligned_load:
    37053716        if (TARGET_VSX && TARGET_ALLOW_MOVMISALIGN)
    37063717          {
     
    1581115822print_operand (FILE *file, rtx x, int code)
    1581215823{
    1581315824  int i;
    15814   HOST_WIDE_INT val;
    1581515825  unsigned HOST_WIDE_INT uval;
    1581615826
    1581715827  switch (code)
     
    1625216262
    1625316263    case 'W':
    1625416264      /* MB value for a PowerPC64 rldic operand.  */
    16255       val = (GET_CODE (x) == CONST_INT
    16256              ? INTVAL (x) : CONST_DOUBLE_HIGH (x));
    16257 
    16258       if (val < 0)
    16259         i = -1;
    16260       else
    16261         for (i = 0; i < HOST_BITS_PER_WIDE_INT; i++)
    16262           if ((val <<= 1) < 0)
    16263             break;
     16265      i = clz_hwi (GET_CODE (x) == CONST_INT
     16266                   ? INTVAL (x) : CONST_DOUBLE_HIGH (x));
    1626416267
    1626516268#if HOST_BITS_PER_WIDE_INT == 32
    16266       if (GET_CODE (x) == CONST_INT && i >= 0)
     16269      if (GET_CODE (x) == CONST_INT && i > 0)
    1626716270        i += 32;  /* zero-extend high-part was all 0's */
    1626816271      else if (GET_CODE (x) == CONST_DOUBLE && i == 32)
    16269         {
    16270           val = CONST_DOUBLE_LOW (x);
    16271 
    16272           gcc_assert (val);
    16273           if (val < 0)
    16274             --i;
    16275           else
    16276             for ( ; i < 64; i++)
    16277               if ((val <<= 1) < 0)
    16278                 break;
    16279         }
     16272        i = clz_hwi (CONST_DOUBLE_LOW (x)) + 32;
    1628016273#endif
    1628116274
    16282       fprintf (file, "%d", i + 1);
     16275      fprintf (file, "%d", i);
    1628316276      return;
    1628416277
    1628516278    case 'x':
     
    1722917222    case EQ:
    1723017223    case GT:
    1723117224    case GTU:
     17225    case ORDERED:
     17226    case UNORDERED:
     17227    case UNEQ:
     17228    case LTGT:
    1723217229      mask = gen_reg_rtx (mode);
    1723317230      emit_insn (gen_rtx_SET (VOIDmode,
    1723417231                              mask,
  • gcc/config/rs6000/rs6000.h

    diff -Naur gcc-4.6.3.orig/gcc/config/rs6000/rs6000.h gcc-4.6.3/gcc/config/rs6000/rs6000.h
    old new  
    469469/* ISA 2.01 allowed FCFID to be done in 32-bit, previously it was 64-bit only.
    470470   Enable 32-bit fcfid's on any of the switches for newer ISA machines or
    471471   XILINX.  */
    472 #define TARGET_FCFID    (TARGET_POWERPC64 \
    473                          || TARGET_POPCNTB      /* ISA 2.02 */ \
    474                          || TARGET_CMPB         /* ISA 2.05 */ \
    475                          || TARGET_POPCNTD      /* ISA 2.06 */ \
     472#define TARGET_FCFID    (TARGET_POWERPC64                               \
     473                         || TARGET_PPC_GPOPT    /* 970/power4 */        \
     474                         || TARGET_POPCNTB      /* ISA 2.02 */          \
     475                         || TARGET_CMPB         /* ISA 2.05 */          \
     476                         || TARGET_POPCNTD      /* ISA 2.06 */          \
    476477                         || TARGET_XILINX_FPU)
    477478
    478479#define TARGET_FCTIDZ   TARGET_FCFID
  • gcc/config/rs6000/rs6000.md

    diff -Naur gcc-4.6.3.orig/gcc/config/rs6000/rs6000.md gcc-4.6.3/gcc/config/rs6000/rs6000.md
    old new  
    25242524  if (GET_CODE (addr1) == PLUS)
    25252525    {
    25262526      emit_insn (gen_add3_insn (op2, XEXP (addr1, 0), GEN_INT (4)));
    2527       addr2 = gen_rtx_PLUS (Pmode, op2, XEXP (addr1, 1));
     2527      if (TARGET_AVOID_XFORM)
     2528        {
     2529          emit_insn (gen_add3_insn (op2, XEXP (addr1, 1), op2));
     2530          addr2 = op2;
     2531        }
     2532      else
     2533        addr2 = gen_rtx_PLUS (Pmode, op2, XEXP (addr1, 1));
     2534    }
     2535  else if (TARGET_AVOID_XFORM)
     2536    {
     2537      emit_insn (gen_add3_insn (op2, addr1, GEN_INT (4)));
     2538      addr2 = op2;
    25282539    }
    25292540  else
    25302541    {
     
    25742585  if (GET_CODE (addr1) == PLUS)
    25752586    {
    25762587      emit_insn (gen_add3_insn (op2, XEXP (addr1, 0), GEN_INT (4)));
    2577       addr2 = gen_rtx_PLUS (Pmode, op2, XEXP (addr1, 1));
     2588      if (TARGET_AVOID_XFORM)
     2589        {
     2590          emit_insn (gen_add3_insn (op2, XEXP (addr1, 1), op2));
     2591          addr2 = op2;
     2592        }
     2593      else
     2594        addr2 = gen_rtx_PLUS (Pmode, op2, XEXP (addr1, 1));
     2595    }
     2596  else if (TARGET_AVOID_XFORM)
     2597    {
     2598      emit_insn (gen_add3_insn (op2, addr1, GEN_INT (4)));
     2599      addr2 = op2;
    25782600    }
    25792601  else
    25802602    {
     
    26552677  if (GET_CODE (addr1) == PLUS)
    26562678    {
    26572679      emit_insn (gen_add3_insn (op2, XEXP (addr1, 0), GEN_INT (4)));
    2658       addr2 = gen_rtx_PLUS (SImode, op2, XEXP (addr1, 1));
     2680      if (TARGET_AVOID_XFORM)
     2681        {
     2682          emit_insn (gen_add3_insn (op2, XEXP (addr1, 1), op2));
     2683          addr2 = op2;
     2684        }
     2685      else
     2686        addr2 = gen_rtx_PLUS (SImode, op2, XEXP (addr1, 1));
     2687    }
     2688  else if (TARGET_AVOID_XFORM)
     2689    {
     2690      emit_insn (gen_add3_insn (op2, addr1, GEN_INT (4)));
     2691      addr2 = op2;
    26592692    }
    26602693  else
    26612694    {
     
    27002733  if (GET_CODE (addr1) == PLUS)
    27012734    {
    27022735      emit_insn (gen_add3_insn (op2, XEXP (addr1, 0), GEN_INT (4)));
    2703       addr2 = gen_rtx_PLUS (SImode, op2, XEXP (addr1, 1));
     2736      if (TARGET_AVOID_XFORM)
     2737        {
     2738          emit_insn (gen_add3_insn (op2, XEXP (addr1, 1), op2));
     2739          addr2 = op2;
     2740        }
     2741      else
     2742        addr2 = gen_rtx_PLUS (SImode, op2, XEXP (addr1, 1));
     2743    }
     2744  else if (TARGET_AVOID_XFORM)
     2745    {
     2746      emit_insn (gen_add3_insn (op2, addr1, GEN_INT (4)));
     2747      addr2 = op2;
    27042748    }
    27052749  else
    27062750    {
  • gcc/config/rs6000/vector.md

    diff -Naur gcc-4.6.3.orig/gcc/config/rs6000/vector.md gcc-4.6.3/gcc/config/rs6000/vector.md
    old new  
    448448  "VECTOR_UNIT_ALTIVEC_P (<MODE>mode)"
    449449  "")
    450450
     451(define_insn_and_split "*vector_uneq<mode>"
     452  [(set (match_operand:VEC_F 0 "vfloat_operand" "")
     453        (uneq:VEC_F (match_operand:VEC_F 1 "vfloat_operand" "")
     454                    (match_operand:VEC_F 2 "vfloat_operand" "")))]
     455  "VECTOR_UNIT_ALTIVEC_OR_VSX_P (<MODE>mode)"
     456  "#"
     457  ""
     458  [(set (match_dup 3)
     459        (gt:VEC_F (match_dup 1)
     460                  (match_dup 2)))
     461   (set (match_dup 4)
     462        (gt:VEC_F (match_dup 2)
     463                  (match_dup 1)))
     464   (set (match_dup 0)
     465        (not:VEC_F (ior:VEC_F (match_dup 3)
     466                              (match_dup 4))))]
     467  "
     468{
     469  operands[3] = gen_reg_rtx (<MODE>mode);
     470  operands[4] = gen_reg_rtx (<MODE>mode);
     471}")
     472
     473(define_insn_and_split "*vector_ltgt<mode>"
     474  [(set (match_operand:VEC_F 0 "vfloat_operand" "")
     475        (ltgt:VEC_F (match_operand:VEC_F 1 "vfloat_operand" "")
     476                    (match_operand:VEC_F 2 "vfloat_operand" "")))]
     477  "VECTOR_UNIT_ALTIVEC_OR_VSX_P (<MODE>mode)"
     478  "#"
     479  ""
     480  [(set (match_dup 3)
     481        (gt:VEC_F (match_dup 1)
     482                  (match_dup 2)))
     483   (set (match_dup 4)
     484        (gt:VEC_F (match_dup 2)
     485                  (match_dup 1)))
     486   (set (match_dup 0)
     487        (ior:VEC_F (match_dup 3)
     488                   (match_dup 4)))]
     489  "
     490{
     491  operands[3] = gen_reg_rtx (<MODE>mode);
     492  operands[4] = gen_reg_rtx (<MODE>mode);
     493}")
     494
     495(define_insn_and_split "*vector_ordered<mode>"
     496  [(set (match_operand:VEC_F 0 "vfloat_operand" "")
     497        (ordered:VEC_F (match_operand:VEC_F 1 "vfloat_operand" "")
     498                       (match_operand:VEC_F 2 "vfloat_operand" "")))]
     499  "VECTOR_UNIT_ALTIVEC_OR_VSX_P (<MODE>mode)"
     500  "#"
     501  ""
     502  [(set (match_dup 3)
     503        (ge:VEC_F (match_dup 1)
     504                  (match_dup 2)))
     505   (set (match_dup 4)
     506        (ge:VEC_F (match_dup 2)
     507                  (match_dup 1)))
     508   (set (match_dup 0)
     509        (ior:VEC_F (match_dup 3)
     510                   (match_dup 4)))]
     511  "
     512{
     513  operands[3] = gen_reg_rtx (<MODE>mode);
     514  operands[4] = gen_reg_rtx (<MODE>mode);
     515}")
     516
     517(define_insn_and_split "*vector_unordered<mode>"
     518  [(set (match_operand:VEC_F 0 "vfloat_operand" "")
     519        (unordered:VEC_F (match_operand:VEC_F 1 "vfloat_operand" "")
     520                         (match_operand:VEC_F 2 "vfloat_operand" "")))]
     521  "VECTOR_UNIT_ALTIVEC_OR_VSX_P (<MODE>mode)"
     522  "#"
     523  ""
     524  [(set (match_dup 3)
     525        (ge:VEC_F (match_dup 1)
     526                  (match_dup 2)))
     527   (set (match_dup 4)
     528        (ge:VEC_F (match_dup 2)
     529                  (match_dup 1)))
     530   (set (match_dup 0)
     531        (not:VEC_F (ior:VEC_F (match_dup 3)
     532                              (match_dup 4))))]
     533  "
     534{
     535  operands[3] = gen_reg_rtx (<MODE>mode);
     536  operands[4] = gen_reg_rtx (<MODE>mode);
     537}")
     538
    451539;; Note the arguments for __builtin_altivec_vsel are op2, op1, mask
    452540;; which is in the reverse order that we want
    453541(define_expand "vector_select_<mode>"
  • gcc/config/rs6000/vsx.md

    diff -Naur gcc-4.6.3.orig/gcc/config/rs6000/vsx.md gcc-4.6.3/gcc/config/rs6000/vsx.md
    old new  
    10061006  "VECTOR_MEM_VSX_P (<MODE>mode)"
    10071007{
    10081008  if (INTVAL (operands[3]) == 0)
    1009     return \"xxpermdi %x0,%x1,%x2,1\";
     1009    return \"xxpermdi %x0,%x2,%x1,1\";
    10101010  else if (INTVAL (operands[3]) == 1)
    1011     return \"xxpermdi %x0,%x2,%x1,0\";
     1011    return \"xxpermdi %x0,%x1,%x2,0\";
    10121012  else
    10131013    gcc_unreachable ();
    10141014}
  • gcc/config/rx/rx.c

    diff -Naur gcc-4.6.3.orig/gcc/config/rx/rx.c gcc-4.6.3/gcc/config/rx/rx.c
    old new  
    23482348rx_option_override (void)
    23492349{
    23502350  /* This target defaults to strict volatile bitfields.  */
    2351   if (flag_strict_volatile_bitfields < 0)
     2351  if (flag_strict_volatile_bitfields < 0 && abi_version_at_least(2))
    23522352    flag_strict_volatile_bitfields = 1;
    23532353
    23542354  rx_override_options_after_change ();
  • gcc/config/sh/linux-unwind.h

    diff -Naur gcc-4.6.3.orig/gcc/config/sh/linux-unwind.h gcc-4.6.3/gcc/config/sh/linux-unwind.h
    old new  
    11/* DWARF2 EH unwinding support for SH Linux.
    2    Copyright (C) 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
     2   Copyright (C) 2004, 2005, 2006, 2007, 2009, 2012 Free Software Foundation,
     3   Inc.
    34
    45This file is part of GCC.
    56
     
    8081           && (*(unsigned long *) (pc+11)  == 0x6ff0fff0))
    8182    {
    8283      struct rt_sigframe {
    83         struct siginfo *pinfo;
     84        siginfo_t *pinfo;
    8485        void *puc;
    85         struct siginfo info;
     86        siginfo_t info;
    8687        struct ucontext uc;
    8788      } *rt_ = context->cfa;
    8889      /* The void * cast is necessary to avoid an aliasing warning.
     
    179180                && (*(unsigned short *) (pc+14)  == 0x00ad))))
    180181    {
    181182      struct rt_sigframe {
    182         struct siginfo info;
     183        siginfo_t info;
    183184        struct ucontext uc;
    184185      } *rt_ = context->cfa;
    185186      /* The void * cast is necessary to avoid an aliasing warning.
  • gcc/config/sh/sh.c

    diff -Naur gcc-4.6.3.orig/gcc/config/sh/sh.c gcc-4.6.3/gcc/config/sh/sh.c
    old new  
    763763  SUBTARGET_OVERRIDE_OPTIONS;
    764764  if (optimize > 1 && !optimize_size)
    765765    target_flags |= MASK_SAVE_ALL_TARGET_REGS;
    766   if (flag_finite_math_only == 2)
    767     flag_finite_math_only
    768       = !flag_signaling_nans && TARGET_SH2E && ! TARGET_IEEE;
    769   if (TARGET_SH2E && !flag_finite_math_only)
    770     target_flags |= MASK_IEEE;
    771766  sh_cpu = PROCESSOR_SH1;
    772767  assembler_dialect = 0;
    773768  if (TARGET_SH2)
     
    911906    if (! VALID_REGISTER_P (ADDREGNAMES_REGNO (regno)))
    912907      sh_additional_register_names[regno][0] = '\0';
    913908
    914   flag_omit_frame_pointer = (PREFERRED_DEBUGGING_TYPE == DWARF2_DEBUG);
    915 
    916909  if ((flag_pic && ! TARGET_PREFERGOT)
    917910      || (TARGET_SHMEDIA && !TARGET_PT_FIXED))
    918911    flag_no_function_cse = 1;
     
    944937        flag_schedule_insns = 0;
    945938    }
    946939
    947     if ((target_flags_explicit & MASK_ACCUMULATE_OUTGOING_ARGS) == 0)
    948        target_flags |= MASK_ACCUMULATE_OUTGOING_ARGS;
    949 
    950940  /* Unwind info is not correct around the CFG unless either a frame
    951941     pointer is present or M_A_O_A is set.  Fixing this requires rewriting
    952942     unwind info generation to be aware of the CFG and propagating states
    953943     around edges.  */
    954944  if ((flag_unwind_tables || flag_asynchronous_unwind_tables
    955945       || flag_exceptions || flag_non_call_exceptions)   
    956       && flag_omit_frame_pointer
    957       && !(target_flags & MASK_ACCUMULATE_OUTGOING_ARGS))
     946      && flag_omit_frame_pointer && !TARGET_ACCUMULATE_OUTGOING_ARGS)
    958947    {
    959       if (target_flags_explicit & MASK_ACCUMULATE_OUTGOING_ARGS)
    960948        warning (0, "unwind tables currently require either a frame pointer "
    961949                 "or -maccumulate-outgoing-args for correctness");
    962       target_flags |= MASK_ACCUMULATE_OUTGOING_ARGS;
     950        TARGET_ACCUMULATE_OUTGOING_ARGS = 1;
    963951    }
    964952
    965953  /* Unwinding with -freorder-blocks-and-partition does not work on this
     
    10141002        align_functions = min_align;
    10151003    }
    10161004
     1005  /* If the -mieee option was not explicitly set by the user, turn it on
     1006     unless -ffinite-math-only was specified.  See also PR 33135.  */
     1007  if (! global_options_set.x_TARGET_IEEE)
     1008    TARGET_IEEE = ! flag_finite_math_only;
     1009
    10171010  if (sh_fixed_range_str)
    10181011    sh_fix_range (sh_fixed_range_str);
    10191012
    10201013  /* This target defaults to strict volatile bitfields.  */
    1021   if (flag_strict_volatile_bitfields < 0)
     1014  if (flag_strict_volatile_bitfields < 0 && abi_version_at_least(2))
    10221015    flag_strict_volatile_bitfields = 1;
    10231016}
    10241017
  • gcc/config/sh/sh.opt

    diff -Naur gcc-4.6.3.orig/gcc/config/sh/sh.opt gcc-4.6.3/gcc/config/sh/sh.opt
    old new  
    202202Generate FPU-less SHcompact code
    203203
    204204maccumulate-outgoing-args
    205 Target Report Mask(ACCUMULATE_OUTGOING_ARGS)
     205Target Report Var(TARGET_ACCUMULATE_OUTGOING_ARGS) Init(1)
    206206Reserve space for outgoing arguments in the function prologue
    207207
    208208madjust-unroll
     
    270270Follow Renesas (formerly Hitachi) / SuperH calling conventions
    271271
    272272mieee
    273 Target Report Mask(IEEE)
    274 Increase the IEEE compliance for floating-point code
     273Target Var(TARGET_IEEE)
     274Increase the IEEE compliance for floating-point comparisons
    275275
    276276mindexed-addressing
    277277Target Report Mask(ALLOW_INDEXED_ADDRESS) Condition(SUPPORT_ANY_SH5_32MEDIA)
  • gcc/config/sol2.h

    diff -Naur gcc-4.6.3.orig/gcc/config/sol2.h gcc-4.6.3/gcc/config/sol2.h
    old new  
    11/* Operating system specific defines to be used when targeting GCC for any
    22   Solaris 2 system.
    3    Copyright 2002, 2003, 2004, 2007, 2008, 2009, 2010, 2011
     3   Copyright 2002, 2003, 2004, 2007, 2008, 2009, 2010, 2011, 2012
    44   Free Software Foundation, Inc.
    55
    66This file is part of GCC.
     
    163163   %{YP,*} \
    164164   %{R*} \
    165165   %{compat-bsd: \
    166      %{!YP,*:%{p|pg:-Y P,%R/usr/ucblib:%R/usr/ccs/lib/libp:%R/usr/lib/libp:%R/usr/ccs/lib:%R/usr/lib} \
    167              %{!p:%{!pg:-Y P,%R/usr/ucblib:%R/usr/ccs/lib:%R/usr/lib}}} \
     166     %{!YP,*:%{p|pg:-Y P,%R/usr/ucblib:%R/usr/ccs/lib/libp:%R/usr/lib/libp:%R/usr/ccs/lib:%R/usr/lib:%R/lib} \
     167             %{!p:%{!pg:-Y P,%R/usr/ucblib:%R/usr/ccs/lib:%R/usr/lib:%R/lib}}} \
    168168             -R %R/usr/ucblib} \
    169169   %{!compat-bsd: \
    170      %{!YP,*:%{p|pg:-Y P,%R/usr/ccs/lib/libp:%R/usr/lib/libp:%R/usr/ccs/lib:%R/usr/lib} \
    171              %{!p:%{!pg:-Y P,%R/usr/ccs/lib:%R/usr/lib}}}}"
     170     %{!YP,*:%{p|pg:-Y P,%R/usr/ccs/lib/libp:%R/usr/lib/libp:%R/usr/ccs/lib:%R/usr/lib:%R/lib} \
     171             %{!p:%{!pg:-Y P,%R/usr/ccs/lib:%R/usr/lib:%R/lib}}}}"
    172172
    173173#undef LINK_ARCH32_SPEC
    174174#define LINK_ARCH32_SPEC LINK_ARCH32_SPEC_BASE
  • gcc/config/sparc/sol2-bi.h

    diff -Naur gcc-4.6.3.orig/gcc/config/sparc/sol2-bi.h gcc-4.6.3/gcc/config/sparc/sol2-bi.h
    old new  
    11/* Definitions of target machine for GCC, for bi-arch SPARC
    22   running Solaris 2 using the system assembler and linker.
    3    Copyright (C) 2002, 2003, 2004, 2006, 2007, 2009, 2010, 2011
     3   Copyright (C) 2002, 2003, 2004, 2006, 2007, 2009, 2010, 2011, 2012
    44   Free Software Foundation, Inc.
    55
    66This file is part of GCC.
     
    191191   %{YP,*} \
    192192   %{R*} \
    193193   %{compat-bsd: \
    194      %{!YP,*:%{p|pg:-Y P,%R/usr/ucblib/sparcv9:%R/usr/lib/libp/sparcv9:%R/usr/lib/sparcv9} \
    195        %{!p:%{!pg:-Y P,%R/usr/ucblib/sparcv9:%R/usr/lib/sparcv9}}} \
     194     %{!YP,*:%{p|pg:-Y P,%R/usr/ucblib/sparcv9:%R/usr/lib/libp/sparcv9:%R/usr/lib/sparcv9:%R/lib/sparcv9} \
     195       %{!p:%{!pg:-Y P,%R/usr/ucblib/sparcv9:%R/usr/lib/sparcv9:%R/lib/sparcv9}}} \
    196196     -R %R/usr/ucblib/sparcv9} \
    197197   %{!compat-bsd: \
    198      %{!YP,*:%{p|pg:-Y P,%R/usr/lib/libp/sparcv9:%R/usr/lib/sparcv9} \
    199        %{!p:%{!pg:-Y P,%R/usr/lib/sparcv9}}}}"
     198     %{!YP,*:%{p|pg:-Y P,%R/usr/lib/libp/sparcv9:%R/usr/lib/sparcv9:%R/lib/sparcv9} \
     199       %{!p:%{!pg:-Y P,%R/usr/lib/sparcv9:%R/lib/sparcv9}}}}"
    200200
    201201#define LINK_ARCH64_SPEC LINK_ARCH64_SPEC_BASE
    202202
  • gcc/config/sparc/sparc.c

    diff -Naur gcc-4.6.3.orig/gcc/config/sparc/sparc.c gcc-4.6.3/gcc/config/sparc/sparc.c
    old new  
    36583658{
    36593659  x = delegitimize_mem_from_attrs (x);
    36603660
    3661   if (GET_CODE (x) == LO_SUM
    3662       && GET_CODE (XEXP (x, 1)) == UNSPEC
    3663       && XINT (XEXP (x, 1), 1) == UNSPEC_TLSLE)
    3664     {
    3665       x = XVECEXP (XEXP (x, 1), 0, 0);
    3666       gcc_assert (GET_CODE (x) == SYMBOL_REF);
    3667     }
     3661  if (GET_CODE (x) == LO_SUM && GET_CODE (XEXP (x, 1)) == UNSPEC)
     3662    switch (XINT (XEXP (x, 1), 1))
     3663      {
     3664      case UNSPEC_MOVE_PIC:
     3665      case UNSPEC_TLSLE:
     3666        x = XVECEXP (XEXP (x, 1), 0, 0);
     3667        gcc_assert (GET_CODE (x) == SYMBOL_REF);
     3668        break;
     3669      default:
     3670        break;
     3671      }
    36683672
    36693673  return x;
    36703674}
     
    96349638                                                       void_list_node));
    96359639          DECL_RESULT (decl) = build_decl (BUILTINS_LOCATION, RESULT_DECL,
    96369640                                           NULL_TREE, void_type_node);
     9641          TREE_PUBLIC (decl) = 1;
    96379642          TREE_STATIC (decl) = 1;
    96389643          make_decl_one_only (decl, DECL_ASSEMBLER_NAME (decl));
    96399644          DECL_VISIBILITY (decl) = VISIBILITY_HIDDEN;
  • gcc/config/spu/spu.c

    diff -Naur gcc-4.6.3.orig/gcc/config/spu/spu.c gcc-4.6.3/gcc/config/spu/spu.c
    old new  
    67946794      case scalar_to_vec:
    67956795      case cond_branch_not_taken:
    67966796      case vec_perm:
     6797      case vec_promote_demote:
    67976798        return 1;
    67986799
    67996800      case scalar_store:
  • gcc/config/xtensa/linux-unwind.h

    diff -Naur gcc-4.6.3.orig/gcc/config/xtensa/linux-unwind.h gcc-4.6.3/gcc/config/xtensa/linux-unwind.h
    old new  
    11/* DWARF2 EH unwinding support for Xtensa.
    2    Copyright (C) 2008, 2009 Free Software Foundation, Inc.
     2   Copyright (C) 2008, 2009, 2012 Free Software Foundation, Inc.
    33
    44This file is part of GCC.
    55
     
    6262  struct sigcontext *sc;
    6363
    6464  struct rt_sigframe {
    65     struct siginfo info;
     65    siginfo_t info;
    6666    struct ucontext uc;
    6767  } *rt_;
    6868
  • gcc/config.gcc

    diff -Naur gcc-4.6.3.orig/gcc/config.gcc gcc-4.6.3/gcc/config.gcc
    old new  
    817817arm*-*-linux*)                  # ARM GNU/Linux with ELF
    818818        tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
    819819        case $target in
    820         arm*b-*)
     820        arm*b-*-linux*)
    821821                tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
    822822                ;;
    823823        esac
     
    925925        extra_objs="avr-devices.o"
    926926        ;;
    927927avr-*-*)
    928         tm_file="avr/avr.h dbxelf.h newlib-stdint.h"
     928        tm_file="avr/avr.h dbxelf.h avr/avr-stdint.h"
    929929        use_gcc_stdint=wrap
    930930        extra_gcc_objs="driver-avr.o avr-devices.o"
    931931        extra_objs="avr-devices.o"
  • gcc/configure

    diff -Naur gcc-4.6.3.orig/gcc/configure gcc-4.6.3/gcc/configure
    old new  
    48424842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_cc_gcc_supports_ada" >&5
    48434843$as_echo "$acx_cv_cc_gcc_supports_ada" >&6; }
    48444844
    4845 if test x$GNATBIND != xno && test x$GNATMAKE != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
     4845if test "x$GNATBIND" != xno && test "x$GNATMAKE" != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
    48464846  have_gnat=yes
    48474847else
    48484848  have_gnat=no
  • gcc/convert.c

    diff -Naur gcc-4.6.3.orig/gcc/convert.c gcc-4.6.3/gcc/convert.c
    old new  
    4444  if (TREE_TYPE (expr) == type)
    4545    return expr;
    4646
    47   /* Propagate overflow to the NULL pointer.  */
    48   if (integer_zerop (expr))
    49     return force_fit_type_double (type, double_int_zero, 0,
    50                                   TREE_OVERFLOW (expr));
    51 
    5247  switch (TREE_CODE (TREE_TYPE (expr)))
    5348    {
    5449    case POINTER_TYPE:
  • gcc/cp/decl.c

    diff -Naur gcc-4.6.3.orig/gcc/cp/decl.c gcc-4.6.3/gcc/cp/decl.c
    old new  
    36363636    TYPE_SIZE_UNIT (nullptr_type_node) = size_int (GET_MODE_SIZE (ptr_mode));
    36373637    TYPE_UNSIGNED (nullptr_type_node) = 1;
    36383638    TYPE_PRECISION (nullptr_type_node) = GET_MODE_BITSIZE (ptr_mode);
    3639     SET_TYPE_MODE (nullptr_type_node, Pmode);
     3639    SET_TYPE_MODE (nullptr_type_node, ptr_mode);
    36403640    record_builtin_type (RID_MAX, "decltype(nullptr)", nullptr_type_node);
    36413641    nullptr_node = build_int_cst (nullptr_type_node, 0);
    36423642  }
  • gcc/cp/pt.c

    diff -Naur gcc-4.6.3.orig/gcc/cp/pt.c gcc-4.6.3/gcc/cp/pt.c
    old new  
    1778517785            }
    1778617786          else
    1778717787            {
     17788              tree tmp;
    1778817789              decl = tsubst_copy (TREE_PURPOSE (t), argvec,
    1778917790                                  tf_warning_or_error, NULL_TREE);
    1779017791
     
    1779317794                in_base_initializer = 1;
    1779417795
    1779517796              init = TREE_VALUE (t);
     17797              tmp = init;
    1779617798              if (init != void_type_node)
    1779717799                init = tsubst_expr (init, argvec,
    1779817800                                    tf_warning_or_error, NULL_TREE,
    1779917801                                    /*integral_constant_expression_p=*/false);
     17802              if (init == NULL_TREE && tmp != NULL_TREE)
     17803                /* If we had an initializer but it instantiated to nothing,
     17804                   value-initialize the object.  This will only occur when
     17805                   the initializer was a pack expansion where the parameter
     17806                   packs used in that expansion were of length zero.  */
     17807                init = void_type_node;
    1780017808              in_base_initializer = 0;
    1780117809            }
    1780217810
  • gcc/cp/semantics.c

    diff -Naur gcc-4.6.3.orig/gcc/cp/semantics.c gcc-4.6.3/gcc/cp/semantics.c
    old new  
    67636763
    67646764  STRIP_NOPS (sub);
    67656765  subtype = TREE_TYPE (sub);
    6766   gcc_assert (POINTER_TYPE_P (subtype));
    67676766
    67686767  if (TREE_CODE (sub) == ADDR_EXPR)
    67696768    {
  • gcc/cp/typeck.c

    diff -Naur gcc-4.6.3.orig/gcc/cp/typeck.c gcc-4.6.3/gcc/cp/typeck.c
    old new  
    18221822  if (error_operand_p (exp))
    18231823    return error_mark_node;
    18241824
    1825   if (NULLPTR_TYPE_P (type))
     1825  if (NULLPTR_TYPE_P (type) && !TREE_SIDE_EFFECTS (exp))
    18261826    return nullptr_node;
    18271827
    18281828  /* build_c_cast puts on a NOP_EXPR to make the result not an lvalue.
  • gcc/df-problems.c

    diff -Naur gcc-4.6.3.orig/gcc/df-problems.c gcc-4.6.3/gcc/df-problems.c
    old new  
    39563956  df_simulate_initialize_backwards (merge_bb, test_use);
    39573957  for (insn = across_to; ; insn = next)
    39583958    {
     3959      if (CALL_P (insn))
     3960        {
     3961          if (RTL_CONST_OR_PURE_CALL_P (insn))
     3962            /* Pure functions can read from memory.  Const functions can
     3963               read from arguments that the ABI has forced onto the stack.
     3964               Neither sort of read can be volatile.  */
     3965            memrefs_in_across |= MEMREF_NORMAL;
     3966          else
     3967            {
     3968              memrefs_in_across |= MEMREF_VOLATILE;
     3969              mem_sets_in_across |= MEMREF_VOLATILE;
     3970            }
     3971        }
    39593972      if (NONDEBUG_INSN_P (insn))
    39603973        {
    39613974          df_simulate_find_defs (insn, test_set);
  • gcc/doc/install.texi

    diff -Naur gcc-4.6.3.orig/gcc/doc/install.texi gcc-4.6.3/gcc/doc/install.texi
    old new  
    12081208
    12091209@item --with-llsc
    12101210On MIPS targets, make @option{-mllsc} the default when no
    1211 @option{-mno-lsc} option is passed.  This is the default for
     1211@option{-mno-llsc} option is passed.  This is the default for
    12121212Linux-based targets, as the kernel will emulate them if the ISA does
    12131213not provide them.
    12141214
  • gcc/doc/invoke.texi

    diff -Naur gcc-4.6.3.orig/gcc/doc/invoke.texi gcc-4.6.3/gcc/doc/invoke.texi
    old new  
    853853-m5-compact  -m5-compact-nofpu @gol
    854854-mb  -ml  -mdalign  -mrelax @gol
    855855-mbigtable -mfmovd -mhitachi -mrenesas -mno-renesas -mnomacsave @gol
    856 -mieee  -mbitops  -misize  -minline-ic_invalidate -mpadstruct  -mspace @gol
    857 -mprefergot  -musermode -multcost=@var{number} -mdiv=@var{strategy} @gol
     856-mieee -mno-ieee -mbitops  -misize  -minline-ic_invalidate -mpadstruct @gol
     857-mspace -mprefergot  -musermode -multcost=@var{number} -mdiv=@var{strategy} @gol
    858858-mdivsi3_libfunc=@var{name} -mfixed-range=@var{register-range} @gol
    859859-madjust-unroll -mindexed-addressing -mgettrcost=@var{number} -mpt-fixed @gol
    860860-maccumulate-outgoing-args -minvalid-symbols}
     
    1693816938@option{-mhitachi} is given.
    1693916939
    1694016940@item -mieee
     16941@item -mno-ieee
    1694116942@opindex mieee
    16942 Increase IEEE-compliance of floating-point code.
    16943 At the moment, this is equivalent to @option{-fno-finite-math-only}.
    16944 When generating 16 bit SH opcodes, getting IEEE-conforming results for
    16945 comparisons of NANs / infinities incurs extra overhead in every
    16946 floating point comparison, therefore the default is set to
    16947 @option{-ffinite-math-only}.
     16943@opindex mnoieee
     16944Control the IEEE compliance of floating-point comparisons, which affects the
     16945handling of cases where the result of a comparison is unordered.  By default
     16946@option{-mieee} is implicitly enabled.  If @option{-ffinite-math-only} is
     16947enabled @option{-mno-ieee} is implicitly set, which results in faster
     16948floating-point greater-equal and less-equal comparisons.  The implcit settings
     16949can be overridden by specifying either @option{-mieee} or @option{-mno-ieee}.
    1694816950
    1694916951@item -minline-ic_invalidate
    1695016952@opindex minline-ic_invalidate
  • gcc/doc/tm.texi

    diff -Naur gcc-4.6.3.orig/gcc/doc/tm.texi gcc-4.6.3/gcc/doc/tm.texi
    old new  
    11181118If the value of this macro has a type, it should be an unsigned type.
    11191119@end defmac
    11201120
     1121@deftypefn {Target Hook} HOST_WIDE_INT TARGET_VECTOR_ALIGNMENT (const_tree @var{type})
     1122This hook can be used to define the alignment for a vector of type
     1123@var{type}, in order to comply with a platform ABI.  The default is to
     1124require natural alignment for vector types.  The alignment returned by
     1125this hook must be a power-of-two multiple of the default alignment of
     1126the vector element type.
     1127@end deftypefn
     1128
    11211129@defmac STACK_SLOT_ALIGNMENT (@var{type}, @var{mode}, @var{basic-align})
    11221130If defined, a C expression to compute the alignment for stack slot.
    11231131@var{type} is the data type, @var{mode} is the widest mode available,
  • gcc/doc/tm.texi.in

    diff -Naur gcc-4.6.3.orig/gcc/doc/tm.texi.in gcc-4.6.3/gcc/doc/tm.texi.in
    old new  
    11081108If the value of this macro has a type, it should be an unsigned type.
    11091109@end defmac
    11101110
     1111@hook TARGET_VECTOR_ALIGNMENT
     1112
    11111113@defmac STACK_SLOT_ALIGNMENT (@var{type}, @var{mode}, @var{basic-align})
    11121114If defined, a C expression to compute the alignment for stack slot.
    11131115@var{type} is the data type, @var{mode} is the widest mode available,
  • gcc/expr.c

    diff -Naur gcc-4.6.3.orig/gcc/expr.c gcc-4.6.3/gcc/expr.c
    old new  
    59715971                || bitpos % GET_MODE_ALIGNMENT (mode))
    59725972               && SLOW_UNALIGNED_ACCESS (mode, MEM_ALIGN (target)))
    59735973              || (bitpos % BITS_PER_UNIT != 0)))
     5974      || (bitsize >= 0 && mode != BLKmode
     5975          && GET_MODE_BITSIZE (mode) > bitsize)
    59745976      /* If the RHS and field are a constant size and the size of the
    59755977         RHS isn't the same size as the bitfield, we must use bitfield
    59765978         operations.  */
     
    91829184        orig_op0 = op0
    91839185          = expand_expr (tem,
    91849186                         (TREE_CODE (TREE_TYPE (tem)) == UNION_TYPE
     9187                          && COMPLETE_TYPE_P (TREE_TYPE (tem))
    91859188                          && (TREE_CODE (TYPE_SIZE (TREE_TYPE (tem)))
    91869189                              != INTEGER_CST)
    91879190                          && modifier != EXPAND_STACK_PARM
  • gcc/fortran/decl.c

    diff -Naur gcc-4.6.3.orig/gcc/fortran/decl.c gcc-4.6.3/gcc/fortran/decl.c
    old new  
    36233623        }
    36243624    }
    36253625
    3626   /* Module variables implicitly have the SAVE attribute.  */
    3627   if (gfc_current_state () == COMP_MODULE && !current_attr.save)
     3626  /* Since Fortran 2008 module variables implicitly have the SAVE attribute.  */
     3627  if (gfc_current_state () == COMP_MODULE && !current_attr.save
     3628      && (gfc_option.allow_std & GFC_STD_F2008) != 0)
    36283629    current_attr.save = SAVE_IMPLICIT;
    36293630
    36303631  colon_seen = 1;
  • gcc/fortran/expr.c

    diff -Naur gcc-4.6.3.orig/gcc/fortran/expr.c gcc-4.6.3/gcc/fortran/expr.c
    old new  
    44744474      if (ptr_component && ref->type == REF_COMPONENT)
    44754475        check_intentin = false;
    44764476      if (ref->type == REF_COMPONENT && ref->u.c.component->attr.pointer)
    4477         ptr_component = true;
     4477        {
     4478          ptr_component = true;
     4479          if (!pointer)
     4480            check_intentin = false;
     4481        }
    44784482    }
    44794483  if (check_intentin && sym->attr.intent == INTENT_IN)
    44804484    {
  • gcc/fortran/resolve.c

    diff -Naur gcc-4.6.3.orig/gcc/fortran/resolve.c gcc-4.6.3/gcc/fortran/resolve.c
    old new  
    14521452
    14531453  if (sym->intmod_sym_id)
    14541454    isym = gfc_intrinsic_function_by_id ((gfc_isym_id) sym->intmod_sym_id);
    1455   else
     1455  else if (!sym->attr.subroutine)
    14561456    isym = gfc_find_function (sym->name);
    14571457
    14581458  if (isym)
     
    97009700      || sym->attr.data
    97019701      || sym->module
    97029702      || sym->attr.cray_pointee
    9703       || sym->attr.cray_pointer)
     9703      || sym->attr.cray_pointer
     9704      || sym->assoc)
    97049705    return NULL;
    97059706
    97069707  /* Now we'll try to build an initializer expression.  */
  • gcc/fortran/trans-array.c

    diff -Naur gcc-4.6.3.orig/gcc/fortran/trans-array.c gcc-4.6.3/gcc/fortran/trans-array.c
    old new  
    20562056  gfc_se se;
    20572057  int n;
    20582058
     2059  /* Don't evaluate the arguments for realloc_lhs_loop_for_fcn_call; otherwise,
     2060     arguments could get evaluated multiple times.  */
     2061  if (ss->is_alloc_lhs)
     2062    return;
     2063
    20592064  /* TODO: This can generate bad code if there are ordering dependencies,
    20602065     e.g., a callee allocated function and an unknown size constructor.  */
    20612066  gcc_assert (ss != NULL);
     
    75487553  scalar = 1;
    75497554  for (; arg; arg = arg->next)
    75507555    {
    7551       if (!arg->expr)
     7556      if (!arg->expr || arg->expr->expr_type == EXPR_NULL)
    75527557        continue;
    75537558
    75547559      newss = gfc_walk_subexpr (head, arg->expr);
  • gcc/fortran/trans-types.c

    diff -Naur gcc-4.6.3.orig/gcc/fortran/trans-types.c gcc-4.6.3/gcc/fortran/trans-types.c
    old new  
    25192519              || sym->attr.flavor == FL_PROGRAM);
    25202520
    25212521  if (sym->backend_decl)
    2522     return TREE_TYPE (sym->backend_decl);
     2522    {
     2523      if (sym->attr.proc_pointer)
     2524        return TREE_TYPE (TREE_TYPE (sym->backend_decl));
     2525      return TREE_TYPE (sym->backend_decl);
     2526    }
    25232527
    25242528  alternate_return = 0;
    25252529  typelist = NULL_TREE;
  • gcc/fortran/trans.c

    diff -Naur gcc-4.6.3.orig/gcc/fortran/trans.c gcc-4.6.3/gcc/fortran/trans.c
    old new  
    10051005  if (!res && size != 0)
    10061006    _gfortran_os_error ("Allocation would exceed memory limit");
    10071007
    1008   if (size == 0)
    1009     return NULL;
    1010 
    10111008  return res;
    10121009}  */
    10131010tree
    10141011gfc_call_realloc (stmtblock_t * block, tree mem, tree size)
    10151012{
    1016   tree msg, res, nonzero, zero, null_result, tmp;
     1013  tree msg, res, nonzero, null_result, tmp;
    10171014  tree type = TREE_TYPE (mem);
    10181015
    10191016  size = gfc_evaluate_now (size, block);
     
    10441041                         build_empty_stmt (input_location));
    10451042  gfc_add_expr_to_block (block, tmp);
    10461043
    1047   /* if (size == 0) then the result is NULL.  */
    1048   tmp = fold_build2_loc (input_location, MODIFY_EXPR, type, res,
    1049                          build_int_cst (type, 0));
    1050   zero = fold_build1_loc (input_location, TRUTH_NOT_EXPR, boolean_type_node,
    1051                           nonzero);
    1052   tmp = fold_build3_loc (input_location, COND_EXPR, void_type_node, zero, tmp,
    1053                          build_empty_stmt (input_location));
    1054   gfc_add_expr_to_block (block, tmp);
    1055 
    10561044  return res;
    10571045}
    10581046
  • gcc/gcov-iov.c

    diff -Naur gcc-4.6.3.orig/gcc/gcov-iov.c gcc-4.6.3/gcc/gcov-iov.c
    old new  
    1919along with GCC; see the file COPYING3.  If not see
    2020<http://www.gnu.org/licenses/>.  */
    2121
    22 #include <stdio.h>
    23 #include <stdlib.h>
     22#include "bconfig.h"
     23#include "system.h"
    2424
    2525/* Command line arguments are the base GCC version and the development
    2626   phase (the latter may be an empty string).  */
     
    4848  if (*ptr == '.')
    4949    minor = strtoul (ptr + 1, 0, 10);
    5050
     51  /* For releases the development phase is an empty string, for
     52     prerelease versions on a release branch it is "prerelease".
     53     Consider both equal as patch-level releases do not change
     54     the GCOV version either.
     55     On the trunk the development phase is "experimental".  */
    5156  phase = argv[2][0];
    52   if (phase == '\0')
     57  if (phase == '\0'
     58      || strcmp (argv[2], "prerelease") == 0)
    5359    phase = '*';
    5460
    5561  v[0] = (major < 10 ? '0' : 'A' - 10) + major;
  • gcc/gimple.c

    diff -Naur gcc-4.6.3.orig/gcc/gimple.c gcc-4.6.3/gcc/gimple.c
    old new  
    22752275bool
    22762276gimple_has_side_effects (const_gimple s)
    22772277{
    2278   unsigned i;
    2279 
    22802278  if (is_gimple_debug (s))
    22812279    return false;
    22822280
     
    22922290
    22932291  if (is_gimple_call (s))
    22942292    {
    2295       unsigned nargs = gimple_call_num_args (s);
     2293      int flags = gimple_call_flags (s);
    22962294
    2297       if (!(gimple_call_flags (s) & (ECF_CONST | ECF_PURE)))
    2298         return true;
    2299       else if (gimple_call_flags (s) & ECF_LOOPING_CONST_OR_PURE)
    2300         /* An infinite loop is considered a side effect.  */
     2295      /* An infinite loop is considered a side effect.  */
     2296      if (!(flags & (ECF_CONST | ECF_PURE))
     2297          || (flags & ECF_LOOPING_CONST_OR_PURE))
    23012298        return true;
    23022299
    2303       if (gimple_call_lhs (s)
    2304           && TREE_SIDE_EFFECTS (gimple_call_lhs (s)))
    2305         {
    2306           gcc_checking_assert (gimple_has_volatile_ops (s));
    2307           return true;
    2308         }
    2309 
    2310       if (TREE_SIDE_EFFECTS (gimple_call_fn (s)))
    2311         return true;
    2312 
    2313       for (i = 0; i < nargs; i++)
    2314         if (TREE_SIDE_EFFECTS (gimple_call_arg (s, i)))
    2315           {
    2316             gcc_checking_assert (gimple_has_volatile_ops (s));
    2317             return true;
    2318           }
    2319 
    23202300      return false;
    23212301    }
    2322   else
    2323     {
    2324       for (i = 0; i < gimple_num_ops (s); i++)
    2325         {
    2326           tree op = gimple_op (s, i);
    2327           if (op && TREE_SIDE_EFFECTS (op))
    2328             {
    2329               gcc_checking_assert (gimple_has_volatile_ops (s));
    2330               return true;
    2331             }
    2332         }
    2333     }
    23342302
    23352303  return false;
    23362304}
  • gcc/gthr-posix.h

    diff -Naur gcc-4.6.3.orig/gcc/gthr-posix.h gcc-4.6.3/gcc/gthr-posix.h
    old new  
    239239static inline int
    240240__gthread_active_p (void)
    241241{
    242   static void *const __gthread_active_ptr
    243     = __extension__ (void *) &__gthrw_(
    244242/* Android's C library does not provide pthread_cancel, check for
    245243   `pthread_create' instead.  */
    246244#ifndef __BIONIC__
    247                                        pthread_cancel
     245  static void *const __gthread_active_ptr
     246    = __extension__ (void *) &__gthrw_(pthread_cancel);
    248247#else
    249                                        pthread_create
     248  static void *const __gthread_active_ptr
     249    = __extension__ (void *) &__gthrw_(pthread_create);
    250250#endif
    251                                        );
    252251  return __gthread_active_ptr != 0;
    253252}
    254253
  • gcc/ipa-prop.c

    diff -Naur gcc-4.6.3.orig/gcc/ipa-prop.c gcc-4.6.3/gcc/ipa-prop.c
    old new  
    704704      || is_global_var (base))
    705705    return;
    706706
    707   if (detect_type_change (op, base, call, jfunc, offset))
    708     return;
    709 
    710707  binfo = TYPE_BINFO (TREE_TYPE (base));
    711   if (!binfo)
     708  if (!binfo
     709      || detect_type_change (op, base, call, jfunc, offset))
    712710    return;
     711
    713712  binfo = get_binfo_at_offset (binfo, offset, TREE_TYPE (op));
    714713  if (binfo)
    715714    {
  • gcc/lto/lto.c

    diff -Naur gcc-4.6.3.orig/gcc/lto/lto.c gcc-4.6.3/gcc/lto/lto.c
    old new  
    893893
    894894  for (node = cgraph_nodes; node; node = node->next)
    895895    {
    896       if (!partition_cgraph_node_p (node))
     896      if (!partition_cgraph_node_p (node)
     897          || node->aux)
    897898        continue;
    898899
    899900      file_data = node->local.lto_file_data;
     
    923924          npartitions++;
    924925        }
    925926
    926       if (!node->aux)
    927         add_cgraph_node_to_partition (partition, node);
     927      add_cgraph_node_to_partition (partition, node);
    928928    }
    929929
    930930  for (vnode = varpool_nodes; vnode; vnode = vnode->next)
    931931    {
    932       if (!partition_varpool_node_p (vnode))
     932      if (!partition_varpool_node_p (vnode)
     933          || vnode->aux)
    933934        continue;
    934935      file_data = vnode->lto_file_data;
    935936      slot = pointer_map_contains (pmap, file_data);
     
    943944          npartitions++;
    944945        }
    945946
    946       if (!vnode->aux)
    947         add_varpool_node_to_partition (partition, vnode);
     947      add_varpool_node_to_partition (partition, vnode);
    948948    }
    949949  for (node = cgraph_nodes; node; node = node->next)
    950950    node->aux = NULL;
     
    10501050
    10511051  for (i = 0; i < n_nodes; i++)
    10521052    {
    1053       if (!order[i]->aux)
    1054         add_cgraph_node_to_partition (partition, order[i]);
     1053      if (order[i]->aux)
     1054        continue;
     1055      add_cgraph_node_to_partition (partition, order[i]);
    10551056      total_size -= order[i]->global.size;
    10561057
    10571058      /* Once we added a new node to the partition, we also want to add
     
    12311232            }
    12321233          i = best_i;
    12331234          /* When we are finished, avoid creating empty partition.  */
     1235          while (i < n_nodes - 1 && order[i + 1]->aux)
     1236            i++;
    12341237          if (i == n_nodes - 1)
    12351238            break;
    12361239          partition = new_partition ("");
  • gcc/predict.c

    diff -Naur gcc-4.6.3.orig/gcc/predict.c gcc-4.6.3/gcc/predict.c
    old new  
    17901790static void
    17911791predict_paths_for_bb (basic_block cur, basic_block bb,
    17921792                      enum br_predictor pred,
    1793                       enum prediction taken)
     1793                      enum prediction taken,
     1794                      bitmap visited)
    17941795{
    17951796  edge e;
    17961797  edge_iterator ei;
     
    18111812        continue;
    18121813      gcc_assert (bb == cur || dominated_by_p (CDI_POST_DOMINATORS, cur, bb));
    18131814
    1814       /* See if there is how many edge from e->src that is not abnormal
     1815      /* See if there is an edge from e->src that is not abnormal
    18151816         and does not lead to BB.  */
    18161817      FOR_EACH_EDGE (e2, ei2, e->src->succs)
    18171818        if (e2 != e
     
    18241825
    18251826      /* If there is non-abnormal path leaving e->src, predict edge
    18261827         using predictor.  Otherwise we need to look for paths
    1827          leading to e->src.  */
     1828         leading to e->src.
     1829
     1830         The second may lead to infinite loop in the case we are predicitng
     1831         regions that are only reachable by abnormal edges.  We simply
     1832         prevent visiting given BB twice.  */
    18281833      if (found)
    18291834        predict_edge_def (e, pred, taken);
    1830       else
    1831         predict_paths_for_bb (e->src, e->src, pred, taken);
     1835      else if (bitmap_set_bit (visited, e->src->index))
     1836        predict_paths_for_bb (e->src, e->src, pred, taken, visited);
    18321837    }
    18331838  for (son = first_dom_son (CDI_POST_DOMINATORS, cur);
    18341839       son;
    18351840       son = next_dom_son (CDI_POST_DOMINATORS, son))
    1836     predict_paths_for_bb (son, bb, pred, taken);
     1841    predict_paths_for_bb (son, bb, pred, taken, visited);
    18371842}
    18381843
    18391844/* Sets branch probabilities according to PREDiction and
     
    18431848predict_paths_leading_to (basic_block bb, enum br_predictor pred,
    18441849                          enum prediction taken)
    18451850{
    1846   predict_paths_for_bb (bb, bb, pred, taken);
     1851  bitmap visited = BITMAP_ALLOC (NULL);
     1852  predict_paths_for_bb (bb, bb, pred, taken, visited);
     1853  BITMAP_FREE (visited);
    18471854}
    18481855
    18491856/* Like predict_paths_leading_to but take edge instead of basic block.  */
     
    18661873        break;
    18671874      }
    18681875  if (!has_nonloop_edge)
    1869     predict_paths_for_bb (bb, bb, pred, taken);
     1876    {
     1877      bitmap visited = BITMAP_ALLOC (NULL);
     1878      predict_paths_for_bb (bb, bb, pred, taken, visited);
     1879      BITMAP_FREE (visited);
     1880    }
    18701881  else
    18711882    predict_edge_def (e, pred, taken);
    18721883}
  • gcc/stor-layout.c

    diff -Naur gcc-4.6.3.orig/gcc/stor-layout.c gcc-4.6.3/gcc/stor-layout.c
    old new  
    660660          /* See if we can use an ordinary integer mode for a bit-field.
    661661             Conditions are: a fixed size that is correct for another mode,
    662662             occupying a complete byte or bytes on proper boundary,
    663              and not volatile or not -fstrict-volatile-bitfields.  */
     663             and not -fstrict-volatile-bitfields.  If the latter is set,
     664             we unfortunately can't check TREE_THIS_VOLATILE, as a cast
     665             may make a volatile object later.  */
    664666          if (TYPE_SIZE (type) != 0
    665667              && TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST
    666668              && GET_MODE_CLASS (TYPE_MODE (type)) == MODE_INT
    667               && !(TREE_THIS_VOLATILE (decl)
    668                    && flag_strict_volatile_bitfields > 0))
     669              && flag_strict_volatile_bitfields <= 0)
    669670            {
    670671              enum machine_mode xmode
    671672                = mode_for_size_tree (DECL_SIZE (decl), MODE_INT, 1);
     
    19261927        TYPE_SIZE (type) = int_const_binop (MULT_EXPR, TYPE_SIZE (innertype),
    19271928                                            bitsize_int (nunits), 0);
    19281929
    1929         /* Always naturally align vectors.  This prevents ABI changes
    1930            depending on whether or not native vector modes are supported.  */
    1931         TYPE_ALIGN (type) = tree_low_cst (TYPE_SIZE (type), 0);
     1930        /* For vector types, we do not default to the mode's alignment.
     1931           Instead, query a target hook, defaulting to natural alignment.
     1932           This prevents ABI changes depending on whether or not native
     1933           vector modes are supported.  */
     1934        TYPE_ALIGN (type) = targetm.vector_alignment (type);
     1935
     1936        /* However, if the underlying mode requires a bigger alignment than
     1937           what the target hook provides, we cannot use the mode.  For now,
     1938           simply reject that case.  */
     1939        gcc_assert (TYPE_ALIGN (type)
     1940                    >= GET_MODE_ALIGNMENT (TYPE_MODE (type)));
    19321941        break;
    19331942      }
    19341943
  • gcc/target.def

    diff -Naur gcc-4.6.3.orig/gcc/target.def gcc-4.6.3/gcc/target.def
    old new  
    16111611 bool, (enum machine_mode mode),
    16121612 hook_bool_mode_false)
    16131613
     1614DEFHOOK
     1615(vector_alignment,
     1616 "This hook can be used to define the alignment for a vector of type\n\
     1617@var{type}, in order to comply with a platform ABI.  The default is to\n\
     1618require natural alignment for vector types.  The alignment returned by\n\
     1619this hook must be a power-of-two multiple of the default alignment of\n\
     1620the vector element type.",
     1621 HOST_WIDE_INT, (const_tree type),
     1622 default_vector_alignment)
     1623
    16141624/* Compute cost of moving data from a register of class FROM to one of
    16151625   TO, using MODE.  */
    16161626DEFHOOK
  • gcc/target.h

    diff -Naur gcc-4.6.3.orig/gcc/target.h gcc-4.6.3/gcc/target.h
    old new  
    128128  scalar_to_vec,
    129129  cond_branch_not_taken,
    130130  cond_branch_taken,
    131   vec_perm
     131  vec_perm,
     132  vec_promote_demote
    132133};
    133134
    134135/* Sets of optimization levels at which an option may be enabled by
  • gcc/targhooks.c

    diff -Naur gcc-4.6.3.orig/gcc/targhooks.c gcc-4.6.3/gcc/targhooks.c
    old new  
    529529      case scalar_to_vec:
    530530      case cond_branch_not_taken:
    531531      case vec_perm:
     532      case vec_promote_demote:
    532533        return 1;
    533534
    534535      case unaligned_load:
     
    978979   return id;
    979980}
    980981
     982/* Default to natural alignment for vector types.  */
     983HOST_WIDE_INT
     984default_vector_alignment (const_tree type)
     985{
     986  return tree_low_cst (TYPE_SIZE (type), 0);
     987}
     988
    981989bool
    982990default_builtin_vector_alignment_reachable (const_tree type, bool is_packed)
    983991{
  • gcc/targhooks.h

    diff -Naur gcc-4.6.3.orig/gcc/targhooks.h gcc-4.6.3/gcc/targhooks.h
    old new  
    8585
    8686extern tree default_builtin_reciprocal (unsigned int, bool, bool);
    8787
     88extern HOST_WIDE_INT default_vector_alignment (const_tree);
     89
    8890extern bool default_builtin_vector_alignment_reachable (const_tree, bool);
    8991extern bool
    9092default_builtin_support_vector_misalignment (enum machine_mode mode,
  • gcc/testsuite/c-c++-common/abi-bf.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/c-c++-common/abi-bf.c gcc-4.6.3/gcc/testsuite/c-c++-common/abi-bf.c
    old new  
     1/* { dg-warning "incompatible" } */
     2/* { dg-do compile } */
     3/* { dg-options "-fstrict-volatile-bitfields -fabi-version=1" } */
  • gcc/testsuite/g++.dg/cpp0x/nullptr28.C

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/g++.dg/cpp0x/nullptr28.C gcc-4.6.3/gcc/testsuite/g++.dg/cpp0x/nullptr28.C
    old new  
     1// { dg-do run }
     2// { dg-options "-std=c++0x -pedantic-errors" }
     3
     4typedef decltype(nullptr) nullptr_t;
     5
     6int i;
     7nullptr_t n;
     8const nullptr_t& f() { ++i; return n; }
     9
     10nullptr_t g() { return f(); }
     11
     12int main()
     13{
     14  g();
     15  if (i != 1)
     16    __builtin_abort ();
     17}
  • gcc/testsuite/g++.dg/cpp0x/variadic-value1.C

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/g++.dg/cpp0x/variadic-value1.C gcc-4.6.3/gcc/testsuite/g++.dg/cpp0x/variadic-value1.C
    old new  
     1// PR c++/52796
     2// { dg-options "-std=c++0x -pedantic-errors" }
     3
     4inline void *operator new(__SIZE_TYPE__ s, void *p) { return p; }
     5
     6struct A
     7{
     8  int i;
     9  template<class... Ts>
     10  A(Ts&&... ts): i(ts...) { }
     11};
     12
     13static union {
     14  unsigned char c[sizeof(A)];
     15  int i;
     16};
     17
     18int main()
     19{
     20  i = 0xdeadbeef;
     21  new(c) A;
     22  if (i != 0)
     23    __builtin_abort();
     24}
  • gcc/testsuite/gcc.c-torture/compile/limits-externdecl.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.c-torture/compile/limits-externdecl.c gcc-4.6.3/gcc/testsuite/gcc.c-torture/compile/limits-externdecl.c
    old new  
     1/* Inspired by the test case for PR middle-end/52640.  */
     2
     3typedef struct
     4{
     5    char *value;
     6} REFERENCE;
     7
     8/* Add a few "extern int Xxxxxx ();" declarations.  */
     9#undef DEF
     10#undef LIM1
     11#undef LIM2
     12#undef LIM3
     13#undef LIM4
     14#undef LIM5
     15#undef LIM6
     16#define DEF(x)  extern int x ()
     17#define LIM1(x) DEF(x##0); DEF(x##1); DEF(x##2); DEF(x##3); DEF(x##4); \
     18                DEF(x##5); DEF(x##6); DEF(x##7); DEF(x##8); DEF(x##9);
     19#define LIM2(x) LIM1(x##0) LIM1(x##1) LIM1(x##2) LIM1(x##3) LIM1(x##4) \
     20                LIM1(x##5) LIM1(x##6) LIM1(x##7) LIM1(x##8) LIM1(x##9)
     21#define LIM3(x) LIM2(x##0) LIM2(x##1) LIM2(x##2) LIM2(x##3) LIM2(x##4) \
     22                LIM2(x##5) LIM2(x##6) LIM2(x##7) LIM2(x##8) LIM2(x##9)
     23#define LIM4(x) LIM3(x##0) LIM3(x##1) LIM3(x##2) LIM3(x##3) LIM3(x##4) \
     24                LIM3(x##5) LIM3(x##6) LIM3(x##7) LIM3(x##8) LIM3(x##9)
     25#define LIM5(x) LIM4(x##0) LIM4(x##1) LIM4(x##2) LIM4(x##3) LIM4(x##4) \
     26                LIM4(x##5) LIM4(x##6) LIM4(x##7) LIM4(x##8) LIM4(x##9)
     27#define LIM6(x) LIM5(x##0) LIM5(x##1) LIM5(x##2) LIM5(x##3) LIM5(x##4) \
     28                LIM5(x##5) LIM5(x##6) LIM5(x##7) LIM5(x##8) LIM5(x##9)
     29LIM5 (X);
     30
     31/* Add references to them, or GCC will simply ignore the extern decls.  */
     32#undef DEF
     33#undef LIM1
     34#undef LIM2
     35#undef LIM3
     36#undef LIM4
     37#undef LIM5
     38#undef LIM6
     39#define DEF(x)  (char *) x
     40#define LIM1(x) DEF(x##0), DEF(x##1), DEF(x##2), DEF(x##3), DEF(x##4), \
     41                DEF(x##5), DEF(x##6), DEF(x##7), DEF(x##8), DEF(x##9),
     42#define LIM2(x) LIM1(x##0) LIM1(x##1) LIM1(x##2) LIM1(x##3) LIM1(x##4) \
     43                LIM1(x##5) LIM1(x##6) LIM1(x##7) LIM1(x##8) LIM1(x##9)
     44#define LIM3(x) LIM2(x##0) LIM2(x##1) LIM2(x##2) LIM2(x##3) LIM2(x##4) \
     45                LIM2(x##5) LIM2(x##6) LIM2(x##7) LIM2(x##8) LIM2(x##9)
     46#define LIM4(x) LIM3(x##0) LIM3(x##1) LIM3(x##2) LIM3(x##3) LIM3(x##4) \
     47                LIM3(x##5) LIM3(x##6) LIM3(x##7) LIM3(x##8) LIM3(x##9)
     48#define LIM5(x) LIM4(x##0) LIM4(x##1) LIM4(x##2) LIM4(x##3) LIM4(x##4) \
     49                LIM4(x##5) LIM4(x##6) LIM4(x##7) LIM4(x##8) LIM4(x##9)
     50#define LIM6(x) LIM5(x##0) LIM5(x##1) LIM5(x##2) LIM5(x##3) LIM5(x##4) \
     51                LIM5(x##5) LIM5(x##6) LIM5(x##7) LIM5(x##8) LIM5(x##9)
     52REFERENCE references[] = {
     53  LIM5 (X)
     54  0
     55};
     56
  • gcc/testsuite/gcc.c-torture/compile/pr53418-1.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.c-torture/compile/pr53418-1.c gcc-4.6.3/gcc/testsuite/gcc.c-torture/compile/pr53418-1.c
    old new  
     1void
     2f (void)
     3{
     4  int i = (0 ? 1 : 0U / 0);
     5}
  • gcc/testsuite/gcc.c-torture/compile/pr53418-2.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.c-torture/compile/pr53418-2.c gcc-4.6.3/gcc/testsuite/gcc.c-torture/compile/pr53418-2.c
    old new  
     1void
     2f (void)
     3{
     4  int i = (1 ? 0U / 0 : 1);
     5}
  • gcc/testsuite/gcc.c-torture/execute/20120427-1.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.c-torture/execute/20120427-1.c gcc-4.6.3/gcc/testsuite/gcc.c-torture/execute/20120427-1.c
    old new  
     1typedef struct sreal
     2{
     3  unsigned sig;         /* Significant.  */
     4  int exp;              /* Exponent.  */
     5} sreal;
     6
     7sreal_compare (sreal *a, sreal *b)
     8{
     9  if (a->exp > b->exp)
     10    return 1;
     11  if (a->exp < b->exp)
     12    return -1;
     13  if (a->sig > b->sig)
     14    return 1;
     15  return -(a->sig < b->sig);
     16}
     17
     18sreal a[] = {
     19   { 0, 0 },
     20   { 1, 0 },
     21   { 0, 1 },
     22   { 1, 1 }
     23};
     24
     25int main()
     26{
     27  int i, j;
     28  for (i = 0; i <= 3; i++) {
     29    for (j = 0; j < 3; j++) {
     30      if (i < j && sreal_compare(&a[i], &a[j]) != -1) abort();
     31      if (i == j && sreal_compare(&a[i], &a[j]) != 0) abort();
     32      if (i > j && sreal_compare(&a[i], &a[j]) != 1) abort();
     33    }
     34  }
     35  return 0;
     36}
  • gcc/testsuite/gcc.c-torture/execute/pr53084.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.c-torture/execute/pr53084.c gcc-4.6.3/gcc/testsuite/gcc.c-torture/execute/pr53084.c
    old new  
     1/* PR middle-end/53084 */
     2
     3extern void abort (void);
     4
     5__attribute__((noinline, noclone)) void
     6bar (const char *p)
     7{
     8  if (p[0] != 'o' || p[1] != 'o' || p[2])
     9    abort ();
     10}
     11
     12int
     13main ()
     14{
     15  static const char *const foo[] = {"foo" + 1};
     16  bar (foo[0]);
     17  return 0;
     18}
  • gcc/testsuite/gcc.dg/20020201-1.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.dg/20020201-1.c gcc-4.6.3/gcc/testsuite/gcc.dg/20020201-1.c
    old new  
    77/* { dg-options "-fprofile-arcs" } */
    88/* { dg-do run { target native } } */
    99
    10 extern void abort (void);
    11 extern void exit (int);
    12 
    13 int rand (void);
    14 void srand (unsigned int seed);
     10#include <stdlib.h>
    1511
    1612int globvar;
    1713
  • gcc/testsuite/gcc.dg/align-2.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.dg/align-2.c gcc-4.6.3/gcc/testsuite/gcc.dg/align-2.c
    old new  
    11/* PR 17962 */
    2 /* { dg-do compile } */
     2/* { dg-do compile { target vect_natural_alignment } } */
    33/* { dg-options "" } */
    44
    55typedef float v4 __attribute__((vector_size(sizeof(float)*4)));
  • gcc/testsuite/gcc.dg/pr52862.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.dg/pr52862.c gcc-4.6.3/gcc/testsuite/gcc.dg/pr52862.c
    old new  
     1/* { dg-do compile } */
     2/* { dg-options "-O" } */
     3
     4void ASMAtomicWritePtrVoid(const void *pv);
     5void rtThreadDestroy(void)
     6{
     7  void * const pvTypeChecked = ((void *)0);
     8  ASMAtomicWritePtrVoid((void *)(pvTypeChecked));
     9}
  • gcc/testsuite/gcc.dg/stack-usage-1.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.dg/stack-usage-1.c gcc-4.6.3/gcc/testsuite/gcc.dg/stack-usage-1.c
    old new  
    4141#  define SIZE 160 /* 256 -  96 bytes for register save area */
    4242#elif defined (__SPU__)
    4343#  define SIZE 224
     44#elif defined (__sh__)
     45#  define SIZE 252
    4446#else
    4547#  define SIZE 256
    4648#endif
  • gcc/testsuite/gcc.dg/torture/pr51071-2.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.dg/torture/pr51071-2.c gcc-4.6.3/gcc/testsuite/gcc.dg/torture/pr51071-2.c
    old new  
     1/* { dg-do compile } */
     2/* { dg-options "-fno-delete-null-pointer-checks" } */
     3
     4extern struct module __this_module;
     5static inline void
     6trace_module_get  (struct module *mod, unsigned long ip) { }
     7struct module;
     8static inline __attribute__((no_instrument_function))
     9int try_module_get(struct module *module)
     10{
     11  int ret = 1;
     12  if (module)
     13    {
     14      if (module_is_live(module))
     15        {
     16          __label__ __here;
     17          asm("");
     18          __here:
     19          trace_module_get(module, (unsigned long)&&__here);
     20        }
     21      else
     22        ret = 0;
     23    }
     24  return ret;
     25}
     26struct net_device;
     27struct net_device_ops {
     28    int (*ndo_open)(struct net_device *dev);
     29};
     30int t3e3_open(struct net_device *dev)
     31{
     32  int ret = hdlc_open(dev);
     33  if (ret)
     34    return ret;
     35  try_module_get((&__this_module));
     36  return 0;
     37}
     38const struct net_device_ops t3e3_ops = { .ndo_open = t3e3_open };
  • gcc/testsuite/gcc.dg/torture/pr51071.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.dg/torture/pr51071.c gcc-4.6.3/gcc/testsuite/gcc.dg/torture/pr51071.c
    old new  
     1/* { dg-do compile } */
     2
     3void foo (void);
     4void bar (void *);
     5extern int t;
     6
     7static void kmalloc_large (int size, int flags)
     8{
     9  (void) size;
     10  (void) flags;
     11  foo ();
     12  bar (({__here:&&__here;}));
     13}
     14
     15static void kmalloc (int size, int flags)
     16{
     17  if (size)
     18    {
     19      if ((unsigned long) size > 0x1000)
     20        kmalloc_large (size, flags);
     21
     22      if (flags)
     23        bar (({__here:&&__here;}));
     24    }
     25}
     26
     27void compress_file_range (int i, int j, int k)
     28{
     29  int nr_pages = ({j < k;});
     30
     31  if (i || t)
     32    kmalloc (0x1000UL * nr_pages, 0x40UL);
     33}
  • gcc/testsuite/gcc.dg/torture/pr52407.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.dg/torture/pr52407.c gcc-4.6.3/gcc/testsuite/gcc.dg/torture/pr52407.c
    old new  
     1/* { dg-do run } */
     2
     3extern void abort (void);
     4
     5typedef long long T;
     6typedef T vl_t __attribute__((vector_size(2 * sizeof (T))));
     7
     8vl_t    ul[4], vl[4] = { { 1, 2 }, { 3, 4 }, { 5, 6 }, { 7, 8 } };
     9
     10static void
     11mul_vl_l(vl_t *u, vl_t *v, T x, int m)
     12{
     13  vl_t   w;
     14  T *p = (T *)&w;
     15  p[0] = p[1] = x;
     16  while (m--)
     17    *u++ = *v++ * w;
     18}
     19
     20int
     21main(int argc, char *argv[])
     22{
     23  int i;
     24  T *pl;
     25
     26  pl = (T *) &ul;
     27  mul_vl_l(ul, vl, 2, 4);
     28  for (i = 0; i < 8; i++)
     29    if (pl[i] != 2 * (i + 1))
     30      abort ();
     31
     32  return 0;
     33}
  • gcc/testsuite/gcc.dg/torture/pr52693.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.dg/torture/pr52693.c gcc-4.6.3/gcc/testsuite/gcc.dg/torture/pr52693.c
    old new  
     1/* { dg-do run } */
     2
     3struct pair
     4{
     5  int x;
     6  int y;
     7};
     8
     9struct array
     10{
     11  struct pair elems[ 2 ];
     12  unsigned index;
     13};
     14
     15extern void abort ();
     16
     17void __attribute__ ((noinline,noclone))
     18test_results (int x1, int y1, int x2, int y2)
     19{
     20  if (x1 != x2 || y1 != y2)
     21    abort ();
     22}
     23
     24int
     25main (void)
     26{
     27  struct array arr = {{{1,2}, {3,4}}, 1};
     28  struct pair last = arr.elems[arr.index];
     29
     30  test_results ( last.x, last.y, arr.elems[1].x, arr.elems[1].y);
     31
     32  return 0;
     33}
  • gcc/testsuite/gcc.dg/torture/pr53790.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.dg/torture/pr53790.c gcc-4.6.3/gcc/testsuite/gcc.dg/torture/pr53790.c
    old new  
     1/* { dg-do compile } */
     2
     3typedef struct s {
     4    int value;
     5} s_t;
     6
     7static inline int
     8read(s_t const *var)
     9{
     10  return var->value;
     11}
     12
     13int main()
     14{
     15  extern union u extern_var;
     16  return read((s_t *)&extern_var);
     17}
  • gcc/testsuite/gcc.dg/torture/pr53908.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.dg/torture/pr53908.c gcc-4.6.3/gcc/testsuite/gcc.dg/torture/pr53908.c
    old new  
     1/* { dg-do run } */
     2/* SEGV at comment below.  */
     3typedef unsigned int size_t;
     4typedef enum har {
     5  he_fatal = (-199),
     6  he_not_initialized,
     7  he_bad_input,
     8  he_memory_too_small,
     9  he_bad_action,
     10  he_duplicate,
     11  he_bad_nonce,
     12  he_stale_nonce,
     13  he_bad_credentials,
     14  he_bad_user,
     15  he_no_such_user,
     16  he_bad_passwd,
     17  he_unknown_auth_scheme,
     18  he_not_found,
     19  he_failed_digest_file_check,
     20  he_failed_digest_file_save,
     21  he_process_not_privileged,
     22  he_other,
     23  he_end_of_range,
     24  ha_no_error = 0,
     25  ha_no_value = 1
     26} har;
     27typedef enum realm_type
     28{
     29  axis_realm = 0,
     30  ws_realm
     31} realm_type;
     32
     33__attribute__((__noclone__, __noinline__))
     34har has_www_auth(char *, size_t, realm_type, har);
     35
     36__attribute__((__noclone__, __noinline__))
     37har has_auth_user(const char *, const char *, realm_type, char *, size_t);
     38
     39__attribute__((__noclone__, __noinline__))
     40char *ha_get_string_value(void);
     41
     42typedef struct
     43{
     44  unsigned int track_id;
     45  char* user;
     46  char* realm;
     47  char* authent;
     48  int internal_realm;
     49} request;
     50enum user_response {
     51  file_not_found_user_response = -3,
     52  access_denied_user_response = -2,
     53  no_user_response = -1,
     54  ok_user_response = 0
     55};
     56struct realm_group {
     57  char *name;
     58  int id;
     59  struct realm_group *next;
     60};
     61struct realm {
     62  char *name;
     63  char *space;
     64  struct realm_group *groups;
     65  struct realm *next;
     66};
     67struct user_info {
     68  char *name;
     69  int no_groups;
     70  int groups[128];
     71  struct user_info *next;
     72};
     73static struct user_info *find_user(const char *user_name);
     74static int is_member_of_groups(const struct user_info *user_item,
     75                                const struct realm_group *groups);
     76int authent_author(request *req);
     77struct realm *realms = ((void *)0);
     78struct user_info *users = ((void *)0);
     79static struct user_info*
     80find_user(const char *user_name)
     81{
     82  struct user_info *user_item;
     83  user_item = users;
     84  while (user_item != ((void *)0)) {
     85    /* SEGV due to NULL access here on user_name.  See also comment below.  */
     86    if ((__builtin_strcmp(user_item->name, user_name) == 0))
     87      break;
     88    user_item = user_item->next;
     89  }
     90  return user_item;
     91}
     92static int
     93is_member_of_groups(const struct user_info *user_item,
     94                    const struct realm_group *groups)
     95{
     96  const struct realm_group *group_item;
     97  int i;
     98  group_item = groups;
     99  while (group_item != ((void *)0)) {
     100    for (i = 0; i < user_item->no_groups; i++)
     101      if (user_item->groups[i] == group_item->id)
     102        return 0;
     103    group_item = group_item->next;
     104  }
     105  return -1;
     106}
     107char *foo (void) __attribute__((__noclone__, __noinline__));
     108char* g_strdup (const char *str) __attribute__((__malloc__, __noclone__, __noinline__));
     109int g_strcmp0 (const char *str1, const char *str2);
     110static int
     111is_basic(char **user)
     112{
     113  char *passwd_ptr;
     114  char *authent = foo();
     115  passwd_ptr = __builtin_strchr(authent, ':');
     116  if (passwd_ptr != ((void *)0)) {
     117    *user = g_strdup(authent);
     118    return 0;
     119  }
     120  return -1;
     121}
     122static int
     123is_digest(char **user)
     124{
     125  int ret_val = -1;
     126  char *authent;
     127  authent = ha_get_string_value();
     128  if (authent) {
     129    *user = g_strdup(authent);
     130    ret_val = 0;
     131  }
     132  return ret_val;
     133}
     134__attribute__((__noclone__, __noinline__))
     135void g_free (void * mem);
     136static enum user_response
     137get_user_info_from_header(const realm_type type,
     138                          char **user_name,
     139                          struct user_info **user_item)
     140{
     141  int ret_val = no_user_response;
     142  if ((type == ws_realm)) {
     143    if (is_basic(user_name) == 0)
     144      ret_val = access_denied_user_response;
     145    if (is_digest(user_name) == 0)
     146      ret_val = ok_user_response;
     147  } else {
     148    if (is_basic(user_name) < 0 &&
     149        /* Load of *user_name here, but not after the is_digest call.  */
     150        is_digest(user_name) < 0)
     151      ;
     152    else if ((*user_item = find_user(*user_name)) != ((void *)0))
     153      ret_val = ok_user_response;
     154    else
     155      ret_val = access_denied_user_response;
     156    if (ret_val != ok_user_response)
     157      g_free(*user_name);
     158  }
     159  return ret_val;
     160}
     161static enum user_response
     162authenticate_user(request *req,
     163                  char **user_name,
     164                  struct user_info **user_item)
     165{
     166  char *authent = ((void *)0);
     167  har resp = ha_no_value;
     168  enum user_response user_resp;
     169  int ret_val = no_user_response;
     170  if (req->authent && __builtin_strlen(req->authent)) {
     171    authent = req->authent;
     172    user_resp = get_user_info_from_header(req->internal_realm,
     173                                          user_name,
     174                                          user_item);
     175    if (user_resp == ok_user_response) {
     176      resp = has_auth_user(authent, 0, req->internal_realm, "", 1);
     177      if (resp == ha_no_error)
     178        ret_val = ok_user_response;
     179      else if (resp != he_stale_nonce)
     180        ret_val = access_denied_user_response;
     181    } else if (user_resp == access_denied_user_response)
     182      ret_val = access_denied_user_response;
     183  }
     184  if (resp != he_memory_too_small && resp != ha_no_error)
     185    resp = has_www_auth("", 1, req->internal_realm, resp);
     186  return ret_val;
     187}
     188
     189int __attribute__ ((__noinline__, __noclone__))
     190authent_author(request *req)
     191{
     192  struct realm *realm;
     193  char *user_name = ((void *)0);
     194  struct user_info *user_item = ((void *)0);
     195  int res = 0;
     196  asm ("");
     197  realm = realms;
     198  if (__builtin_strcmp("Wsd", realm->name) == 0) {
     199    req->internal_realm = ws_realm;
     200    is_digest(&user_name);
     201  }
     202  if (authenticate_user(req, &user_name, &user_item) < 0) {
     203    if (user_name != ((void *)0))
     204      req->user = user_name;
     205    res = -2;
     206    goto authent_author_return;
     207  }
     208  if (is_member_of_groups(user_item, realm->groups) < 0)
     209    res = -1;
     210authent_author_return:
     211  return res;
     212}
     213
     214int good0, good1, good2;
     215
     216__attribute__ ((__noinline__, __noclone__))
     217char *foo(void)
     218{
     219  asm ("");
     220  good0++;
     221  return "";
     222}
     223
     224__attribute__ ((__noinline__, __noclone__))
     225char *ha_get_string_value(void)
     226{
     227  asm ("");
     228  good1++;
     229  return "f";
     230}
     231
     232__attribute__ ((__noinline__, __noclone__))
     233har has_auth_user(const char *a, const char *b, realm_type c, char *d, size_t e)
     234{
     235  asm ("");
     236  if (*a != 'z' || a[1] != 0 || b != 0 || c != axis_realm || *d != 0
     237      || e != 1)
     238    __builtin_abort ();
     239  return ha_no_error;
     240}
     241
     242__attribute__ ((__noinline__, __noclone__))
     243har has_www_auth(char *a, size_t b, realm_type c, har d)
     244{
     245  (void)(*a+b+c+d);
     246  asm ("");
     247  __builtin_abort ();
     248}
     249
     250
     251char *strdupped_user = "me";
     252__attribute__((__malloc__, __noclone__, __noinline__))
     253char* g_strdup (const char *str)
     254{
     255  asm ("");
     256  if (*str != 'f')
     257    __builtin_abort ();
     258  good2++;
     259  return strdupped_user;
     260}
     261
     262__attribute__((__noclone__, __noinline__))
     263void g_free (void * mem)
     264{
     265  (void)mem;
     266  asm ("");
     267  __builtin_abort ();
     268}
     269
     270struct user_info me = { .name = "me", .no_groups = 1, .groups = {42}, .next = 0};
     271struct user_info you = { .name = "you", .next = &me};
     272struct realm_group xgroups = { .name = "*", .id = 42, .next = 0};
     273
     274int main(void)
     275{
     276  char *orig_user = "?";
     277  struct realm r = { .name = "x", .space = "space?", .groups = &xgroups, .next = 0};
     278  request req = { .user = orig_user, .realm = "!", .authent = "z",
     279                  .internal_realm = axis_realm};
     280  realms = &r;
     281  users = &you;
     282  if (authent_author (&req) != 0 || good0 != 1 || good1 != 1 || good2 != 1
     283      || req.user != orig_user
     284      || req.internal_realm != axis_realm)
     285    __builtin_abort ();
     286  __builtin_exit (0);
     287}
     288
  • gcc/testsuite/gcc.dg/vect/slp-25.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.dg/vect/slp-25.c gcc-4.6.3/gcc/testsuite/gcc.dg/vect/slp-25.c
    old new  
    5757
    5858/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect"  } } */
    5959/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
    60 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail { vect_no_align } } } } */
     60/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail { vect_no_align || { ! vect_natural_alignment } } } } } */
    6161/* { dg-final { cleanup-tree-dump "vect" } } */
  • gcc/testsuite/gcc.dg/vect/vect-peel-1.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.dg/vect/vect-peel-1.c gcc-4.6.3/gcc/testsuite/gcc.dg/vect/vect-peel-1.c
    old new  
    4949}
    5050
    5151/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
    52 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target vect_element_align } } } */
     52/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { { vect_element_align } && { vect_aligned_arrays } } } } } */
    5353/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" } } */
    5454/* { dg-final { cleanup-tree-dump "vect" } } */
  • gcc/testsuite/gcc.dg/vect/vect-peel-2.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.dg/vect/vect-peel-2.c gcc-4.6.3/gcc/testsuite/gcc.dg/vect/vect-peel-2.c
    old new  
    5050}
    5151
    5252/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
    53 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target vect_element_align } } } */
    54 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target vect_element_align } } } */
     53/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { { vect_element_align } && { vect_aligned_arrays } } } } } */
     54/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target { { vect_element_align } && { vect_aligned_arrays } } } } } */
    5555/* { dg-final { cleanup-tree-dump "vect" } } */
  • gcc/testsuite/gcc.dg/vect/vect-peel-3.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.dg/vect/vect-peel-3.c gcc-4.6.3/gcc/testsuite/gcc.dg/vect/vect-peel-3.c
    old new  
    44#include "tree-vect.h"
    55
    66#define N 128
    7 #define RES 21888
    8 
    9 /* unaligned store.  */
     7#define RES 21640
    108
    119int ib[N+10];
    1210int ia[N+10];
     
    1816  int i, suma = 0, sumb = 0, sumc = 0;
    1917
    2018  /* ib and ic have same misalignment, we peel to align them.  */
    21   for (i = 1; i <= N; i++)
     19  for (i = 0; i <= N; i++)
    2220    {
    2321      suma += ia[i];
    24       sumb += ib[i+6];
    25       sumc += ic[i+2];
     22      sumb += ib[i+5];
     23      sumc += ic[i+1];
    2624    }
    2725
    2826  /* check results:  */
     
    4947  return main1 ();
    5048}
    5149
    52 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
     50/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
    5351/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect"  { xfail vect_no_align } } } */
    54 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" } } */
     52/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail vect_no_align } } } */
    5553/* { dg-final { cleanup-tree-dump "vect" } } */
  • gcc/testsuite/gcc.dg/vect/vect-peel-4.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.dg/vect/vect-peel-4.c gcc-4.6.3/gcc/testsuite/gcc.dg/vect/vect-peel-4.c
    old new  
    1616  /* Don't peel keeping one load and the store aligned.  */
    1717  for (i = 0; i <= N; i++)
    1818    {
    19       ia[i] = ib[i] + ib[i+6];
     19      ia[i] = ib[i] + ib[i+5];
    2020    }
    2121
    2222  /* check results:  */
    2323  for (i = 1; i <= N; i++)
    2424    {
    25       if (ia[i] != ib[i] + ib[i+6])
     25      if (ia[i] != ib[i] + ib[i+5])
    2626        abort ();
    2727    }
    2828
     
    4444  return main1 ();
    4545}
    4646
    47 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
     47/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
    4848/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect"  { xfail vect_no_align } } } */
    4949/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
    5050/* { dg-final { cleanup-tree-dump "vect" } } */
  • gcc/testsuite/gcc.dg/volatile-bitfields-2.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.dg/volatile-bitfields-2.c gcc-4.6.3/gcc/testsuite/gcc.dg/volatile-bitfields-2.c
    old new  
     1/* { dg-do run } */
     2/* { dg-options "-fstrict-volatile-bitfields" } */
     3
     4extern void abort(void);
     5struct thing {
     6  volatile unsigned short a: 8;
     7  volatile unsigned short b: 8;
     8} t = {1,2};
     9
     10int main()
     11{
     12  t.a = 3;
     13  if (t.a !=3 || t.b !=2) abort();
     14  return 0;
     15}
  • gcc/testsuite/gcc.target/arm/volatile-bitfields-4.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/arm/volatile-bitfields-4.c gcc-4.6.3/gcc/testsuite/gcc.target/arm/volatile-bitfields-4.c
    old new  
     1/* { dg-require-effective-target arm_eabi } */
     2/* { dg-do compile } */
     3/* { dg-options "-O2" } */
     4/* { dg-final { scan-assembler-times "ldr\[\\t \]+\[^\n\]*,\[\\t \]*\\\[\[^\n\]*\\\]" 2 } } */
     5/* { dg-final { scan-assembler-times "str\[\\t \]+\[^\n\]*,\[\\t \]*\\\[\[^\n\]*\\\]" 2 } } */
     6/* { dg-final { scan-assembler-not "strb" } } */
     7
     8struct thing {
     9  unsigned a: 8;
     10  unsigned b: 8;
     11  unsigned c: 8;
     12  unsigned d: 8;
     13};
     14
     15struct thing2 {
     16  volatile unsigned a: 8;
     17  volatile unsigned b: 8;
     18  volatile unsigned c: 8;
     19  volatile unsigned d: 8;
     20};
     21
     22void test1(volatile struct thing *t)
     23{
     24  t->a = 5;
     25}
     26
     27void test2(struct thing2 *t)
     28{
     29  t->a = 5;
     30}
  • gcc/testsuite/gcc.target/i386/avx256-unaligned-load-1.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-1.c gcc-4.6.3/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-1.c
    old new  
    1414    c[i] = a[i] * b[i+3];
    1515}
    1616
    17 /* { dg-final { scan-assembler-not "\\*avx_movups256/1" } } */
    18 /* { dg-final { scan-assembler "\\*avx_movups/1" } } */
     17/* { dg-final { scan-assembler-not "avx_movups256/1" } } */
     18/* { dg-final { scan-assembler "avx_movups/1" } } */
    1919/* { dg-final { scan-assembler "vinsertf128" } } */
  • gcc/testsuite/gcc.target/i386/avx256-unaligned-load-2.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-2.c gcc-4.6.3/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-2.c
    old new  
    2424    }
    2525}
    2626
    27 /* { dg-final { scan-assembler-not "\\*avx_movdqu256/1" } } */
    28 /* { dg-final { scan-assembler "\\*avx_movdqu/1" } } */
     27/* { dg-final { scan-assembler-not "avx_movdqu256/1" } } */
     28/* { dg-final { scan-assembler "avx_movdqu/1" } } */
    2929/* { dg-final { scan-assembler "vinsertf128" } } */
  • gcc/testsuite/gcc.target/i386/avx256-unaligned-load-3.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-3.c gcc-4.6.3/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-3.c
    old new  
    1414    c[i] = a[i] * b[i+3];
    1515}
    1616
    17 /* { dg-final { scan-assembler-not "\\*avx_movupd256/1" } } */
    18 /* { dg-final { scan-assembler "\\*avx_movupd/1" } } */
     17/* { dg-final { scan-assembler-not "avx_movupd256/1" } } */
     18/* { dg-final { scan-assembler "avx_movupd/1" } } */
    1919/* { dg-final { scan-assembler "vinsertf128" } } */
  • gcc/testsuite/gcc.target/i386/avx256-unaligned-load-4.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-4.c gcc-4.6.3/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-4.c
    old new  
    1414    b[i] = a[i+3] * 2;
    1515}
    1616
    17 /* { dg-final { scan-assembler "\\*avx_movups256/1" } } */
    18 /* { dg-final { scan-assembler-not "\\*avx_movups/1" } } */
     17/* { dg-final { scan-assembler "avx_movups256/1" } } */
     18/* { dg-final { scan-assembler-not "avx_movups/1" } } */
    1919/* { dg-final { scan-assembler-not "vinsertf128" } } */
  • gcc/testsuite/gcc.target/i386/avx256-unaligned-store-1.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-1.c gcc-4.6.3/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-1.c
    old new  
    1717    d[i] = c[i] * 20.0;
    1818}
    1919
    20 /* { dg-final { scan-assembler-not "\\*avx_movups256/2" } } */
     20/* { dg-final { scan-assembler-not "avx_movups256/2" } } */
    2121/* { dg-final { scan-assembler "movups.*\\*avx_movv4sf_internal/3" } } */
    2222/* { dg-final { scan-assembler "vextractf128" } } */
  • gcc/testsuite/gcc.target/i386/avx256-unaligned-store-2.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-2.c gcc-4.6.3/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-2.c
    old new  
    2424    }
    2525}
    2626
    27 /* { dg-final { scan-assembler-not "\\*avx_movdqu256/2" } } */
     27/* { dg-final { scan-assembler-not "avx_movdqu256/2" } } */
    2828/* { dg-final { scan-assembler "movdqu.*\\*avx_movv16qi_internal/3" } } */
    2929/* { dg-final { scan-assembler "vextractf128" } } */
  • gcc/testsuite/gcc.target/i386/avx256-unaligned-store-3.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-3.c gcc-4.6.3/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-3.c
    old new  
    1717    d[i] = c[i] * 20.0;
    1818}
    1919
    20 /* { dg-final { scan-assembler-not "\\*avx_movupd256/2" } } */
     20/* { dg-final { scan-assembler-not "avx_movupd256/2" } } */
    2121/* { dg-final { scan-assembler "movupd.*\\*avx_movv2df_internal/3" } } */
    2222/* { dg-final { scan-assembler "vextractf128" } } */
  • gcc/testsuite/gcc.target/i386/avx256-unaligned-store-4.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-4.c gcc-4.6.3/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-4.c
    old new  
    1414    b[i+3] = a[i] * c[i];
    1515}
    1616
    17 /* { dg-final { scan-assembler "\\*avx_movups256/2" } } */
    18 /* { dg-final { scan-assembler-not "\\*avx_movups/2" } } */
     17/* { dg-final { scan-assembler "avx_movups256/2" } } */
     18/* { dg-final { scan-assembler-not "avx_movups/2" } } */
    1919/* { dg-final { scan-assembler-not "\\*avx_movv4sf_internal/3" } } */
    2020/* { dg-final { scan-assembler-not "vextractf128" } } */
  • gcc/testsuite/gcc.target/i386/pr52736.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/i386/pr52736.c gcc-4.6.3/gcc/testsuite/gcc.target/i386/pr52736.c
    old new  
     1/* PR target/52736 */
     2/* { dg-do run } */
     3/* { dg-options "-O1 -msse2" } */
     4/* { dg-require-effective-target sse2_runtime } */
     5
     6#include <x86intrin.h>
     7
     8typedef double D __attribute__((may_alias));
     9__attribute__((aligned(16))) static const double r[4] = { 1., 5., 1., 3. };
     10
     11__attribute__((noinline, noclone))
     12void
     13foo (int x)
     14{
     15  asm volatile ("" : "+g" (x) : : "memory");
     16  if (x != 3)
     17    __builtin_abort ();
     18}
     19
     20int
     21main ()
     22{
     23  __m128d t = _mm_set1_pd (5.);
     24  ((D *)(&t))[0] = 1.;
     25  foo (_mm_movemask_pd (_mm_cmpeq_pd (t, _mm_load_pd (&r[0]))));
     26  ((D *)(&t))[1] = 3.;
     27  foo (_mm_movemask_pd (_mm_cmpeq_pd (t, _mm_load_pd (&r[2]))));
     28  return 0;
     29}
  • gcc/testsuite/gcc.target/i386/pr53416.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/i386/pr53416.c gcc-4.6.3/gcc/testsuite/gcc.target/i386/pr53416.c
    old new  
     1/* PR target/53416 */
     2/* { dg-options "-O2 -mrdrnd" } */
     3
     4int test (void)
     5{
     6  unsigned int number = 0;
     7  int result0, result1, result2, result3;
     8
     9  result0 = __builtin_ia32_rdrand32_step (&number);
     10  result1 = __builtin_ia32_rdrand32_step (&number);
     11  result2 = __builtin_ia32_rdrand32_step (&number);
     12  result3 = __builtin_ia32_rdrand32_step (&number);
     13
     14  return result0 + result1 +result2 + result3;
     15}
     16
     17/* { dg-final { scan-assembler-times "rdrand" 4 } } */
  • gcc/testsuite/gcc.target/powerpc/cell_builtin-1.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-1.c gcc-4.6.3/gcc/testsuite/gcc.target/powerpc/cell_builtin-1.c
    old new  
     1/* { dg-do compile { target { powerpc*-*-* } } } */
     2/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
     3/* { dg-require-effective-target powerpc_altivec_ok } */
     4/* { dg-options "-O2 -maltivec -mcpu=cell" } */
     5/* { dg-final { scan-assembler-times "lvlx" 19 } } */
     6
     7#include <altivec.h>
     8
     9typedef __vector signed char vsc;
     10typedef __vector signed short vss;
     11typedef __vector signed int vsi;
     12typedef __vector unsigned char vuc;
     13typedef __vector unsigned short vus;
     14typedef __vector unsigned int vui;
     15typedef __vector bool char vbc;
     16typedef __vector bool short vbs;
     17typedef __vector bool int vbi;
     18typedef __vector float vsf;
     19typedef __vector pixel vp;
     20typedef signed char sc;
     21typedef signed short ss;
     22typedef signed int si;
     23typedef signed long sl;
     24typedef unsigned char uc;
     25typedef unsigned short us;
     26typedef unsigned int ui;
     27typedef unsigned long ul;
     28typedef float sf;
     29
     30vsc  lc1(long a, void *p)           { return __builtin_altivec_lvlx (a,p); }
     31vsf  llx01(long a, vsf *p)          { return __builtin_vec_lvlx (a,p); }
     32vsf  llx02(long a, sf *p)           { return __builtin_vec_lvlx (a,p); }
     33vbi  llx03(long a, vbi *p)          { return __builtin_vec_lvlx (a,p); }
     34vsi  llx04(long a, vsi *p)          { return __builtin_vec_lvlx (a,p); }
     35vsi  llx05(long a, si *p)           { return __builtin_vec_lvlx (a,p); }
     36vui  llx06(long a, vui *p)          { return __builtin_vec_lvlx (a,p); }
     37vui  llx07(long a, ui *p)           { return __builtin_vec_lvlx (a,p); }
     38vbs  llx08(long a, vbs *p)          { return __builtin_vec_lvlx (a,p); }
     39vp   llx09(long a, vp *p)           { return __builtin_vec_lvlx (a,p); }
     40vss  llx10(long a, vss *p)          { return __builtin_vec_lvlx (a,p); }
     41vss  llx11(long a, ss *p)           { return __builtin_vec_lvlx (a,p); }
     42vus  llx12(long a, vus *p)          { return __builtin_vec_lvlx (a,p); }
     43vus  llx13(long a, us *p)           { return __builtin_vec_lvlx (a,p); }
     44vbc  llx14(long a, vbc *p)          { return __builtin_vec_lvlx (a,p); }
     45vsc  llx15(long a, vsc *p)          { return __builtin_vec_lvlx (a,p); }
     46vsc  llx16(long a, sc *p)           { return __builtin_vec_lvlx (a,p); }
     47vuc  llx17(long a, vuc *p)          { return __builtin_vec_lvlx (a,p); }
     48vuc  llx18(long a, uc *p)           { return __builtin_vec_lvlx (a,p); }
  • gcc/testsuite/gcc.target/powerpc/cell_builtin-2.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-2.c gcc-4.6.3/gcc/testsuite/gcc.target/powerpc/cell_builtin-2.c
    old new  
     1/* { dg-do compile { target { powerpc*-*-* } } } */
     2/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
     3/* { dg-require-effective-target powerpc_altivec_ok } */
     4/* { dg-options "-O2 -maltivec -mcpu=cell" } */
     5/* { dg-final { scan-assembler-times "lvlxl" 19 } } */
     6
     7#include <altivec.h>
     8
     9typedef __vector signed char vsc;
     10typedef __vector signed short vss;
     11typedef __vector signed int vsi;
     12typedef __vector unsigned char vuc;
     13typedef __vector unsigned short vus;
     14typedef __vector unsigned int vui;
     15typedef __vector bool char vbc;
     16typedef __vector bool short vbs;
     17typedef __vector bool int vbi;
     18typedef __vector float vsf;
     19typedef __vector pixel vp;
     20typedef signed char sc;
     21typedef signed short ss;
     22typedef signed int si;
     23typedef signed long sl;
     24typedef unsigned char uc;
     25typedef unsigned short us;
     26typedef unsigned int ui;
     27typedef unsigned long ul;
     28typedef float sf;
     29
     30vsc  lc2(long a, void *p)           { return __builtin_altivec_lvlxl (a,p); }
     31vsf  llxl01(long a, vsf *p)         { return __builtin_vec_lvlxl (a,p); }
     32vsf  llxl02(long a, sf *p)          { return __builtin_vec_lvlxl (a,p); }
     33vbi  llxl03(long a, vbi *p)         { return __builtin_vec_lvlxl (a,p); }
     34vsi  llxl04(long a, vsi *p)         { return __builtin_vec_lvlxl (a,p); }
     35vsi  llxl05(long a, si *p)          { return __builtin_vec_lvlxl (a,p); }
     36vui  llxl06(long a, vui *p)         { return __builtin_vec_lvlxl (a,p); }
     37vui  llxl07(long a, ui *p)          { return __builtin_vec_lvlxl (a,p); }
     38vbs  llxl08(long a, vbs *p)         { return __builtin_vec_lvlxl (a,p); }
     39vp   llxl09(long a, vp *p)          { return __builtin_vec_lvlxl (a,p); }
     40vss  llxl10(long a, vss *p)         { return __builtin_vec_lvlxl (a,p); }
     41vss  llxl11(long a, ss *p)          { return __builtin_vec_lvlxl (a,p); }
     42vus  llxl12(long a, vus *p)         { return __builtin_vec_lvlxl (a,p); }
     43vus  llxl13(long a, us *p)          { return __builtin_vec_lvlxl (a,p); }
     44vbc  llxl14(long a, vbc *p)         { return __builtin_vec_lvlxl (a,p); }
     45vsc  llxl15(long a, vsc *p)         { return __builtin_vec_lvlxl (a,p); }
     46vsc  llxl16(long a, sc *p)          { return __builtin_vec_lvlxl (a,p); }
     47vuc  llxl17(long a, vuc *p)         { return __builtin_vec_lvlxl (a,p); }
     48vuc  llxl18(long a, uc *p)          { return __builtin_vec_lvlxl (a,p); }
  • gcc/testsuite/gcc.target/powerpc/cell_builtin-3.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-3.c gcc-4.6.3/gcc/testsuite/gcc.target/powerpc/cell_builtin-3.c
    old new  
     1/* { dg-do compile { target { powerpc*-*-* } } } */
     2/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
     3/* { dg-require-effective-target powerpc_altivec_ok } */
     4/* { dg-options "-O2 -maltivec -mcpu=cell" } */
     5/* { dg-final { scan-assembler-times "lvrx" 19 } } */
     6
     7#include <altivec.h>
     8
     9typedef __vector signed char vsc;
     10typedef __vector signed short vss;
     11typedef __vector signed int vsi;
     12typedef __vector unsigned char vuc;
     13typedef __vector unsigned short vus;
     14typedef __vector unsigned int vui;
     15typedef __vector bool char vbc;
     16typedef __vector bool short vbs;
     17typedef __vector bool int vbi;
     18typedef __vector float vsf;
     19typedef __vector pixel vp;
     20typedef signed char sc;
     21typedef signed short ss;
     22typedef signed int si;
     23typedef signed long sl;
     24typedef unsigned char uc;
     25typedef unsigned short us;
     26typedef unsigned int ui;
     27typedef unsigned long ul;
     28typedef float sf;
     29
     30vsc  lc3(long a, void *p)           { return __builtin_altivec_lvrx (a,p); }
     31vsf  lrx01(long a, vsf *p)          { return __builtin_vec_lvrx (a,p); }
     32vsf  lrx02(long a, sf *p)           { return __builtin_vec_lvrx (a,p); }
     33vbi  lrx03(long a, vbi *p)          { return __builtin_vec_lvrx (a,p); }
     34vsi  lrx04(long a, vsi *p)          { return __builtin_vec_lvrx (a,p); }
     35vsi  lrx05(long a, si *p)           { return __builtin_vec_lvrx (a,p); }
     36vui  lrx06(long a, vui *p)          { return __builtin_vec_lvrx (a,p); }
     37vui  lrx07(long a, ui *p)           { return __builtin_vec_lvrx (a,p); }
     38vbs  lrx08(long a, vbs *p)          { return __builtin_vec_lvrx (a,p); }
     39vp   lrx09(long a, vp *p)           { return __builtin_vec_lvrx (a,p); }
     40vss  lrx10(long a, vss *p)          { return __builtin_vec_lvrx (a,p); }
     41vss  lrx11(long a, ss *p)           { return __builtin_vec_lvrx (a,p); }
     42vus  lrx12(long a, vus *p)          { return __builtin_vec_lvrx (a,p); }
     43vus  lrx13(long a, us *p)           { return __builtin_vec_lvrx (a,p); }
     44vbc  lrx14(long a, vbc *p)          { return __builtin_vec_lvrx (a,p); }
     45vsc  lrx15(long a, vsc *p)          { return __builtin_vec_lvrx (a,p); }
     46vsc  lrx16(long a, sc *p)           { return __builtin_vec_lvrx (a,p); }
     47vuc  lrx17(long a, vuc *p)          { return __builtin_vec_lvrx (a,p); }
     48vuc  lrx18(long a, uc *p)           { return __builtin_vec_lvrx (a,p); }
  • gcc/testsuite/gcc.target/powerpc/cell_builtin-4.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-4.c gcc-4.6.3/gcc/testsuite/gcc.target/powerpc/cell_builtin-4.c
    old new  
     1/* { dg-do compile { target { powerpc*-*-* } } } */
     2/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
     3/* { dg-require-effective-target powerpc_altivec_ok } */
     4/* { dg-options "-O2 -maltivec -mcpu=cell" } */
     5/* { dg-final { scan-assembler-times "lvrxl" 19 } } */
     6
     7#include <altivec.h>
     8
     9typedef __vector signed char vsc;
     10typedef __vector signed short vss;
     11typedef __vector signed int vsi;
     12typedef __vector unsigned char vuc;
     13typedef __vector unsigned short vus;
     14typedef __vector unsigned int vui;
     15typedef __vector bool char vbc;
     16typedef __vector bool short vbs;
     17typedef __vector bool int vbi;
     18typedef __vector float vsf;
     19typedef __vector pixel vp;
     20typedef signed char sc;
     21typedef signed short ss;
     22typedef signed int si;
     23typedef signed long sl;
     24typedef unsigned char uc;
     25typedef unsigned short us;
     26typedef unsigned int ui;
     27typedef unsigned long ul;
     28typedef float sf;
     29
     30vsc  lc4(long a, void *p)           { return __builtin_altivec_lvrxl (a,p); }
     31vsf  lrxl01(long a, vsf *p)         { return __builtin_vec_lvrxl (a,p); }
     32vsf  lrxl02(long a, sf *p)          { return __builtin_vec_lvrxl (a,p); }
     33vbi  lrxl03(long a, vbi *p)         { return __builtin_vec_lvrxl (a,p); }
     34vsi  lrxl04(long a, vsi *p)         { return __builtin_vec_lvrxl (a,p); }
     35vsi  lrxl05(long a, si *p)          { return __builtin_vec_lvrxl (a,p); }
     36vui  lrxl06(long a, vui *p)         { return __builtin_vec_lvrxl (a,p); }
     37vui  lrxl07(long a, ui *p)          { return __builtin_vec_lvrxl (a,p); }
     38vbs  lrxl08(long a, vbs *p)         { return __builtin_vec_lvrxl (a,p); }
     39vp   lrxl09(long a, vp *p)          { return __builtin_vec_lvrxl (a,p); }
     40vss  lrxl10(long a, vss *p)         { return __builtin_vec_lvrxl (a,p); }
     41vss  lrxl11(long a, ss *p)          { return __builtin_vec_lvrxl (a,p); }
     42vus  lrxl12(long a, vus *p)         { return __builtin_vec_lvrxl (a,p); }
     43vus  lrxl13(long a, us *p)          { return __builtin_vec_lvrxl (a,p); }
     44vbc  lrxl14(long a, vbc *p)         { return __builtin_vec_lvrxl (a,p); }
     45vsc  lrxl15(long a, vsc *p)         { return __builtin_vec_lvrxl (a,p); }
     46vsc  lrxl16(long a, sc *p)          { return __builtin_vec_lvrxl (a,p); }
     47vuc  lrxl17(long a, vuc *p)         { return __builtin_vec_lvrxl (a,p); }
     48vuc  lrxl18(long a, uc *p)          { return __builtin_vec_lvrxl (a,p); }
  • gcc/testsuite/gcc.target/powerpc/cell_builtin-5.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-5.c gcc-4.6.3/gcc/testsuite/gcc.target/powerpc/cell_builtin-5.c
    old new  
     1/* { dg-do compile { target { powerpc*-*-* } } } */
     2/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
     3/* { dg-require-effective-target powerpc_altivec_ok } */
     4/* { dg-options "-O2 -maltivec -mcpu=cell" } */
     5/* { dg-final { scan-assembler-times "stvlx" 19 } } */
     6
     7#include <altivec.h>
     8
     9typedef __vector signed char vsc;
     10typedef __vector signed short vss;
     11typedef __vector signed int vsi;
     12typedef __vector unsigned char vuc;
     13typedef __vector unsigned short vus;
     14typedef __vector unsigned int vui;
     15typedef __vector bool char vbc;
     16typedef __vector bool short vbs;
     17typedef __vector bool int vbi;
     18typedef __vector float vsf;
     19typedef __vector pixel vp;
     20typedef signed char sc;
     21typedef signed short ss;
     22typedef signed int si;
     23typedef signed long sl;
     24typedef unsigned char uc;
     25typedef unsigned short us;
     26typedef unsigned int ui;
     27typedef unsigned long ul;
     28typedef float sf;
     29
     30void sc1(vsc v, long a, void *p)    { __builtin_altivec_stvlx (v,a,p); }
     31void slx01(vsf v, long a, vsf *p)   { __builtin_vec_stvlx (v,a,p); }
     32void slx02(vsf v, long a, sf *p)    { __builtin_vec_stvlx (v,a,p); }
     33void slx03(vbi v, long a, vbi *p)   { __builtin_vec_stvlx (v,a,p); }
     34void slx04(vsi v, long a, vsi *p)   { __builtin_vec_stvlx (v,a,p); }
     35void slx05(vsi v, long a, si *p)    { __builtin_vec_stvlx (v,a,p); }
     36void slx06(vui v, long a, vui *p)   { __builtin_vec_stvlx (v,a,p); }
     37void slx07(vui v, long a, ui *p)    { __builtin_vec_stvlx (v,a,p); }
     38void slx08(vbs v, long a, vbs *p)   { __builtin_vec_stvlx (v,a,p); }
     39void slx09(vp v, long a, vp *p)     { __builtin_vec_stvlx (v,a,p); }
     40void slx10(vss v, long a, vss *p)   { __builtin_vec_stvlx (v,a,p); }
     41void slx11(vss v, long a, ss *p)    { __builtin_vec_stvlx (v,a,p); }
     42void slx12(vus v, long a, vus *p)   { __builtin_vec_stvlx (v,a,p); }
     43void slx13(vus v, long a, us *p)    { __builtin_vec_stvlx (v,a,p); }
     44void slx14(vbc v, long a, vbc *p)   { __builtin_vec_stvlx (v,a,p); }
     45void slx15(vsc v, long a, vsc *p)   { __builtin_vec_stvlx (v,a,p); }
     46void slx16(vsc v, long a, sc *p)    { __builtin_vec_stvlx (v,a,p); }
     47void slx17(vuc v, long a, vuc *p)   { __builtin_vec_stvlx (v,a,p); }
     48void slx18(vuc v, long a, uc *p)    { __builtin_vec_stvlx (v,a,p); }
  • gcc/testsuite/gcc.target/powerpc/cell_builtin-6.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-6.c gcc-4.6.3/gcc/testsuite/gcc.target/powerpc/cell_builtin-6.c
    old new  
     1/* { dg-do compile { target { powerpc*-*-* } } } */
     2/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
     3/* { dg-require-effective-target powerpc_altivec_ok } */
     4/* { dg-options "-O2 -maltivec -mcpu=cell" } */
     5/* { dg-final { scan-assembler-times "stvlxl" 19 } } */
     6
     7#include <altivec.h>
     8
     9typedef __vector signed char vsc;
     10typedef __vector signed short vss;
     11typedef __vector signed int vsi;
     12typedef __vector unsigned char vuc;
     13typedef __vector unsigned short vus;
     14typedef __vector unsigned int vui;
     15typedef __vector bool char vbc;
     16typedef __vector bool short vbs;
     17typedef __vector bool int vbi;
     18typedef __vector float vsf;
     19typedef __vector pixel vp;
     20typedef signed char sc;
     21typedef signed short ss;
     22typedef signed int si;
     23typedef signed long sl;
     24typedef unsigned char uc;
     25typedef unsigned short us;
     26typedef unsigned int ui;
     27typedef unsigned long ul;
     28typedef float sf;
     29
     30void sc2(vsc v, long a, void *p)    { __builtin_altivec_stvlxl (v,a,p); }
     31void slxl01(vsf v, long a, vsf *p)  { __builtin_vec_stvlxl (v,a,p); }
     32void slxl02(vsf v, long a, sf *p)   { __builtin_vec_stvlxl (v,a,p); }
     33void slxl03(vbi v, long a, vbi *p)  { __builtin_vec_stvlxl (v,a,p); }
     34void slxl04(vsi v, long a, vsi *p)  { __builtin_vec_stvlxl (v,a,p); }
     35void slxl05(vsi v, long a, si *p)   { __builtin_vec_stvlxl (v,a,p); }
     36void slxl06(vui v, long a, vui *p)  { __builtin_vec_stvlxl (v,a,p); }
     37void slxl07(vui v, long a, ui *p)   { __builtin_vec_stvlxl (v,a,p); }
     38void slxl08(vbs v, long a, vbs *p)  { __builtin_vec_stvlxl (v,a,p); }
     39void slxl09(vp v, long a, vp *p)    { __builtin_vec_stvlxl (v,a,p); }
     40void slxl10(vss v, long a, vss *p)  { __builtin_vec_stvlxl (v,a,p); }
     41void slxl11(vss v, long a, ss *p)   { __builtin_vec_stvlxl (v,a,p); }
     42void slxl12(vus v, long a, vus *p)  { __builtin_vec_stvlxl (v,a,p); }
     43void slxl13(vus v, long a, us *p)   { __builtin_vec_stvlxl (v,a,p); }
     44void slxl14(vbc v, long a, vbc *p)  { __builtin_vec_stvlxl (v,a,p); }
     45void slxl15(vsc v, long a, vsc *p)  { __builtin_vec_stvlxl (v,a,p); }
     46void slxl16(vsc v, long a, sc *p)   { __builtin_vec_stvlxl (v,a,p); }
     47void slxl17(vuc v, long a, vuc *p)  { __builtin_vec_stvlxl (v,a,p); }
     48void slxl18(vuc v, long a, uc *p)   { __builtin_vec_stvlxl (v,a,p); }
  • gcc/testsuite/gcc.target/powerpc/cell_builtin-7.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-7.c gcc-4.6.3/gcc/testsuite/gcc.target/powerpc/cell_builtin-7.c
    old new  
     1/* { dg-do compile { target { powerpc*-*-* } } } */
     2/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
     3/* { dg-require-effective-target powerpc_altivec_ok } */
     4/* { dg-options "-O2 -maltivec -mcpu=cell" } */
     5/* { dg-final { scan-assembler-times "stvrx" 19 } } */
     6
     7#include <altivec.h>
     8
     9typedef __vector signed char vsc;
     10typedef __vector signed short vss;
     11typedef __vector signed int vsi;
     12typedef __vector unsigned char vuc;
     13typedef __vector unsigned short vus;
     14typedef __vector unsigned int vui;
     15typedef __vector bool char vbc;
     16typedef __vector bool short vbs;
     17typedef __vector bool int vbi;
     18typedef __vector float vsf;
     19typedef __vector pixel vp;
     20typedef signed char sc;
     21typedef signed short ss;
     22typedef signed int si;
     23typedef signed long sl;
     24typedef unsigned char uc;
     25typedef unsigned short us;
     26typedef unsigned int ui;
     27typedef unsigned long ul;
     28typedef float sf;
     29
     30void sc3(vsc v, long a, void *p)    { __builtin_altivec_stvrx (v,a,p); }
     31void srx01(vsf v, long a, vsf *p)   { __builtin_vec_stvrx (v,a,p); }
     32void srx02(vsf v, long a, sf *p)    { __builtin_vec_stvrx (v,a,p); }
     33void srx03(vbi v, long a, vbi *p)   { __builtin_vec_stvrx (v,a,p); }
     34void srx04(vsi v, long a, vsi *p)   { __builtin_vec_stvrx (v,a,p); }
     35void srx05(vsi v, long a, si *p)    { __builtin_vec_stvrx (v,a,p); }
     36void srx06(vui v, long a, vui *p)   { __builtin_vec_stvrx (v,a,p); }
     37void srx07(vui v, long a, ui *p)    { __builtin_vec_stvrx (v,a,p); }
     38void srx08(vbs v, long a, vbs *p)   { __builtin_vec_stvrx (v,a,p); }
     39void srx09(vp v, long a, vp *p)     { __builtin_vec_stvrx (v,a,p); }
     40void srx10(vss v, long a, vss *p)   { __builtin_vec_stvrx (v,a,p); }
     41void srx11(vss v, long a, ss *p)    { __builtin_vec_stvrx (v,a,p); }
     42void srx12(vus v, long a, vus *p)   { __builtin_vec_stvrx (v,a,p); }
     43void srx13(vus v, long a, us *p)    { __builtin_vec_stvrx (v,a,p); }
     44void srx14(vbc v, long a, vbc *p)   { __builtin_vec_stvrx (v,a,p); }
     45void srx15(vsc v, long a, vsc *p)   { __builtin_vec_stvrx (v,a,p); }
     46void srx16(vsc v, long a, sc *p)    { __builtin_vec_stvrx (v,a,p); }
     47void srx17(vuc v, long a, vuc *p)   { __builtin_vec_stvrx (v,a,p); }
     48void srx18(vuc v, long a, uc *p)    { __builtin_vec_stvrx (v,a,p); }
  • gcc/testsuite/gcc.target/powerpc/cell_builtin-8.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-8.c gcc-4.6.3/gcc/testsuite/gcc.target/powerpc/cell_builtin-8.c
    old new  
     1/* { dg-do compile { target { powerpc*-*-* } } } */
     2/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
     3/* { dg-require-effective-target powerpc_altivec_ok } */
     4/* { dg-options "-O2 -maltivec -mcpu=cell" } */
     5/* { dg-final { scan-assembler-times "stvrxl" 19 } } */
     6
     7#include <altivec.h>
     8
     9typedef __vector signed char vsc;
     10typedef __vector signed short vss;
     11typedef __vector signed int vsi;
     12typedef __vector unsigned char vuc;
     13typedef __vector unsigned short vus;
     14typedef __vector unsigned int vui;
     15typedef __vector bool char vbc;
     16typedef __vector bool short vbs;
     17typedef __vector bool int vbi;
     18typedef __vector float vsf;
     19typedef __vector pixel vp;
     20typedef signed char sc;
     21typedef signed short ss;
     22typedef signed int si;
     23typedef signed long sl;
     24typedef unsigned char uc;
     25typedef unsigned short us;
     26typedef unsigned int ui;
     27typedef unsigned long ul;
     28typedef float sf;
     29
     30void sc4(vsc v, long a, void *p)    { __builtin_altivec_stvrxl (v,a,p); }
     31void srxl01(vsf v, long a, vsf *p)  { __builtin_vec_stvrxl (v,a,p); }
     32void srxl02(vsf v, long a, sf *p)   { __builtin_vec_stvrxl (v,a,p); }
     33void srxl03(vbi v, long a, vbi *p)  { __builtin_vec_stvrxl (v,a,p); }
     34void srxl04(vsi v, long a, vsi *p)  { __builtin_vec_stvrxl (v,a,p); }
     35void srxl05(vsi v, long a, si *p)   { __builtin_vec_stvrxl (v,a,p); }
     36void srxl06(vui v, long a, vui *p)  { __builtin_vec_stvrxl (v,a,p); }
     37void srxl07(vui v, long a, ui *p)   { __builtin_vec_stvrxl (v,a,p); }
     38void srxl08(vbs v, long a, vbs *p)  { __builtin_vec_stvrxl (v,a,p); }
     39void srxl09(vp v, long a, vp *p)    { __builtin_vec_stvrxl (v,a,p); }
     40void srxl10(vss v, long a, vss *p)  { __builtin_vec_stvrxl (v,a,p); }
     41void srxl11(vss v, long a, ss *p)   { __builtin_vec_stvrxl (v,a,p); }
     42void srxl12(vus v, long a, vus *p)  { __builtin_vec_stvrxl (v,a,p); }
     43void srxl13(vus v, long a, us *p)   { __builtin_vec_stvrxl (v,a,p); }
     44void srxl14(vbc v, long a, vbc *p)  { __builtin_vec_stvrxl (v,a,p); }
     45void srxl15(vsc v, long a, vsc *p)  { __builtin_vec_stvrxl (v,a,p); }
     46void srxl16(vsc v, long a, sc *p)   { __builtin_vec_stvrxl (v,a,p); }
     47void srxl17(vuc v, long a, vuc *p)  { __builtin_vec_stvrxl (v,a,p); }
     48void srxl18(vuc v, long a, uc *p)   { __builtin_vec_stvrxl (v,a,p); }
  • gcc/testsuite/gcc.target/powerpc/pr52457.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/powerpc/pr52457.c gcc-4.6.3/gcc/testsuite/gcc.target/powerpc/pr52457.c
    old new  
     1/* { dg-do run { target { powerpc*-*-linux* } } } */
     2/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
     3/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
     4/* { dg-require-effective-target vsx_hw } */
     5/* { dg-options "-O1 -mcpu=power7" } */
     6
     7extern void abort (void);
     8
     9typedef long long T;
     10typedef T vl_t __attribute__((vector_size(2 * sizeof (T))));
     11
     12vl_t
     13buggy_func (T x)
     14{
     15  vl_t w;
     16  T *p = (T *)&w;
     17  p[0] = p[1] = x;
     18  return w;
     19}
     20
     21int
     22main(void)
     23{
     24  vl_t rval;
     25  T *pl;
     26
     27  pl = (T *) &rval;
     28  rval = buggy_func (2);
     29
     30  if (pl[0] != 2 || pl[1] != 2)
     31    abort ();
     32
     33  return 0;
     34}
  • gcc/testsuite/gcc.target/powerpc/pr52775.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/powerpc/pr52775.c gcc-4.6.3/gcc/testsuite/gcc.target/powerpc/pr52775.c
    old new  
     1/* { dg-do compile { target { powerpc*-*-* && ilp32 } } } */
     2/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
     3/* { dg-options "-O1 -mcpu=power4" } */
     4/* { dg-final { scan-assembler-times "fcfid" 2 } } */
     5
     6double
     7int_to_double (int *p)
     8{
     9  return (double)*p;
     10}
     11
     12double
     13long_long_to_double (long long *p)
     14{
     15  return (double)*p;
     16}
  • gcc/testsuite/gcc.target/powerpc/pr53199.c

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gcc.target/powerpc/pr53199.c gcc-4.6.3/gcc/testsuite/gcc.target/powerpc/pr53199.c
    old new  
     1/* { dg-do compile { target { powerpc*-*-* } } } */
     2/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
     3/* { dg-options "-O2 -mcpu=power6 -mavoid-indexed-addresses" } */
     4/* { dg-final { scan-assembler-times "lwbrx" 6 } } */
     5/* { dg-final { scan-assembler-times "stwbrx" 6 } } */
     6
     7/* PR 51399: bswap gets an error if -mavoid-indexed-addresses was used in
     8   creating the two lwbrx instructions.  */
     9
     10long long
     11load64_reverse_1 (long long *p)
     12{
     13  return __builtin_bswap64 (*p);
     14}
     15
     16long long
     17load64_reverse_2 (long long *p)
     18{
     19  return __builtin_bswap64 (p[1]);
     20}
     21
     22long long
     23load64_reverse_3 (long long *p, int i)
     24{
     25  return __builtin_bswap64 (p[i]);
     26}
     27
     28void
     29store64_reverse_1 (long long *p, long long x)
     30{
     31  *p = __builtin_bswap64 (x);
     32}
     33
     34void
     35store64_reverse_2 (long long *p, long long x)
     36{
     37  p[1] = __builtin_bswap64 (x);
     38}
     39
     40void
     41store64_reverse_3 (long long *p, long long x, int i)
     42{
     43  p[i] = __builtin_bswap64 (x);
     44}
     45
     46long long
     47reg_reverse (long long x)
     48{
     49  return __builtin_bswap64 (x);
     50}
  • gcc/testsuite/gfortran.dg/init_flag_10.f90

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gfortran.dg/init_flag_10.f90 gcc-4.6.3/gcc/testsuite/gfortran.dg/init_flag_10.f90
    old new  
     1! { dg-do run }
     2! { dg-options "-finit-real=NAN" }
     3! { dg-add-options ieee }
     4! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
     5!
     6! PR fortran/50619
     7!
     8! Contributed by Fred Krogh
     9!
     10! The NaN initialization used to set the associate name to NaN!
     11!
     12
     13module testa2
     14type, public ::  test_ty
     15  real :: rmult = 1.0e0
     16end type test_ty
     17
     18contains
     19  subroutine test(e, var1)
     20    type(test_ty) :: e
     21    real :: var1, var2 ! Should get NaN initialized
     22
     23    ! Should be the default value
     24    if (e%rmult /= 1.0) call abort ()
     25
     26    ! Check that NaN initialization is really turned on
     27    if (var1 == var1) call abort ()
     28    if (var2 == var2) call abort ()
     29
     30    ! The following was failing:
     31    associate (rmult=>e%rmult)
     32      if (e%rmult /= 1.0) call abort ()
     33    end associate
     34  end subroutine test
     35end module testa2
     36
     37program testa1
     38  use testa2
     39  type(test_ty) :: e
     40  real :: var1 ! Should get NaN initialized
     41  call test(e, var1)
     42  stop
     43end program testa1
  • gcc/testsuite/gfortran.dg/intrinsic_8.f90

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gfortran.dg/intrinsic_8.f90 gcc-4.6.3/gcc/testsuite/gfortran.dg/intrinsic_8.f90
    old new  
     1! { dg-do compile }
     2!
     3! PR fortran/52452
     4!
     5! Contributed by Roger Ferrer Ibanez
     6!
     7PROGRAM test_etime
     8    IMPLICIT NONE
     9    INTRINSIC :: etime
     10    REAL(4) :: tarray(1:2)
     11    REAL(4) :: result
     12
     13    CALL etime(tarray, result)
     14END PROGRAM test_etime
     15
     16subroutine test_etime2
     17    IMPLICIT NONE
     18    INTRINSIC :: etime
     19    REAL(4) :: tarray(1:2)
     20    REAL(4) :: result
     21
     22    result = etime(tarray)
     23END subroutine test_etime2
  • gcc/testsuite/gfortran.dg/optional_absent_2.f90

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gfortran.dg/optional_absent_2.f90 gcc-4.6.3/gcc/testsuite/gfortran.dg/optional_absent_2.f90
    old new  
     1! { dg-do run }
     2!
     3! PR fortran/51758
     4!
     5! Contributed by Mikael Morin
     6!
     7! Check whether passing NULL() to an elemental procedure works,
     8! where NULL() denotes an absent optional argument.
     9!
     10program p
     11
     12  integer :: a(2)
     13  integer :: b
     14
     15  a = 0
     16  a = foo((/ 1, 1 /), null())
     17!  print *, a
     18  if (any(a /= 2)) call abort
     19
     20  a = 0
     21  a = bar((/ 1, 1 /), null())
     22!  print *, a
     23  if (any(a /= 2)) call abort
     24
     25  b = 0
     26  b = bar(1, null())
     27!  print *, b
     28  if (b /= 2) call abort
     29
     30contains
     31
     32  function foo(a, b)
     33    integer           :: a(:)
     34    integer, optional :: b(:)
     35    integer           :: foo(size(a))
     36
     37    if (present(b)) call abort
     38
     39    foo = 2
     40  end function foo
     41
     42  elemental function bar(a, b)
     43    integer, intent(in)           :: a
     44    integer, intent(in), optional :: b
     45    integer                       :: bar
     46
     47    bar = 2
     48
     49    if (present(b)) bar = 1
     50
     51  end function bar
     52
     53end program p
  • gcc/testsuite/gfortran.dg/pointer_intent_6.f90

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gfortran.dg/pointer_intent_6.f90 gcc-4.6.3/gcc/testsuite/gfortran.dg/pointer_intent_6.f90
    old new  
     1! { dg-do compile }
     2!
     3! PR fortran/52864
     4!
     5! Assigning to an intent(in) pointer (which is valid).
     6!
     7      program test
     8         type PoisFFT_Solver3D
     9           complex, dimension(:,:,:), &
     10                           pointer :: work => null()
     11         end type PoisFFT_Solver3D
     12      contains
     13        subroutine PoisFFT_Solver3D_FullPeriodic(D, p)
     14          type(PoisFFT_Solver3D), intent(in) :: D
     15          real, intent(in), pointer :: p(:)
     16          D%work(i,j,k) = 0.0
     17          p = 0.0
     18        end subroutine
     19      end
  • gcc/testsuite/gfortran.dg/proc_ptr_34.f90

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gfortran.dg/proc_ptr_34.f90 gcc-4.6.3/gcc/testsuite/gfortran.dg/proc_ptr_34.f90
    old new  
     1! { dg-do compile }
     2!
     3! PR fortran/52469
     4!
     5! This was failing as the DECL of the proc pointer "func"
     6! was used for the interface of the proc-pointer component "my_f_ptr"
     7! rather than the decl of the proc-pointer target
     8!
     9! Contributed by palott@gmail.com
     10!
     11
     12module ExampleFuncs
     13  implicit none
     14
     15  ! NOTE: "func" is a procedure pointer!
     16  pointer :: func
     17  interface
     18     function func (z)
     19        real :: func
     20        real, intent (in) :: z
     21     end function func
     22  end interface
     23
     24  type Contains_f_ptr
     25     procedure (func), pointer, nopass :: my_f_ptr
     26  end type Contains_f_ptr
     27contains
     28
     29function f1 (x)
     30  real :: f1
     31  real, intent (in) :: x
     32
     33  f1 = 2.0 * x
     34
     35  return
     36end function f1
     37
     38function f2 (x)
     39   real :: f2
     40   real, intent (in) :: x
     41
     42   f2 = 3.0 * x**2
     43
     44   return
     45end function f2
     46
     47function fancy (func, x)
     48   real :: fancy
     49   real, intent (in) :: x
     50
     51   interface AFunc
     52      function func (y)
     53         real :: func
     54         real, intent (in) ::y
     55      end function func
     56   end interface AFunc
     57
     58   fancy = func (x) + 3.3 * x
     59end function fancy
     60
     61end module  ExampleFuncs
     62
     63
     64program test_proc_ptr
     65  use ExampleFuncs
     66  implicit none
     67
     68  type (Contains_f_ptr), dimension (2) :: NewType
     69 
     70  !NewType(1) % my_f_ptr => f1
     71  NewType(2) % my_f_ptr => f2
     72
     73  !write (*, *) NewType(1) % my_f_ptr (3.0), NewType(2) % my_f_ptr (3.0)
     74  write (6, *)  NewType(2) % my_f_ptr (3.0) ! < Shall print '27.0'
     75
     76  stop
     77end program test_proc_ptr
     78
     79! { dg-final { cleanup-modules "examplefuncs" } }
  • gcc/testsuite/gfortran.dg/realloc_on_assign_15.f90

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gfortran.dg/realloc_on_assign_15.f90 gcc-4.6.3/gcc/testsuite/gfortran.dg/realloc_on_assign_15.f90
    old new  
     1! { dg-do run }
     2!
     3! PR fortran/53389
     4!
     5! The program was leaking memory before due to
     6! realloc on assignment and nested functions.
     7!
     8module foo
     9  implicit none
     10  contains
     11
     12  function filler(array, val)
     13    real, dimension(:), intent(in):: array
     14    real, dimension(size(array)):: filler
     15    real, intent(in):: val
     16
     17    filler=val
     18
     19  end function filler
     20end module
     21
     22program test
     23  use foo
     24  implicit none
     25
     26  real, dimension(:), allocatable:: x, y
     27  integer, parameter:: N=1000 !*1000
     28  integer:: i
     29
     30!  allocate( x(N) )
     31  allocate( y(N) )
     32  y=0.0
     33
     34  do i=1, N
     35!    print *,i
     36    x=filler(filler(y, real(2*i)), real(i))
     37    y=y+x
     38  end do
     39
     40end program test
  • gcc/testsuite/gfortran.dg/save_4.f90

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/gfortran.dg/save_4.f90 gcc-4.6.3/gcc/testsuite/gfortran.dg/save_4.f90
    old new  
     1! { dg-do compile }
     2! { dg-options "-std=f2003" }
     3!
     4! PR fortran/53597
     5!
     6MODULE somemodule
     7  IMPLICIT NONE
     8  TYPE sometype
     9    INTEGER :: i
     10    DOUBLE PRECISION, POINTER, DIMENSION(:,:) :: coef => NULL()
     11  END TYPE sometype
     12  TYPE(sometype) :: somevariable ! { dg-error "Fortran 2008: Implied SAVE for module variable 'somevariable' at .1., needed due to the default initialization" }
     13END MODULE somemodule
  • gcc/testsuite/lib/target-supports.exp

    diff -Naur gcc-4.6.3.orig/gcc/testsuite/lib/target-supports.exp gcc-4.6.3/gcc/testsuite/lib/target-supports.exp
    old new  
    29762976    return $et_natural_alignment_64_saved
    29772977}
    29782978
     2979# Return 1 if all vector types are naturally aligned (aligned to their
     2980# type-size), 0 otherwise.
     2981#
     2982# This won't change for different subtargets so cache the result.
     2983
     2984proc check_effective_target_vect_natural_alignment { } {
     2985    global et_vect_natural_alignment
     2986
     2987    if [info exists et_vect_natural_alignment_saved] {
     2988        verbose "check_effective_target_vect_natural_alignment: using cached result" 2
     2989    } else {
     2990        set et_vect_natural_alignment_saved 1
     2991        if { [check_effective_target_arm_eabi] } {
     2992            set et_vect_natural_alignment_saved 0
     2993        }
     2994    }
     2995    verbose "check_effective_target_vect_natural_alignment: returning $et_vect_natural_alignment_saved" 2
     2996    return $et_vect_natural_alignment_saved
     2997}
     2998
    29792999# Return 1 if vector alignment (for types of size 32 bit or less) is reachable, 0 otherwise.
    29803000#
    29813001# This won't change for different subtargets so cache the result.
  • gcc/toplev.c

    diff -Naur gcc-4.6.3.orig/gcc/toplev.c gcc-4.6.3/gcc/toplev.c
    old new  
    13261326           "and -ftree-loop-linear)");
    13271327#endif
    13281328
     1329  if (flag_strict_volatile_bitfields > 0 && !abi_version_at_least (2))
     1330    {
     1331      warning (0, "-fstrict-volatile-bitfields disabled; "
     1332               "it is incompatible with ABI versions < 2");
     1333      flag_strict_volatile_bitfields = 0;
     1334    }
     1335
    13291336  /* Unrolling all loops implies that standard loop unrolling must also
    13301337     be done.  */
    13311338  if (flag_unroll_all_loops)
  • gcc/tree-inline.c

    diff -Naur gcc-4.6.3.orig/gcc/tree-inline.c gcc-4.6.3/gcc/tree-inline.c
    old new  
    49474947                if ((e = cgraph_edge (id->dst_node, gsi_stmt (bsi))) != NULL)
    49484948                  {
    49494949                    if (!e->inline_failed)
    4950                       cgraph_remove_node_and_inline_clones (e->callee);
     4950                      cgraph_remove_node_and_inline_clones (e->callee, id->dst_node);
    49514951                    else
    49524952                      cgraph_remove_edge (e);
    49534953                  }
     
    49574957                    {
    49584958                      if ((e = cgraph_edge (node, gsi_stmt (bsi))) != NULL)
    49594959                        {
    4960                           if (!e->inline_failed)
    4961                             cgraph_remove_node_and_inline_clones (e->callee);
     4960                          if (!e->inline_failed && e->callee != id->src_node)
     4961                            cgraph_remove_node_and_inline_clones (e->callee, id->dst_node);
    49624962                          else
    49634963                            cgraph_remove_edge (e);
    49644964                        }
  • gcc/tree-pretty-print.c

    diff -Naur gcc-4.6.3.orig/gcc/tree-pretty-print.c gcc-4.6.3/gcc/tree-pretty-print.c
    old new  
    805805               infer them and MEM_ATTR caching will share MEM_REFs
    806806               with differently-typed op0s.  */
    807807            && TREE_CODE (TREE_OPERAND (node, 0)) != INTEGER_CST
     808            /* Released SSA_NAMES have no TREE_TYPE.  */
     809            && TREE_TYPE (TREE_OPERAND (node, 0)) != NULL_TREE
    808810            /* Same pointer types, but ignoring POINTER_TYPE vs.
    809811               REFERENCE_TYPE.  */
    810812            && (TREE_TYPE (TREE_TYPE (TREE_OPERAND (node, 0)))
     
    11711173                     can't infer them and MEM_ATTR caching will share
    11721174                     MEM_REFs with differently-typed op0s.  */
    11731175                  && TREE_CODE (TREE_OPERAND (op0, 0)) != INTEGER_CST
     1176                  /* Released SSA_NAMES have no TREE_TYPE.  */
     1177                  && TREE_TYPE (TREE_OPERAND (op0, 0)) != NULL_TREE
    11741178                  /* Same pointer types, but ignoring POINTER_TYPE vs.
    11751179                     REFERENCE_TYPE.  */
    11761180                  && (TREE_TYPE (TREE_TYPE (TREE_OPERAND (op0, 0)))
  • gcc/tree-sra.c

    diff -Naur gcc-4.6.3.orig/gcc/tree-sra.c gcc-4.6.3/gcc/tree-sra.c
    old new  
    29372937    }
    29382938  else
    29392939    {
    2940       if (access_has_children_p (lacc) && access_has_children_p (racc))
     2940      if (access_has_children_p (lacc)
     2941          && access_has_children_p (racc)
     2942          /* When an access represents an unscalarizable region, it usually
     2943             represents accesses with variable offset and thus must not be used
     2944             to generate new memory accesses.  */
     2945          && !lacc->grp_unscalarizable_region
     2946          && !racc->grp_unscalarizable_region)
    29412947        {
    29422948          gimple_stmt_iterator orig_gsi = *gsi;
    29432949          enum unscalarized_data_handling refreshed;
  • gcc/tree-ssa-ccp.c

    diff -Naur gcc-4.6.3.orig/gcc/tree-ssa-ccp.c gcc-4.6.3/gcc/tree-ssa-ccp.c
    old new  
    13641364      if (!DECL_INITIAL (base)
    13651365          && (TREE_STATIC (base) || DECL_EXTERNAL (base)))
    13661366        return error_mark_node;
     1367      /* Do not return an error_mark_node DECL_INITIAL.  LTO uses this
     1368         as special marker (_not_ zero ...) for its own purposes.  */
     1369      if (DECL_INITIAL (base) == error_mark_node)
     1370        return NULL_TREE;
    13671371      return DECL_INITIAL (base);
    13681372
    13691373    case ARRAY_REF:
  • gcc/tree-vect-data-refs.c

    diff -Naur gcc-4.6.3.orig/gcc/tree-vect-data-refs.c gcc-4.6.3/gcc/tree-vect-data-refs.c
    old new  
    10191019      int misal = DR_MISALIGNMENT (dr);
    10201020      tree vectype = STMT_VINFO_VECTYPE (stmt_info);
    10211021      misal += negative ? -npeel * dr_size : npeel * dr_size;
    1022       misal &= GET_MODE_SIZE (TYPE_MODE (vectype)) - 1;
     1022      misal &= (TYPE_ALIGN (vectype) / BITS_PER_UNIT) - 1;
    10231023      SET_DR_MISALIGNMENT (dr, misal);
    10241024      return;
    10251025    }
  • gcc/tree-vect-loop-manip.c

    diff -Naur gcc-4.6.3.orig/gcc/tree-vect-loop-manip.c gcc-4.6.3/gcc/tree-vect-loop-manip.c
    old new  
    20082008   If the misalignment of DR is known at compile time:
    20092009     addr_mis = int mis = DR_MISALIGNMENT (dr);
    20102010   Else, compute address misalignment in bytes:
    2011      addr_mis = addr & (vectype_size - 1)
     2011     addr_mis = addr & (vectype_align - 1)
    20122012
    20132013   prolog_niters = min (LOOP_NITERS, ((VF - addr_mis/elem_size)&(VF-1))/step)
    20142014
     
    20652065      tree ptr_type = TREE_TYPE (start_addr);
    20662066      tree size = TYPE_SIZE (ptr_type);
    20672067      tree type = lang_hooks.types.type_for_size (tree_low_cst (size, 1), 1);
    2068       tree vectype_size_minus_1 = build_int_cst (type, vectype_align - 1);
    2069       tree elem_size_log =
    2070         build_int_cst (type, exact_log2 (vectype_align/nelements));
     2068      tree vectype_align_minus_1 = build_int_cst (type, vectype_align - 1);
     2069      HOST_WIDE_INT elem_size =
     2070                int_cst_value (TYPE_SIZE_UNIT (TREE_TYPE (vectype)));
     2071      tree elem_size_log = build_int_cst (type, exact_log2 (elem_size));
    20712072      tree nelements_minus_1 = build_int_cst (type, nelements - 1);
    20722073      tree nelements_tree = build_int_cst (type, nelements);
    20732074      tree byte_misalign;
     
    20762077      new_bb = gsi_insert_seq_on_edge_immediate (pe, new_stmts);
    20772078      gcc_assert (!new_bb);
    20782079
    2079       /* Create:  byte_misalign = addr & (vectype_size - 1)  */
     2080      /* Create:  byte_misalign = addr & (vectype_align - 1)  */
    20802081      byte_misalign =
    20812082        fold_build2 (BIT_AND_EXPR, type, fold_convert (type, start_addr),
    2082                      vectype_size_minus_1);
     2083                     vectype_align_minus_1);
    20832084
    20842085      /* Create:  elem_misalign = byte_misalign / element_size  */
    20852086      elem_misalign =
  • gcc/tree-vect-loop.c

    diff -Naur gcc-4.6.3.orig/gcc/tree-vect-loop.c gcc-4.6.3/gcc/tree-vect-loop.c
    old new  
    21042104          if (stmt_info
    21052105              && !STMT_VINFO_RELEVANT_P (stmt_info)
    21062106              && (!STMT_VINFO_LIVE_P (stmt_info)
    2107                   || STMT_VINFO_DEF_TYPE (stmt_info) != vect_reduction_def))
     2107                  || !VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_info)))
     2108              && !STMT_VINFO_IN_PATTERN_P (stmt_info))
    21082109            continue;
    21092110
    21102111          if (STMT_VINFO_DATA_REF (vinfo_for_stmt (stmt)))
     
    22512252        {
    22522253          gimple stmt = gsi_stmt (si);
    22532254          stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
     2255
     2256          if (STMT_VINFO_IN_PATTERN_P (stmt_info))
     2257            {
     2258              stmt = STMT_VINFO_RELATED_STMT (stmt_info);
     2259              stmt_info = vinfo_for_stmt (stmt);
     2260            }
     2261
    22542262          /* Skip stmts that are not vectorized inside the loop.  */
    22552263          if (!STMT_VINFO_RELEVANT_P (stmt_info)
    22562264              && (!STMT_VINFO_LIVE_P (stmt_info)
    2257                   || STMT_VINFO_DEF_TYPE (stmt_info) != vect_reduction_def))
     2265                  || !VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_info))))
    22582266            continue;
     2267
    22592268          vec_inside_cost += STMT_VINFO_INSIDE_OF_LOOP_COST (stmt_info) * factor;
    22602269          /* FIXME: for stmts in the inner-loop in outer-loop vectorization,
    22612270             some of the "outside" costs are generated inside the outer-loop.  */
  • gcc/tree-vect-stmts.c

    diff -Naur gcc-4.6.3.orig/gcc/tree-vect-stmts.c gcc-4.6.3/gcc/tree-vect-stmts.c
    old new  
    623623}
    624624
    625625
     626/* Model cost for type demotion and promotion operations.  PWR is normally
     627   zero for single-step promotions and demotions.  It will be one if
     628   two-step promotion/demotion is required, and so on.  Each additional
     629   step doubles the number of instructions required.  */
     630
     631static void
     632vect_model_promotion_demotion_cost (stmt_vec_info stmt_info,
     633                                    enum vect_def_type *dt, int pwr)
     634{
     635  int i, tmp;
     636  int inside_cost = 0, outside_cost = 0, single_stmt_cost;
     637
     638  /* The SLP costs were already calculated during SLP tree build.  */
     639  if (PURE_SLP_STMT (stmt_info))
     640    return;
     641
     642  single_stmt_cost = vect_get_stmt_cost (vec_promote_demote);
     643  for (i = 0; i < pwr + 1; i++)
     644    {
     645      tmp = (STMT_VINFO_TYPE (stmt_info) == type_promotion_vec_info_type) ?
     646        (i + 1) : i;
     647      inside_cost += vect_pow2 (tmp) * single_stmt_cost;
     648    }
     649
     650  /* FORNOW: Assuming maximum 2 args per stmts.  */
     651  for (i = 0; i < 2; i++)
     652    {
     653      if (dt[i] == vect_constant_def || dt[i] == vect_external_def)
     654        outside_cost += vect_get_stmt_cost (vector_stmt);
     655    }
     656
     657  if (vect_print_dump_info (REPORT_COST))
     658    fprintf (vect_dump, "vect_model_promotion_demotion_cost: inside_cost = %d, "
     659             "outside_cost = %d .", inside_cost, outside_cost);
     660
     661  /* Set the costs in STMT_INFO.  */
     662  stmt_vinfo_set_inside_of_loop_cost (stmt_info, NULL, inside_cost);
     663  stmt_vinfo_set_outside_of_loop_cost (stmt_info, NULL, outside_cost);
     664}
     665
    626666/* Function vect_cost_strided_group_size
    627667
    628668   For strided load or store, return the group_size only if it is the first
     
    691731    {
    692732      /* Uses a high and low interleave operation for each needed permute.  */
    693733      inside_cost = ncopies * exact_log2(group_size) * group_size
    694         * vect_get_stmt_cost (vector_stmt);
     734        * vect_get_stmt_cost (vec_perm);
    695735
    696736      if (vect_print_dump_info (REPORT_COST))
    697737        fprintf (vect_dump, "vect_model_store_cost: strided group_size = %d .",
     
    795835    {
    796836      /* Uses an even and odd extract operations for each needed permute.  */
    797837      inside_cost = ncopies * exact_log2(group_size) * group_size
    798         * vect_get_stmt_cost (vector_stmt);
     838        * vect_get_stmt_cost (vec_perm);
    799839
    800840      if (vect_print_dump_info (REPORT_COST))
    801841        fprintf (vect_dump, "vect_model_load_cost: strided group_size = %d .",
     
    855895    case dr_explicit_realign:
    856896      {
    857897        *inside_cost += ncopies * (2 * vect_get_stmt_cost (vector_load)
    858            + vect_get_stmt_cost (vector_stmt));
     898                                   + vect_get_stmt_cost (vec_perm));
    859899
    860900        /* FIXME: If the misalignment remains fixed across the iterations of
    861901           the containing loop, the following cost should be added to the
     
    863903        if (targetm.vectorize.builtin_mask_for_load)
    864904          *inside_cost += vect_get_stmt_cost (vector_stmt);
    865905
     906        if (vect_print_dump_info (REPORT_COST))
     907          fprintf (vect_dump, "vect_model_load_cost: explicit realign");
     908
    866909        break;
    867910      }
    868911    case dr_explicit_realign_optimized:
     
    886929          }
    887930
    888931        *inside_cost += ncopies * (vect_get_stmt_cost (vector_load)
    889           + vect_get_stmt_cost (vector_stmt));
     932                                   + vect_get_stmt_cost (vec_perm));
     933
     934        if (vect_print_dump_info (REPORT_COST))
     935          fprintf (vect_dump,
     936                   "vect_model_load_cost: explicit realign optimized");
     937
    890938        break;
    891939      }
    892940
     
    29192967      STMT_VINFO_TYPE (stmt_info) = type_demotion_vec_info_type;
    29202968      if (vect_print_dump_info (REPORT_DETAILS))
    29212969        fprintf (vect_dump, "=== vectorizable_demotion ===");
    2922       vect_model_simple_cost (stmt_info, ncopies, dt, NULL);
     2970      vect_model_promotion_demotion_cost (stmt_info, dt, multi_step_cvt);
    29232971      return true;
    29242972    }
    29252973
     
    32173265      STMT_VINFO_TYPE (stmt_info) = type_promotion_vec_info_type;
    32183266      if (vect_print_dump_info (REPORT_DETAILS))
    32193267        fprintf (vect_dump, "=== vectorizable_promotion ===");
    3220       vect_model_simple_cost (stmt_info, 2*ncopies, dt, NULL);
     3268      vect_model_promotion_demotion_cost (stmt_info, dt, multi_step_cvt);
    32213269      return true;
    32223270    }
    32233271
  • gcc/varasm.c

    diff -Naur gcc-4.6.3.orig/gcc/varasm.c gcc-4.6.3/gcc/varasm.c
    old new  
    11/* Output variables, constants and external declarations, for GNU compiler.
    22   Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997,
    33   1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
    4    2010, 2011  Free Software Foundation, Inc.
     4   2010, 2011, 2012  Free Software Foundation, Inc.
    55
    66This file is part of GCC.
    77
     
    3030#include "config.h"
    3131#include "system.h"
    3232#include "coretypes.h"
     33#include "pointer-set.h"
    3334#include "tm.h"
    3435#include "rtl.h"
    3536#include "tree.h"
     
    20972098   it all the way to final.  See PR 17982 for further discussion.  */
    20982099static GTY(()) tree pending_assemble_externals;
    20992100
     2101/* FIXME: Trunk is at GCC 4.8 now and the above problem still hasn't been
     2102   addressed properly.  This caused PR 52640 due to O(external_decls**2)
     2103   lookups in the pending_assemble_externals TREE_LIST in assemble_external.
     2104   Paper over with this pointer set, which we use to see if we have already
     2105   added a decl to pending_assemble_externals without first traversing
     2106   the entire pending_assemble_externals list.  See assemble_external().  */
     2107static struct pointer_set_t *pending_assemble_externals_set;
     2108
     2109/* Some targets delay some output to final using TARGET_ASM_FILE_END.
     2110   As a result, assemble_external can be called after the list of externals
     2111   is processed and the pointer set destroyed.  */
     2112static bool pending_assemble_externals_processed;
     2113
    21002114#ifdef ASM_OUTPUT_EXTERNAL
    21012115/* True if DECL is a function decl for which no out-of-line copy exists.
    21022116   It is assumed that DECL's assembler name has been set.  */
     
    21462160    assemble_external_real (TREE_VALUE (list));
    21472161
    21482162  pending_assemble_externals = 0;
     2163  pending_assemble_externals_processed = true;
     2164  pointer_set_destroy (pending_assemble_externals_set);
    21492165#endif
    21502166}
    21512167
     
    21862202    weak_decls = tree_cons (NULL, decl, weak_decls);
    21872203
    21882204#ifdef ASM_OUTPUT_EXTERNAL
    2189   if (value_member (decl, pending_assemble_externals) == NULL_TREE)
     2205  if (pending_assemble_externals_processed)
     2206    {
     2207      assemble_external_real (decl);
     2208      return;
     2209    }
     2210
     2211  if (! pointer_set_insert (pending_assemble_externals_set, decl))
    21902212    pending_assemble_externals = tree_cons (NULL, decl,
    21912213                                            pending_assemble_externals);
    21922214#endif
     
    39223944           tem = TREE_OPERAND (tem, 0))
    39233945        ;
    39243946
     3947      if (TREE_CODE (tem) == MEM_REF
     3948          && TREE_CODE (TREE_OPERAND (tem, 0)) == ADDR_EXPR)
     3949        {
     3950          reloc = compute_reloc_for_constant (TREE_OPERAND (tem, 0));
     3951          break;
     3952        }
     3953
    39253954      if (TREE_PUBLIC (tem))
    39263955        reloc |= 2;
    39273956      else
     
    39904019
    39914020      if (CONSTANT_CLASS_P (tem) || TREE_CODE (tem) == CONSTRUCTOR)
    39924021        output_constant_def (tem, 0);
     4022
     4023      if (TREE_CODE (tem) == MEM_REF)
     4024        output_addressed_constants (TREE_OPERAND (tem, 0));
    39934025      break;
    39944026
    39954027    case PLUS_EXPR:
     
    60196051
    60206052  if (readonly_data_section == NULL)
    60216053    readonly_data_section = text_section;
     6054
     6055#ifdef ASM_OUTPUT_EXTERNAL
     6056  pending_assemble_externals_set = pointer_set_create ();
     6057#endif
    60226058}
    60236059
    60246060enum tls_model
  • gcc/version.c

    diff -Naur gcc-4.6.3.orig/gcc/version.c gcc-4.6.3/gcc/version.c
    old new  
    3333   Makefile.  */
    3434
    3535const char version_string[] = BASEVER DATESTAMP DEVPHASE REVISION;
    36 const char pkgversion_string[] = PKGVERSION;
     36const char pkgversion_string[] = "(GCC for Cross-LFS 4.6.3.20120825) ";
  • libffi/src/powerpc/aix.S

    diff -Naur gcc-4.6.3.orig/libffi/src/powerpc/aix.S gcc-4.6.3/libffi/src/powerpc/aix.S
    old new  
    11/* -----------------------------------------------------------------------
    2    aix.S - Copyright (c) 2002,2009 Free Software Foundation, Inc.
     2   aix.S - Copyright (c) 2002, 2009 Free Software Foundation, Inc.
    33   based on darwin.S by John Hornkvist
    44
    55   PowerPC Assembly glue.
     
    7979        .set f20,20
    8080        .set f21,21
    8181
     82        .extern .ffi_prep_args
     83
    8284#define LIBFFI_ASM
    8385#include <fficonfig.h>
    8486#include <ffi.h>
     
    125127        /* Call ffi_prep_args.  */
    126128        mr      r4, r1
    127129        bl      .ffi_prep_args
     130        nop
    128131
    129132        /* Now do the call.  */
    130133        ld      r0, 0(r29)
     
    226229        /* Call ffi_prep_args.  */
    227230        mr      r4, r1
    228231        bl      .ffi_prep_args
     232        nop
    229233
    230234        /* Now do the call.  */
    231235        lwz     r0, 0(r29)
  • libffi/src/powerpc/aix_closure.S

    diff -Naur gcc-4.6.3.orig/libffi/src/powerpc/aix_closure.S gcc-4.6.3/libffi/src/powerpc/aix_closure.S
    old new  
    7979        .set f20,20
    8080        .set f21,21
    8181
     82        .extern .ffi_closure_helper_DARWIN
     83
    8284#define LIBFFI_ASM
    8385#define JUMPTARGET(name) name
    8486#define L(x) x
     
    165167
    166168        /* look up the proper starting point in table  */
    167169        /* by using return type as offset */
     170        lhz     r3, 10(r3)      /* load type from return type */
    168171        ld      r4, LC..60(2)   /* get address of jump table */
    169172        sldi    r3, r3, 4       /* now multiply return type by 16 */
    170173        ld      r0, 240+16(r1)  /* load return address */
     
    337340
    338341        /* look up the proper starting point in table  */
    339342        /* by using return type as offset */
     343        lhz     r3, 6(r3)       /* load type from return type */
    340344        lwz     r4, LC..60(2)   /* get address of jump table */
    341         slwi    r3, r3, 4       /* now multiply return type by 4 */
     345        slwi    r3, r3, 4       /* now multiply return type by 16 */
    342346        lwz     r0, 176+8(r1)   /* load return address */
    343347        add     r3, r3, r4      /* add contents of table to table address */
    344348        mtctr   r3
  • libgfortran/intrinsics/eoshift2.c

    diff -Naur gcc-4.6.3.orig/libgfortran/intrinsics/eoshift2.c gcc-4.6.3/libgfortran/intrinsics/eoshift2.c
    old new  
    7777
    7878      ret->offset = 0;
    7979      ret->dtype = array->dtype;
     80
     81      if (arraysize > 0)
     82        ret->data = internal_malloc_size (size * arraysize);
     83      else
     84        ret->data = internal_malloc_size (1);
     85
    8086      for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
    8187        {
    8288          index_type ub, str;
     
    9096              * GFC_DESCRIPTOR_STRIDE(ret,i-1);
    9197
    9298          GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
    93 
    94           if (arraysize > 0)
    95             ret->data = internal_malloc_size (size * arraysize);
    96           else
    97             ret->data = internal_malloc_size (1);
    98 
    9999        }
    100100    }
    101101  else if (unlikely (compile_options.bounds_check))
  • libjava/configure

    diff -Naur gcc-4.6.3.orig/libjava/configure gcc-4.6.3/libjava/configure
    old new  
    1977519775        SYSTEMSPEC="-lunicows $SYSTEMSPEC"
    1977619776      fi
    1977719777    ;;
    19778     *-*-darwin9*)
     19778    *-*-darwin[912]*)
    1977919779      SYSTEMSPEC="%{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}"
    1978019780    ;;
    19781     *-*-darwin[12]*)
    19782       # Something is incompatible with pie, would be nice to fix it and
    19783       # remove -no_pie.  PR49461
    19784       SYSTEMSPEC="-no_pie %{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}"
    19785     ;;
    1978619781    *)
    1978719782      SYSTEMSPEC=
    1978819783    ;;
  • libjava/configure.ac

    diff -Naur gcc-4.6.3.orig/libjava/configure.ac gcc-4.6.3/libjava/configure.ac
    old new  
    886886        SYSTEMSPEC="-lunicows $SYSTEMSPEC"
    887887      fi
    888888    ;;
    889     *-*-darwin9*)
     889    *-*-darwin[[912]]*)
    890890      SYSTEMSPEC="%{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}"
    891891    ;;
    892     *-*-darwin[[12]]*)
    893       # Something is incompatible with pie, would be nice to fix it and
    894       # remove -no_pie.  PR49461
    895       SYSTEMSPEC="-no_pie %{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}"
    896     ;;
    897892    *)
    898893      SYSTEMSPEC=
    899894    ;;
  • libquadmath/libquadmath.info

    diff -Naur gcc-4.6.3.orig/libquadmath/libquadmath.info gcc-4.6.3/libquadmath/libquadmath.info
    old new  
    1 This is libquadmath.info, produced by makeinfo version 4.13 from
    2 /d//gcc-4.6.3/gcc-4.6.3/libquadmath/libquadmath.texi.
    3 
    4 Copyright (C) 2010 Free Software Foundation, Inc.
    5 
    6      Permission is granted to copy, distribute and/or modify this
    7      document under the terms of the GNU Free Documentation License,
    8      Version 1.2 or any later version published by the Free Software
    9      Foundation; with no Invariant Sections, with the Front-Cover Texts
    10      being "A GNU Manual," and with the Back-Cover Texts as in (a)
    11      below.  A copy of the license is included in the section entitled
    12      "GNU Free Documentation License."
    13 
    14      (a) The FSF's Back-Cover Text is: "You have the freedom to copy
    15      and modify this GNU manual.
    16 
    17 INFO-DIR-SECTION GNU Libraries
    18 START-INFO-DIR-ENTRY
    19 * libquadmath: (libquadmath).                  GCC Quad-Precision Math Library
    20 END-INFO-DIR-ENTRY
    21 
    22    This manual documents the GCC Quad-Precision Math Library API.
    23 
    24    Published by the Free Software Foundation 51 Franklin Street, Fifth
    25 Floor Boston, MA 02110-1301 USA
    26 
    27    Copyright (C) 2010 Free Software Foundation, Inc.
    28 
    29      Permission is granted to copy, distribute and/or modify this
    30      document under the terms of the GNU Free Documentation License,
    31      Version 1.2 or any later version published by the Free Software
    32      Foundation; with no Invariant Sections, with the Front-Cover Texts
    33      being "A GNU Manual," and with the Back-Cover Texts as in (a)
    34      below.  A copy of the license is included in the section entitled
    35      "GNU Free Documentation License."
    36 
    37      (a) The FSF's Back-Cover Text is: "You have the freedom to copy
    38      and modify this GNU manual.
    39 
    40 
    41 File: libquadmath.info,  Node: Top,  Next: Typedef and constants,  Up: (dir)
    42 
    43 Introduction
    44 ************
    45 
    46 This manual documents the usage of libquadmath, the GCC Quad-Precision
    47 Math Library Application Programming Interface (API).
    48 
    49 * Menu:
    50 
    51 * Typedef and constants::      Defined data types and constants
    52 * Math Library Routines::      The Libquadmath math runtime application
    53                                programming interface.
    54 * I/O Library Routines::       The Libquadmath I/O runtime application
    55                                programming interface.
    56 * GNU Free Documentation License::
    57                                How you can copy and share this manual.
    58 * Reporting Bugs::             How to report bugs in GCC Libquadmath.
    59 
    60 
    61 File: libquadmath.info,  Node: Typedef and constants,  Next: Math Library Routines,  Prev: Top,  Up: Top
    62 
    63 1 Typedef and constants
    64 ***********************
    65 
    66 The following data type has been defined via `typedef'.
    67 
    68 `__complex128': `__float128'-based complex number
    69 
    70    The following macros are defined, which give the numeric limits of
    71 the `__float128' data type.
    72 
    73 `FLT128_MAX': largest finite number
    74 
    75 `FLT128_MIN': smallest positive number with full precision
    76 
    77 `FLT128_EPSILON': difference between 1 and the next larger
    78      representable number
    79 
    80 `FLT128_DENORM_MIN': smallest positive denormalized number
    81 
    82 `FLT128_MANT_DIG': number of digits in the mantissa (bit precision)
    83 
    84 `FLT128_MIN_EXP': maximal negative exponent
    85 
    86 `FLT128_MAX_EXP': maximal positive exponent
    87 
    88 `FLT128_DIG': number of decimal digits in the mantissa
    89 
    90 `FLT128_MIN_10_EXP': maximal negative decimal exponent
    91 
    92 `FLT128_MAX_10_EXP': maximal positive decimal exponent
    93 
    94    The following mathematical constants of type `__float128' are
    95 defined.
    96 
    97 `M_Eq': the constant e (Euler's number)
    98 
    99 `M_LOG2Eq': binary logarithm of 2
    100 
    101 `M_LOG10Eq': common, decimal logarithm of 2
    102 
    103 `M_LN2q': natural logarithm of 2
    104 
    105 `M_LN10q': natural logarithm of 10
    106 
    107 `M_PIq': pi
    108 
    109 `M_PI_2q': two pi
    110 
    111 `M_PI_4q': four pi
    112 
    113 `M_1_PIq': one over pi
    114 
    115 `M_2_PIq': one over two pi
    116 
    117 `M_2_SQRTPIq': two over square root of pi
    118 
    119 `M_SQRT2q': square root of 2
    120 
    121 `M_SQRT1_2q': one over square root of 2
    122 
    123 
    124 File: libquadmath.info,  Node: Math Library Routines,  Next: I/O Library Routines,  Prev: Typedef and constants,  Up: Top
    125 
    126 2 Math Library Routines
    127 ***********************
    128 
    129 The following mathematical functions are available:
    130 
    131 `acosq': arc cosine function
    132 
    133 `acoshq': inverse hyperbolic cosine function
    134 
    135 `asinq': arc sine function
    136 
    137 `asinhq': inverse hyperbolic sine function
    138 
    139 `atanq': arc tangent function
    140 
    141 `atanhq': inverse hyperbolic tangent function
    142 
    143 `atan2q': arc tangent function
    144 
    145 `cbrtq': cube root function
    146 
    147 `ceilq': ceiling value function
    148 
    149 `copysignq': copy sign of a number
    150 
    151 `coshq': hyperbolic cosine function
    152 
    153 `cosq': cosine function
    154 
    155 `erfq': error function
    156 
    157 `erfcq': complementary error function
    158 
    159 `expq': exponential function
    160 
    161 `expm1q': exponential minus 1 function
    162 
    163 `fabsq': absolute value function
    164 
    165 `fdimq': positive difference function
    166 
    167 `finiteq': check finiteness of value
    168 
    169 `floorq': floor value function
    170 
    171 `fmaq': fused multiply and add
    172 
    173 `fmaxq': determine maximum of two values
    174 
    175 `fminq': determine minimum of two values
    176 
    177 `fmodq': remainder value function
    178 
    179 `frexpq': extract mantissa and exponent
    180 
    181 `hypotq': Eucledian distance function
    182 
    183 `ilogbq': get exponent of the value
    184 
    185 `isinfq': check for infinity
    186 
    187 `isnanq': check for not a number
    188 
    189 `j0q': Bessel function of the first kind, first order
    190 
    191 `j1q': Bessel function of the first kind, second order
    192 
    193 `jnq': Bessel function of the first kind, N-th order
    194 
    195 `ldexpq': load exponent of the value
    196 
    197 `lgammaq': logarithmic gamma function
    198 
    199 `llrintq': round to nearest integer value
    200 
    201 `llroundq': round to nearest integer value away from zero
    202 
    203 `logq': natural logarithm function
    204 
    205 `log10q': base 10 logarithm function
    206 
    207 `log1pq': compute natural logarithm of the value plus one
    208 
    209 `log2q': base 2 logarithm function
    210 
    211 `lrintq': round to nearest integer value
    212 
    213 `lroundq': round to nearest integer value away from zero
    214 
    215 `modfq': decompose the floating-point number
    216 
    217 `nanq': return quiet NaN
    218 
    219 `nearbyintq': round to nearest integer
    220 
    221 `nextafterq': next representable floating-point number
    222 
    223 `powq': power function
    224 
    225 `remainderq': remainder function
    226 
    227 `remquoq': remainder and part of quotient
    228 
    229 `rintq': round-to-nearest integral value
    230 
    231 `roundq': round-to-nearest integral value, return `__float128'
    232 
    233 `scalblnq': compute exponent using `FLT_RADIX'
    234 
    235 `scalbnq': compute exponent using `FLT_RADIX'
    236 
    237 `signbitq': return sign bit
    238 
    239 `sincosq': calculate sine and cosine simulataneously
    240 
    241 `sinhq': hyperbolic sine function
    242 
    243 `sinq': sine function
    244 
    245 `sqrtq': square root function
    246 
    247 `tanq': tangent function
    248 
    249 `tanhq': hyperbolic tangent function
    250 
    251 `tgammaq': true gamma function
    252 
    253 `truncq': round to integer, towards zero
    254 
    255 `y0q': Bessel function of the second kind, first order
    256 
    257 `y1q': Bessel function of the second kind, second order
    258 
    259 `ynq': Bessel function of the second kind, N-th order
    260 
    261 `cabsq' complex absolute value function
    262 
    263 `cargq': calculate the argument
    264 
    265 `cimagq' imaginary part of complex number
    266 
    267 `crealq': real part of complex number
    268 
    269 `cacoshq': complex arc hyperbolic cosine function
    270 
    271 `cacosq': complex arc cosine function
    272 
    273 `casinhq': complex arc hyperbolic sine function
    274 
    275 `casinq': complex arc sine function
    276 
    277 `catanhq': complex arc hyperbolic tangent function
    278 
    279 `catanq': complex arc tangent function
    280 
    281 `ccosq' complex cosine function:
    282 
    283 `ccoshq': complex hyperbolic cosine function
    284 
    285 `cexpq': complex exponential function
    286 
    287 `cexpiq': computes the exponential function of "i" times a
    288      real value
    289 
    290 `clogq': complex natural logarithm
    291 
    292 `clog10q': complex base 10 logarithm
    293 
    294 `conjq': complex conjugate function
    295 
    296 `cpowq': complex power function
    297 
    298 `cprojq': project into Riemann Sphere
    299 
    300 `csinq': complex sine function
    301 
    302 `csinhq': complex hyperbolic sine function
    303 
    304 `csqrtq': complex square root
    305 
    306 `ctanq': complex tangent function
    307 
    308 `ctanhq': complex hyperbolic tangent function
    309 
    310 
    311 File: libquadmath.info,  Node: I/O Library Routines,  Next: GNU Free Documentation License,  Prev: Math Library Routines,  Up: Top
    312 
    313 3 I/O Library Routines
    314 **********************
    315 
    316 * Menu:
    317 
    318 * `strtoflt128':          strtoflt128,          Convert from string
    319 * `quadmath_snprintf':    quadmath_snprintf,    Convert to string
    320 
    321 
    322 File: libquadmath.info,  Node: strtoflt128,  Next: quadmath_snprintf,  Up: I/O Library Routines
    323 
    324 3.1 `strtoflt128' -- Convert from string
    325 ========================================
    326 
    327 The function `dmath_strtopQ' converts a string into a `__float128'
    328 number.
    329 
    330 Syntax
    331      `__float128 strtoflt128 (const char *s, char **sp)'
    332 
    333 _Arguments_:
    334      S          input string
    335      SP         the address of the next character in the string
    336 
    337      The argument SP contains, if not `NULL', the address of the next
    338      character following the parts of the string, which have been read.
    339 
    340 Example
    341           #include <quadmath.h>
    342 
    343           int main ()
    344           {
    345             __float128 r;
    346 
    347             r = strtoflt128 ("1.2345678", NULL);
    348 
    349             return 0;
    350           }
    351 
    352 
    353 File: libquadmath.info,  Node: quadmath_snprintf,  Prev: strtoflt128,  Up: I/O Library Routines
    354 
    355 3.2 `quadmath_snprintf' -- Convert to string
    356 ============================================
    357 
    358 The function `quadmath_snprintf' converts a `__float128' floating-point
    359 number into a string.  It is a specialized alternative to `snprintf',
    360 where the format string is restricted to a single conversion specifier
    361 with `Q' modifier and conversion specifier `e', `E', `f', `F', `g',
    362 `G', `a' or `A', with no extra characters before or after the
    363 conversion specifier.  The `%m$' or `*m$' style must not be used in the
    364 format.
    365 
    366 Syntax
    367      `int quadmath_snprintf (char *s, size_t size, const char *format,
    368      ...)'
    369 
    370 _Arguments_:
    371      S          output string
    372      SIZE       byte size of the string, including tailing NUL
    373      FORMAT     conversion specifier string
    374 
    375 Example
    376           #include <quadmath.h>
    377           #include <stdlib.h>
    378           #include <stdio.h>
    379 
    380           int main ()
    381           {
    382             __float128 r;
    383             int prec = 20;
    384             int width = 46;
    385             char buf[128];
    386 
    387             r = 2.0q;
    388             r = sqrtq (r);
    389             int n = quadmath_snprintf (buf, sizeof buf, "%+-#*.20Qe", width, r);
    390             if ((size_t) n < sizeof buf)
    391               printf ("%s\n", buf);
    392               /* Prints: +1.41421356237309504880e+00 */
    393             quadmath_snprintf (buf, sizeof buf, "%Qa", r);
    394             if ((size_t) n < sizeof buf)
    395               printf ("%s\n", buf);
    396               /* Prints: 0x1.6a09e667f3bcc908b2fb1366ea96p+0 */
    397             n = quadmath_snprintf (NULL, 0, "%+-#46.*Qe", prec, r);
    398             if (n > -1)
    399               {
    400                 char *str = malloc (n + 1);
    401                 if (str)
    402                   {
    403                     quadmath_snprintf (str, n + 1, "%+-#46.*Qe", prec, r);
    404                     printf ("%s\n", str);
    405                     /* Prints: +1.41421356237309504880e+00 */
    406                   }
    407                 free (str);
    408               }
    409             return 0;
    410           }
    411 
    412 
    413    On some targets when supported by the C library hooks are installed
    414 for `printf' family of functions, so that `printf ("%Qe", 1.2Q);' etc.
    415 works too.
    416 
    417 
    418 File: libquadmath.info,  Node: GNU Free Documentation License,  Next: Reporting Bugs,  Prev: I/O Library Routines,  Up: Top
    419 
    420 GNU Free Documentation License
    421 ******************************
    422 
    423                      Version 1.3, 3 November 2008
    424 
    425      Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
    426      `http://fsf.org/'
    427 
    428      Everyone is permitted to copy and distribute verbatim copies
    429      of this license document, but changing it is not allowed.
    430 
    431   0. PREAMBLE
    432 
    433      The purpose of this License is to make a manual, textbook, or other
    434      functional and useful document "free" in the sense of freedom: to
    435      assure everyone the effective freedom to copy and redistribute it,
    436      with or without modifying it, either commercially or
    437      noncommercially.  Secondarily, this License preserves for the
    438      author and publisher a way to get credit for their work, while not
    439      being considered responsible for modifications made by others.
    440 
    441      This License is a kind of "copyleft", which means that derivative
    442      works of the document must themselves be free in the same sense.
    443      It complements the GNU General Public License, which is a copyleft
    444      license designed for free software.
    445 
    446      We have designed this License in order to use it for manuals for
    447      free software, because free software needs free documentation: a
    448      free program should come with manuals providing the same freedoms
    449      that the software does.  But this License is not limited to
    450      software manuals; it can be used for any textual work, regardless
    451      of subject matter or whether it is published as a printed book.
    452      We recommend this License principally for works whose purpose is
    453      instruction or reference.
    454 
    455   1. APPLICABILITY AND DEFINITIONS
    456 
    457      This License applies to any manual or other work, in any medium,
    458      that contains a notice placed by the copyright holder saying it
    459      can be distributed under the terms of this License.  Such a notice
    460      grants a world-wide, royalty-free license, unlimited in duration,
    461      to use that work under the conditions stated herein.  The
    462      "Document", below, refers to any such manual or work.  Any member
    463      of the public is a licensee, and is addressed as "you".  You
    464      accept the license if you copy, modify or distribute the work in a
    465      way requiring permission under copyright law.
    466 
    467      A "Modified Version" of the Document means any work containing the
    468      Document or a portion of it, either copied verbatim, or with
    469      modifications and/or translated into another language.
    470 
    471      A "Secondary Section" is a named appendix or a front-matter section
    472      of the Document that deals exclusively with the relationship of the
    473      publishers or authors of the Document to the Document's overall
    474      subject (or to related matters) and contains nothing that could
    475      fall directly within that overall subject.  (Thus, if the Document
    476      is in part a textbook of mathematics, a Secondary Section may not
    477      explain any mathematics.)  The relationship could be a matter of
    478      historical connection with the subject or with related matters, or
    479      of legal, commercial, philosophical, ethical or political position
    480      regarding them.
    481 
    482      The "Invariant Sections" are certain Secondary Sections whose
    483      titles are designated, as being those of Invariant Sections, in
    484      the notice that says that the Document is released under this
    485      License.  If a section does not fit the above definition of
    486      Secondary then it is not allowed to be designated as Invariant.
    487      The Document may contain zero Invariant Sections.  If the Document
    488      does not identify any Invariant Sections then there are none.
    489 
    490      The "Cover Texts" are certain short passages of text that are
    491      listed, as Front-Cover Texts or Back-Cover Texts, in the notice
    492      that says that the Document is released under this License.  A
    493      Front-Cover Text may be at most 5 words, and a Back-Cover Text may
    494      be at most 25 words.
    495 
    496      A "Transparent" copy of the Document means a machine-readable copy,
    497      represented in a format whose specification is available to the
    498      general public, that is suitable for revising the document
    499      straightforwardly with generic text editors or (for images
    500      composed of pixels) generic paint programs or (for drawings) some
    501      widely available drawing editor, and that is suitable for input to
    502      text formatters or for automatic translation to a variety of
    503      formats suitable for input to text formatters.  A copy made in an
    504      otherwise Transparent file format whose markup, or absence of
    505      markup, has been arranged to thwart or discourage subsequent
    506      modification by readers is not Transparent.  An image format is
    507      not Transparent if used for any substantial amount of text.  A
    508      copy that is not "Transparent" is called "Opaque".
    509 
    510      Examples of suitable formats for Transparent copies include plain
    511      ASCII without markup, Texinfo input format, LaTeX input format,
    512      SGML or XML using a publicly available DTD, and
    513      standard-conforming simple HTML, PostScript or PDF designed for
    514      human modification.  Examples of transparent image formats include
    515      PNG, XCF and JPG.  Opaque formats include proprietary formats that
    516      can be read and edited only by proprietary word processors, SGML or
    517      XML for which the DTD and/or processing tools are not generally
    518      available, and the machine-generated HTML, PostScript or PDF
    519      produced by some word processors for output purposes only.
    520 
    521      The "Title Page" means, for a printed book, the title page itself,
    522      plus such following pages as are needed to hold, legibly, the
    523      material this License requires to appear in the title page.  For
    524      works in formats which do not have any title page as such, "Title
    525      Page" means the text near the most prominent appearance of the
    526      work's title, preceding the beginning of the body of the text.
    527 
    528      The "publisher" means any person or entity that distributes copies
    529      of the Document to the public.
    530 
    531      A section "Entitled XYZ" means a named subunit of the Document
    532      whose title either is precisely XYZ or contains XYZ in parentheses
    533      following text that translates XYZ in another language.  (Here XYZ
    534      stands for a specific section name mentioned below, such as
    535      "Acknowledgements", "Dedications", "Endorsements", or "History".)
    536      To "Preserve the Title" of such a section when you modify the
    537      Document means that it remains a section "Entitled XYZ" according
    538      to this definition.
    539 
    540      The Document may include Warranty Disclaimers next to the notice
    541      which states that this License applies to the Document.  These
    542      Warranty Disclaimers are considered to be included by reference in
    543      this License, but only as regards disclaiming warranties: any other
    544      implication that these Warranty Disclaimers may have is void and
    545      has no effect on the meaning of this License.
    546 
    547   2. VERBATIM COPYING
    548 
    549      You may copy and distribute the Document in any medium, either
    550      commercially or noncommercially, provided that this License, the
    551      copyright notices, and the license notice saying this License
    552      applies to the Document are reproduced in all copies, and that you
    553      add no other conditions whatsoever to those of this License.  You
    554      may not use technical measures to obstruct or control the reading
    555      or further copying of the copies you make or distribute.  However,
    556      you may accept compensation in exchange for copies.  If you
    557      distribute a large enough number of copies you must also follow
    558      the conditions in section 3.
    559 
    560      You may also lend copies, under the same conditions stated above,
    561      and you may publicly display copies.
    562 
    563   3. COPYING IN QUANTITY
    564 
    565      If you publish printed copies (or copies in media that commonly
    566      have printed covers) of the Document, numbering more than 100, and
    567      the Document's license notice requires Cover Texts, you must
    568      enclose the copies in covers that carry, clearly and legibly, all
    569      these Cover Texts: Front-Cover Texts on the front cover, and
    570      Back-Cover Texts on the back cover.  Both covers must also clearly
    571      and legibly identify you as the publisher of these copies.  The
    572      front cover must present the full title with all words of the
    573      title equally prominent and visible.  You may add other material
    574      on the covers in addition.  Copying with changes limited to the
    575      covers, as long as they preserve the title of the Document and
    576      satisfy these conditions, can be treated as verbatim copying in
    577      other respects.
    578 
    579      If the required texts for either cover are too voluminous to fit
    580      legibly, you should put the first ones listed (as many as fit
    581      reasonably) on the actual cover, and continue the rest onto
    582      adjacent pages.
    583 
    584      If you publish or distribute Opaque copies of the Document
    585      numbering more than 100, you must either include a
    586      machine-readable Transparent copy along with each Opaque copy, or
    587      state in or with each Opaque copy a computer-network location from
    588      which the general network-using public has access to download
    589      using public-standard network protocols a complete Transparent
    590      copy of the Document, free of added material.  If you use the
    591      latter option, you must take reasonably prudent steps, when you
    592      begin distribution of Opaque copies in quantity, to ensure that
    593      this Transparent copy will remain thus accessible at the stated
    594      location until at least one year after the last time you
    595      distribute an Opaque copy (directly or through your agents or
    596      retailers) of that edition to the public.
    597 
    598      It is requested, but not required, that you contact the authors of
    599      the Document well before redistributing any large number of
    600      copies, to give them a chance to provide you with an updated
    601      version of the Document.
    602 
    603   4. MODIFICATIONS
    604 
    605      You may copy and distribute a Modified Version of the Document
    606      under the conditions of sections 2 and 3 above, provided that you
    607      release the Modified Version under precisely this License, with
    608      the Modified Version filling the role of the Document, thus
    609      licensing distribution and modification of the Modified Version to
    610      whoever possesses a copy of it.  In addition, you must do these
    611      things in the Modified Version:
    612 
    613        A. Use in the Title Page (and on the covers, if any) a title
    614           distinct from that of the Document, and from those of
    615           previous versions (which should, if there were any, be listed
    616           in the History section of the Document).  You may use the
    617           same title as a previous version if the original publisher of
    618           that version gives permission.
    619 
    620        B. List on the Title Page, as authors, one or more persons or
    621           entities responsible for authorship of the modifications in
    622           the Modified Version, together with at least five of the
    623           principal authors of the Document (all of its principal
    624           authors, if it has fewer than five), unless they release you
    625           from this requirement.
    626 
    627        C. State on the Title page the name of the publisher of the
    628           Modified Version, as the publisher.
    629 
    630        D. Preserve all the copyright notices of the Document.
    631 
    632        E. Add an appropriate copyright notice for your modifications
    633           adjacent to the other copyright notices.
    634 
    635        F. Include, immediately after the copyright notices, a license
    636           notice giving the public permission to use the Modified
    637           Version under the terms of this License, in the form shown in
    638           the Addendum below.
    639 
    640        G. Preserve in that license notice the full lists of Invariant
    641           Sections and required Cover Texts given in the Document's
    642           license notice.
    643 
    644        H. Include an unaltered copy of this License.
    645 
    646        I. Preserve the section Entitled "History", Preserve its Title,
    647           and add to it an item stating at least the title, year, new
    648           authors, and publisher of the Modified Version as given on
    649           the Title Page.  If there is no section Entitled "History" in
    650           the Document, create one stating the title, year, authors,
    651           and publisher of the Document as given on its Title Page,
    652           then add an item describing the Modified Version as stated in
    653           the previous sentence.
    654 
    655        J. Preserve the network location, if any, given in the Document
    656           for public access to a Transparent copy of the Document, and
    657           likewise the network locations given in the Document for
    658           previous versions it was based on.  These may be placed in
    659           the "History" section.  You may omit a network location for a
    660           work that was published at least four years before the
    661           Document itself, or if the original publisher of the version
    662           it refers to gives permission.
    663 
    664        K. For any section Entitled "Acknowledgements" or "Dedications",
    665           Preserve the Title of the section, and preserve in the
    666           section all the substance and tone of each of the contributor
    667           acknowledgements and/or dedications given therein.
    668 
    669        L. Preserve all the Invariant Sections of the Document,
    670           unaltered in their text and in their titles.  Section numbers
    671           or the equivalent are not considered part of the section
    672           titles.
    673 
    674        M. Delete any section Entitled "Endorsements".  Such a section
    675           may not be included in the Modified Version.
    676 
    677        N. Do not retitle any existing section to be Entitled
    678           "Endorsements" or to conflict in title with any Invariant
    679           Section.
    680 
    681        O. Preserve any Warranty Disclaimers.
    682 
    683      If the Modified Version includes new front-matter sections or
    684      appendices that qualify as Secondary Sections and contain no
    685      material copied from the Document, you may at your option
    686      designate some or all of these sections as invariant.  To do this,
    687      add their titles to the list of Invariant Sections in the Modified
    688      Version's license notice.  These titles must be distinct from any
    689      other section titles.
    690 
    691      You may add a section Entitled "Endorsements", provided it contains
    692      nothing but endorsements of your Modified Version by various
    693      parties--for example, statements of peer review or that the text
    694      has been approved by an organization as the authoritative
    695      definition of a standard.
    696 
    697      You may add a passage of up to five words as a Front-Cover Text,
    698      and a passage of up to 25 words as a Back-Cover Text, to the end
    699      of the list of Cover Texts in the Modified Version.  Only one
    700      passage of Front-Cover Text and one of Back-Cover Text may be
    701      added by (or through arrangements made by) any one entity.  If the
    702      Document already includes a cover text for the same cover,
    703      previously added by you or by arrangement made by the same entity
    704      you are acting on behalf of, you may not add another; but you may
    705      replace the old one, on explicit permission from the previous
    706      publisher that added the old one.
    707 
    708      The author(s) and publisher(s) of the Document do not by this
    709      License give permission to use their names for publicity for or to
    710      assert or imply endorsement of any Modified Version.
    711 
    712   5. COMBINING DOCUMENTS
    713 
    714      You may combine the Document with other documents released under
    715      this License, under the terms defined in section 4 above for
    716      modified versions, provided that you include in the combination
    717      all of the Invariant Sections of all of the original documents,
    718      unmodified, and list them all as Invariant Sections of your
    719      combined work in its license notice, and that you preserve all
    720      their Warranty Disclaimers.
    721 
    722      The combined work need only contain one copy of this License, and
    723      multiple identical Invariant Sections may be replaced with a single
    724      copy.  If there are multiple Invariant Sections with the same name
    725      but different contents, make the title of each such section unique
    726      by adding at the end of it, in parentheses, the name of the
    727      original author or publisher of that section if known, or else a
    728      unique number.  Make the same adjustment to the section titles in
    729      the list of Invariant Sections in the license notice of the
    730      combined work.
    731 
    732      In the combination, you must combine any sections Entitled
    733      "History" in the various original documents, forming one section
    734      Entitled "History"; likewise combine any sections Entitled
    735      "Acknowledgements", and any sections Entitled "Dedications".  You
    736      must delete all sections Entitled "Endorsements."
    737 
    738   6. COLLECTIONS OF DOCUMENTS
    739 
    740      You may make a collection consisting of the Document and other
    741      documents released under this License, and replace the individual
    742      copies of this License in the various documents with a single copy
    743      that is included in the collection, provided that you follow the
    744      rules of this License for verbatim copying of each of the
    745      documents in all other respects.
    746 
    747      You may extract a single document from such a collection, and
    748      distribute it individually under this License, provided you insert
    749      a copy of this License into the extracted document, and follow
    750      this License in all other respects regarding verbatim copying of
    751      that document.
    752 
    753   7. AGGREGATION WITH INDEPENDENT WORKS
    754 
    755      A compilation of the Document or its derivatives with other
    756      separate and independent documents or works, in or on a volume of
    757      a storage or distribution medium, is called an "aggregate" if the
    758      copyright resulting from the compilation is not used to limit the
    759      legal rights of the compilation's users beyond what the individual
    760      works permit.  When the Document is included in an aggregate, this
    761      License does not apply to the other works in the aggregate which
    762      are not themselves derivative works of the Document.
    763 
    764      If the Cover Text requirement of section 3 is applicable to these
    765      copies of the Document, then if the Document is less than one half
    766      of the entire aggregate, the Document's Cover Texts may be placed
    767      on covers that bracket the Document within the aggregate, or the
    768      electronic equivalent of covers if the Document is in electronic
    769      form.  Otherwise they must appear on printed covers that bracket
    770      the whole aggregate.
    771 
    772   8. TRANSLATION
    773 
    774      Translation is considered a kind of modification, so you may
    775      distribute translations of the Document under the terms of section
    776      4.  Replacing Invariant Sections with translations requires special
    777      permission from their copyright holders, but you may include
    778      translations of some or all Invariant Sections in addition to the
    779      original versions of these Invariant Sections.  You may include a
    780      translation of this License, and all the license notices in the
    781      Document, and any Warranty Disclaimers, provided that you also
    782      include the original English version of this License and the
    783      original versions of those notices and disclaimers.  In case of a
    784      disagreement between the translation and the original version of
    785      this License or a notice or disclaimer, the original version will
    786      prevail.
    787 
    788      If a section in the Document is Entitled "Acknowledgements",
    789      "Dedications", or "History", the requirement (section 4) to
    790      Preserve its Title (section 1) will typically require changing the
    791      actual title.
    792 
    793   9. TERMINATION
    794 
    795      You may not copy, modify, sublicense, or distribute the Document
    796      except as expressly provided under this License.  Any attempt
    797      otherwise to copy, modify, sublicense, or distribute it is void,
    798      and will automatically terminate your rights under this License.
    799 
    800      However, if you cease all violation of this License, then your
    801      license from a particular copyright holder is reinstated (a)
    802      provisionally, unless and until the copyright holder explicitly
    803      and finally terminates your license, and (b) permanently, if the
    804      copyright holder fails to notify you of the violation by some
    805      reasonable means prior to 60 days after the cessation.
    806 
    807      Moreover, your license from a particular copyright holder is
    808      reinstated permanently if the copyright holder notifies you of the
    809      violation by some reasonable means, this is the first time you have
    810      received notice of violation of this License (for any work) from
    811      that copyright holder, and you cure the violation prior to 30 days
    812      after your receipt of the notice.
    813 
    814      Termination of your rights under this section does not terminate
    815      the licenses of parties who have received copies or rights from
    816      you under this License.  If your rights have been terminated and
    817      not permanently reinstated, receipt of a copy of some or all of
    818      the same material does not give you any rights to use it.
    819 
    820  10. FUTURE REVISIONS OF THIS LICENSE
    821 
    822      The Free Software Foundation may publish new, revised versions of
    823      the GNU Free Documentation License from time to time.  Such new
    824      versions will be similar in spirit to the present version, but may
    825      differ in detail to address new problems or concerns.  See
    826      `http://www.gnu.org/copyleft/'.
    827 
    828      Each version of the License is given a distinguishing version
    829      number.  If the Document specifies that a particular numbered
    830      version of this License "or any later version" applies to it, you
    831      have the option of following the terms and conditions either of
    832      that specified version or of any later version that has been
    833      published (not as a draft) by the Free Software Foundation.  If
    834      the Document does not specify a version number of this License,
    835      you may choose any version ever published (not as a draft) by the
    836      Free Software Foundation.  If the Document specifies that a proxy
    837      can decide which future versions of this License can be used, that
    838      proxy's public statement of acceptance of a version permanently
    839      authorizes you to choose that version for the Document.
    840 
    841  11. RELICENSING
    842 
    843      "Massive Multiauthor Collaboration Site" (or "MMC Site") means any
    844      World Wide Web server that publishes copyrightable works and also
    845      provides prominent facilities for anybody to edit those works.  A
    846      public wiki that anybody can edit is an example of such a server.
    847      A "Massive Multiauthor Collaboration" (or "MMC") contained in the
    848      site means any set of copyrightable works thus published on the MMC
    849      site.
    850 
    851      "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
    852      license published by Creative Commons Corporation, a not-for-profit
    853      corporation with a principal place of business in San Francisco,
    854      California, as well as future copyleft versions of that license
    855      published by that same organization.
    856 
    857      "Incorporate" means to publish or republish a Document, in whole or
    858      in part, as part of another Document.
    859 
    860      An MMC is "eligible for relicensing" if it is licensed under this
    861      License, and if all works that were first published under this
    862      License somewhere other than this MMC, and subsequently
    863      incorporated in whole or in part into the MMC, (1) had no cover
    864      texts or invariant sections, and (2) were thus incorporated prior
    865      to November 1, 2008.
    866 
    867      The operator of an MMC Site may republish an MMC contained in the
    868      site under CC-BY-SA on the same site at any time before August 1,
    869      2009, provided the MMC is eligible for relicensing.
    870 
    871 
    872 ADDENDUM: How to use this License for your documents
    873 ====================================================
    874 
    875 To use this License in a document you have written, include a copy of
    876 the License in the document and put the following copyright and license
    877 notices just after the title page:
    878 
    879        Copyright (C)  YEAR  YOUR NAME.
    880        Permission is granted to copy, distribute and/or modify this document
    881        under the terms of the GNU Free Documentation License, Version 1.3
    882        or any later version published by the Free Software Foundation;
    883        with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
    884        Texts.  A copy of the license is included in the section entitled ``GNU
    885        Free Documentation License''.
    886 
    887    If you have Invariant Sections, Front-Cover Texts and Back-Cover
    888 Texts, replace the "with...Texts." line with this:
    889 
    890          with the Invariant Sections being LIST THEIR TITLES, with
    891          the Front-Cover Texts being LIST, and with the Back-Cover Texts
    892          being LIST.
    893 
    894    If you have Invariant Sections without Cover Texts, or some other
    895 combination of the three, merge those two alternatives to suit the
    896 situation.
    897 
    898    If your document contains nontrivial examples of program code, we
    899 recommend releasing these examples in parallel under your choice of
    900 free software license, such as the GNU General Public License, to
    901 permit their use in free software.
    902 
    903 
    904 File: libquadmath.info,  Node: Reporting Bugs,  Prev: GNU Free Documentation License,  Up: Top
    905 
    906 4 Reporting Bugs
    907 ****************
    908 
    909 Bugs in the GCC Quad-Precision Math Library implementation should be
    910 reported via `http://gcc.gnu.org/bugs.html'.
    911 
    912 
    913 
    914 Tag Table:
    915 Node: Top1661
    916 Node: Typedef and constants2395
    917 Node: Math Library Routines3813
    918 Node: I/O Library Routines7618
    919 Node: strtoflt1287943
    920 Node: quadmath_snprintf8703
    921 Node: GNU Free Documentation License10894
    922 Node: Reporting Bugs36060
    923 
    924 End Tag Table
  • libstdc++-v3/acinclude.m4

    diff -Naur gcc-4.6.3.orig/libstdc++-v3/acinclude.m4 gcc-4.6.3/libstdc++-v3/acinclude.m4
    old new  
    32133213  ])
    32143214])
    32153215
     3216dnl
     3217dnl Check whether gthreads types can be copy-assigned in C++11 mode.
     3218dnl
     3219AC_DEFUN([GLIBCXX_GTHREADS_CXX11_COPY_ASSIGN], [
     3220
     3221  AC_LANG_SAVE
     3222  AC_LANG_CPLUSPLUS
     3223  ac_save_CXXFLAGS="$CXXFLAGS"
     3224  CXXFLAGS="$CXXFLAGS -std=c++0x -I${toplevel_srcdir}/gcc"
     3225
     3226  target_thread_file=`$CXX -v 2>&1 | sed -n 's/^Thread model: //p'`
     3227  case $target_thread_file in
     3228    posix)
     3229      CXXFLAGS="$CXXFLAGS -DSUPPORTS_WEAK -DGTHREAD_USE_WEAK -D_PTHREADS"
     3230  esac
     3231
     3232  AC_MSG_CHECKING([whether gthreads types are copy-assignable in C++11 mode])
     3233
     3234  AC_TRY_COMPILE([#include "gthr.h"],
     3235    [
     3236      #ifdef __GTHREAD_MUTEX_INIT
     3237      __gthread_mutex_t m1;
     3238      __gthread_mutex_t m2 = __GTHREAD_MUTEX_INIT;
     3239      m1 = m2;
     3240      #endif
     3241      #ifdef __GTHREAD_RECURSIVE_MUTEX_INIT
     3242      __gthread_recursive_mutex_t r1;
     3243      __gthread_recursive_mutex_t r2 = __GTHREAD_RECURSIVE_MUTEX_INIT;
     3244      r1 = r2;
     3245      #endif
     3246      #ifdef __GTHREAD_HAS_COND
     3247      #ifdef __GTHREAD_COND_INIT
     3248      __gthread_cond_t c1;
     3249      __gthread_cond_t c2 = __GTHREAD_COND_INIT;
     3250      c1 = c2;
     3251      #endif
     3252      #endif
     3253    ], [ac_gthread_cxx11_copy_assign=1], [ac_gthread_cxx11_copy_assign=0])
     3254
     3255  if test $ac_gthread_cxx11_copy_assign = 1 ; then res_gthr_copy_assign=yes ;
     3256  else res_gthr_copy_assign=no ; fi
     3257  AC_MSG_RESULT([$res_gthr_copy_assign])
     3258
     3259  if test x"$res_gthr_copy_assign" = x"no"; then
     3260    AC_DEFINE(_GLIBCXX_GTHREADS_NO_COPY_ASSIGN_IN_CXX11, 1,
     3261              [Define if gthreads types cannot be copy-assigned in C++11.])
     3262  fi
     3263
     3264  CXXFLAGS="$ac_save_CXXFLAGS"
     3265  AC_LANG_RESTORE
     3266])
     3267
    32163268# Macros from the top-level gcc directory.
    32173269m4_include([../config/gc++filt.m4])
    32183270m4_include([../config/tls.m4])
  • libstdc++-v3/config/os/bsd/netbsd/ctype_base.h

    diff -Naur gcc-4.6.3.orig/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h gcc-4.6.3/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h
    old new  
    11// Locale support -*- C++ -*-
    22
    3 // Copyright (C) 2000, 2009 Free Software Foundation, Inc.
     3// Copyright (C) 2000, 2009, 2011, 2012 Free Software Foundation, Inc.
    44//
    55// This file is part of the GNU ISO C++ Library.  This library is free
    66// software; you can redistribute it and/or modify it under the
     
    3131//   anoncvs@anoncvs.netbsd.org:/cvsroot/basesrc/include/ctype.h
    3232// See www.netbsd.org for details of access.
    3333 
    34 #include <sys/param.h>
    35 
    3634namespace std _GLIBCXX_VISIBILITY(default)
    3735{
    3836_GLIBCXX_BEGIN_NAMESPACE_VERSION
     
    4745    // on the mask type. Because of this, we don't use an enum.
    4846    typedef unsigned char       mask;
    4947
    50 #if __NetBSD_Version__ < 599004100
     48#ifndef _CTYPE_U
    5149    static const mask upper     = _U;
    5250    static const mask lower     = _L;
    5351    static const mask alpha     = _U | _L;
  • libstdc++-v3/config.h.in

    diff -Naur gcc-4.6.3.orig/libstdc++-v3/config.h.in gcc-4.6.3/libstdc++-v3/config.h.in
    old new  
    692692/* Define if a fully dynamic basic_string is wanted. */
    693693#undef _GLIBCXX_FULLY_DYNAMIC_STRING
    694694
     695/* Define if gthreads types cannot be copy-assigned in C++11. */
     696#undef _GLIBCXX_GTHREADS_NO_COPY_ASSIGN_IN_CXX11
     697
    695698/* Defi