x86: swap: save the scratch pad registers.

Save the required scratch pad register (in this case only edx)
before calling the C function.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
This commit is contained in:
Adithya Baglody 2017-11-27 15:14:00 +05:30 committed by Andrew Boie
commit 808ad6101e

View file

@ -143,7 +143,9 @@ SECTION_FUNC(TEXT, __swap)
#ifdef CONFIG_KERNEL_EVENT_LOGGER_CONTEXT_SWITCH
/* Register the context switch */
push %edx
call _sys_k_event_logger_context_switch
pop %edx
#endif
movl _kernel_offset_to_ready_q_cache(%edi), %eax