1 /*
2  * Copyright (c) 2016 Wind River Systems, Inc.
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef ZEPHYR_ARCH_NIOS2_INCLUDE_OFFSETS_SHORT_ARCH_H_
8 #define ZEPHYR_ARCH_NIOS2_INCLUDE_OFFSETS_SHORT_ARCH_H_
9 
10 #include <offsets.h>
11 
12 /* kernel */
13 
14 /* nothing for now */
15 
16 /* end - kernel */
17 
18 /* threads */
19 
20 #define _thread_offset_to_r16 \
21 	(___thread_t_callee_saved_OFFSET + ___callee_saved_t_r16_OFFSET)
22 
23 #define _thread_offset_to_r17 \
24 	(___thread_t_callee_saved_OFFSET + ___callee_saved_t_r17_OFFSET)
25 
26 #define _thread_offset_to_r18 \
27 	(___thread_t_callee_saved_OFFSET + ___callee_saved_t_r18_OFFSET)
28 
29 #define _thread_offset_to_r19 \
30 	(___thread_t_callee_saved_OFFSET + ___callee_saved_t_r19_OFFSET)
31 
32 #define _thread_offset_to_r20 \
33 	(___thread_t_callee_saved_OFFSET + ___callee_saved_t_r20_OFFSET)
34 
35 #define _thread_offset_to_r21 \
36 	(___thread_t_callee_saved_OFFSET + ___callee_saved_t_r21_OFFSET)
37 
38 #define _thread_offset_to_r22 \
39 	(___thread_t_callee_saved_OFFSET + ___callee_saved_t_r22_OFFSET)
40 
41 #define _thread_offset_to_r23 \
42 	(___thread_t_callee_saved_OFFSET + ___callee_saved_t_r23_OFFSET)
43 
44 #define _thread_offset_to_r28 \
45 	(___thread_t_callee_saved_OFFSET + ___callee_saved_t_r28_OFFSET)
46 
47 #define _thread_offset_to_ra \
48 	(___thread_t_callee_saved_OFFSET + ___callee_saved_t_ra_OFFSET)
49 
50 #define _thread_offset_to_sp \
51 	(___thread_t_callee_saved_OFFSET + ___callee_saved_t_sp_OFFSET)
52 
53 #define _thread_offset_to_key \
54 	(___thread_t_callee_saved_OFFSET + ___callee_saved_t_key_OFFSET)
55 
56 #define _thread_offset_to_retval \
57 	(___thread_t_callee_saved_OFFSET + ___callee_saved_t_retval_OFFSET)
58 
59 /* end - threads */
60 
61 #endif /* ZEPHYR_ARCH_NIOS2_INCLUDE_OFFSETS_SHORT_ARCH_H_ */
62