diff options
author | Doug Evans <dje@gnu.org> | 1996-04-10 22:37:08 +0000 |
---|---|---|
committer | Doug Evans <dje@gnu.org> | 1996-04-10 22:37:08 +0000 |
commit | 3592ea0d900fb5fc609caf0764dec29c9efe3253 (patch) | |
tree | c3aa74e532daf83686a8bf78dde1d84f3f25d0fb | |
parent | 44ae13fb02be00689e0aaf62a6f5d77071b7cc17 (diff) | |
download | gcc-3592ea0d900fb5fc609caf0764dec29c9efe3253.zip gcc-3592ea0d900fb5fc609caf0764dec29c9efe3253.tar.gz gcc-3592ea0d900fb5fc609caf0764dec29c9efe3253.tar.bz2 |
sparc.c (sparc_override_options): 90c701 renamed to tsc701.
* sparc/sparc.c (sparc_override_options): 90c701 renamed to tsc701.
(eligible_for_epilogue_delay_slot): Don't allow anything if
-mbroken-saverestore.
(output_function_prologue): Only use trivial save's if
-mbroken-saverestore.
From-SVN: r11691
-rw-r--r-- | gcc/config/sparc/sparc.c | 47 |
1 files changed, 30 insertions, 17 deletions
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 54e843d..3ccbbe6 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -140,7 +140,7 @@ sparc_override_options () char *name; } cpu_default[] = { { TARGET_CPU_sparc, "cypress" }, - { TARGET_CPU_sparclet, "90c701" }, + { TARGET_CPU_sparclet, "tsc701" }, { TARGET_CPU_sparclite, "f930" }, { TARGET_CPU_sparc64, "ultrasparc" }, { 0 } @@ -165,7 +165,7 @@ sparc_override_options () { "f934", PROCESSOR_F934, MASK_ISA, MASK_SPARCLITE|MASK_FPU }, { "sparclet", PROCESSOR_SPARCLET, MASK_ISA, MASK_SPARCLET }, /* TEMIC sparclet */ - { "90c701", PROCESSOR_90C701, MASK_ISA, MASK_SPARCLET }, + { "tsc701", PROCESSOR_TSC701, MASK_ISA, MASK_SPARCLET }, /* "v9" is used to specify a true 64 bit architecture. "v8plus" is what Sun calls Solaris2 running on UltraSPARC's. */ { "v8plus", PROCESSOR_V8PLUS, MASK_ISA, MASK_V9 }, @@ -1108,6 +1108,10 @@ eligible_for_epilogue_delay (trial, slot) return (get_attr_in_uncond_branch_delay (trial) == IN_BRANCH_DELAY_TRUE); return 0; } + /* If only trivial `restore' insns work, nothing can go in the + delay slot. */ + else if (TARGET_BROKEN_SAVERESTORE) + return 0; pat = PATTERN (trial); @@ -3076,34 +3080,43 @@ output_function_prologue (file, size, leaf_function) if (actual_fsize == 0) /* do nothing. */ ; - else if (actual_fsize <= 4096) + else if (! leaf_function && ! TARGET_BROKEN_SAVERESTORE) { - if (! leaf_function) + if (actual_fsize <= 4096) fprintf (file, "\tsave %%sp,-%d,%%sp\n", actual_fsize); - else - fprintf (file, "\tadd %%sp,-%d,%%sp\n", actual_fsize); - } - else if (actual_fsize <= 8192) - { - /* For frames in the range 4097..8192, we can use just two insns. */ - if (! leaf_function) + else if (actual_fsize <= 8192) { fprintf (file, "\tsave %%sp,-4096,%%sp\n"); fprintf (file, "\tadd %%sp,-%d,%%sp\n", actual_fsize - 4096); } else { - fprintf (file, "\tadd %%sp,-4096,%%sp\n"); - fprintf (file, "\tadd %%sp,-%d,%%sp\n", actual_fsize - 4096); + build_big_number (file, -actual_fsize, "%g1"); + fprintf (file, "\tsave %%sp,%%g1,%%sp\n"); } } else { - build_big_number (file, -actual_fsize, "%g1"); - if (! leaf_function) - fprintf (file, "\tsave %%sp,%%g1,%%sp\n"); + /* If the target has a broken save insn (only handles save %g0,%g0,%g0), + do the save and then handle like a leaf function. + We assume the environment will properly handle or otherwise avoid + trouble associated with an interrupt occuring after the `save' or + trap occuring during it. */ + if (TARGET_BROKEN_SAVERESTORE) + fprintf (file, "\tsave\n"); + + if (actual_fsize <= 4096) + fprintf (file, "\tadd %%sp,-%d,%%sp\n", actual_fsize); + else if (actual_fsize <= 8192) + { + fprintf (file, "\tadd %%sp,-4096,%%sp\n"); + fprintf (file, "\tadd %%sp,-%d,%%sp\n", actual_fsize - 4096); + } else - fprintf (file, "\tadd %%sp,%%g1,%%sp\n"); + { + build_big_number (file, -actual_fsize, "%g1"); + fprintf (file, "\tadd %%sp,%%g1,%%sp\n"); + } } /* If doing anything with PIC, do it now. */ |