Commit 1c31ecf6 by John David Anglin Committed by John David Anglin

pa.c (override_options): Override TARGET_JUMP_IN_DELAY when scheduling for…

pa.c (override_options): Override TARGET_JUMP_IN_DELAY when scheduling for PA8000 or generating dwarf2...

	* pa.c (override_options): Override TARGET_JUMP_IN_DELAY when scheduling
	for PA8000 or generating dwarf2 call frame information.
	(output_call): Remove DO_FRAME_NOTES check from return pointer
	optimization.
	(following_call): Return 0 when scheduling for PA8000 or generating
	dwarf2 call frame information.  Revise comment.

From-SVN: r53470
parent ac9cfada
2002-05-14 John David Anglin <dave@hiauly1.hia.nrc.ca>
* pa.c (override_options): Override TARGET_JUMP_IN_DELAY when scheduling
for PA8000 or generating dwarf2 call frame information.
(output_call): Remove DO_FRAME_NOTES check from return pointer
optimization.
(following_call): Return 0 when scheduling for PA8000 or generating
dwarf2 call frame information. Revise comment.
2002-05-14 Neil Booth <neil@daikokuya.demon.co.uk> 2002-05-14 Neil Booth <neil@daikokuya.demon.co.uk>
config/alpha: config/alpha:
......
...@@ -250,6 +250,14 @@ override_options () ...@@ -250,6 +250,14 @@ override_options ()
warning ("unknown -march= option (%s).\nValid options are 1.0, 1.1, and 2.0\n", pa_arch_string); warning ("unknown -march= option (%s).\nValid options are 1.0, 1.1, and 2.0\n", pa_arch_string);
} }
/* Unconditional branches in the delay slot are not compatible with dwarf2
call frame information. There is no benefit in using this optimization
on PA8000 and later processors. */
if (pa_cpu >= PROCESSOR_8000
|| (! USING_SJLJ_EXCEPTIONS && flag_exceptions)
|| flag_unwind_tables)
target_flags &= ~MASK_JUMP_IN_DELAY;
if (flag_pic && TARGET_PORTABLE_RUNTIME) if (flag_pic && TARGET_PORTABLE_RUNTIME)
{ {
warning ("PIC code generation is not supported in the portable runtime model\n"); warning ("PIC code generation is not supported in the portable runtime model\n");
...@@ -6377,17 +6385,13 @@ output_call (insn, call_dest, sibcall) ...@@ -6377,17 +6385,13 @@ output_call (insn, call_dest, sibcall)
distance = INSN_ADDRESSES (INSN_UID (JUMP_LABEL (NEXT_INSN (insn)))) distance = INSN_ADDRESSES (INSN_UID (JUMP_LABEL (NEXT_INSN (insn))))
- INSN_ADDRESSES (INSN_UID (seq_insn)) - 8; - INSN_ADDRESSES (INSN_UID (seq_insn)) - 8;
/* If the branch was too far away, emit a normal call followed /* If the branch is too far away, emit a normal call followed
by a nop, followed by the unconditional branch. We also don't by a nop, followed by the unconditional branch. If the branch
adjust %r2 when generating dwarf2 frame or unwind info since is close, then adjust %r2 in the call's delay slot. */
the adjustment confuses the dwarf2 output.
If the branch is close, then adjust %r2 from within the
call's delay slot. */
xoperands[0] = call_dest; xoperands[0] = call_dest;
xoperands[1] = XEXP (PATTERN (NEXT_INSN (insn)), 1); xoperands[1] = XEXP (PATTERN (NEXT_INSN (insn)), 1);
if (DO_FRAME_NOTES || ! VAL_14_BITS_P (distance)) if (! VAL_14_BITS_P (distance))
output_asm_insn ("{bl|b,l} %0,%%r2\n\tnop\n\tb,n %1", xoperands); output_asm_insn ("{bl|b,l} %0,%%r2\n\tnop\n\tb,n %1", xoperands);
else else
{ {
...@@ -6763,22 +6767,20 @@ output_parallel_addb (operands, length) ...@@ -6763,22 +6767,20 @@ output_parallel_addb (operands, length)
} }
} }
/* Return nonzero if INSN (a jump insn) immediately follows a call to /* Return nonzero if INSN (a jump insn) immediately follows a call
a named function. This is used to discourage creating parallel movb/addb to a named function. This is used to avoid filling the delay slot
insns since a jump which immediately follows a call can execute in the of the jump since it can usually be eliminated by modifying RP in
delay slot of the call. the delay slot of the call. */
It is also used to avoid filling the delay slot of a jump which
immediately follows a call since the jump can usually be eliminated
completely by modifying RP in the delay slot of the call. */
int int
following_call (insn) following_call (insn)
rtx insn; rtx insn;
{ {
/* We do not parallel movb,addb or place jumps into call delay slots when /* We do not place jumps into call delay slots when optimizing for the
optimizing for the PA8000. */ PA8000 processor or when generating dwarf2 call frame information. */
if (pa_cpu != PROCESSOR_8000) if (pa_cpu >= PROCESSOR_8000
|| (! USING_SJLJ_EXCEPTIONS && flag_exceptions)
|| flag_unwind_tables)
return 0; return 0;
/* Find the previous real insn, skipping NOTEs. */ /* Find the previous real insn, skipping NOTEs. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment