Commit dddc1815 by Claudiu Zissulescu Committed by Claudiu Zissulescu

[ARC] Do not emit ZOL in the presence of text jump tables.

Avoid emitting lp instruction when in its ZOL body we find a jump
table data in text section. One of the reason is the jump tables size
can be changed latter on, hence the total ZOL length may be wrongly
computed.

gcc/
xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc.c (hwloop_optimize): Bailout when detecting a
	jump table data in the text section.

From-SVN: r266067
parent 3fd6ae8a
2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.c (hwloop_optimize): Bailout when detecting a
jump table data in the text section.
2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.c (arc_eh_return_address_location): Repurpose it
to fit the eh_return pattern.
* config/arc/arc.md (eh_return): Define.
......@@ -7861,7 +7861,17 @@ hwloop_optimize (hwloop_info loop)
for (insn = loop->start_label;
insn && insn != loop->loop_end;
insn = NEXT_INSN (insn))
length += NONDEBUG_INSN_P (insn) ? get_attr_length (insn) : 0;
{
length += NONDEBUG_INSN_P (insn) ? get_attr_length (insn) : 0;
if (JUMP_TABLES_IN_TEXT_SECTION
&& JUMP_TABLE_DATA_P (insn))
{
if (dump_file)
fprintf (dump_file, ";; loop %d has a jump table\n",
loop->loop_no);
return false;
}
}
if (!insn)
{
......
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