Zephyr Project API 4.0.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
exception.h
Go to the documentation of this file.
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
17extern "C" {
18#endif
19
20struct arch_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#ifdef __cplusplus
54}
55#endif
56
57#endif /* _ASMLANGUAGE */
58
59#endif /* ZEPHYR_INCLUDE_ARCH_MIPS_EXPCEPTION_H_ */
Exception Stack Frame.
Definition exception.h:60
unsigned long a0
Definition exception.h:35
unsigned long gp
Definition exception.h:22
unsigned long badvaddr
Definition exception.h:46
unsigned long ra
Definition exception.h:21
unsigned long epc
Definition exception.h:45
unsigned long t0
Definition exception.h:24
unsigned long a3
Definition exception.h:38
unsigned long t8
Definition exception.h:32
unsigned long v1
Definition exception.h:41
unsigned long lo
Definition exception.h:48
unsigned long a1
Definition exception.h:36
unsigned long t6
Definition exception.h:30
unsigned long t4
Definition exception.h:28
unsigned long at
Definition exception.h:43
unsigned long t7
Definition exception.h:31
unsigned long t9
Definition exception.h:33
unsigned long cause
Definition exception.h:50
unsigned long t2
Definition exception.h:26
unsigned long status
Definition exception.h:49
unsigned long v0
Definition exception.h:40
unsigned long t5
Definition exception.h:29
unsigned long a2
Definition exception.h:37
unsigned long t1
Definition exception.h:25
unsigned long hi
Definition exception.h:47
unsigned long t3
Definition exception.h:27
Macros to abstract toolchain specific capabilities.