]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
rs6000.md (restore_stack_block): Generate MEM and specify mode.
authorDavid Edelsohn <edelsohn@mhpcc.edu>
Sun, 7 Jun 1998 09:34:09 +0000 (09:34 +0000)
committerDavid Edelsohn <dje@gcc.gnu.org>
Sun, 7 Jun 1998 09:34:09 +0000 (05:34 -0400)
        * rs6000.md (restore_stack_block): Generate MEM and specify mode.
        * rs6000.h (STACK_SAVEAREA_MODE): SAVE_FUNCTION is VOIDmode.
        * rs6000.c (rs6000_output_load_toc_table): Use fputs.
        (output_function_profiler): Use asm_fprintf and fputs.

From-SVN: r20268

gcc/ChangeLog
gcc/config/rs6000/rs6000.c
gcc/config/rs6000/rs6000.h
gcc/config/rs6000/rs6000.md

index d473e5a4926a480adeaade8b44a4e5110385edb4..d9932227fc844dcf36de1b8adcecdb7fbffcf125 100644 (file)
@@ -1,3 +1,10 @@
+Sun Jun  7 12:27:30 1998  David Edelsohn  <edelsohn@mhpcc.edu>
+
+       * rs6000.md (restore_stack_block): Generate MEM and specify mode.
+       * rs6000.h (STACK_SAVEAREA_MODE): SAVE_FUNCTION is VOIDmode.
+       * rs6000.c (rs6000_output_load_toc_table): Use fputs.
+       (output_function_profiler): Use asm_fprintf and fputs.
+
 Sat Jun  6 12:17:12 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * gencheck.c: Remove redundant stdio.h include.  Add a definition
index 6a04d552855eaf6ccabb1755b9eb57b8cd199abb..72396847ac2c3af7b989952fa133f2820db86e1c 100644 (file)
@@ -3676,7 +3676,7 @@ rs6000_output_load_toc_table (file, reg)
       ASM_GENERATE_INTERNAL_LABEL (buf, "LCTOC", 1);
       asm_fprintf (file, "\t{liu|lis} %s,", reg_names[reg]);
       assemble_name (file, buf);
-      asm_fprintf (file, "@ha\n");
+      fputs ("@ha\n", file);
       asm_fprintf (file, "\t{cal|la} %s,", reg_names[reg]);
       assemble_name (file, buf);
       asm_fprintf (file, "@l(%s)\n", reg_names[reg]);
@@ -4609,32 +4609,28 @@ output_function_profiler (file, labelno)
       fprintf (file, "\tmflr %s\n", reg_names[0]);
       if (flag_pic == 1)
        {
-         fprintf (file, "\tbl _GLOBAL_OFFSET_TABLE_@local-4\n");
-         fprintf (file, "\t%s %s,4(%s)\n",
-                  (TARGET_NEW_MNEMONICS) ? "stw" : "st",
-                  reg_names[0], reg_names[1]);
-         fprintf (file, "\tmflr %s\n", reg_names[11]);
-         fprintf (file, "\t%s %s,", (TARGET_NEW_MNEMONICS) ? "lwz" : "l",
-                  reg_names[0]);
+         fputs ("\tbl _GLOBAL_OFFSET_TABLE_@local-4\n", file);
+         asm_fprintf (file, "\t{st|stw} %s,4(%s)\n",
+                      reg_names[0], reg_names[1]);
+         asm_fprintf (file, "\tmflr %s\n", reg_names[11]);
+         asm_fprintf (file, "\t{l|lwz} %s,", reg_names[0]);
          assemble_name (file, buf);
-         fprintf (file, "@got(%s)\n", reg_names[11]);
+         asm_fprintf (file, "@got(%s)\n", reg_names[11]);
        }
 #if TARGET_ELF
       else if (flag_pic > 1 || TARGET_RELOCATABLE)
        {
-         fprintf (file, "\t%s %s,4(%s)\n",
-                  (TARGET_NEW_MNEMONICS) ? "stw" : "st",
-                  reg_names[0], reg_names[1]);
+         asm_fprintf (file, "\t{st|stw} %s,4(%s)\n",
+                      reg_names[0], reg_names[1]);
          rs6000_pic_func_labelno = rs6000_pic_labelno;
          rs6000_output_load_toc_table (file, 11);
-         fprintf (file, "\t%s %s,", (TARGET_NEW_MNEMONICS) ? "lwz" : "l",
-                  reg_names[11]);
+         asm_fprintf (file, "\t{l|lwz} %s,", reg_names[11]);
          assemble_name (file, buf);
-         fprintf (file, "X(%s)\n", reg_names[11]);
-         fprintf (file, "%s\n", MINIMAL_TOC_SECTION_ASM_OP);
+         asm_fprintf (file, "X(%s)\n", reg_names[11]);
+         asm_fprintf (file, "%s\n", MINIMAL_TOC_SECTION_ASM_OP);
          assemble_name (file, buf);
-         fprintf (file, "X = .-.LCTOC1\n");
-         fprintf (file, "\t.long ");
+         fputs ("X = .-.LCTOC1\n", file);
+         fputs ("\t.long ", file);
          assemble_name (file, buf);
          fputs ("\n\t.previous\n", file);
        }
