This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, alpha]: If trap is the last insn in the function, emit NOP after the insn


Hello!

CALL_PALL 0x81 that implements trap insn updates PC to point after the
insn before exception is raised. If the trap insn is the last insn in
the noreturn function, then updated PC actually points outside of
function boundaries. This confuses both, gdb and backtrace.

The solution is to emit NOP, when trap is the last active insn in the function.

2017-08-06  Uros Bizjak  <ubizjak@gmail.com>

    * config/alpha/alpha.c (alpha_reorg): If trap is the last active
    insn in the function, emit NOP after the insn.

Bootstrapped and regression tested on alphaev68-linux-gnu, where the
patch fixes TestBreakpoint gotools failure.

Committed to mainline.

Uros.

Attachment: a.diff.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]