]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: tm.texi (DBX_OUTPUT_NFUN): Describe.
authorAlan Modra <amodra@bigpond.net.au>
Sat, 14 Sep 2002 00:26:39 +0000 (00:26 +0000)
committerAlan Modra <amodra@gcc.gnu.org>
Sat, 14 Sep 2002 00:26:39 +0000 (09:56 +0930)
Merge from mainline.
2002-09-14  Alan Modra  <amodra@bigpond.net.au>
* doc/tm.texi (DBX_OUTPUT_NFUN): Describe.
* dbxout.c (dbxout_function_end): Use DBX_OUTPUT_NFUN.
* config/rs6000/linux64.h (DBX_OUTPUT_NFUN): Define.

2002-08-27  David Edelsohn  <edelsohn@gnu.org>
* config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Undef before define.

2002-08-02  Alan Modra  <amodra@bigpond.net.au>
* config/rs6000/linux64.h (DBX_OUTPUT_BRAC): Define.
(DBX_OUTPUT_LBRAC, DBX_OUTPUT_RBRAC): Define.
* config/rs6000/rs6000.c (output_toc): Don't use lshift_double when
HOST_BITS_PER_WIDE_INT == 64.

2002-07-27  Alan Modra  <amodra@bigpond.net.au>
* config/rs6000/rs6000.c (output_profile_hook): Don't generate profile
label reference when NO_PROFILE_COUNTERS.

2002-07-11  Alan Modra  <amodra@bigpond.net.au>
* config/rs6000/linux64.h (ASM_SPEC): Define.

From-SVN: r57124

gcc/ChangeLog
gcc/config/rs6000/linux64.h
gcc/config/rs6000/rs6000.c
gcc/dbxout.c
gcc/doc/tm.texi

index aa7900e36bd6b68b6ee3f5a0d8fa739d694715d4..dacf58124ac67a7f23434d7fd7961b48bfce8583 100644 (file)
@@ -1,3 +1,27 @@
+2002-09-14  Alan Modra  <amodra@bigpond.net.au>
+
+       Merge from mainline.
+       2002-09-14  Alan Modra  <amodra@bigpond.net.au>
+       * doc/tm.texi (DBX_OUTPUT_NFUN): Describe.
+       * dbxout.c (dbxout_function_end): Use DBX_OUTPUT_NFUN.
+       * config/rs6000/linux64.h (DBX_OUTPUT_NFUN): Define.
+
+       2002-08-27  David Edelsohn  <edelsohn@gnu.org>
+       * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Undef before define.
+
+       2002-08-02  Alan Modra  <amodra@bigpond.net.au>
+       * config/rs6000/linux64.h (DBX_OUTPUT_BRAC): Define.
+       (DBX_OUTPUT_LBRAC, DBX_OUTPUT_RBRAC): Define.
+       * config/rs6000/rs6000.c (output_toc): Don't use lshift_double when
+       HOST_BITS_PER_WIDE_INT == 64.
+
+       2002-07-27  Alan Modra  <amodra@bigpond.net.au>
+       * config/rs6000/rs6000.c (output_profile_hook): Don't generate profile
+       label reference when NO_PROFILE_COUNTERS.
+
+       2002-07-11  Alan Modra  <amodra@bigpond.net.au>
+       * config/rs6000/linux64.h (ASM_SPEC): Define.
+
 2002-09-13  Alan Modra  <amodra@bigpond.net.au>
 
        Merge from mainline.
index 6669a8c9e06fb72704e76bfef2911caa49044c5b..ce8f7ac91c47ffe3f86145a3d095aef4f02e55da 100644 (file)
@@ -37,6 +37,12 @@ Boston, MA 02111-1307, USA.  */
 #undef  ASM_DEFAULT_SPEC
 #define ASM_DEFAULT_SPEC "-mppc64"
 
+#undef ASM_SPEC
+#define        ASM_SPEC "%{.s: %{mregnames} %{mno-regnames}} \
+%{.S: %{mregnames} %{mno-regnames}} \
+%{mlittle} %{mlittle-endian} %{mbig} %{mbig-endian} \
+%{v:-V} %{Qy:} %{!Qn:-Qy} -a64 %(asm_cpu) %{Wa,*:%*}"
+
 /* 64-bit PowerPC Linux always has a TOC.  */
 #undef  TARGET_NO_TOC
 #define TARGET_NO_TOC          0
@@ -65,6 +71,7 @@ Boston, MA 02111-1307, USA.  */
 #define USER_LABEL_PREFIX  ""
 
 /* AIX word-aligns FP doubles but doubleword-aligns 64-bit ints.  */
