Skip to content

Commit

Permalink
prevent wierd (a4) insns with minus/neg and so
Browse files Browse the repository at this point in the history
  • Loading branch information
bebbo committed May 9, 2022
1 parent 1e66d08 commit 40209c7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gcc/config/m68k/m68k.c
Original file line number Diff line number Diff line change
Expand Up @@ -2112,7 +2112,7 @@ m68k_illegitimate_symbolic_constant_p (rtx x)
&& !offset_within_block_p (base, INTVAL (offset)))
return true;
}
return m68k_tls_reference_p (x, false);
return m68k_tls_reference_p (x, false) || !amigaos_legitimate_src(x);
}

/* Implement TARGET_CANNOT_FORCE_CONST_MEM. */
Expand Down
17 changes: 17 additions & 0 deletions gcc/loop-doloop.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,23 @@ doloop_valid_p (struct loop *loop, struct niter_desc *desc)
goto cleanup;
}

#ifdef TARGET_AMIGAOS
if (desc->noloop_assumptions)
{
rtx cmp = XEXP (desc->noloop_assumptions, 0);
if (COMPARISON_P (cmp))
{
rtx b = XEXP (cmp, 0);
extern bool amigaos_legitimate_src (rtx);
if (!amigaos_legitimate_src (b))
{
result = false;
goto cleanup;
}
}
}
#endif

for (i = 0; i < loop->num_nodes; i++)
{
bb = body[i];
Expand Down

0 comments on commit 40209c7

Please sign in to comment.