https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93122

--- Comment #2 from Segher Boessenkool <segher at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #1)
> Created attachment 47581 [details]
> gcc10-pr93122.patch
> 
> Untested fix.  With additional -fno-asynchronous-unwind-tables, it doesn't
> ICE, but just emit wrong-code, the stack clash protection code expects r12
> to be r1 + stack offset, but it is not initialized to anything at all.
> The bug seems to be that add<mode>3 expander uses reg_or_add_cint_operand
> predicate for the last operand and if that isn't satisfied, gen_add3_insn
> simply doesn't emit anything.

Yeah, gen_add3_insn needs to be fixed; it shouldn't silently generate bad code.
This may not be so easy though?

> On top of that, I think we want to use
> add_operand as before too, because otherwise gen_add3_insn can emit multiple
> instructions and in that case we really need to describe the effect to
> dwarf2frame.c properly.

Does that not happen automatically here?

Reply via email to