+#undef  ADJUST_FIELD_ALIGN
 #define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
   (TYPE_MODE (TREE_CODE (TREE_TYPE (FIELD)) == ARRAY_TYPE \
              ? get_inner_array_type (FIELD) \
@@ -328,6 +335,41 @@ do                                                                 \
   }                                                                    \
 while (0)
 
+/* Similarly, we want the function code label here.  */
+#define DBX_OUTPUT_BRAC(FILE, NAME, BRAC) \
+  do                                                                   \
+    {                                                                  \
+      const char *flab;                                                        \
+      fprintf (FILE, "%s%d,0,0,", ASM_STABN_OP, BRAC);                 \
+      assemble_name (FILE, NAME);                                      \
+      putc ('-', FILE);                                                        \
+      if (current_function_func_begin_label != NULL_TREE)              \
+       flab = IDENTIFIER_POINTER (current_function_func_begin_label);  \
+      else                                                             \
+       {                                                               \
+         putc ('.', FILE);                                             \
+         flab = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0);  \
+       }                                                               \
+      assemble_name (FILE, flab);                                      \
+      putc ('\n', FILE);                                               \
+    }                                                                  \
+  while (0)
+
+#define DBX_OUTPUT_LBRAC(FILE, NAME) DBX_OUTPUT_BRAC (FILE, NAME, N_LBRAC)
+#define DBX_OUTPUT_RBRAC(FILE, NAME) DBX_OUTPUT_BRAC (FILE, NAME, N_RBRAC)
+
+/* Another case where we want the dot name.  */
+#define        DBX_OUTPUT_NFUN(FILE, LSCOPE, DECL)                             \
+  do                                                                   \
+    {                                                                  \
+      fprintf (FILE, "%s\"\",%d,0,0,", ASM_STABS_OP, N_FUN);           \
+      assemble_name (FILE, LSCOPE);                                    \
+      fputs ("-.", FILE);                                              \
+      assemble_name (FILE, XSTR (XEXP (DECL_RTL (DECL), 0), 0));       \
+      putc ('\n', FILE);                                               \
+    }                                                                  \
+  while (0)
+
 /* Override sysv4.h as these are ABI_V4 only.  */
 #undef ASM_OUTPUT_REG_PUSH
 #undef ASM_OUTPUT_REG_POP
index 287f8ffbb778a1a132f14a9e8f2b692afd8bb2c9..ad9df44dbc884ed6f97cb557ed488dfc0cbdc7b8 100644 (file)
@@ -10100,8 +10100,17 @@ output_toc (file, x, labelno, mode)
        abort ();/* It would be easy to make this work, but it doesn't now.  */
 
       if (POINTER_SIZE > GET_MODE_BITSIZE (mode))
-       lshift_double (low, high, POINTER_SIZE - GET_MODE_BITSIZE (mode),
-                      POINTER_SIZE, &low, &high, 0);
+       {
+#if HOST_BITS_PER_WIDE_INT == 32
+         lshift_double (low, high, POINTER_SIZE - GET_MODE_BITSIZE (mode),
+                        POINTER_SIZE, &low, &high, 0);
+#else
+         low |= high << 32;
+         low <<= POINTER_SIZE - GET_MODE_BITSIZE (mode);
+         high = (HOST_WIDE_INT) low >> 32;
+         low &= 0xffffffff;
+#endif
+       }
 
       if (TARGET_64BIT)
        {
@@ -10319,10 +10328,13 @@ rs6000_gen_section_name (buf, filename, section_desc)
 
 void
 output_profile_hook (labelno)
-     int labelno;
+     int labelno ATTRIBUTE_UNUSED;
 {
   if (DEFAULT_ABI == ABI_AIX)
     {
+#ifdef NO_PROFILE_COUNTERS
+      emit_library_call (init_one_libfunc (RS6000_MCOUNT), 0, VOIDmode, 0);
+#else
       char buf[30];
       const char *label_name;
       rtx fun;
@@ -10333,6 +10345,7 @@ output_profile_hook (labelno)
 
       emit_library_call (init_one_libfunc (RS6000_MCOUNT), 0, VOIDmode, 1,
                          fun, Pmode);
+#endif
     }
   else if (DEFAULT_ABI == ABI_DARWIN)
     {
index 139286591f9844b3916ab7fa7bbba8056eeece88..d2ae7fba27a396c64b723dd1da82d333c8e4151a 100644 (file)
@@ -396,11 +396,15 @@ dbxout_function_end ()
 
   /* By convention, GCC will mark the end of a function with an N_FUN
      symbol and an empty string.  */
+#ifdef DBX_OUTPUT_NFUN
+  DBX_OUTPUT_NFUN (asmfile, lscope_label_name, current_function_decl);
+#else
   fprintf (asmfile, "%s\"\",%d,0,0,", ASM_STABS_OP, N_FUN);
   assemble_name (asmfile, lscope_label_name);
   putc ('-', asmfile);
   assemble_name (asmfile, XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0));
   fprintf (asmfile, "\n");
+#endif
 }
 #endif /* DBX_DEBUGGING_INFO */
 
index 8451e3e0f39de0f21dbdce0d12e1e7630fd88bf3..d8821c5467ca7ca2c33e09d39b3ec32433fa6d6a 100644 (file)
@@ -7423,6 +7423,11 @@ argument @var{name} is the name of an assembler symbol (for use with
 @item DBX_OUTPUT_RBRAC (@var{stream}, @var{name})
 Like @code{DBX_OUTPUT_LBRAC}, but for the end of a scope level.
 
+@findex DBX_OUTPUT_NFUN
+@item DBX_OUTPUT_NFUN (@var{stream}, @var{lscope_label}, @var{decl})
+Define this macro if the target machine requires special handling to
+output an @code{N_FUN} entry for the function @var{decl}.
+
 @findex DBX_OUTPUT_ENUM
 @item DBX_OUTPUT_ENUM (@var{stream}, @var{type})
 Define this macro if the target machine requires special handling to