bmarcot / vega

vega -- The Unix-like Operating System for micro-controllers (ARM Cortex-M4)
6 stars 1 forks source link

switch_to does not save r12 #13

Closed bmarcot closed 7 years ago

bmarcot commented 8 years ago

r12 is a scratch register right after interrupt is taken (because pushed to the stack by the CPU). It's not a scratch at the time of switch_to because the kernel/interrupt context might have use it at the time of the context-switch. This should be checked against the AAPCS.