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
+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
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)
{