1 /* 2 * Copyright (c) 2021 Antony Pavlov <antonynpavlov@gmail.com> 3 * 4 * based on include/arch/riscv/exception.h 5 * 6 * SPDX-License-Identifier: Apache-2.0 7 */ 8 9 #ifndef ZEPHYR_INCLUDE_ARCH_MIPS_EXPCEPTION_H_ 10 #define ZEPHYR_INCLUDE_ARCH_MIPS_EXPCEPTION_H_ 11 12 #ifndef _ASMLANGUAGE 13 #include <zephyr/types.h> 14 #include <zephyr/toolchain.h> 15 16 #ifdef __cplusplus 17 extern "C" { 18 #endif 19 20 struct __esf { 21 unsigned long ra; /* return address */ 22 unsigned long gp; /* global pointer */ 23 24 unsigned long t0; /* Caller-saved temporary register */ 25 unsigned long t1; /* Caller-saved temporary register */ 26 unsigned long t2; /* Caller-saved temporary register */ 27 unsigned long t3; /* Caller-saved temporary register */ 28 unsigned long t4; /* Caller-saved temporary register */ 29 unsigned long t5; /* Caller-saved temporary register */ 30 unsigned long t6; /* Caller-saved temporary register */ 31 unsigned long t7; /* Caller-saved temporary register */ 32 unsigned long t8; /* Caller-saved temporary register */ 33 unsigned long t9; /* Caller-saved temporary register */ 34 35 unsigned long a0; /* function argument */ 36 unsigned long a1; /* function argument */ 37 unsigned long a2; /* function argument */ 38 unsigned long a3; /* function argument */ 39 40 unsigned long v0; /* return value */ 41 unsigned long v1; /* return value */ 42 43 unsigned long at; /* assembly temporary */ 44 45 unsigned long epc; 46 unsigned long badvaddr; 47 unsigned long hi; 48 unsigned long lo; 49 unsigned long status; 50 unsigned long cause; 51 }; 52 53 typedef struct __esf z_arch_esf_t; 54 55 #ifdef __cplusplus 56 } 57 #endif 58 59 #endif /* _ASMLANGUAGE */ 60 61 #endif /* ZEPHYR_INCLUDE_ARCH_MIPS_EXPCEPTION_H_ */ 62