hasting2    02/11/20 12:49:30

  Modified:    live/gcc3/gcc c-objc-common.c flags.h gcc.c pfe-config.h
                        toplev.c varray.c version.c
               live/gcc3/gcc/config darwin.c darwin.h
               live/gcc3/gcc/config/i386 i386.c
               live/gcc3/gcc/cp class.c lex.c
               live/gcc3/gcc/pfe cp-freeze-thaw.c
  Log:
  Merge PFE fixes from pre-import-2002-10-21 branch into TOT,
  add one PFE fix for last FSF merge, add fix for machopic failure in FSF testsuite,
  bump version to 1300.  First 3.3 compiler with working PFE (survivies Finder_FE 
build).
  
  Revision  Changes    Path
  1.19      +7 -0      src/live/gcc3/gcc/c-objc-common.c
  
  Index: c-objc-common.c
  ===================================================================
  RCS file: /cvs/Darwin/src/live/gcc3/gcc/c-objc-common.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- c-objc-common.c   2002/10/24 23:42:41     1.18
  +++ c-objc-common.c   2002/11/20 20:49:12     1.19
  @@ -258,6 +258,13 @@
     /* APPLE LOCAL PFE */
     VARRAY_TREE_INIT (deferred_fns, 32, PFE_VARRAY "deferred_fns");
   
  +/* APPLE LOCAL gdb only used symbols */
  +#ifdef DBX_ONLY_USED_SYMBOLS
  +  /* By default we want to use -gused for C and Objective-C.  */
  +  if (flag_debug_only_used_symbols == -1)
  +    flag_debug_only_used_symbols = 1;
  +#endif
  +
     return filename;
   }
   
  
  
  
  1.39      +5 -0      src/live/gcc3/gcc/flags.h
  
  Index: flags.h
  ===================================================================
  RCS file: /cvs/Darwin/src/live/gcc3/gcc/flags.h,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- flags.h   2002/10/24 23:42:57     1.38
  +++ flags.h   2002/11/20 20:49:12     1.39
  @@ -727,4 +727,9 @@
   #define HONOR_SIGN_DEPENDENT_ROUNDING(MODE) \
     (MODE_HAS_SIGN_DEPENDENT_ROUNDING (MODE) && !flag_unsafe_math_optimizations)
   
  +/* APPLE LOCAL gdb only used symbols */
  +#ifdef DBX_ONLY_USED_SYMBOLS
  +/* Nonzero if generating debugger info for used symbols only.  */
  +extern int flag_debug_only_used_symbols;
  +#endif
   #endif /* ! GCC_FLAGS_H */
  
  
  
  1.155     +3 -3      src/live/gcc3/gcc/gcc.c
  
  Index: gcc.c
  ===================================================================
  RCS file: /cvs/Darwin/src/live/gcc3/gcc/gcc.c,v
  retrieving revision 1.154
  retrieving revision 1.155
  diff -u -r1.154 -r1.155
  --- gcc.c     2002/11/20 00:09:52     1.154
  +++ gcc.c     2002/11/20 20:49:12     1.155
  @@ -3553,6 +3553,9 @@
        }
       }
   
  +  /* Convert new-style -- options to old-style.  */
  +  translate_options (&argc, &argv);
  +
     /* If there is a -V or -b option (or both), process it now, before
        trying to interpret the rest of the command line.  */
     if (argc > 1 && argv[1][0] == '-'
  @@ -3768,9 +3771,6 @@
        }
       }
     /* APPLE LOCAL end constant cfstrings */
  -
  -  /* Convert new-style -- options to old-style.  */
  -  translate_options (&argc, &argv);
   
     /* Do language-specific adjustment/addition of flags.  */
     lang_specific_driver (&argc, &argv, &added_libraries);
  
  
  
  1.10      +3 -3      src/live/gcc3/gcc/pfe-config.h
  
  Index: pfe-config.h
  ===================================================================
  RCS file: /cvs/Darwin/src/live/gcc3/gcc/pfe-config.h,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- pfe-config.h      2002/08/07 03:13:10     1.9
  +++ pfe-config.h      2002/11/20 20:49:13     1.10
  @@ -76,9 +76,9 @@
   /* Disable the following block of #define's when the pfe_ggc_...
      routines are defined to accept the "kind" argument.  */
   #if 1
  -#define pfe_ggc_alloc(size, kind)       ggc_alloc (size)
  -#define pfe_ggc_alloc_cleared(size, kind)  ggc_alloc_cleared (size)
  -#define pfe_ggc_realloc(p, size, kind)          ggc_realloc (p, size)
  +#define pfe_ggc_alloc(size, kind)       ((PFE_DUMPING || PFE_LOADING) ? 
