1 /* 2 * Copyright (c) 2021 Travis Geiselbrecht 3 * 4 * Use of this source code is governed by a MIT-style 5 * license that can be found in the LICENSE file or at 6 * https://opensource.org/licenses/MIT 7 */ 8 #pragma once 9 10 #include <sys/types.h> 11 12 struct m68k_context_switch_frame { 13 uint32_t sp; 14 uint32_t pc; 15 16 /* callee saved */ 17 uint32_t d2; 18 uint32_t d3; 19 uint32_t d4; 20 uint32_t d5; 21 uint32_t d6; 22 uint32_t d7; 23 uint32_t a2; 24 uint32_t a3; 25 uint32_t a4; 26 uint32_t a5; 27 uint32_t a6; 28 }; 29 30 // NOTE: consider using 'state on stack' instead 31 struct arch_thread { 32 struct m68k_context_switch_frame cs_frame; 33 }; 34 35 void m68k_context_switch(struct m68k_context_switch_frame *oldcs, struct m68k_context_switch_frame *newcs); 36 37