@@ -4643,7 +4639,7 @@ output_function_profiler (file, labelno)
        {
          asm_fprintf (file, "\t{liu|lis} %s,", reg_names[11]);
          assemble_name (file, buf);
-         asm_fprintf (file, "@ha\n");
+         fputs ("@ha\n", file);
          asm_fprintf (file, "\t{st|stw} %s,4(%s)\n", reg_names[0], reg_names[1]);
          asm_fprintf (file, "\t{cal|la} %s,", reg_names[0]);
          assemble_name (file, buf);
index 7190de757de40d32a64fb05e454cd2945289a252..910d99e0e68e83c2deb65824d772b0d99dda6b67 100644 (file)
@@ -1324,9 +1324,12 @@ extern int rs6000_sysv_varargs_p;
    && (DEFAULT_ABI != ABI_SOLARIS || int_size_in_bytes (TYPE) > 8))
 
 /* Mode of stack savearea.
+   FUNCTION is VOIDmode because calling convention maintains SP.
+   BLOCK needs Pmode for SP.
    NONLOCAL needs twice Pmode to maintain both backchain and SP.  */
 #define STACK_SAVEAREA_MODE(LEVEL)     \
-    (LEVEL == SAVE_NONLOCAL ? (TARGET_32BIT ? DImode : TImode) : Pmode)
+  (LEVEL == SAVE_FUNCTION ? VOIDmode   \
+  : LEVEL == SAVE_NONLOCAL ? (TARGET_32BIT ? DImode : TImode) : Pmode)
 
 /* Minimum and maximum general purpose registers used to hold arguments.  */
 #define GP_ARG_MIN_REG 3
index 61398db34b2ce6936adea91fb62bc0ebee1d4bf9..91300e37ca5bf2a9b626799f1e22ddab83640618 100644 (file)
   "")
 
 (define_expand "restore_stack_block"
-  [(set (match_dup 2) (mem (match_operand 0 "register_operand" "")))
+  [(use (match_operand 0 "register_operand" ""))
+   (set (match_dup 2) (match_dup 3))
    (set (match_dup 0) (match_operand 1 "register_operand" ""))
-   (set (mem (match_dup 0)) (match_dup 2))]
+   (set (match_dup 3) (match_dup 2))]
   ""
   "
-{ operands[2] = gen_reg_rtx (Pmode); }")
+{
+  operands[2] = gen_reg_rtx (Pmode);
+  operands[3] = gen_rtx (MEM, Pmode, operands[0]);
+}")
 
 (define_expand "save_stack_nonlocal"
   [(match_operand 0 "memory_operand" "")