Skip to content

Commit cd19876

Browse files
cjordan44Anas Nashif
authored andcommitted
arc: branch too far when STACK_CHECKING enabled.
A build error was resulting if CONFIG_ARC_STACK_CHECKING is enabled. There is a breq that was too far. Adding conditional code to re-arrange the branching so that it can be done. See ZEP-1116. Change-Id: Idea85817b2e05617bbaa4450437aa74c5737e213 Signed-off-by: Chuck Jordan <[email protected]>
1 parent a08c4b8 commit cd19876

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

arch/arc/core/regular_irq.S

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,16 @@ SECTION_FUNC(TEXT, _rirq_exit)
144144

145145
/* scheduler locked ? do not schedule */
146146
ld_s r0, [r2, _thread_offset_to_sched_locked]
147+
#ifdef CONFIG_ARC_STACK_CHECKING
148+
brle.d r0, 0, _rirq_reschedule_check
149+
ld sp, [r2, _thread_offset_to_sp]
150+
b _rirq_no_reschedule
151+
/* This branch is a bit far */
152+
_rirq_reschedule_check:
153+
#else
147154
brgt.d r0, 0, _rirq_no_reschedule
148155
ld sp, [r2, _thread_offset_to_sp]
156+
#endif
149157

150158
/* check if the current thread needs to be rescheduled */
151159
push_s r2

0 commit comments

Comments
 (0)