pa.c (output_function_epilogue): Use assemble_integer rather than calling ASM_OUTPUT_...
authorJeff Law <law@gcc.gnu.org>
Mon, 25 Dec 1995 05:46:32 +0000 (22:46 -0700)
committerJeff Law <law@gcc.gnu.org>
Mon, 25 Dec 1995 05:46:32 +0000 (22:46 -0700)
        * pa.c (output_function_epilogue): Use assemble_integer rather
        than calling ASM_OUTPUT_INT directly.
        * pa.h (ASM_OUTPUT_INT): Use plabels for everything in the
        exception table section.

        * pa.c (print_operand): Don't call fprintf to output a register
        name.  Use fputs instead.

From-SVN: r10861

gcc/config/pa/pa.c
gcc/config/pa/pa.h

index c6fb1ed43418b7ff4aa87a2338712c9401611f6f..ed019cbeb0897ed3e04bbadac572a9ca338db99d 100644 (file)
@@ -2320,7 +2320,7 @@ output_function_epilogue (file, size)
   for (i = 0; i < n_deferred_plabels; i++)
     {
       ASM_OUTPUT_INTERNAL_LABEL (file, "L", CODE_LABEL_NUMBER (deferred_plabels[i].internal_label));
-      ASM_OUTPUT_INT (file, deferred_plabels[i].symbol);
+      assemble_integer (deferred_plabels[i].symbol, 4, 1);
     }
   n_deferred_plabels = 0;
 }
@@ -3065,10 +3065,9 @@ print_operand (file, x, code)
     }
   if (GET_CODE (x) == REG)
     {
+      fputs (reg_names [REGNO (x)], file);
       if (FP_REG_P (x) && GET_MODE_SIZE (GET_MODE (x)) <= 4 && (REGNO (x) & 1) == 0)
-       fprintf (file, "%sL", reg_names [REGNO (x)]);
-      else
-       fprintf (file, "%s", reg_names [REGNO (x)]);
+       fputs ("L", file);
     }
   else if (GET_CODE (x) == MEM)
     {
index 005a19effcf071aa7ffb1a321dcd47d873bc1ba4..8e1d89a58ce9383b4bdbba71f45f9db59aa5fb54 100644 (file)
@@ -2018,13 +2018,20 @@ DTORS_SECTION_FUNCTION
        fprintf (FILE, "\t.word 0x%lx\n", l);                           \
      } while (0)
 
-/* This is how to output an assembler line defining an `int' constant.  */
+/* This is how to output an assembler line defining an `int' constant. 
+
+   This is made more complicated by the fact that functions must be
+   prefixed by a P% as well as code label references for the exception
+   table -- otherwise the linker chokes.  */
 
 #define ASM_OUTPUT_INT(FILE,VALUE)  \
 { fputs ("\t.word ", FILE);                    \
   if (function_label_operand (VALUE, VOIDmode) \
       && !TARGET_PORTABLE_RUNTIME)             \
     fputs ("P%", FILE);                        \
+  if (in_section == in_named           \
+      && ! strcmp (".gcc_except_table", in_named_name))\
+    fputs ("P%", FILE);                        \
   output_addr_const (FILE, (VALUE));           \
   fputs ("\n", FILE);}