Skip to content
Commit b94949ef authored by Alexey Brodkin's avatar Alexey Brodkin Committed by Peter Korsgaard
Browse files

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: default avatarAlexey 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: default avatarPeter Korsgaard <peter@korsgaard.com>
parent 6bd18208
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment