From: Eric Botcazou Date: Tue, 12 Sep 2017 20:24:35 +0000 (+0000) Subject: sparc.c (output_return): Output the source location of the insn in the delay slot... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5980cb5b8bf5a336328061df24b81ea5845e36b0;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 766dd644031..aaf639461c0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-09-12 Eric Botcazou + + * 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 PR driver/81498 diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 1a750ec8093..9a7e46794b2 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -6182,7 +6182,9 @@ output_return (rtx_insn *insn) if (final_sequence) { - rtx delay, pat; + rtx_insn *delay; + rtx pat; + int seen; delay = NEXT_INSN (insn); gcc_assert (delay); @@ -6197,9 +6199,15 @@ output_return (rtx_insn *insn) else { 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 (); INSN_CODE (delay) = -1; + final_scan_insn (delay, asm_out_file, optimize, 0, &seen); + INSN_LOCATION (delay) = UNKNOWN_LOCATION; + + output_restore (pat); } } else @@ -6255,13 +6263,23 @@ output_sibcall (rtx_insn *insn, rtx call_operand) if (final_sequence) { - rtx_insn *delay = NEXT_INSN (insn); + rtx_insn *delay; + rtx pat; + int seen; + + delay = NEXT_INSN (insn); 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 (); INSN_CODE (delay) = -1; + final_scan_insn (delay, asm_out_file, optimize, 0, &seen); + INSN_LOCATION (delay) = UNKNOWN_LOCATION; + + output_restore (pat); } else output_restore (NULL_RTX);