Commit 5980cb5b by Eric Botcazou Committed by Eric Botcazou

sparc.c (output_return): Output the source location of the insn in the delay slot, if any.

	* config/sparc/sparc.c (output_return): Output the source location of
	the insn in the delay slot, if any.
	(output_sibcall): Likewise.

From-SVN: r252041
parent 741bbaab
2017-09-12 Eric Botcazou <ebotcazou@adacore.com>
* config/sparc/sparc.c (output_return): Output the source location of
the insn in the delay slot, if any.
(output_sibcall): Likewise.
2017-09-12 H.J. Lu <hongjiu.lu@intel.com> 2017-09-12 H.J. Lu <hongjiu.lu@intel.com>
PR driver/81498 PR driver/81498
......
...@@ -6182,7 +6182,9 @@ output_return (rtx_insn *insn) ...@@ -6182,7 +6182,9 @@ output_return (rtx_insn *insn)
if (final_sequence) if (final_sequence)
{ {
rtx delay, pat; rtx_insn *delay;
rtx pat;
int seen;
delay = NEXT_INSN (insn); delay = NEXT_INSN (insn);
gcc_assert (delay); gcc_assert (delay);
...@@ -6197,9 +6199,15 @@ output_return (rtx_insn *insn) ...@@ -6197,9 +6199,15 @@ output_return (rtx_insn *insn)
else else
{ {
output_asm_insn ("jmp\t%%i7+%)", NULL); output_asm_insn ("jmp\t%%i7+%)", NULL);
output_restore (pat);
/* We're going to output the insn in the delay slot manually.
Make sure to output its source location first. */
PATTERN (delay) = gen_blockage (); PATTERN (delay) = gen_blockage ();
INSN_CODE (delay) = -1; INSN_CODE (delay) = -1;
final_scan_insn (delay, asm_out_file, optimize, 0, &seen);
INSN_LOCATION (delay) = UNKNOWN_LOCATION;
output_restore (pat);
} }
} }
else else
...@@ -6255,13 +6263,23 @@ output_sibcall (rtx_insn *insn, rtx call_operand) ...@@ -6255,13 +6263,23 @@ output_sibcall (rtx_insn *insn, rtx call_operand)
if (final_sequence) if (final_sequence)
{ {
rtx_insn *delay = NEXT_INSN (insn); rtx_insn *delay;
rtx pat;
int seen;
delay = NEXT_INSN (insn);
gcc_assert (delay); gcc_assert (delay);
output_restore (PATTERN (delay)); pat = PATTERN (delay);
/* We're going to output the insn in the delay slot manually.
Make sure to output its source location first. */
PATTERN (delay) = gen_blockage (); PATTERN (delay) = gen_blockage ();
INSN_CODE (delay) = -1; INSN_CODE (delay) = -1;
final_scan_insn (delay, asm_out_file, optimize, 0, &seen);
INSN_LOCATION (delay) = UNKNOWN_LOCATION;
output_restore (pat);
} }
else else
output_restore (NULL_RTX); output_restore (NULL_RTX);
......
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