Commits

Iain Buclaw  committed 8028545

Remove some more old old and dead code from prior gcc release support.

  • Participants
  • Parent commits 996b2b5

Comments (0)

Files changed (13)

File d/asmstmt.cc

 }
 
 void
-ExtAsmStatement::toCBuffer(OutBuffer *buf, HdrGenState *hgs)
+ExtAsmStatement::toCBuffer(OutBuffer *buf)
 {
     buf->writestring("gcc asm { ");
     if (insnTemplate)

File d/d-codegen.cc

 bool IRState::splitDynArrayVarArgs;
 bool IRState::useInlineAsm;
 bool IRState::useBuiltins;
-bool IRState::originalOmitFramePointer;
 
 Module * IRState::builtinsModule = 0;
 Module * IRState::intrinsicModule = 0;
     return d_null_pointer;
 }
 
-bool
-IRState::isClassNestedIn(ClassDeclaration *inner, ClassDeclaration *outer)
-{
-    // not implemented yet
-    return false;
-}
-
 /* For the purposes this is used, inner is assumed to be a nested
    function or a method of a class or struct that is (eventually) nested in a
    function.
                 return irs->convertTo(irs->var(fd->vthis),
                         fd_cd->type, target_cd->type);
             }
-            else if (irs->isClassNestedIn(fd_cd, target_cd))
-            {
-                gcc_unreachable(); // not implemented
-            }
             else
             {
                 fd = irs->isClassNestedInFunction(fd_cd);

File d/d-codegen.h

   static bool useInlineAsm;
   static bool useBuiltins;
 
-  // %%
-  static bool originalOmitFramePointer;
-
 #if V2
   // Variables that are in scope that will need destruction later
   static VarDeclarations * varsInScope;
   static bool functionNeedsChain(FuncDeclaration *f);
 
   // Check for nested functions/class/structs
-  static bool isClassNestedIn(ClassDeclaration *inner, ClassDeclaration *outer);
   static bool isFuncNestedIn(FuncDeclaration * inner, FuncDeclaration * outer);
   static FuncDeclaration * isClassNestedInFunction(ClassDeclaration * cd);
 

File d/d-gcc-real.cc

 }
 
 void
-real_t::toBytes(unsigned char * buf, unsigned buf_size)
-{
-    // See assemble_real in varasm.c
-    // This code assumes we are storing into 8-bit host bytes.
-    unsigned ld_size = int_size_in_bytes(long_double_type_node);
-    unsigned count = ld_size;
-    long data[4];
-    long *src = data;
-    unsigned char *dest = buf;
-
-    // gcc_assert(ld_size == REALSIZE);
-    // gcc_assert(buf_size >= REALSIZE);
-    gcc_assert( ld_size <= 16 );
-
-    real_to_target (data, & rv(), TYPE_MODE(long_double_type_node));
-    while (count)
-    {
-        long l = *src++;
-        for (int i = 4; i && count; i--)
-        {
-            *dest++ = l & 0xff;
-            l >>= 8;
-            count--;
-        }
-    }
-}
-
-
-void
 real_t::dump()
 {
     char buf[128];

File d/d-gcc-real.h

   bool isNan();
   bool isSignallingNan();
   bool isConversionExact(Mode to_mode) const;
-  void toBytes(unsigned char * buf, unsigned buf_size);
   void dump();
 private:
   // prevent this from being used

File d/d-irstate.cc

     new_irs->parent = g.irs;
     new_irs->func = decl;
 
-    tree decl_tree = decl->toSymbol()->Stree;
-
     g.irs = (IRState*) new_irs;
     ModuleInfo & mi = * g.mi();
 #if V2
 #if D_GCC_VER >= 46
 static bool
 d_handle_option (size_t scode, const char *arg, int value,
-                 int kind, location_t loc,
-                 const struct cl_option_handlers *handlers)
+                 int kind ATTRIBUTE_UNUSED,
+                 location_t loc ATTRIBUTE_UNUSED,
+                 const struct cl_option_handlers *handlers ATTRIBUTE_UNUSED)
 #else
 static int
 d_handle_option (size_t scode, const char *arg, int value)
     //global.params.useInline = flag_inline_functions;
     global.params.obj = ! flag_syntax_only;
     global.params.pic = flag_pic != 0; // Has no effect yet.
-    gen.originalOmitFramePointer = flag_omit_frame_pointer;
 
     // better to use input_location.xxx ?
     (*debug_hooks->start_source_file) (input_line, main_input_filename);
     }
 }
 
-#if V2
-
-/* DMD 2 makes a parameter delclaration's type 'const(T)' if the
-   parameter is a simple STCin or STCconst.  The TypeFunction's
-   Argument's type stays unqualified, however.
-
-   This mismatch causes a problem with optimization and inlining.  For
-   RECORD_TYPE arguments, failure will occur in (setup_one_parameter
-   -> fold_convert).  d_types_compatible_p hacks lead to failures in
-   the sra pass.
-
-   Fortunately, the middle end provides a simple workaround by using
-   this hook.
-*/
-
-tree
-d_convert_parm_for_inlining  (tree parm, tree value, tree fndecl, int argnum)
-{
-    if (!value)
-        return value;
-
-    if (TYPE_ARG_TYPES(TREE_TYPE(fndecl))
-            && (TYPE_MAIN_VARIANT(TREE_TYPE(parm))
-                == TYPE_MAIN_VARIANT(TREE_TYPE(value))))
-        return value;
-
-    if (TREE_TYPE(parm) != TREE_TYPE(value))
-        return build1(NOP_EXPR, TREE_TYPE(parm), value);
-
-    return value;
-}
-#endif
-
 
 struct lang_type *
 build_d_type_lang_specific(Type * t)

File d/d-objfile.cc

     l.linnum = 1;
     setDeclLoc(decl, l);
 
-    declareType(t, decl);
+    initTypeDecl(t, decl);
+    declareType(decl);
 }
 
 void
 ObjectFile::declareType(tree t, Dsymbol * d_sym)
 {
     initTypeDecl(t, d_sym);
-    declareType(t, TYPE_NAME(t));
+    declareType(TYPE_NAME(t));
 }
 
 
             TYPE_STUB_DECL(t) = decl;
             // g++ does this and the debugging code assumes it:
             DECL_ARTIFICIAL(decl) = 1;
-            // code now assumes...
-            DECL_SOURCE_LOCATION(decl) = DECL_SOURCE_LOCATION(decl);
             break;
 
         default:
 }
 
 void
-ObjectFile::declareType(tree t, tree decl)
+ObjectFile::declareType(tree decl)
 {
-    bool top_level = /*DECL_CONTEXT(decl) == fileContext || */
-        ! DECL_CONTEXT(decl);
+    bool top_level = ! DECL_CONTEXT(decl);
     // okay to do this?
     rodc(decl, top_level);
 }

File d/d-objfile.h

 
 protected:
   static void initTypeDecl(tree t, tree decl);
-  static void declareType(tree t, tree decl);
+  static void declareType(tree decl);
 public:
 
   // Hack for systems without linkonce support

File d/dmd/statement.h

                     Expressions *argConstraints, int nOutputArgs, Expressions *clobbers);
     Statement *syntaxCopy();
     Statement *semantic(Scope *sc);
-    void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
+    void toCBuffer(OutBuffer *buf);
 
     void toIR(IRState *irs);
 };

File d/dmd2/statement.h

     Statement *syntaxCopy();
     Statement *semantic(Scope *sc);
     int blockExit(bool mustNotThrow);
-    void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
+    void toCBuffer(OutBuffer *buf);
 
     void toIR(IRState *irs);
 };

File d/patches/patch-gcc-4.7.x

---- gcc~/config/i386/i386.c	2011-12-23 18:38:03.000000000 +0000
-+++ gcc/config/i386/i386.c	2012-01-21 18:30:14.895643377 +0000
+--- gcc~/config/i386/i386.c	2012-01-30 03:28:03.195381025 +0000
++++ gcc/config/i386/i386.c	2012-01-30 03:28:21.391380698 +0000
 @@ -5337,6 +5337,17 @@ ix86_return_pops_args (tree fundecl, tre
  
    return 0;
    /* End element.  */
    { NULL,        0, 0, false, false, false, NULL, false }
  };
