ARC: gcc - fixes for improperly calculated jump/branch offsets
authorAlexey Brodkin <Alexey.Brodkin@synopsys.com>
Wed, 8 Oct 2014 18:19:37 +0000 (11:19 -0700)
committerPeter Korsgaard <peter@korsgaard.com>
Wed, 8 Oct 2014 18:55:28 +0000 (20:55 +0200)
commitb94949efb34c706cea8271a05785727904f3d72d
treef835ddad985e29b1aea9ba7579d3a37d3557abd4
parent6bd18208f2e5fb3b2daebd0d7d1c9ae04c87540d
ARC: gcc - fixes for improperly calculated jump/branch offsets

Symptoms usually seen are like that:
--->---
Error: operand out of range (128 is not between -128 and 127)
--->---
where range may differ.

Since compiler tries to use jump/branch instructions with the shortest encoding
of offset it's important to calculate required offset properly.

In case of miscalculation by compiler later assembler throws an error because of
inability to encode requested value.

Fixes are taken from current development branch of GCC for ARC and will be a
part of the next release of ARC tools, so at that point patch should be dropped.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Anton Kolesov <akolesov@synopsys.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/gcc/arc-2014.08/400-call-arc_hazard-before-branch-shortening.patch [new file with mode: 0644]
package/gcc/arc-2014.08/401-fix-length-attribute-for-casesi_load-pattern.patch [new file with mode: 0644]
package/gcc/arc-2014.08/402-fix-length-of-instructions-that-are-in-delay-slot-and-needs-to-be-predicated.patch [new file with mode: 0644]
package/gcc/arc-2014.08/403-update-casesi_compact_jump-instruction-length.patch [new file with mode: 0644]