This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PA cleanup
- To: egcs-patches at egcs dot cygnus dot com
- Subject: PA cleanup
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Fri, 16 Jul 1999 14:08:41 -0600
- Reply-To: law at cygnus dot com
This kills a long forgotten and unwanted switch. If we ever wanted to do
out of line prologues/epilogues on the PA again, there are much better ways :-)
An appropriate doc update will follow shortly.
* pa.c (out_of_line_prologue_epilogue): Delete.
(override_options): Remove -mspace related code.
(hppa_expand_prologue, hppa_expand_epilogue): Likewise.
(compute_frame_size): Only allocate space for register that
actually need to be saved.
* pa.h (MASK_SPACE, TARGET_SPACE): Delete.
(TARGET_SWITCHES): Remove -mspace, -mno-space
* pa/t-pa (LIB2FUNCS_EXTRA): Remove ee.asm and ee_fp.asm
* pa/t-pro (LIB2FUNCS_EXTRA): Likewise. Remove -mspace multilib.
* pa/ee.asm, pa/ee_fp.asm: Delete.
Index: pa.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/pa/pa.c,v
retrieving revision 1.37
diff -c -3 -p -r1.37 pa.c
*** pa.c 1999/06/30 06:11:41 1.37
--- pa.c 1999/07/16 20:02:27
*************** int hp_profile_labelno;
*** 71,80 ****
registers which were saved by the current function's prologue. */
static int gr_saved, fr_saved;
- /* Whether or not the current function uses an out-of-line prologue
- and epilogue. */
- static int out_of_line_prologue_epilogue;
-
static rtx find_addr_reg ();
/* Keep track of the number of bytes we have output in the CODE subspaces
--- 71,76 ----
*************** override_options ()
*** 174,185 ****
warning ("PIC code generation is not compatible with profiling\n");
}
- if (TARGET_SPACE && (flag_pic || profile_flag))
- {
- warning ("Out of line entry/exit sequences are not compatible\n");
- warning ("with PIC or profiling\n");
- }
-
if (! TARGET_GAS && write_symbols != NO_DEBUG)
{
warning ("-g is only supported when using GAS on this processor,");
--- 170,175 ----
*************** compute_frame_size (size, fregs_live)
*** 2566,2596 ****
we need to add this in because of STARTING_FRAME_OFFSET. */
fsize = size + (size || frame_pointer_needed ? 8 : 0);
- /* We must leave enough space for all the callee saved registers
- from 3 .. highest used callee save register since we don't
- know if we're going to have an inline or out of line prologue
- and epilogue. */
for (i = 18; i >= 3; i--)
if (regs_ever_live[i])
{
! fsize += 4 * (i - 2);
break;
}
/* Round the stack. */
fsize = (fsize + 7) & ~7;
- /* We must leave enough space for all the callee saved registers
- from 3 .. highest used callee save register since we don't
- know if we're going to have an inline or out of line prologue
- and epilogue. */
for (i = 66; i >= 48; i -= 2)
if (regs_ever_live[i] || regs_ever_live[i + 1])
{
if (fregs_live)
*fregs_live = 1;
! fsize += 4 * (i - 46);
break;
}
--- 2556,2578 ----
we need to add this in because of STARTING_FRAME_OFFSET. */
fsize = size + (size || frame_pointer_needed ? 8 : 0);
for (i = 18; i >= 3; i--)
if (regs_ever_live[i])
{
! fsize += 4;
break;
}
/* Round the stack. */
fsize = (fsize + 7) & ~7;
for (i = 66; i >= 48; i -= 2)
if (regs_ever_live[i] || regs_ever_live[i + 1])
{
if (fregs_live)
*fregs_live = 1;
! fsize += 4;
break;
}
*************** hppa_expand_prologue()
*** 2691,2781 ****
tmpreg = gen_rtx_REG (SImode, 1);
size_rtx = GEN_INT (actual_fsize);
- /* Handle out of line prologues and epilogues. */
- if (TARGET_SPACE)
- {
- rtx operands[2];
- int saves = 0;
- int outline_insn_count = 0;
- int inline_insn_count = 0;
-
- /* Count the number of insns for the inline and out of line
- variants so we can choose one appropriately.
-
- No need to screw with counting actual_fsize operations -- they're
- done for both inline and out of line prologues. */
- if (regs_ever_live[2])
- inline_insn_count += 1;
-
- if (! cint_ok_for_move (local_fsize))
- outline_insn_count += 2;
- else
- outline_insn_count += 1;
-
- /* Put the register save info into %r22. */
- for (i = 18; i >= 3; i--)
- if (regs_ever_live[i] && ! call_used_regs[i])
- {
- /* -1 because the stack adjustment is normally done in
- the same insn as a register save. */
- inline_insn_count += (i - 2) - 1;
- saves = i;
- break;
- }
-
- for (i = 66; i >= 48; i -= 2)
- if (regs_ever_live[i] || regs_ever_live[i + 1])
- {
- /* +1 needed as we load %r1 with the start of the freg
- save area. */
- inline_insn_count += (i/2 - 23) + 1;
- saves |= ((i/2 - 12 ) << 16);
- break;
- }
-
- if (frame_pointer_needed)
- inline_insn_count += 3;
-
- if (! cint_ok_for_move (saves))
- outline_insn_count += 2;
- else
- outline_insn_count += 1;
-
- if (TARGET_PORTABLE_RUNTIME)
- outline_insn_count += 2;
- else
- outline_insn_count += 1;
-
- /* If there's a lot of insns in the prologue, then do it as
- an out-of-line sequence. */
- if (inline_insn_count > outline_insn_count)
- {
- /* Put the local_fisze into %r19. */
- operands[0] = gen_rtx_REG (SImode, 19);
- operands[1] = GEN_INT (local_fsize);
- emit_move_insn (operands[0], operands[1]);
-
- /* Put the stack size into %r21. */
- operands[0] = gen_rtx_REG (SImode, 21);
- operands[1] = size_rtx;
- emit_move_insn (operands[0], operands[1]);
-
- operands[0] = gen_rtx_REG (SImode, 22);
- operands[1] = GEN_INT (saves);
- emit_move_insn (operands[0], operands[1]);
-
- /* Now call the out-of-line prologue. */
- emit_insn (gen_outline_prologue_call ());
- emit_insn (gen_blockage ());
-
- /* Note that we're using an out-of-line prologue. */
- out_of_line_prologue_epilogue = 1;
- return;
- }
- }
-
- out_of_line_prologue_epilogue = 0;
-
/* Save RP first. The calling conventions manual states RP will
always be stored into the caller's frame at sp-20. */
if (regs_ever_live[2] || profile_flag)
--- 2673,2678 ----
*************** hppa_expand_epilogue ()
*** 3037,3084 ****
rtx tmpreg;
int offset,i;
int merge_sp_adjust_with_load = 0;
-
- /* Handle out of line prologues and epilogues. */
- if (TARGET_SPACE && out_of_line_prologue_epilogue)
- {
- int saves = 0;
- rtx operands[2];
-
- /* Put the register save info into %r22. */
- for (i = 18; i >= 3; i--)
- if (regs_ever_live[i] && ! call_used_regs[i])
- {
- saves = i;
- break;
- }
-
- for (i = 66; i >= 48; i -= 2)
- if (regs_ever_live[i] || regs_ever_live[i + 1])
- {
- saves |= ((i/2 - 12 ) << 16);
- break;
- }
-
- emit_insn (gen_blockage ());
-
- /* Put the local_fisze into %r19. */
- operands[0] = gen_rtx_REG (SImode, 19);
- operands[1] = GEN_INT (local_fsize);
- emit_move_insn (operands[0], operands[1]);
-
- /* Put the stack size into %r21. */
- operands[0] = gen_rtx_REG (SImode, 21);
- operands[1] = GEN_INT (actual_fsize);
- emit_move_insn (operands[0], operands[1]);
-
- operands[0] = gen_rtx_REG (SImode, 22);
- operands[1] = GEN_INT (saves);
- emit_move_insn (operands[0], operands[1]);
-
- /* Now call the out-of-line epilogue. */
- emit_insn (gen_outline_epilogue_call ());
- return;
- }
/* We will use this often. */
tmpreg = gen_rtx_REG (SImode, 1);
--- 2934,2939 ----
Index: pa.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/pa/pa.h,v
retrieving revision 1.48
diff -c -3 -p -r1.48 pa.h
*** pa.h 1999/06/30 06:11:45 1.48
--- pa.h 1999/07/16 20:02:31
*************** extern int target_flags;
*** 108,118 ****
#define MASK_JUMP_IN_DELAY 8
#define TARGET_JUMP_IN_DELAY (target_flags & MASK_JUMP_IN_DELAY)
- /* Optimize for space. Currently this only turns on out of line
- prologues and epilogues. */
- #define MASK_SPACE 16
- #define TARGET_SPACE (target_flags & MASK_SPACE)
-
/* Disable indexed addressing modes. */
#define MASK_DISABLE_INDEXING 32
#define TARGET_DISABLE_INDEXING (target_flags & MASK_DISABLE_INDEXING)
--- 108,113 ----
*************** extern int target_flags;
*** 174,181 ****
{"space-regs", -MASK_NO_SPACE_REGS, "Do not disable space regs"}, \
{"jump-in-delay", MASK_JUMP_IN_DELAY, "Put jumps in call delay slots"},\
{"no-jump-in-delay", -MASK_JUMP_IN_DELAY, "Do not put jumps in call delay
slots"}, \
- {"space", MASK_SPACE, "Optimize for code space"}, \
- {"no-space", -MASK_SPACE, "Do not optimize for code space"}, \
{"disable-indexing", MASK_DISABLE_INDEXING, "Disable indexed
addressing"},\
{"no-disable-indexing", -MASK_DISABLE_INDEXING, "Do not disable indexed
addressing"},\
{"portable-runtime", MASK_PORTABLE_RUNTIME, "Use portable calling
conventions"}, \
--- 169,174 ----
Index: t-pa
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/pa/t-pa,v
retrieving revision 1.4
diff -c -3 -p -r1.4 t-pa
*** t-pa 1998/12/16 21:11:15 1.4
--- t-pa 1999/07/16 20:02:31
***************
*** 1,18 ****
LIBGCC1=libgcc1.null
CROSS_LIBGCC1=libgcc1.null
ADA_CFLAGS=-mdisable-indexing
! LIB2FUNCS_EXTRA=lib2funcs.asm ee.asm ee_fp.asm
lib2funcs.asm: $(srcdir)/config/pa/lib2funcs.asm
rm -f lib2funcs.asm
cp $(srcdir)/config/pa/lib2funcs.asm .
-
- ee.asm: $(srcdir)/config/pa/ee.asm
- rm -f ee.asm
- cp $(srcdir)/config/pa/ee.asm .
-
- ee_fp.asm: $(srcdir)/config/pa/ee_fp.asm
- rm -f ee_fp.asm
- cp $(srcdir)/config/pa/ee_fp.asm .
TARGET_LIBGCC2_CFLAGS = -fPIC
--- 1,10 ----
LIBGCC1=libgcc1.null
CROSS_LIBGCC1=libgcc1.null
ADA_CFLAGS=-mdisable-indexing
! LIB2FUNCS_EXTRA=lib2funcs.asm
lib2funcs.asm: $(srcdir)/config/pa/lib2funcs.asm
rm -f lib2funcs.asm
cp $(srcdir)/config/pa/lib2funcs.asm .
TARGET_LIBGCC2_CFLAGS = -fPIC
Index: t-pro
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/pa/t-pro,v
retrieving revision 1.2
diff -c -3 -p -r1.2 t-pro
*** t-pro 1998/12/16 21:11:16 1.2
--- t-pro 1999/07/16 20:02:31
*************** LIBGCC1_TEST =
*** 7,13 ****
ADA_CFLAGS=-mdisable-indexing
! LIB2FUNCS_EXTRA=fp-bit.c dp-bit.c lib2funcs.asm ee.asm ee_fp.asm
dp-bit.c: $(srcdir)/config/fp-bit.c
cat $(srcdir)/config/fp-bit.c > dp-bit.c
--- 7,13 ----
ADA_CFLAGS=-mdisable-indexing
! LIB2FUNCS_EXTRA=fp-bit.c dp-bit.c lib2funcs.asm
dp-bit.c: $(srcdir)/config/fp-bit.c
cat $(srcdir)/config/fp-bit.c > dp-bit.c
*************** fp-bit.c: $(srcdir)/config/fp-bit.c
*** 19,38 ****
lib2funcs.asm: $(srcdir)/config/pa/lib2funcs.asm
rm -f lib2funcs.asm
cp $(srcdir)/config/pa/lib2funcs.asm .
-
- ee.asm: $(srcdir)/config/pa/ee.asm
- rm -f ee.asm
- cp $(srcdir)/config/pa/ee.asm .
-
- ee_fp.asm: $(srcdir)/config/pa/ee_fp.asm
- rm -f ee_fp.asm
- cp $(srcdir)/config/pa/ee_fp.asm .
-
- # Build the libraries for both speed and space optimizations
-
- MULTILIB_OPTIONS=mspace
- MULTILIB_DIRNAMES=space
- MULTILIB_MATCHES=
-
- LIBGCC = stmp-multilib
- INSTALL_LIBGCC = install-multilib
--- 19,21 ----