netbsd32_machdep.h revision 1.1
1/*	$NetBSD: netbsd32_machdep.h,v 1.1 2018/04/01 04:35:03 ryo Exp $	*/
2
3#ifndef _MACHINE_NETBSD32_H_
4#define _MACHINE_NETBSD32_H_
5
6#include <sys/ucontext.h>
7#include <compat/sys/ucontext.h>
8#include <compat/sys/siginfo.h>
9
10#define NETBSD32_POINTER_TYPE uint32_t
11typedef	struct { NETBSD32_POINTER_TYPE i32; } netbsd32_pointer_t;
12
13/* earm has 64bit aligned 64bit integers */
14#define NETBSD32_INT64_ALIGN __attribute__((__aligned__(8)))
15
16typedef netbsd32_pointer_t netbsd32_sigcontextp_t;
17
18#define netbsd32_syscall_intern syscall_intern
19
20struct netbsd32_sigcontext13 {
21	int32_t		sc_onstack;		/* sigstack state to restore */
22	int32_t		__sc_mask13;		/* signal mask to restore (old style) */
23
24	uint32_t	sc_spsr;
25	uint32_t	sc_r0;
26	uint32_t	sc_r1;
27	uint32_t	sc_r2;
28	uint32_t	sc_r3;
29	uint32_t	sc_r4;
30	uint32_t	sc_r5;
31	uint32_t	sc_r6;
32	uint32_t	sc_r7;
33	uint32_t	sc_r8;
34	uint32_t	sc_r9;
35	uint32_t	sc_r10;
36	uint32_t	sc_r11;
37	uint32_t	sc_r12;
38	uint32_t	sc_usr_sp;
39	uint32_t	sc_usr_lr;
40	uint32_t	sc_svc_lr;
41	uint32_t	sc_pc;
42};
43
44struct netbsd32_sigcontext {
45	int32_t		sc_onstack;		/* sigstack state to restore */
46	int32_t		__sc_mask13;		/* signal mask to restore (old style) */
47
48	uint32_t	sc_spsr;
49	uint32_t	sc_r0;
50	uint32_t	sc_r1;
51	uint32_t	sc_r2;
52	uint32_t	sc_r3;
53	uint32_t	sc_r4;
54	uint32_t	sc_r5;
55	uint32_t	sc_r6;
56	uint32_t	sc_r7;
57	uint32_t	sc_r8;
58	uint32_t	sc_r9;
59	uint32_t	sc_r10;
60	uint32_t	sc_r11;
61	uint32_t	sc_r12;
62	uint32_t	sc_usr_sp;
63	uint32_t	sc_usr_lr;
64	uint32_t	sc_svc_lr;
65	uint32_t	sc_pc;
66
67	sigset_t	sc_mask;		/* signal mask to restore (new style) */
68};
69
70#define NETBSD32_MID_MACHINE MID_ARM
71
72#endif /* _MACHINE_NETBSD32_H_ */
73