nios2: _Swap(): fix C calling issue
The code expected r10 to be preserved across the call to the event logger, which wasn't reasonable given that it is caller- saved. Change-Id: I694357ea7ee9b410b93b5a0894e8c38c53127363 Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
8c524a291e
commit
448334c2eb
1 changed files with 5 additions and 0 deletions
|
@ -63,6 +63,11 @@ SECTION_FUNC(exception.other, _Swap)
|
|||
|
||||
#if CONFIG_KERNEL_EVENT_LOGGER_CONTEXT_SWITCH
|
||||
call _sys_k_event_logger_context_switch
|
||||
/* Restore caller-saved r10. We could have stuck its value
|
||||
* onto the stack, but less instructions to just use immediates
|
||||
*/
|
||||
movhi r10, %hi(_nanokernel)
|
||||
ori r10, r10, %lo(_nanokernel)
|
||||
#endif
|
||||
|
||||
/* Find the next context to run. Choose _nanokernel.fiber
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue