Re: [PATCH] RISC-V: Fix interrupt support for -g.

2018-07-02 Thread Kito Cheng
Hi Jim: It's no problem with current approach, I just think it can simplify the .md file. Thanks :) On Tue, Jul 3, 2018 at 11:22 AM Jim Wilson wrote: > > On Mon, Jul 2, 2018 at 8:04 PM, Kito Cheng wrote: > > Does it possible just combine those pattern into simple_return > > pattern, and then

Re: [PATCH] RISC-V: Fix interrupt support for -g.

2018-07-02 Thread Jim Wilson
On Mon, Jul 2, 2018 at 8:04 PM, Kito Cheng wrote: > Does it possible just combine those pattern into simple_return > pattern, and then check the function type and output correct return > instruction in riscv_output_return? There might be problems with optimizations thinking this is a regular

Re: [PATCH] RISC-V: Fix interrupt support for -g.

2018-07-02 Thread Kito Cheng
Hi Jim: Does it possible just combine those pattern into simple_return pattern, and then check the function type and output correct return instruction in riscv_output_return? On Tue, Jul 3, 2018 at 8:22 AM Jim Wilson wrote: > > This fixes a problem found by someone trying to use the new RISC-V

[PATCH] RISC-V: Fix interrupt support for -g.

2018-07-02 Thread Jim Wilson
This fixes a problem found by someone trying to use the new RISC-V interrupt attribute support. With a slightly non-trivial example, and the -g option, we get an abort in dwarf2cfi for an inconsistent CFI state. This is my fault for not making the new interrupt return patterns look enough like