diff options
author | David Edelsohn <edelsohn@mhpcc.edu> | 1998-06-07 09:34:09 +0000 |
---|---|---|
committer | David Edelsohn <dje@gcc.gnu.org> | 1998-06-07 05:34:09 -0400 |
commit | dfdfa60f540afcfb54a599ce9a59770225d11ce6 (patch) | |
tree | 77c27f7359c008e569e6416bcafdf57ddd9bf7ce | |
parent | a0b152cd982db03c04c909b14649f9eedf902611 (diff) | |
download | gcc-dfdfa60f540afcfb54a599ce9a59770225d11ce6.zip gcc-dfdfa60f540afcfb54a599ce9a59770225d11ce6.tar.gz gcc-dfdfa60f540afcfb54a599ce9a59770225d11ce6.tar.bz2 |
rs6000.md (restore_stack_block): Generate MEM and specify mode.
* 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
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 34 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.h | 5 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.md | 10 |
4 files changed, 33 insertions, 23 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d473e5a..d993222 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 6a04d55..7239684 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -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); diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index 7190de7..910d99e 100644 --- a/gcc/config/rs6000/rs6000.h +++ b/gcc/config/rs6000/rs6000.h @@ -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 diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 61398db..91300e3 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -7318,12 +7318,16 @@ "") (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" "") |