Skip to content

Commit

Permalink
arc: use different load instruction
Browse files Browse the repository at this point in the history
If the offset within the thread struct to the
ARC arch-specific 'relinquish_cause' member is too
large, ld_s instructions referencing it will not
compile. This happens easily if CONFIG_THREAD_NAME
reserves a name buffer within the thread struct, since
all the arch-specific members come last.

Use the regular 'ld' instruction instead.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
  • Loading branch information
Andrew Boie authored and andrewboie committed Jul 1, 2019
1 parent 5a8b40b commit 1ee0170
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion arch/arc/core/fast_irq.S
Expand Up @@ -238,7 +238,7 @@ _firq_reschedule:
pop_s r2 pop_s r2
#endif #endif


ld_s r3, [r2, _thread_offset_to_relinquish_cause] ld r3, [r2, _thread_offset_to_relinquish_cause]


breq r3, _CAUSE_RIRQ, _firq_return_from_rirq breq r3, _CAUSE_RIRQ, _firq_return_from_rirq
nop nop
Expand Down
2 changes: 1 addition & 1 deletion arch/arc/core/regular_irq.S
Expand Up @@ -181,7 +181,7 @@ _rirq_common_interrupt_swap:
pop_s r2 pop_s r2
#endif #endif


ld_s r3, [r2, _thread_offset_to_relinquish_cause] ld r3, [r2, _thread_offset_to_relinquish_cause]


breq r3, _CAUSE_RIRQ, _rirq_return_from_rirq breq r3, _CAUSE_RIRQ, _rirq_return_from_rirq
nop nop
Expand Down
2 changes: 1 addition & 1 deletion arch/arc/core/switch.S
Expand Up @@ -126,7 +126,7 @@ _switch_to_target_thread:
pop_s r2 pop_s r2
#endif #endif


ld_s r3, [r2, _thread_offset_to_relinquish_cause] ld r3, [r2, _thread_offset_to_relinquish_cause]


breq r3, _CAUSE_RIRQ, _switch_return_from_rirq breq r3, _CAUSE_RIRQ, _switch_return_from_rirq
nop nop
Expand Down

0 comments on commit 1ee0170

Please sign in to comment.