rs6000.c (output_mi_thunk): Return to function section on TARGET_ELF.
authorDavid Edelsohn <edelsohn@gnu.org>
Thu, 15 Aug 2002 14:51:00 +0000 (14:51 +0000)
committerDavid Edelsohn <dje@gcc.gnu.org>
Thu, 15 Aug 2002 14:51:00 +0000 (10:51 -0400)
        * rs6000.c (output_mi_thunk): Return to function section on
        TARGET_ELF.

        * rs6000-c.c (rs6000_cpu_cpp_builtins): Define __PPC405__ if PPC405.

From-SVN: r56348

gcc/ChangeLog
gcc/config/rs6000/rs6000-c.c
gcc/config/rs6000/rs6000.c

index 71ae78dae207f76979ba4870cee77204940d1e54..ca3ebb23c7534ff0d41b43a02aab30f0766ac56f 100644 (file)
@@ -1,3 +1,10 @@
+2002-08-15  David Edelsohn  <edelsohn@gnu.org>
+
+       * rs6000.c (output_mi_thunk): Return to function section on
+       TARGET_ELF.
+
+       * rs6000-c.c (rs6000_cpu_cpp_builtins): Define __PPC405__ if PPC405.
+
 2002-08-15  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * config/s390/s390.c (legitimize_address): Optimize loading
index 14132ca68ad2ef6a9352ac09841b31a943a53256..6093996a132539a754c90bcd1f3e68848d3d0ecd 100644 (file)
@@ -97,6 +97,9 @@ rs6000_cpu_cpp_builtins (pfile)
     builtin_define ("__SPE__");
   if (TARGET_SOFT_FLOAT)
     builtin_define ("_SOFT_FLOAT");
+  /* Used by lwarx/stwcx. errata work-around.  */
+  if (rs6000_cpu == PROCESSOR_PPC405)
+    builtin_define ("__PPC405__");
   if (BYTES_BIG_ENDIAN)
     {
       builtin_define ("__BIG_ENDIAN__");
@@ -127,5 +130,7 @@ rs6000_cpu_cpp_builtins (pfile)
     case ABI_DARWIN:
       builtin_define ("_CALL_DARWIN");
       break;
+    default:
+      break;
     }
 }
index 81df7c396bccec7a4aaca8b54e4c113a3b00fa96..5b69dd58a19b9f0a0a9f6b551647c0bc4ed8ecea 100644 (file)
@@ -11335,7 +11335,10 @@ output_mi_thunk (file, thunk_fndecl, delta, function)
            }
          assemble_name (file, fname);
          putc ('\n', file);
-         text_section ();
+         if (TARGET_ELF)
+           function_section (current_function_decl);
+         else
+           text_section();
          if (TARGET_MINIMAL_TOC)
            asm_fprintf (file, (TARGET_32BIT)
                         ? "\t{l|lwz} %s,%s(%s)\n" : "\tld %s,%s(%s)\n", r12,