pfe_malloc(size) : ggc_alloc (size))
  +#define pfe_ggc_alloc_cleared(size, kind)  (((PFE_DUMPING) || (PFE_LOADING)) ? 
pfe_calloc(1,size) : ggc_alloc_cleared (size))
  +#define pfe_ggc_realloc(p, size, kind)          ((PFE_DUMPING || PFE_LOADING) ? 
pfe_realloc(p, size) : ggc_realloc (p, size))
   #define pfe_ggc_alloc_rtx(nslots)       ggc_alloc_rtx (nslots)
   #define pfe_ggc_alloc_rtvec(nelt)       ggc_alloc_rtvec (nelt)
   #define pfe_ggc_alloc_tree(length)              ggc_alloc_tree (length)
  
  
  
  1.164     +3 -9      src/live/gcc3/gcc/toplev.c
  
  Index: toplev.c
  ===================================================================
  RCS file: /cvs/Darwin/src/live/gcc3/gcc/toplev.c,v
  retrieving revision 1.163
  retrieving revision 1.164
  diff -u -r1.163 -r1.164
  --- toplev.c  2002/11/07 20:34:24     1.163
  +++ toplev.c  2002/11/20 20:49:13     1.164
  @@ -339,7 +339,7 @@
   /* Type(s) of debugging information we are producing (if any).
      See flags.h for the definitions of the different possible
      types of debugging information.  */
  -enum debug_info_type write_symbols = NO_DEBUG;
  +extern enum debug_info_type write_symbols = NO_DEBUG;
   
   /* Level of debugging information we are producing.  See flags.h
      for the definitions of the different possible levels.  */
  @@ -354,7 +354,7 @@
   /* APPLE LOCAL gdb only used symbols */
   #ifdef DBX_ONLY_USED_SYMBOLS
   /* Nonzero if generating debugger info for used symbols only.  */
  -int flag_debug_only_used_symbols = 0;
  +int flag_debug_only_used_symbols = -1;
   #endif
   
   /* Nonzero means do optimizations.  -O.
  @@ -4367,7 +4367,7 @@
   #ifdef DBX_ONLY_USED_SYMBOLS
     if (strncmp (arg, "full", 4) == 0 || strncmp (arg, "-full", 5) == 0)
       {
  -      /* -fgull and -g are now identical.  */
  +      flag_debug_only_used_symbols = 0;
         char *p = (char *)arg + (*(char *)arg == '-') + 4;
         if (*p == '-')
        ++p;
  @@ -5963,12 +5963,6 @@
       sleep (1);
   #endif
     /* APPLE LOCAL end testsuite OS flush bug workaround */
  -
  -  /* APPLE LOCAL work around Radar 2844245.  */
  -  fflush(stdout); fflush(stderr);
  -#if 0 /* this helps test results sometimes */
  -  sleep (2);
  -#endif
   
     if (errorcount || sorrycount)
       return (FATAL_EXIT_CODE);
  
  
  
  1.16      +5 -4      src/live/gcc3/gcc/varray.c
  
  Index: varray.c
  ===================================================================
  RCS file: /cvs/Darwin/src/live/gcc3/gcc/varray.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- varray.c  2002/08/17 06:29:06     1.15
  +++ varray.c  2002/11/20 20:49:14     1.16
  @@ -32,7 +32,8 @@
      ones needed to ve freeze/thawed.  They are indicated by their
      varray name being prefixed with the string defined by PFE_VARRAY.  */
   static char *use_pfe_mem_indicator = PFE_VARRAY"";
  -#define USE_PFE_MEMORY(name) (*(name) == *use_pfe_mem_indicator)
  +#define USE_PFE_MEMORY(name) ((*(name) == *use_pfe_mem_indicator) \
  +                              && (PFE_DUMPING || PFE_LOADING))
   /* APPLE LOCAL end PFE */
   
   #define VARRAY_HDR_SIZE (sizeof (struct varray_head_tag) - sizeof (varray_data))
  @@ -79,11 +80,11 @@
     varray_type ptr;
     if (uses_ggc [element_kind])
       ptr = USE_PFE_MEMORY (name)
  -      ? (varray_type) GGC_ALLOC_CLEARED (VARRAY_HDR_SIZE + data_size,
  +      ? (varray_type) PFE_CALLOC (VARRAY_HDR_SIZE + data_size, 1,
                                         PFE_ALLOC_VARRAY)
         : (varray_type) ggc_alloc_cleared (VARRAY_HDR_SIZE + data_size);
     else
  -    ptr = USE_PFE_MEMORY (name)
  +    ptr = USE_PFE_MEMORY (name) 
         ? (varray_type) PFE_CALLOC (VARRAY_HDR_SIZE + data_size, 1,
                                  PFE_ALLOC_VARRAY)
         : (varray_type) xcalloc (VARRAY_HDR_SIZE + data_size, 1);
  @@ -114,7 +115,7 @@
         if (uses_ggc[va->type])
        {
          if (va->name && USE_PFE_MEMORY (va->name))
  -         va = (varray_type) GGC_REALLOC ((char *) va,
  +         va = (varray_type) PFE_REALLOC ((char *) va,
                                            VARRAY_HDR_SIZE + data_size,
                                            PFE_ALLOC_VARRAY);
          else
  
  
  
  1.53      +1 -1      src/live/gcc3/gcc/version.c
  
  Index: version.c
  ===================================================================
  RCS file: /cvs/Darwin/src/live/gcc3/gcc/version.c,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- version.c 2002/10/31 21:25:48     1.52
  +++ version.c 2002/11/20 20:49:14     1.53
  @@ -14,7 +14,7 @@
        compiler will be identical to the last prerelease compiler and it
        makes no sense to mark released compilers as 'prerelease'.
   */
  -const char version_string[] = "3.3 20021020 (Apple Computer, Inc. build 1230)";
  +const char version_string[] = "3.3 20021120 (Apple Computer, Inc. build 1300)";
   /* APPLE LOCAL end Apple version */
   
   /* This is the location of the online document giving instructions for
  
  
  
  1.82      +37 -18    src/live/gcc3/gcc/config/darwin.c
  
  Index: darwin.c
  ===================================================================
  RCS file: /cvs/Darwin/src/live/gcc3/gcc/config/darwin.c,v
  retrieving revision 1.81
  retrieving revision 1.82
  diff -u -r1.81 -r1.82
  --- darwin.c  2002/11/07 20:33:23     1.81
  +++ darwin.c  2002/11/20 20:49:18     1.82
  @@ -955,29 +955,48 @@
          pic_ref = plus_constant (base, INTVAL (orig));
          is_complex = 1;
        }
  -      /* APPLE LOCAL begin gen ADD */
  -#ifdef MASK_80387
  -      else if ((GET_CODE (XEXP (orig, 0)) == MEM))
  -     {
  -       pic_ref = gen_rtx (PLUS, Pmode, base, orig);
  -       if ( ! reload_in_progress) /* necessary ? */
  -         {
  -           rtx clob = gen_rtx_CLOBBER (VOIDmode, gen_rtx_REG (CCmode, FLAGS_REG));
  -           rtx set  = gen_rtx_SET (VOIDmode, reg, pic_ref);
  -           pic_ref = gen_rtx_PARALLEL (VOIDmode, gen_rtvec (2, set, clob));
  -           emit_insn (pic_ref);
  -           pic_ref = reg;
  -           is_complex = 0;
  -         }
  -     }
  -#endif
         else
        pic_ref = gen_rtx (PLUS, Pmode, base, orig);
   
  -     /* APPLE LOCAL end gen ADD */
  -
         if (RTX_UNCHANGING_P (base) && RTX_UNCHANGING_P (orig))
        RTX_UNCHANGING_P (pic_ref) = 1;
  +
  +      /* APPLE LOCAL begin gen ADD */
  +#ifdef MASK_80387
  +      {
  +     rtx mem, other;
  +
  +     if (GET_CODE (orig) == MEM) {
  +         mem = orig; other = base;
  +         /* Swap the kids only if there is only one MEM, and it's on the right.  */
  +         if (GET_CODE (base) != MEM) {
  +             XEXP (pic_ref, 0) = orig;
  +             XEXP (pic_ref, 1) = base;
  +           }
  +       }
  +     else if (GET_CODE (base) == MEM) {
  +         mem = base; other = orig;
  +       } else
  +         mem = other = NULL_RTX;
  +     
  +     /* Both kids are MEMs.  */
  +     if (other && GET_CODE (other) == MEM)
  +       other = force_reg (GET_MODE (other), other);
  +
  +     /* The x86 can't post-index a MEM; emit an ADD instruction to handle this.  */
  +     if (mem && GET_CODE (mem) == MEM) {
  +       if ( ! reload_in_progress) {
  +         rtx set = gen_rtx_SET (VOIDmode, reg, pic_ref);
  +         rtx clobber_cc = gen_rtx_CLOBBER (VOIDmode, gen_rtx_REG (CCmode, 
FLAGS_REG));
  +         pic_ref = gen_rtx_PARALLEL (VOIDmode, gen_rtvec (2, set, clobber_cc));
  +         emit_insn (pic_ref);
  +         pic_ref = reg;
  +         is_complex = 0;
  +       }
  +     }
  +      }
  +#endif
  +      /* APPLE LOCAL end gen ADD */
   
         if (reg && is_complex)
        {
  
  
  
  1.185     +10 -1     src/live/gcc3/gcc/config/darwin.h
  
  Index: darwin.h
  ===================================================================
  RCS file: /cvs/Darwin/src/live/gcc3/gcc/config/darwin.h,v
  retrieving revision 1.184
  retrieving revision 1.185
  diff -u -r1.184 -r1.185
  --- darwin.h  2002/11/07 20:33:24     1.184
  +++ darwin.h  2002/11/20 20:49:18     1.185
  @@ -123,6 +123,7 @@
     { "-dylib_file", "-Zdylib_file" }, \
     { "-dynamic", " " },  \
     { "-dynamiclib", "-Zdynamiclib" },  \
  +  { "-exported_symbols_list", "-Zexported_symbols_list" },  \
     { "-seg_addr_table_filename", "-Zseg_addr_table_filename" }, \
     { "-filelist", "-Xlinker -filelist -Xlinker" },  \
     { "-flat_namespace", "-Zflat_namespace" },  \
  @@ -133,8 +134,11 @@
     { "-install_name", "-Zinstall_name" },  \
     { "-multiply_defined_unused", "-Zmultiplydefinedunused" },  \
     { "-multiply_defined", "-Zmultiply_defined" },  \
  +  { "-multi_module", "-Zmulti_module" },  \
     { "-static", "-static -Wa,-static" },  \
  -  { "-traditional-cpp", "-no-cpp-precomp" }
  +  { "-single_module", "-Zsingle_module" },  \
  +  { "-traditional-cpp", "-no-cpp-precomp" }, \
  +  { "-unexported_symbols_list", "-Zunexported_symbols_list" }
   /* APPLE LOCAL end flag translation */
   
   /* APPLE LOCAL framework headers */
  @@ -157,6 +161,7 @@
      !strcmp (STR, "compatibility_version") ? 1 : \
      !strcmp (STR, "current_version") ? 1 :    \
      !strcmp (STR, "Zdylib_file") ? 1 :                \
  +   !strcmp (STR, "Zexported_symbols_list") ? 1 : \
      !strcmp (STR, "Zimage_base") ? 1 :                \
      !strcmp (STR, "Zinit") ? 1 :                      \
      !strcmp (STR, "Zinstall_name") ? 1 :              \
  @@ -174,6 +179,7 @@
      !strcmp (STR, "sub_umbrella") ? 1 :               \
      !strcmp (STR, "umbrella") ? 1 :           \
      !strcmp (STR, "undefined") ? 1 :          \
  +   !strcmp (STR, "Zunexported_symbols_list") ? 1 : \
      !strcmp (STR, "Zweak_reference_mismatches") ? 1 : \
      !strcmp (STR, "pagezero_size") ? 1 :              \
      !strcmp (STR, "segs_read_only_addr") ? 1 :        \
  @@ -271,11 +277,13 @@
      %{Zallowable_client*:-allowable_client %*} \
      %{Zarch_errors_fatal:-arch_errors_fatal} \
      %{Zdylib_file*:-dylib_file %*} \
  +   %{Zexported_symbols_list*:-exported_symbols_list %*} \
      %{Zflat_namespace:-flat_namespace} \
      %{headerpad_max_install_names*} \
      %{Zimage_base*:-image_base %*} \
      %{Zinit*:-init %*} \
      %{nomultidefs} \
  +   %{Zmulti_module:-multi_module} %{Zsingle_module:-single_module} \
      %{Zmultiply_defined*:-multiply_defined %*} \
      %{Zmultiplydefinedunused*:-multiply_defined_unused %*} \
      %{prebind} %{noprebind} %{prebind_all_twolevel_modules} \
  @@ -286,6 +294,7 @@
      %{twolevel_namespace} %{twolevel_namespace_hints} \
      %{umbrella*} \
      %{undefined*} \
  +   %{Zunexported_symbols_list*:-unexported_symbols_list %*} \
      %{Zweak_reference_mismatches*:-weak_reference_mismatches %*} \
      %{X} \
      %{y*} \
  
  
  
  1.35      +9 -0      src/live/gcc3/gcc/config/i386/i386.c
  
  Index: i386.c
  ===================================================================
  RCS file: /cvs/Darwin/src/live/gcc3/gcc/config/i386/i386.c,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- i386.c    2002/10/31 01:45:37     1.34
  +++ i386.c    2002/11/20 20:49:20     1.35
  @@ -1313,6 +1313,15 @@
     /* In 64-bit mode, we do not have support for vcall thunks.  */
     if (TARGET_64BIT)
       targetm.asm_out.output_mi_vcall_thunk = NULL;
  +
  +  /* APPLE LOCAL begin dynamic-no-pic */
  +  if (flag_pic == 1)
  +    {
  +      /* Darwin doesn't support -fpic.  */
  +      warning ("-fpic is not supported; -fPIC assumed");  
  +      flag_pic = 2;
  +    }
  +  /* APPLE LOCAL end dynamic-no-pic */
   }
   
   void
  
  
  
  1.37      +1 -3      src/live/gcc3/gcc/cp/class.c
  
  Index: class.c
  ===================================================================
  RCS file: /cvs/Darwin/src/live/gcc3/gcc/cp/class.c,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- class.c   2002/10/24 23:46:32     1.36
  +++ class.c   2002/11/20 20:49:24     1.37
  @@ -5654,11 +5654,9 @@
       = (class_stack_node_t) xmalloc (current_class_stack_size 
                                    * sizeof (struct class_stack_node));
     /* APPLE LOCAL PFE */
  -  VARRAY_TREE_INIT (local_classes, 8, PFE_VARRAY "local_classes");
  -
  -  /* APPLE LOCAL PFE */
     if (!PFE_LOADING) {
   
  +  VARRAY_TREE_INIT (local_classes, 8, PFE_VARRAY "local_classes");
     access_default_node = build_int_2 (0, 0);
     access_public_node = build_int_2 (ak_public, 0);
     access_protected_node = build_int_2 (ak_protected, 0);
  
  
  
  1.56      +7 -0      src/live/gcc3/gcc/cp/lex.c
  
  Index: lex.c
  ===================================================================
  RCS file: /cvs/Darwin/src/live/gcc3/gcc/cp/lex.c,v
  retrieving revision 1.55
  retrieving revision 1.56
  diff -u -r1.55 -r1.56
  --- lex.c     2002/10/24 23:46:46     1.55
  +++ lex.c     2002/11/20 20:49:25     1.56
  @@ -755,6 +755,13 @@
   
     init_repo (filename);
   
  +  /* APPLE LOCAL gdb only used symbols */
  +#ifdef DBX_ONLY_USED_SYMBOLS
  +  /* By default we want to use -gused for C++ and Objective-C++.  */
  +  if (flag_debug_only_used_symbols == -1)
  +    flag_debug_only_used_symbols = 1;
  +#endif
  +
     return filename;
   }
   
  
  
  
  1.15      +1 -2      src/live/gcc3/gcc/pfe/cp-freeze-thaw.c
  
  Index: cp-freeze-thaw.c
  ===================================================================
  RCS file: /cvs/Darwin/src/live/gcc3/gcc/pfe/cp-freeze-thaw.c,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- cp-freeze-thaw.c  2002/08/17 19:17:54     1.14
  +++ cp-freeze-thaw.c  2002/11/20 20:49:29     1.15
  @@ -255,8 +255,7 @@
         PFE_FREEZE_THAW_WALK (CLASSTYPE_VFIELDS (node));                       /* 
NEEDED? */
         PFE_FREEZE_THAW_WALK (CLASSTYPE_VBASECLASSES (node));          /* NEEDED? */
         PFE_FREEZE_THAW_WALK (CLASSTYPE_TAGS (node));                  /* NEEDED? */
  -      PFE_FREEZE_THAW_WALK (CLASSTYPE_SIZE (node));                  /* NEEDED? */
  -      PFE_FREEZE_THAW_WALK (CLASSTYPE_SIZE_UNIT (node));             /* NEEDED? */
  +      PFE_FREEZE_THAW_WALK (CLASSTYPE_AS_BASE (node));                       /* 
NEEDED? */
         PFE_FREEZE_THAW_WALK (CLASSTYPE_PURE_VIRTUALS (node));         /* NEEDED? */
         PFE_FREEZE_THAW_WALK (CLASSTYPE_FRIEND_CLASSES (node));                /* 
NEEDED? */
         PFE_FREEZE_THAW_WALK (CLASSTYPE_RTTI (node));                  /* NEEDED? */
  
  
  


Reply via email to