---- gcc~/config/i386/i386.h	2011-11-24 22:11:12.000000000 +0000
-+++ gcc/config/i386/i386.h	2012-01-21 18:31:07.615641452 +0000
+--- gcc~/config/i386/i386.h	2012-01-30 03:28:03.195381025 +0000
++++ gcc/config/i386/i386.h	2012-01-30 03:28:21.395380698 +0000
 @@ -2214,6 +2214,9 @@ struct GTY(()) machine_function {
    /* Nonzero if the function requires a CLD in the prologue.  */
    BOOL_BITFIELD needs_cld : 1;
  #define ix86_tls_descriptor_calls_expanded_in_cfun \
    (cfun->machine->tls_descriptor_call_expanded_p)
  /* Since tls_descriptor_call_expanded is not cleared, even if all TLS
---- gcc~/config/rs6000/rs6000.c	2012-01-10 01:01:01.000000000 +0000
-+++ gcc/config/rs6000/rs6000.c	2012-01-21 18:32:48.387637776 +0000
-@@ -21036,7 +21036,8 @@ rs6000_output_function_epilogue (FILE *f
+--- gcc~/config/rs6000/rs6000.c	2012-01-30 03:28:10.991380885 +0000
++++ gcc/config/rs6000/rs6000.c	2012-01-30 03:28:21.407380698 +0000
+@@ -21064,7 +21064,8 @@ rs6000_output_function_epilogue (FILE *f
  	 either, so for now use 0.  */
        if (! strcmp (language_string, "GNU C")
  	  || ! strcmp (language_string, "GNU GIMPLE")
  	i = 0;
        else if (! strcmp (language_string, "GNU F77")
  	       || ! strcmp (language_string, "GNU Fortran"))
---- gcc~/dwarf2out.c	2012-01-04 19:58:03.000000000 +0000
-+++ gcc/dwarf2out.c	2012-01-21 18:34:33.247633949 +0000
-@@ -18423,6 +18423,8 @@ gen_compile_unit_die (const char *filena
+--- gcc~/dwarf2out.c	2012-01-30 03:27:17.023381855 +0000
++++ gcc/dwarf2out.c	2012-01-30 03:28:21.419380696 +0000
+@@ -18455,6 +18455,8 @@ gen_compile_unit_die (const char *filena
    language = DW_LANG_C89;
    if (strcmp (language_string, "GNU C++") == 0)
      language = DW_LANG_C_plus_plus;

File d/patches/patch-toplev-4.7.x

---- gcc-4.7-20120114~/configure	2012-01-05 02:25:04.000000000 +0000
-+++ gcc-4.7-20120114/configure	2012-01-21 17:56:00.551718335 +0000
-@@ -2698,7 +2698,8 @@
+--- gcc-4.7-20120128~/configure	2012-01-30 03:26:43.863382449 +0000
++++ gcc-4.7-20120128/configure	2012-01-30 03:28:21.303380699 +0000
+@@ -2698,7 +2698,8 @@ target_libraries="target-libgcc \
  		${libgcj} \
  		target-libobjc \
  		target-libada \
  
  # these tools are built using the target libraries, and are intended to
  # run only in the target environment
---- gcc-4.7-20120114~/configure.ac	2012-01-05 02:25:04.000000000 +0000
-+++ gcc-4.7-20120114/configure.ac	2012-01-21 17:56:00.571718335 +0000
-@@ -164,7 +164,8 @@
+--- gcc-4.7-20120128~/configure.ac	2012-01-30 03:26:43.867382449 +0000
++++ gcc-4.7-20120128/configure.ac	2012-01-30 03:28:21.307380698 +0000
+@@ -164,7 +164,8 @@ target_libraries="target-libgcc \
  		${libgcj} \
  		target-libobjc \
  		target-libada \
  
  # these tools are built using the target libraries, and are intended to
  # run only in the target environment
---- gcc-4.7-20120114~/Makefile.def	2012-01-02 10:59:04.000000000 +0000
-+++ gcc-4.7-20120114/Makefile.def	2012-01-21 17:56:00.579718334 +0000
-@@ -124,6 +124,7 @@
+--- gcc-4.7-20120128~/Makefile.def	2012-01-30 03:26:43.875382449 +0000
++++ gcc-4.7-20120128/Makefile.def	2012-01-30 03:28:21.307380698 +0000
+@@ -124,6 +124,7 @@ target_modules = { module= libquadmath;
  target_modules = { module= libgfortran; };
  target_modules = { module= libobjc; };
  target_modules = { module= libgo; };
  target_modules = { module= libtermcap; no_check=true;
                     missing=mostlyclean;
                     missing=clean;
-@@ -488,6 +489,8 @@
+@@ -488,6 +489,8 @@ dependencies = { module=all-target-fastj
  dependencies = { module=configure-target-libgo; on=configure-target-libffi; };
  dependencies = { module=configure-target-libgo; on=all-target-libstdc++-v3; };
  dependencies = { module=all-target-libgo; on=all-target-libffi; };
  dependencies = { module=configure-target-libjava; on=configure-target-zlib; };
  dependencies = { module=configure-target-libjava; on=configure-target-boehm-gc; };
  dependencies = { module=configure-target-libjava; on=configure-target-libffi; };
-@@ -530,6 +533,8 @@
+@@ -530,6 +533,8 @@ languages = { language=objc;	gcc-check-t
  languages = { language=obj-c++;	gcc-check-target=check-obj-c++; };
  languages = { language=go;	gcc-check-target=check-go;
  				lib-check-target=check-target-libgo; };
  
  // Toplevel bootstrap
  bootstrap_stage = { id=1 ; };
---- gcc-4.7-20120114~/Makefile.in	2012-01-02 10:59:04.000000000 +0000
-+++ gcc-4.7-20120114/Makefile.in	2012-01-21 17:56:00.703718331 +0000
-@@ -950,6 +950,7 @@
+--- gcc-4.7-20120128~/Makefile.in	2012-01-30 03:26:43.883382450 +0000
++++ gcc-4.7-20120128/Makefile.in	2012-01-30 03:28:21.355380699 +0000
+@@ -950,6 +950,7 @@ configure-target:  \
      maybe-configure-target-libgfortran \
      maybe-configure-target-libobjc \
      maybe-configure-target-libgo \
      maybe-configure-target-libtermcap \
      maybe-configure-target-winsup \
      maybe-configure-target-libgloss \
-@@ -1095,6 +1096,7 @@
+@@ -1095,6 +1096,7 @@ all-target: maybe-all-target-libquadmath
  all-target: maybe-all-target-libgfortran
  all-target: maybe-all-target-libobjc
  all-target: maybe-all-target-libgo
  all-target: maybe-all-target-libtermcap
  all-target: maybe-all-target-winsup
  all-target: maybe-all-target-libgloss
-@@ -1180,6 +1182,7 @@
+@@ -1180,6 +1182,7 @@ info-target: maybe-info-target-libquadma
  info-target: maybe-info-target-libgfortran
  info-target: maybe-info-target-libobjc
  info-target: maybe-info-target-libgo
  info-target: maybe-info-target-libtermcap
  info-target: maybe-info-target-winsup
  info-target: maybe-info-target-libgloss
-@@ -1258,6 +1261,7 @@
+@@ -1258,6 +1261,7 @@ dvi-target: maybe-dvi-target-libquadmath
  dvi-target: maybe-dvi-target-libgfortran
  dvi-target: maybe-dvi-target-libobjc
  dvi-target: maybe-dvi-target-libgo
  dvi-target: maybe-dvi-target-libtermcap
  dvi-target: maybe-dvi-target-winsup
  dvi-target: maybe-dvi-target-libgloss
-@@ -1336,6 +1340,7 @@
+@@ -1336,6 +1340,7 @@ pdf-target: maybe-pdf-target-libquadmath
  pdf-target: maybe-pdf-target-libgfortran
  pdf-target: maybe-pdf-target-libobjc
  pdf-target: maybe-pdf-target-libgo
  pdf-target: maybe-pdf-target-libtermcap
  pdf-target: maybe-pdf-target-winsup
  pdf-target: maybe-pdf-target-libgloss
-@@ -1414,6 +1419,7 @@
+@@ -1414,6 +1419,7 @@ html-target: maybe-html-target-libquadma
  html-target: maybe-html-target-libgfortran
  html-target: maybe-html-target-libobjc
  html-target: maybe-html-target-libgo
  html-target: maybe-html-target-libtermcap
  html-target: maybe-html-target-winsup
  html-target: maybe-html-target-libgloss
-@@ -1492,6 +1498,7 @@
+@@ -1492,6 +1498,7 @@ TAGS-target: maybe-TAGS-target-libquadma
  TAGS-target: maybe-TAGS-target-libgfortran
  TAGS-target: maybe-TAGS-target-libobjc
  TAGS-target: maybe-TAGS-target-libgo
  TAGS-target: maybe-TAGS-target-libtermcap
  TAGS-target: maybe-TAGS-target-winsup
  TAGS-target: maybe-TAGS-target-libgloss
-@@ -1570,6 +1577,7 @@
+@@ -1570,6 +1577,7 @@ install-info-target: maybe-install-info-
  install-info-target: maybe-install-info-target-libgfortran
  install-info-target: maybe-install-info-target-libobjc
  install-info-target: maybe-install-info-target-libgo
  install-info-target: maybe-install-info-target-libtermcap
  install-info-target: maybe-install-info-target-winsup
  install-info-target: maybe-install-info-target-libgloss
-@@ -1648,6 +1656,7 @@
+@@ -1648,6 +1656,7 @@ install-pdf-target: maybe-install-pdf-ta
  install-pdf-target: maybe-install-pdf-target-libgfortran
  install-pdf-target: maybe-install-pdf-target-libobjc
  install-pdf-target: maybe-install-pdf-target-libgo
  install-pdf-target: maybe-install-pdf-target-libtermcap
  install-pdf-target: maybe-install-pdf-target-winsup
  install-pdf-target: maybe-install-pdf-target-libgloss
-@@ -1726,6 +1735,7 @@
+@@ -1726,6 +1735,7 @@ install-html-target: maybe-install-html-
  install-html-target: maybe-install-html-target-libgfortran
  install-html-target: maybe-install-html-target-libobjc
  install-html-target: maybe-install-html-target-libgo
  install-html-target: maybe-install-html-target-libtermcap
  install-html-target: maybe-install-html-target-winsup
  install-html-target: maybe-install-html-target-libgloss
-@@ -1804,6 +1814,7 @@
+@@ -1804,6 +1814,7 @@ installcheck-target: maybe-installcheck-
  installcheck-target: maybe-installcheck-target-libgfortran
  installcheck-target: maybe-installcheck-target-libobjc
  installcheck-target: maybe-installcheck-target-libgo
  installcheck-target: maybe-installcheck-target-libtermcap
  installcheck-target: maybe-installcheck-target-winsup
  installcheck-target: maybe-installcheck-target-libgloss
-@@ -1882,6 +1893,7 @@
+@@ -1882,6 +1893,7 @@ mostlyclean-target: maybe-mostlyclean-ta
  mostlyclean-target: maybe-mostlyclean-target-libgfortran
  mostlyclean-target: maybe-mostlyclean-target-libobjc
  mostlyclean-target: maybe-mostlyclean-target-libgo
  mostlyclean-target: maybe-mostlyclean-target-libtermcap
  mostlyclean-target: maybe-mostlyclean-target-winsup
  mostlyclean-target: maybe-mostlyclean-target-libgloss
-@@ -1960,6 +1972,7 @@
+@@ -1960,6 +1972,7 @@ clean-target: maybe-clean-target-libquad
  clean-target: maybe-clean-target-libgfortran
  clean-target: maybe-clean-target-libobjc
  clean-target: maybe-clean-target-libgo
  clean-target: maybe-clean-target-libtermcap
  clean-target: maybe-clean-target-winsup
  clean-target: maybe-clean-target-libgloss
-@@ -2038,6 +2051,7 @@
+@@ -2038,6 +2051,7 @@ distclean-target: maybe-distclean-target
  distclean-target: maybe-distclean-target-libgfortran
  distclean-target: maybe-distclean-target-libobjc
  distclean-target: maybe-distclean-target-libgo
  distclean-target: maybe-distclean-target-libtermcap
  distclean-target: maybe-distclean-target-winsup
  distclean-target: maybe-distclean-target-libgloss
-@@ -2116,6 +2130,7 @@
+@@ -2116,6 +2130,7 @@ maintainer-clean-target: maybe-maintaine
  maintainer-clean-target: maybe-maintainer-clean-target-libgfortran
  maintainer-clean-target: maybe-maintainer-clean-target-libobjc
  maintainer-clean-target: maybe-maintainer-clean-target-libgo
  maintainer-clean-target: maybe-maintainer-clean-target-libtermcap
  maintainer-clean-target: maybe-maintainer-clean-target-winsup
  maintainer-clean-target: maybe-maintainer-clean-target-libgloss
-@@ -2249,6 +2264,7 @@
+@@ -2249,6 +2264,7 @@ check-target:  \
      maybe-check-target-libgfortran \
      maybe-check-target-libobjc \
      maybe-check-target-libgo \
      maybe-check-target-libtermcap \
      maybe-check-target-winsup \
      maybe-check-target-libgloss \
-@@ -2399,6 +2415,7 @@
+@@ -2399,6 +2415,7 @@ install-target:  \
      maybe-install-target-libgfortran \
      maybe-install-target-libobjc \
      maybe-install-target-libgo \
      maybe-install-target-libtermcap \
      maybe-install-target-winsup \
      maybe-install-target-libgloss \
-@@ -2496,6 +2513,7 @@
+@@ -2496,6 +2513,7 @@ install-strip-target:  \
      maybe-install-strip-target-libgfortran \
      maybe-install-strip-target-libobjc \
      maybe-install-strip-target-libgo \
      maybe-install-strip-target-libtermcap \
      maybe-install-strip-target-winsup \
      maybe-install-strip-target-libgloss \
-@@ -35148,6 +35166,463 @@
+@@ -35148,6 +35166,463 @@ maintainer-clean-target-libgo:
  
  
  
  .PHONY: configure-target-libtermcap maybe-configure-target-libtermcap
  maybe-configure-target-libtermcap:
  @if gcc-bootstrap
-@@ -40720,6 +41195,14 @@
+@@ -40720,6 +41195,14 @@ check-gcc-go:
  	(cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-go);
  check-go: check-gcc-go check-target-libgo
  
  
  # Install the gcc headers files, but not the fixed include files,
  # which Cygnus is not allowed to distribute.  This rule is very
-@@ -42705,6 +43188,7 @@
+@@ -42705,6 +43188,7 @@ configure-target-libquadmath: stage_last
  configure-target-libgfortran: stage_last
  configure-target-libobjc: stage_last
  configure-target-libgo: stage_last
  configure-target-libtermcap: stage_last
  configure-target-winsup: stage_last
  configure-target-libgloss: stage_last
-@@ -42733,6 +43217,7 @@
+@@ -42733,6 +43217,7 @@ configure-target-libquadmath: maybe-all-
  configure-target-libgfortran: maybe-all-gcc
  configure-target-libobjc: maybe-all-gcc
  configure-target-libgo: maybe-all-gcc
  configure-target-libtermcap: maybe-all-gcc
  configure-target-winsup: maybe-all-gcc
  configure-target-libgloss: maybe-all-gcc
-@@ -43447,6 +43932,8 @@
+@@ -43447,6 +43932,8 @@ all-target-fastjar: maybe-all-target-zli
  configure-target-libgo: maybe-configure-target-libffi
  configure-target-libgo: maybe-all-target-libstdc++-v3
  all-target-libgo: maybe-all-target-libffi
  configure-target-libjava: maybe-configure-target-zlib
  configure-target-libjava: maybe-configure-target-boehm-gc
  configure-target-libjava: maybe-configure-target-libffi
-@@ -43508,6 +43995,7 @@
+@@ -43508,6 +43995,7 @@ configure-target-libquadmath: maybe-all-
  configure-target-libgfortran: maybe-all-target-libgcc
  configure-target-libobjc: maybe-all-target-libgcc
  configure-target-libgo: maybe-all-target-libgcc
  configure-target-libtermcap: maybe-all-target-libgcc
  configure-target-winsup: maybe-all-target-libgcc
  configure-target-libgloss: maybe-all-target-libgcc
-@@ -43538,6 +44026,8 @@
+@@ -43538,6 +44026,8 @@ configure-target-libobjc: maybe-all-targ
  
  configure-target-libgo: maybe-all-target-newlib maybe-all-target-libgloss