Commit 07432a80 by Jozef Lawrynowicz

MSP430: Indiciate that the epilogue_helper insn does not fallthru

This fixes an ICE in rtl_verify_fallthru, at cfgrtl.c:2970
gcc.c-torture/execute/20071210-1.c for -mcpu=msp430 at -O2
and above.

The epilogue_helper insn was treated as a regular insn which will
fallthru, so when a barrier is emitted after it, RTL verification failed
as rtl_verify_fallthru.

gcc/ChangeLog:

2020-04-09  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

	* config/msp430/msp430.c (msp430_expand_epilogue): Use emit_jump_insn
	when to emit the epilogue_helper insn.
	* config/msp430/msp430.md (epilogue_helper): Add a return insn to the
	RTL pattern.
parent 33c45e51
2020-04-09 Jozef Lawrynowicz <jozef.l@mittosystems.com>
* config/msp430/msp430.c (msp430_expand_epilogue): Use emit_jump_insn
when to emit the epilogue_helper insn.
* config/msp430/msp430.md (epilogue_helper): Add a return insn to the
RTL pattern.
2020-04-09 Jakub Jelinek <jakub@redhat.com> 2020-04-09 Jakub Jelinek <jakub@redhat.com>
PR debug/94495 PR debug/94495
......
...@@ -2587,7 +2587,7 @@ msp430_expand_epilogue (int is_eh) ...@@ -2587,7 +2587,7 @@ msp430_expand_epilogue (int is_eh)
&& helper_n > 1 && helper_n > 1
&& !is_eh) && !is_eh)
{ {
emit_insn (gen_epilogue_helper (GEN_INT (helper_n))); emit_jump_insn (gen_epilogue_helper (GEN_INT (helper_n)));
return; return;
} }
else else
......
...@@ -1130,7 +1130,9 @@ ...@@ -1130,7 +1130,9 @@
) )
(define_insn "epilogue_helper" (define_insn "epilogue_helper"
[(unspec_volatile [(match_operand 0 "immediate_operand" "i")] UNS_EPILOGUE_HELPER)] [(set (pc)
(unspec_volatile [(match_operand 0 "immediate_operand" "i")] UNS_EPILOGUE_HELPER))
(return)]
"" ""
"BR%Q0\t#__mspabi_func_epilog_%J0" "BR%Q0\t#__mspabi_func_epilog_%J0"
) )
......
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