1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
arc: Fix operand-out-of-range errors
brcc_s instructions can generate operand-out-of-range errors. While a
better solution is being discussed by the compiler team, this workaround
ensures that the chances of running into this issue are low.
Signed-off-by: Mischa Jonker <mjonker@synopsys.com>
diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
index ff602c0..b3ca4c4 100644
--- a/gcc/config/arc/arc.c
+++ b/gcc/config/arc/arc.c
@@ -6565,7 +6565,7 @@ estimate required size increase).
rtx *ccp = &XEXP (XVECEXP (pat, 0, 1), 0);
offset = branch_dest (insn) - INSN_ADDRESSES (INSN_UID (insn));
- if ((offset >= -140 && offset < 140)
+ if ((offset >= -120 && offset < 120)
&& rtx_equal_p (XEXP (op, 1), const0_rtx)
&& compact_register_operand (XEXP (op, 0), VOIDmode)
&& equality_comparison_operator (op, VOIDmode))
@@ -6687,7 +6687,7 @@ estimate required size increase).
if (op0 != cmp0)
cc_clob_rtx = gen_rtx_REG (CC_ZNmode, CC_REG);
- else if ((offset >= -140 && offset < 140)
+ else if ((offset >= -120 && offset < 120)
&& rtx_equal_p (op1, const0_rtx)
&& compact_register_operand (op0, VOIDmode)
&& (GET_CODE (op) == EQ
|