Commit 540635ba650bd2529ce55c4135cd594a5fa109b5
1 parent
868d585a
Code provision for n32/n64 mips userland emulation. Not functional yet.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3284 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
28 changed files
with
1854 additions
and
76 deletions
Makefile
... | ... | @@ -154,6 +154,10 @@ tarbin: |
154 | 154 | $(bindir)/qemu-ppc64 \ |
155 | 155 | $(bindir)/qemu-mips \ |
156 | 156 | $(bindir)/qemu-mipsel \ |
157 | + $(bindir)/qemu-mipsn32 \ | |
158 | + $(bindir)/qemu-mipsn32el \ | |
159 | + $(bindir)/qemu-mips64 \ | |
160 | + $(bindir)/qemu-mips64el \ | |
157 | 161 | $(bindir)/qemu-alpha \ |
158 | 162 | $(bindir)/qemu-m68k \ |
159 | 163 | $(bindir)/qemu-sh4 \ | ... | ... |
Makefile.target
... | ... | @@ -4,6 +4,9 @@ TARGET_BASE_ARCH:=$(TARGET_ARCH) |
4 | 4 | ifeq ($(TARGET_ARCH), x86_64) |
5 | 5 | TARGET_BASE_ARCH:=i386 |
6 | 6 | endif |
7 | +ifeq ($(TARGET_ARCH), mipsn32) | |
8 | +TARGET_BASE_ARCH:=mips | |
9 | +endif | |
7 | 10 | ifeq ($(TARGET_ARCH), mips64) |
8 | 11 | TARGET_BASE_ARCH:=mips |
9 | 12 | endif |
... | ... | @@ -50,6 +53,11 @@ ifeq ($(TARGET_ARCH),mips) |
50 | 53 | TARGET_ARCH2=mipsel |
51 | 54 | endif |
52 | 55 | endif |
56 | +ifeq ($(TARGET_ARCH),mipsn32) | |
57 | + ifneq ($(TARGET_WORDS_BIGENDIAN),yes) | |
58 | + TARGET_ARCH2=mipsn32el | |
59 | + endif | |
60 | +endif | |
53 | 61 | ifeq ($(TARGET_ARCH),mips64) |
54 | 62 | ifneq ($(TARGET_WORDS_BIGENDIAN),yes) |
55 | 63 | TARGET_ARCH2=mips64el | ... | ... |
configure
... | ... | @@ -931,6 +931,7 @@ target_bigendian="no" |
931 | 931 | [ "$target_cpu" = "ppc64" ] && target_bigendian=yes |
932 | 932 | [ "$target_cpu" = "ppcemb" ] && target_bigendian=yes |
933 | 933 | [ "$target_cpu" = "mips" ] && target_bigendian=yes |
934 | +[ "$target_cpu" = "mipsn32" ] && target_bigendian=yes | |
934 | 935 | [ "$target_cpu" = "mips64" ] && target_bigendian=yes |
935 | 936 | [ "$target_cpu" = "sh4eb" ] && target_bigendian=yes |
936 | 937 | [ "$target_cpu" = "m68k" ] && target_bigendian=yes |
... | ... | @@ -1042,15 +1043,16 @@ elif test "$target_cpu" = "mips" -o "$target_cpu" = "mipsel" ; then |
1042 | 1043 | echo "TARGET_ARCH=mips" >> $config_mak |
1043 | 1044 | echo "#define TARGET_ARCH \"mips\"" >> $config_h |
1044 | 1045 | echo "#define TARGET_MIPS 1" >> $config_h |
1045 | - echo "CONFIG_SOFTFLOAT=yes" >> $config_mak | |
1046 | - echo "#define CONFIG_SOFTFLOAT 1" >> $config_h | |
1046 | +elif test "$target_cpu" = "mipsn32" -o "$target_cpu" = "mipsn32el" ; then | |
1047 | + echo "TARGET_ARCH=mipsn32" >> $config_mak | |
1048 | + echo "#define TARGET_ARCH \"mipsn32\"" >> $config_h | |
1049 | + echo "#define TARGET_MIPS 1" >> $config_h | |
1050 | + echo "#define TARGET_MIPSN32 1" >> $config_h | |
1047 | 1051 | elif test "$target_cpu" = "mips64" -o "$target_cpu" = "mips64el" ; then |
1048 | 1052 | echo "TARGET_ARCH=mips64" >> $config_mak |
1049 | 1053 | echo "#define TARGET_ARCH \"mips64\"" >> $config_h |
1050 | 1054 | echo "#define TARGET_MIPS 1" >> $config_h |
1051 | 1055 | echo "#define TARGET_MIPS64 1" >> $config_h |
1052 | - echo "CONFIG_SOFTFLOAT=yes" >> $config_mak | |
1053 | - echo "#define CONFIG_SOFTFLOAT 1" >> $config_h | |
1054 | 1056 | elif test "$target_cpu" = "sh4" -o "$target_cpu" = "sh4eb" ; then |
1055 | 1057 | echo "TARGET_ARCH=sh4" >> $config_mak |
1056 | 1058 | echo "#define TARGET_ARCH \"sh4\"" >> $config_h |
... | ... | @@ -1090,7 +1092,7 @@ if test "$target_darwin_user" = "yes" ; then |
1090 | 1092 | echo "#define CONFIG_DARWIN_USER 1" >> $config_h |
1091 | 1093 | fi |
1092 | 1094 | |
1093 | -if test "$target_cpu" = "arm" -o "$target_cpu" = "armeb" -o "$target_cpu" = "sparc" -o "$target_cpu" = "sparc64" -o "$target_cpu" = "m68k"; then | |
1095 | +if test "$target_cpu" = "arm" -o "$target_cpu" = "armeb" -o "$target_cpu" = "sparc" -o "$target_cpu" = "sparc64" -o "$target_cpu" = "m68k" -o "$target_cpu" = "mips" -o "$target_cpu" = "mipsel" -o "$target_cpu" = "mipsn32" -o "$target_cpu" = "mipsn32el" -o "$target_cpu" = "mips64" -o "$target_cpu" = "mips64el"; then | |
1094 | 1096 | echo "CONFIG_SOFTFLOAT=yes" >> $config_mak |
1095 | 1097 | echo "#define CONFIG_SOFTFLOAT 1" >> $config_h |
1096 | 1098 | fi | ... | ... |
linux-user/main.c
... | ... | @@ -2145,7 +2145,11 @@ int main(int argc, char **argv) |
2145 | 2145 | |
2146 | 2146 | /* Choose and initialise CPU */ |
2147 | 2147 | if (cpu_model == NULL) |
2148 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
2149 | + cpu_model = "20Kc"; | |
2150 | +#else | |
2148 | 2151 | cpu_model = "24Kf"; |
2152 | +#endif | |
2149 | 2153 | mips_find_by_name(cpu_model, &def); |
2150 | 2154 | if (def == NULL) |
2151 | 2155 | cpu_abort(env, "Unable to find MIPS CPU definition\n"); | ... | ... |
linux-user/mips/syscall.h
linux-user/mips/target_signal.h
linux-user/mips64/syscall.h
0 โ 100644
1 | + | |
2 | +/* this struct defines the way the registers are stored on the | |
3 | + stack during a system call. */ | |
4 | + | |
5 | +struct target_pt_regs { | |
6 | + /* Saved main processor registers. */ | |
7 | + target_ulong regs[32]; | |
8 | + | |
9 | + /* Saved special registers. */ | |
10 | + target_ulong cp0_status; | |
11 | + target_ulong lo; | |
12 | + target_ulong hi; | |
13 | + target_ulong cp0_badvaddr; | |
14 | + target_ulong cp0_cause; | |
15 | + target_ulong cp0_epc; | |
16 | +}; | |
17 | + | |
18 | +/* Target errno definitions taken from asm-mips/errno.h */ | |
19 | +#undef TARGET_ENOMSG | |
20 | +#define TARGET_ENOMSG 35 /* Identifier removed */ | |
21 | +#undef TARGET_EIDRM | |
22 | +#define TARGET_EIDRM 36 /* Identifier removed */ | |
23 | +#undef TARGET_ECHRNG | |
24 | +#define TARGET_ECHRNG 37 /* Channel number out of range */ | |
25 | +#undef TARGET_EL2NSYNC | |
26 | +#define TARGET_EL2NSYNC 38 /* Level 2 not synchronized */ | |
27 | +#undef TARGET_EL3HLT | |
28 | +#define TARGET_EL3HLT 39 /* Level 3 halted */ | |
29 | +#undef TARGET_EL3RST | |
30 | +#define TARGET_EL3RST 40 /* Level 3 reset */ | |
31 | +#undef TARGET_ELNRNG | |
32 | +#define TARGET_ELNRNG 41 /* Link number out of range */ | |
33 | +#undef TARGET_EUNATCH | |
34 | +#define TARGET_EUNATCH 42 /* Protocol driver not attached */ | |
35 | +#undef TARGET_ENOCSI | |
36 | +#define TARGET_ENOCSI 43 /* No CSI structure available */ | |
37 | +#undef TARGET_EL2HLT | |
38 | +#define TARGET_EL2HLT 44 /* Level 2 halted */ | |
39 | +#undef TARGET_EDEADLK | |
40 | +#define TARGET_EDEADLK 45 /* Resource deadlock would occur */ | |
41 | +#undef TARGET_ENOLCK | |
42 | +#define TARGET_ENOLCK 46 /* No record locks available */ | |
43 | +#undef TARGET_EBADE | |
44 | +#define TARGET_EBADE 50 /* Invalid exchange */ | |
45 | +#undef TARGET_EBADR | |
46 | +#define TARGET_EBADR 51 /* Invalid request descriptor */ | |
47 | +#undef TARGET_EXFULL | |
48 | +#define TARGET_EXFULL 52 /* TARGET_Exchange full */ | |
49 | +#undef TARGET_ENOANO | |
50 | +#define TARGET_ENOANO 53 /* No anode */ | |
51 | +#undef TARGET_EBADRQC | |
52 | +#define TARGET_EBADRQC 54 /* Invalid request code */ | |
53 | +#undef TARGET_EBADSLT | |
54 | +#define TARGET_EBADSLT 55 /* Invalid slot */ | |
55 | +#undef TARGET_EDEADLOCK | |
56 | +#define TARGET_EDEADLOCK 56 /* File locking deadlock error */ | |
57 | +#undef TARGET_EBFONT | |
58 | +#define TARGET_EBFONT 59 /* Bad font file format */ | |
59 | +#undef TARGET_ENOSTR | |
60 | +#define TARGET_ENOSTR 60 /* Device not a stream */ | |
61 | +#undef TARGET_ENODATA | |
62 | +#define TARGET_ENODATA 61 /* No data available */ | |
63 | +#undef TARGET_ETIME | |
64 | +#define TARGET_ETIME 62 /* Timer expired */ | |
65 | +#undef TARGET_ENOSR | |
66 | +#define TARGET_ENOSR 63 /* Out of streams resources */ | |
67 | +#undef TARGET_ENONET | |
68 | +#define TARGET_ENONET 64 /* Machine is not on the network */ | |
69 | +#undef TARGET_ENOPKG | |
70 | +#define TARGET_ENOPKG 65 /* Package not installed */ | |
71 | +#undef TARGET_EREMOTE | |
72 | +#define TARGET_EREMOTE 66 /* Object is remote */ | |
73 | +#undef TARGET_ENOLINK | |
74 | +#define TARGET_ENOLINK 67 /* Link has been severed */ | |
75 | +#undef TARGET_EADV | |
76 | +#define TARGET_EADV 68 /* Advertise error */ | |
77 | +#undef TARGET_ESRMNT | |
78 | +#define TARGET_ESRMNT 69 /* Srmount error */ | |
79 | +#undef TARGET_ECOMM | |
80 | +#define TARGET_ECOMM 70 /* Communication error on send */ | |
81 | +#undef TARGET_EPROTO | |
82 | +#define TARGET_EPROTO 71 /* Protocol error */ | |
83 | +#undef TARGET_EDOTDOT | |
84 | +#define TARGET_EDOTDOT 73 /* RFS specific error */ | |
85 | +#undef TARGET_EMULTIHOP | |
86 | +#define TARGET_EMULTIHOP 74 /* Multihop attempted */ | |
87 | +#undef TARGET_EBADMSG | |
88 | +#define TARGET_EBADMSG 77 /* Not a data message */ | |
89 | +#undef TARGET_ENAMETOOLONG | |
90 | +#define TARGET_ENAMETOOLONG 78 /* File name too long */ | |
91 | +#undef TARGET_EOVERFLOW | |
92 | +#define TARGET_EOVERFLOW 79 /* Value too large for defined data type */ | |
93 | +#undef TARGET_ENOTUNIQ | |
94 | +#define TARGET_ENOTUNIQ 80 /* Name not unique on network */ | |
95 | +#undef TARGET_EBADFD | |
96 | +#define TARGET_EBADFD 81 /* File descriptor in bad state */ | |
97 | +#undef TARGET_EREMCHG | |
98 | +#define TARGET_EREMCHG 82 /* Remote address changed */ | |
99 | +#undef TARGET_ELIBACC | |
100 | +#define TARGET_ELIBACC 83 /* Can not access a needed shared library */ | |
101 | +#undef TARGET_ELIBBAD | |
102 | +#define TARGET_ELIBBAD 84 /* Accessing a corrupted shared library */ | |
103 | +#undef TARGET_ELIBSCN | |
104 | +#define TARGET_ELIBSCN 85 /* .lib section in a.out corrupted */ | |
105 | +#undef TARGET_ELIBMAX | |
106 | +#define TARGET_ELIBMAX 86 /* Attempting to link in too many shared libraries */ | |
107 | +#undef TARGET_ELIBEXEC | |
108 | +#define TARGET_ELIBEXEC 87 /* Cannot exec a shared library directly */ | |
109 | +#undef TARGET_EILSEQ | |
110 | +#define TARGET_EILSEQ 88 /* Illegal byte sequence */ | |
111 | +#undef TARGET_ENOSYS | |
112 | +#define TARGET_ENOSYS 89 /* Function not implemented */ | |
113 | +#undef TARGET_ELOOP | |
114 | +#define TARGET_ELOOP 90 /* Too many symbolic links encountered */ | |
115 | +#undef TARGET_ERESTART | |
116 | +#define TARGET_ERESTART 91 /* Interrupted system call should be restarted */ | |
117 | +#undef TARGET_ESTRPIPE | |
118 | +#define TARGET_ESTRPIPE 92 /* Streams pipe error */ | |
119 | +#undef TARGET_ENOTEMPTY | |
120 | +#define TARGET_ENOTEMPTY 93 /* Directory not empty */ | |
121 | +#undef TARGET_EUSERS | |
122 | +#define TARGET_EUSERS 94 /* Too many users */ | |
123 | +#undef TARGET_ENOTSOCK | |
124 | +#define TARGET_ENOTSOCK 95 /* Socket operation on non-socket */ | |
125 | +#undef TARGET_EDESTADDRREQ | |
126 | +#define TARGET_EDESTADDRREQ 96 /* Destination address required */ | |
127 | +#undef TARGET_EMSGSIZE | |
128 | +#define TARGET_EMSGSIZE 97 /* Message too long */ | |
129 | +#undef TARGET_EPROTOTYPE | |
130 | +#define TARGET_EPROTOTYPE 98 /* Protocol wrong type for socket */ | |
131 | +#undef TARGET_ENOPROTOOPT | |
132 | +#define TARGET_ENOPROTOOPT 99 /* Protocol not available */ | |
133 | +#undef TARGET_EPROTONOSUPPORT | |
134 | +#define TARGET_EPROTONOSUPPORT 120 /* Protocol not supported */ | |
135 | +#undef TARGET_ESOCKTNOSUPPORT | |
136 | +#define TARGET_ESOCKTNOSUPPORT 121 /* Socket type not supported */ | |
137 | +#undef TARGET_EOPNOTSUPP | |
138 | +#define TARGET_EOPNOTSUPP 122 /* Operation not supported on transport endpoint */ | |
139 | +#undef TARGET_EPFNOSUPPORT | |
140 | +#define TARGET_EPFNOSUPPORT 123 /* Protocol family not supported */ | |
141 | +#undef TARGET_EAFNOSUPPORT | |
142 | +#define TARGET_EAFNOSUPPORT 124 /* Address family not supported by protocol */ | |
143 | +#undef TARGET_EADDRINUSE | |
144 | +#define TARGET_EADDRINUSE 125 /* Address already in use */ | |
145 | +#undef TARGET_EADDRNOTAVAIL | |
146 | +#define TARGET_EADDRNOTAVAIL 126 /* Cannot assign requested address */ | |
147 | +#undef TARGET_ENETDOWN | |
148 | +#define TARGET_ENETDOWN 127 /* Network is down */ | |
149 | +#undef TARGET_ENETUNREACH | |
150 | +#define TARGET_ENETUNREACH 128 /* Network is unreachable */ | |
151 | +#undef TARGET_ENETRESET | |
152 | +#define TARGET_ENETRESET 129 /* Network dropped connection because of reset */ | |
153 | +#undef TARGET_ECONNABORTED | |
154 | +#define TARGET_ECONNABORTED 130 /* Software caused connection abort */ | |
155 | +#undef TARGET_ECONNRESET | |
156 | +#define TARGET_ECONNRESET 131 /* Connection reset by peer */ | |
157 | +#undef TARGET_ENOBUFS | |
158 | +#define TARGET_ENOBUFS 132 /* No buffer space available */ | |
159 | +#undef TARGET_EISCONN | |
160 | +#define TARGET_EISCONN 133 /* Transport endpoint is already connected */ | |
161 | +#undef TARGET_ENOTCONN | |
162 | +#define TARGET_ENOTCONN 134 /* Transport endpoint is not connected */ | |
163 | +#undef TARGET_EUCLEAN | |
164 | +#define TARGET_EUCLEAN 135 /* Structure needs cleaning */ | |
165 | +#undef TARGET_ENOTNAM | |
166 | +#define TARGET_ENOTNAM 137 /* Not a XENIX named type file */ | |
167 | +#undef TARGET_ENAVAIL | |
168 | +#define TARGET_ENAVAIL 138 /* No XENIX semaphores available */ | |
169 | +#undef TARGET_EISNAM | |
170 | +#define TARGET_EISNAM 139 /* Is a named type file */ | |
171 | +#undef TARGET_EREMOTEIO | |
172 | +#define TARGET_EREMOTEIO 140 /* Remote I/O error */ | |
173 | +#undef TARGET_EINIT | |
174 | +#define TARGET_EINIT 141 /* Reserved */ | |
175 | +#undef TARGET_EREMDEV | |
176 | +#define TARGET_EREMDEV 142 /* TARGET_Error 142 */ | |
177 | +#undef TARGET_ESHUTDOWN | |
178 | +#define TARGET_ESHUTDOWN 143 /* Cannot send after transport endpoint shutdown */ | |
179 | +#undef TARGET_ETOOMANYREFS | |
180 | +#define TARGET_ETOOMANYREFS 144 /* Too many references: cannot splice */ | |
181 | +#undef TARGET_ETIMEDOUT | |
182 | +#define TARGET_ETIMEDOUT 145 /* Connection timed out */ | |
183 | +#undef TARGET_ECONNREFUSED | |
184 | +#define TARGET_ECONNREFUSED 146 /* Connection refused */ | |
185 | +#undef TARGET_EHOSTDOWN | |
186 | +#define TARGET_EHOSTDOWN 147 /* Host is down */ | |
187 | +#undef TARGET_EHOSTUNREACH | |
188 | +#define TARGET_EHOSTUNREACH 148 /* No route to host */ | |
189 | +#undef TARGET_EALREADY | |
190 | +#define TARGET_EALREADY 149 /* Operation already in progress */ | |
191 | +#undef TARGET_EINPROGRESS | |
192 | +#define TARGET_EINPROGRESS 150 /* Operation now in progress */ | |
193 | +#undef TARGET_ESTALE | |
194 | +#define TARGET_ESTALE 151 /* Stale NFS file handle */ | |
195 | +#undef TARGET_ECANCELED | |
196 | +#define TARGET_ECANCELED 158 /* AIO operation canceled */ | |
197 | +/* | |
198 | + * These error are Linux extensions. | |
199 | + */ | |
200 | +#undef TARGET_ENOMEDIUM | |
201 | +#define TARGET_ENOMEDIUM 159 /* No medium found */ | |
202 | +#undef TARGET_EMEDIUMTYPE | |
203 | +#define TARGET_EMEDIUMTYPE 160 /* Wrong medium type */ | |
204 | +#undef TARGET_ENOKEY | |
205 | +#define TARGET_ENOKEY 161 /* Required key not available */ | |
206 | +#undef TARGET_EKEYEXPIRED | |
207 | +#define TARGET_EKEYEXPIRED 162 /* Key has expired */ | |
208 | +#undef TARGET_EKEYREVOKED | |
209 | +#define TARGET_EKEYREVOKED 163 /* Key has been revoked */ | |
210 | +#undef TARGET_EKEYREJECTED | |
211 | +#define TARGET_EKEYREJECTED 164 /* Key was rejected by service */ | |
212 | + | |
213 | +/* for robust mutexes */ | |
214 | +#undef TARGET_EOWNERDEAD | |
215 | +#define TARGET_EOWNERDEAD 165 /* Owner died */ | |
216 | +#undef TARGET_ENOTRECOVERABLE | |
217 | +#define TARGET_ENOTRECOVERABLE 166 /* State not recoverable */ | |
218 | + | |
219 | + | |
220 | + | |
221 | +#define UNAME_MACHINE "mips64" | ... | ... |
linux-user/mips64/syscall_nr.h
0 โ 100644
1 | +/* | |
2 | + * Linux 64-bit syscalls are in the range from 5000 to 5999. | |
3 | + */ | |
4 | +#define TARGET_NR_Linux 5000 | |
5 | +#define TARGET_NR_read (TARGET_NR_Linux + 0) | |
6 | +#define TARGET_NR_write (TARGET_NR_Linux + 1) | |
7 | +#define TARGET_NR_open (TARGET_NR_Linux + 2) | |
8 | +#define TARGET_NR_close (TARGET_NR_Linux + 3) | |
9 | +#define TARGET_NR_stat (TARGET_NR_Linux + 4) | |
10 | +#define TARGET_NR_fstat (TARGET_NR_Linux + 5) | |
11 | +#define TARGET_NR_lstat (TARGET_NR_Linux + 6) | |
12 | +#define TARGET_NR_poll (TARGET_NR_Linux + 7) | |
13 | +#define TARGET_NR_lseek (TARGET_NR_Linux + 8) | |
14 | +#define TARGET_NR_mmap (TARGET_NR_Linux + 9) | |
15 | +#define TARGET_NR_mprotect (TARGET_NR_Linux + 10) | |
16 | +#define TARGET_NR_munmap (TARGET_NR_Linux + 11) | |
17 | +#define TARGET_NR_brk (TARGET_NR_Linux + 12) | |
18 | +#define TARGET_NR_rt_sigaction (TARGET_NR_Linux + 13) | |
19 | +#define TARGET_NR_rt_sigprocmask (TARGET_NR_Linux + 14) | |
20 | +#define TARGET_NR_ioctl (TARGET_NR_Linux + 15) | |
21 | +#define TARGET_NR_pread64 (TARGET_NR_Linux + 16) | |
22 | +#define TARGET_NR_pwrite64 (TARGET_NR_Linux + 17) | |
23 | +#define TARGET_NR_readv (TARGET_NR_Linux + 18) | |
24 | +#define TARGET_NR_writev (TARGET_NR_Linux + 19) | |
25 | +#define TARGET_NR_access (TARGET_NR_Linux + 20) | |
26 | +#define TARGET_NR_pipe (TARGET_NR_Linux + 21) | |
27 | +#define TARGET_NR__newselect (TARGET_NR_Linux + 22) | |
28 | +#define TARGET_NR_sched_yield (TARGET_NR_Linux + 23) | |
29 | +#define TARGET_NR_mremap (TARGET_NR_Linux + 24) | |
30 | +#define TARGET_NR_msync (TARGET_NR_Linux + 25) | |
31 | +#define TARGET_NR_mincore (TARGET_NR_Linux + 26) | |
32 | +#define TARGET_NR_madvise (TARGET_NR_Linux + 27) | |
33 | +#define TARGET_NR_shmget (TARGET_NR_Linux + 28) | |
34 | +#define TARGET_NR_shmat (TARGET_NR_Linux + 29) | |
35 | +#define TARGET_NR_shmctl (TARGET_NR_Linux + 30) | |
36 | +#define TARGET_NR_dup (TARGET_NR_Linux + 31) | |
37 | +#define TARGET_NR_dup2 (TARGET_NR_Linux + 32) | |
38 | +#define TARGET_NR_pause (TARGET_NR_Linux + 33) | |
39 | +#define TARGET_NR_nanosleep (TARGET_NR_Linux + 34) | |
40 | +#define TARGET_NR_getitimer (TARGET_NR_Linux + 35) | |
41 | +#define TARGET_NR_setitimer (TARGET_NR_Linux + 36) | |
42 | +#define TARGET_NR_alarm (TARGET_NR_Linux + 37) | |
43 | +#define TARGET_NR_getpid (TARGET_NR_Linux + 38) | |
44 | +#define TARGET_NR_sendfile (TARGET_NR_Linux + 39) | |
45 | +#define TARGET_NR_socket (TARGET_NR_Linux + 40) | |
46 | +#define TARGET_NR_connect (TARGET_NR_Linux + 41) | |
47 | +#define TARGET_NR_accept (TARGET_NR_Linux + 42) | |
48 | +#define TARGET_NR_sendto (TARGET_NR_Linux + 43) | |
49 | +#define TARGET_NR_recvfrom (TARGET_NR_Linux + 44) | |
50 | +#define TARGET_NR_sendmsg (TARGET_NR_Linux + 45) | |
51 | +#define TARGET_NR_recvmsg (TARGET_NR_Linux + 46) | |
52 | +#define TARGET_NR_shutdown (TARGET_NR_Linux + 47) | |
53 | +#define TARGET_NR_bind (TARGET_NR_Linux + 48) | |
54 | +#define TARGET_NR_listen (TARGET_NR_Linux + 49) | |
55 | +#define TARGET_NR_getsockname (TARGET_NR_Linux + 50) | |
56 | +#define TARGET_NR_getpeername (TARGET_NR_Linux + 51) | |
57 | +#define TARGET_NR_socketpair (TARGET_NR_Linux + 52) | |
58 | +#define TARGET_NR_setsockopt (TARGET_NR_Linux + 53) | |
59 | +#define TARGET_NR_getsockopt (TARGET_NR_Linux + 54) | |
60 | +#define TARGET_NR_clone (TARGET_NR_Linux + 55) | |
61 | +#define TARGET_NR_fork (TARGET_NR_Linux + 56) | |
62 | +#define TARGET_NR_execve (TARGET_NR_Linux + 57) | |
63 | +#define TARGET_NR_exit (TARGET_NR_Linux + 58) | |
64 | +#define TARGET_NR_wait4 (TARGET_NR_Linux + 59) | |
65 | +#define TARGET_NR_kill (TARGET_NR_Linux + 60) | |
66 | +#define TARGET_NR_uname (TARGET_NR_Linux + 61) | |
67 | +#define TARGET_NR_semget (TARGET_NR_Linux + 62) | |
68 | +#define TARGET_NR_semop (TARGET_NR_Linux + 63) | |
69 | +#define TARGET_NR_semctl (TARGET_NR_Linux + 64) | |
70 | +#define TARGET_NR_shmdt (TARGET_NR_Linux + 65) | |
71 | +#define TARGET_NR_msgget (TARGET_NR_Linux + 66) | |
72 | +#define TARGET_NR_msgsnd (TARGET_NR_Linux + 67) | |
73 | +#define TARGET_NR_msgrcv (TARGET_NR_Linux + 68) | |
74 | +#define TARGET_NR_msgctl (TARGET_NR_Linux + 69) | |
75 | +#define TARGET_NR_fcntl (TARGET_NR_Linux + 70) | |
76 | +#define TARGET_NR_flock (TARGET_NR_Linux + 71) | |
77 | +#define TARGET_NR_fsync (TARGET_NR_Linux + 72) | |
78 | +#define TARGET_NR_fdatasync (TARGET_NR_Linux + 73) | |
79 | +#define TARGET_NR_truncate (TARGET_NR_Linux + 74) | |
80 | +#define TARGET_NR_ftruncate (TARGET_NR_Linux + 75) | |
81 | +#define TARGET_NR_getdents (TARGET_NR_Linux + 76) | |
82 | +#define TARGET_NR_getcwd (TARGET_NR_Linux + 77) | |
83 | +#define TARGET_NR_chdir (TARGET_NR_Linux + 78) | |
84 | +#define TARGET_NR_fchdir (TARGET_NR_Linux + 79) | |
85 | +#define TARGET_NR_rename (TARGET_NR_Linux + 80) | |
86 | +#define TARGET_NR_mkdir (TARGET_NR_Linux + 81) | |
87 | +#define TARGET_NR_rmdir (TARGET_NR_Linux + 82) | |
88 | +#define TARGET_NR_creat (TARGET_NR_Linux + 83) | |
89 | +#define TARGET_NR_link (TARGET_NR_Linux + 84) | |
90 | +#define TARGET_NR_unlink (TARGET_NR_Linux + 85) | |
91 | +#define TARGET_NR_symlink (TARGET_NR_Linux + 86) | |
92 | +#define TARGET_NR_readlink (TARGET_NR_Linux + 87) | |
93 | +#define TARGET_NR_chmod (TARGET_NR_Linux + 88) | |
94 | +#define TARGET_NR_fchmod (TARGET_NR_Linux + 89) | |
95 | +#define TARGET_NR_chown (TARGET_NR_Linux + 90) | |
96 | +#define TARGET_NR_fchown (TARGET_NR_Linux + 91) | |
97 | +#define TARGET_NR_lchown (TARGET_NR_Linux + 92) | |
98 | +#define TARGET_NR_umask (TARGET_NR_Linux + 93) | |
99 | +#define TARGET_NR_gettimeofday (TARGET_NR_Linux + 94) | |
100 | +#define TARGET_NR_getrlimit (TARGET_NR_Linux + 95) | |
101 | +#define TARGET_NR_getrusage (TARGET_NR_Linux + 96) | |
102 | +#define TARGET_NR_sysinfo (TARGET_NR_Linux + 97) | |
103 | +#define TARGET_NR_times (TARGET_NR_Linux + 98) | |
104 | +#define TARGET_NR_ptrace (TARGET_NR_Linux + 99) | |
105 | +#define TARGET_NR_getuid (TARGET_NR_Linux + 100) | |
106 | +#define TARGET_NR_syslog (TARGET_NR_Linux + 101) | |
107 | +#define TARGET_NR_getgid (TARGET_NR_Linux + 102) | |
108 | +#define TARGET_NR_setuid (TARGET_NR_Linux + 103) | |
109 | +#define TARGET_NR_setgid (TARGET_NR_Linux + 104) | |
110 | +#define TARGET_NR_geteuid (TARGET_NR_Linux + 105) | |
111 | +#define TARGET_NR_getegid (TARGET_NR_Linux + 106) | |
112 | +#define TARGET_NR_setpgid (TARGET_NR_Linux + 107) | |
113 | +#define TARGET_NR_getppid (TARGET_NR_Linux + 108) | |
114 | +#define TARGET_NR_getpgrp (TARGET_NR_Linux + 109) | |
115 | +#define TARGET_NR_setsid (TARGET_NR_Linux + 110) | |
116 | +#define TARGET_NR_setreuid (TARGET_NR_Linux + 111) | |
117 | +#define TARGET_NR_setregid (TARGET_NR_Linux + 112) | |
118 | +#define TARGET_NR_getgroups (TARGET_NR_Linux + 113) | |
119 | +#define TARGET_NR_setgroups (TARGET_NR_Linux + 114) | |
120 | +#define TARGET_NR_setresuid (TARGET_NR_Linux + 115) | |
121 | +#define TARGET_NR_getresuid (TARGET_NR_Linux + 116) | |
122 | +#define TARGET_NR_setresgid (TARGET_NR_Linux + 117) | |
123 | +#define TARGET_NR_getresgid (TARGET_NR_Linux + 118) | |
124 | +#define TARGET_NR_getpgid (TARGET_NR_Linux + 119) | |
125 | +#define TARGET_NR_setfsuid (TARGET_NR_Linux + 120) | |
126 | +#define TARGET_NR_setfsgid (TARGET_NR_Linux + 121) | |
127 | +#define TARGET_NR_getsid (TARGET_NR_Linux + 122) | |
128 | +#define TARGET_NR_capget (TARGET_NR_Linux + 123) | |
129 | +#define TARGET_NR_capset (TARGET_NR_Linux + 124) | |
130 | +#define TARGET_NR_rt_sigpending (TARGET_NR_Linux + 125) | |
131 | +#define TARGET_NR_rt_sigtimedwait (TARGET_NR_Linux + 126) | |
132 | +#define TARGET_NR_rt_sigqueueinfo (TARGET_NR_Linux + 127) | |
133 | +#define TARGET_NR_rt_sigsuspend (TARGET_NR_Linux + 128) | |
134 | +#define TARGET_NR_sigaltstack (TARGET_NR_Linux + 129) | |
135 | +#define TARGET_NR_utime (TARGET_NR_Linux + 130) | |
136 | +#define TARGET_NR_mknod (TARGET_NR_Linux + 131) | |
137 | +#define TARGET_NR_personality (TARGET_NR_Linux + 132) | |
138 | +#define TARGET_NR_ustat (TARGET_NR_Linux + 133) | |
139 | +#define TARGET_NR_statfs (TARGET_NR_Linux + 134) | |
140 | +#define TARGET_NR_fstatfs (TARGET_NR_Linux + 135) | |
141 | +#define TARGET_NR_sysfs (TARGET_NR_Linux + 136) | |
142 | +#define TARGET_NR_getpriority (TARGET_NR_Linux + 137) | |
143 | +#define TARGET_NR_setpriority (TARGET_NR_Linux + 138) | |
144 | +#define TARGET_NR_sched_setparam (TARGET_NR_Linux + 139) | |
145 | +#define TARGET_NR_sched_getparam (TARGET_NR_Linux + 140) | |
146 | +#define TARGET_NR_sched_setscheduler (TARGET_NR_Linux + 141) | |
147 | +#define TARGET_NR_sched_getscheduler (TARGET_NR_Linux + 142) | |
148 | +#define TARGET_NR_sched_get_priority_max (TARGET_NR_Linux + 143) | |
149 | +#define TARGET_NR_sched_get_priority_min (TARGET_NR_Linux + 144) | |
150 | +#define TARGET_NR_sched_rr_get_interval (TARGET_NR_Linux + 145) | |
151 | +#define TARGET_NR_mlock (TARGET_NR_Linux + 146) | |
152 | +#define TARGET_NR_munlock (TARGET_NR_Linux + 147) | |
153 | +#define TARGET_NR_mlockall (TARGET_NR_Linux + 148) | |
154 | +#define TARGET_NR_munlockall (TARGET_NR_Linux + 149) | |
155 | +#define TARGET_NR_vhangup (TARGET_NR_Linux + 150) | |
156 | +#define TARGET_NR_pivot_root (TARGET_NR_Linux + 151) | |
157 | +#define TARGET_NR__sysctl (TARGET_NR_Linux + 152) | |
158 | +#define TARGET_NR_prctl (TARGET_NR_Linux + 153) | |
159 | +#define TARGET_NR_adjtimex (TARGET_NR_Linux + 154) | |
160 | +#define TARGET_NR_setrlimit (TARGET_NR_Linux + 155) | |
161 | +#define TARGET_NR_chroot (TARGET_NR_Linux + 156) | |
162 | +#define TARGET_NR_sync (TARGET_NR_Linux + 157) | |
163 | +#define TARGET_NR_acct (TARGET_NR_Linux + 158) | |
164 | +#define TARGET_NR_settimeofday (TARGET_NR_Linux + 159) | |
165 | +#define TARGET_NR_mount (TARGET_NR_Linux + 160) | |
166 | +#define TARGET_NR_umount2 (TARGET_NR_Linux + 161) | |
167 | +#define TARGET_NR_swapon (TARGET_NR_Linux + 162) | |
168 | +#define TARGET_NR_swapoff (TARGET_NR_Linux + 163) | |
169 | +#define TARGET_NR_reboot (TARGET_NR_Linux + 164) | |
170 | +#define TARGET_NR_sethostname (TARGET_NR_Linux + 165) | |
171 | +#define TARGET_NR_setdomainname (TARGET_NR_Linux + 166) | |
172 | +#define TARGET_NR_create_module (TARGET_NR_Linux + 167) | |
173 | +#define TARGET_NR_init_module (TARGET_NR_Linux + 168) | |
174 | +#define TARGET_NR_delete_module (TARGET_NR_Linux + 169) | |
175 | +#define TARGET_NR_get_kernel_syms (TARGET_NR_Linux + 170) | |
176 | +#define TARGET_NR_query_module (TARGET_NR_Linux + 171) | |
177 | +#define TARGET_NR_quotactl (TARGET_NR_Linux + 172) | |
178 | +#define TARGET_NR_nfsservctl (TARGET_NR_Linux + 173) | |
179 | +#define TARGET_NR_getpmsg (TARGET_NR_Linux + 174) | |
180 | +#define TARGET_NR_putpmsg (TARGET_NR_Linux + 175) | |
181 | +#define TARGET_NR_afs_syscall (TARGET_NR_Linux + 176) | |
182 | +#define TARGET_NR_reserved177 (TARGET_NR_Linux + 177) | |
183 | +#define TARGET_NR_gettid (TARGET_NR_Linux + 178) | |
184 | +#define TARGET_NR_readahead (TARGET_NR_Linux + 179) | |
185 | +#define TARGET_NR_setxattr (TARGET_NR_Linux + 180) | |
186 | +#define TARGET_NR_lsetxattr (TARGET_NR_Linux + 181) | |
187 | +#define TARGET_NR_fsetxattr (TARGET_NR_Linux + 182) | |
188 | +#define TARGET_NR_getxattr (TARGET_NR_Linux + 183) | |
189 | +#define TARGET_NR_lgetxattr (TARGET_NR_Linux + 184) | |
190 | +#define TARGET_NR_fgetxattr (TARGET_NR_Linux + 185) | |
191 | +#define TARGET_NR_listxattr (TARGET_NR_Linux + 186) | |
192 | +#define TARGET_NR_llistxattr (TARGET_NR_Linux + 187) | |
193 | +#define TARGET_NR_flistxattr (TARGET_NR_Linux + 188) | |
194 | +#define TARGET_NR_removexattr (TARGET_NR_Linux + 189) | |
195 | +#define TARGET_NR_lremovexattr (TARGET_NR_Linux + 190) | |
196 | +#define TARGET_NR_fremovexattr (TARGET_NR_Linux + 191) | |
197 | +#define TARGET_NR_tkill (TARGET_NR_Linux + 192) | |
198 | +#define TARGET_NR_reserved193 (TARGET_NR_Linux + 193) | |
199 | +#define TARGET_NR_futex (TARGET_NR_Linux + 194) | |
200 | +#define TARGET_NR_sched_setaffinity (TARGET_NR_Linux + 195) | |
201 | +#define TARGET_NR_sched_getaffinity (TARGET_NR_Linux + 196) | |
202 | +#define TARGET_NR_cacheflush (TARGET_NR_Linux + 197) | |
203 | +#define TARGET_NR_cachectl (TARGET_NR_Linux + 198) | |
204 | +#define TARGET_NR_sysmips (TARGET_NR_Linux + 199) | |
205 | +#define TARGET_NR_io_setup (TARGET_NR_Linux + 200) | |
206 | +#define TARGET_NR_io_destroy (TARGET_NR_Linux + 201) | |
207 | +#define TARGET_NR_io_getevents (TARGET_NR_Linux + 202) | |
208 | +#define TARGET_NR_io_submit (TARGET_NR_Linux + 203) | |
209 | +#define TARGET_NR_io_cancel (TARGET_NR_Linux + 204) | |
210 | +#define TARGET_NR_exit_group (TARGET_NR_Linux + 205) | |
211 | +#define TARGET_NR_lookup_dcookie (TARGET_NR_Linux + 206) | |
212 | +#define TARGET_NR_epoll_create (TARGET_NR_Linux + 207) | |
213 | +#define TARGET_NR_epoll_ctl (TARGET_NR_Linux + 208) | |
214 | +#define TARGET_NR_epoll_wait (TARGET_NR_Linux + 209) | |
215 | +#define TARGET_NR_remap_file_pages (TARGET_NR_Linux + 210) | |
216 | +#define TARGET_NR_rt_sigreturn (TARGET_NR_Linux + 211) | |
217 | +#define TARGET_NR_set_tid_address (TARGET_NR_Linux + 212) | |
218 | +#define TARGET_NR_restart_syscall (TARGET_NR_Linux + 213) | |
219 | +#define TARGET_NR_semtimedop (TARGET_NR_Linux + 214) | |
220 | +#define TARGET_NR_fadvise64 (TARGET_NR_Linux + 215) | |
221 | +#define TARGET_NR_timer_create (TARGET_NR_Linux + 216) | |
222 | +#define TARGET_NR_timer_settime (TARGET_NR_Linux + 217) | |
223 | +#define TARGET_NR_timer_gettime (TARGET_NR_Linux + 218) | |
224 | +#define TARGET_NR_timer_getoverrun (TARGET_NR_Linux + 219) | |
225 | +#define TARGET_NR_timer_delete (TARGET_NR_Linux + 220) | |
226 | +#define TARGET_NR_clock_settime (TARGET_NR_Linux + 221) | |
227 | +#define TARGET_NR_clock_gettime (TARGET_NR_Linux + 222) | |
228 | +#define TARGET_NR_clock_getres (TARGET_NR_Linux + 223) | |
229 | +#define TARGET_NR_clock_nanosleep (TARGET_NR_Linux + 224) | |
230 | +#define TARGET_NR_tgkill (TARGET_NR_Linux + 225) | |
231 | +#define TARGET_NR_utimes (TARGET_NR_Linux + 226) | |
232 | +#define TARGET_NR_mbind (TARGET_NR_Linux + 227) | |
233 | +#define TARGET_NR_get_mempolicy (TARGET_NR_Linux + 228) | |
234 | +#define TARGET_NR_set_mempolicy (TARGET_NR_Linux + 229) | |
235 | +#define TARGET_NR_mq_open (TARGET_NR_Linux + 230) | |
236 | +#define TARGET_NR_mq_unlink (TARGET_NR_Linux + 231) | |
237 | +#define TARGET_NR_mq_timedsend (TARGET_NR_Linux + 232) | |
238 | +#define TARGET_NR_mq_timedreceive (TARGET_NR_Linux + 233) | |
239 | +#define TARGET_NR_mq_notify (TARGET_NR_Linux + 234) | |
240 | +#define TARGET_NR_mq_getsetattr (TARGET_NR_Linux + 235) | |
241 | +#define TARGET_NR_vserver (TARGET_NR_Linux + 236) | |
242 | +#define TARGET_NR_waitid (TARGET_NR_Linux + 237) | |
243 | +/* #define TARGET_NR_sys_setaltroot (TARGET_NR_Linux + 238) */ | |
244 | +#define TARGET_NR_add_key (TARGET_NR_Linux + 239) | |
245 | +#define TARGET_NR_request_key (TARGET_NR_Linux + 240) | |
246 | +#define TARGET_NR_keyctl (TARGET_NR_Linux + 241) | |
247 | +#define TARGET_NR_set_thread_area (TARGET_NR_Linux + 242) | |
248 | +#define TARGET_NR_inotify_init (TARGET_NR_Linux + 243) | |
249 | +#define TARGET_NR_inotify_add_watch (TARGET_NR_Linux + 244) | |
250 | +#define TARGET_NR_inotify_rm_watch (TARGET_NR_Linux + 245) | |
251 | +#define TARGET_NR_migrate_pages (TARGET_NR_Linux + 246) | |
252 | +#define TARGET_NR_openat (TARGET_NR_Linux + 247) | |
253 | +#define TARGET_NR_mkdirat (TARGET_NR_Linux + 248) | |
254 | +#define TARGET_NR_mknodat (TARGET_NR_Linux + 249) | |
255 | +#define TARGET_NR_fchownat (TARGET_NR_Linux + 250) | |
256 | +#define TARGET_NR_futimesat (TARGET_NR_Linux + 251) | |
257 | +#define TARGET_NR_newfstatat (TARGET_NR_Linux + 252) | |
258 | +#define TARGET_NR_unlinkat (TARGET_NR_Linux + 253) | |
259 | +#define TARGET_NR_renameat (TARGET_NR_Linux + 254) | |
260 | +#define TARGET_NR_linkat (TARGET_NR_Linux + 255) | |
261 | +#define TARGET_NR_symlinkat (TARGET_NR_Linux + 256) | |
262 | +#define TARGET_NR_readlinkat (TARGET_NR_Linux + 257) | |
263 | +#define TARGET_NR_fchmodat (TARGET_NR_Linux + 258) | |
264 | +#define TARGET_NR_faccessat (TARGET_NR_Linux + 259) | |
265 | +#define TARGET_NR_pselect6 (TARGET_NR_Linux + 260) | |
266 | +#define TARGET_NR_ppoll (TARGET_NR_Linux + 261) | |
267 | +#define TARGET_NR_unshare (TARGET_NR_Linux + 262) | |
268 | +#define TARGET_NR_splice (TARGET_NR_Linux + 263) | |
269 | +#define TARGET_NR_sync_file_range (TARGET_NR_Linux + 264) | |
270 | +#define TARGET_NR_tee (TARGET_NR_Linux + 265) | |
271 | +#define TARGET_NR_vmsplice (TARGET_NR_Linux + 266) | |
272 | +#define TARGET_NR_move_pages (TARGET_NR_Linux + 267) | |
273 | +#define TARGET_NR_set_robust_list (TARGET_NR_Linux + 268) | |
274 | +#define TARGET_NR_get_robust_list (TARGET_NR_Linux + 269) | |
275 | +#define TARGET_NR_kexec_load (TARGET_NR_Linux + 270) | |
276 | +#define TARGET_NR_getcpu (TARGET_NR_Linux + 271) | |
277 | +#define TARGET_NR_epoll_pwait (TARGET_NR_Linux + 272) | |
278 | +#define TARGET_NR_ioprio_set (TARGET_NR_Linux + 273) | |
279 | +#define TARGET_NR_ioprio_get (TARGET_NR_Linux + 274) | |
280 | +#define TARGET_NR_utimensat (TARGET_NR_Linux + 275) | |
281 | +#define TARGET_NR_signalfd (TARGET_NR_Linux + 276) | |
282 | +#define TARGET_NR_timerfd (TARGET_NR_Linux + 277) | |
283 | +#define TARGET_NR_eventfd (TARGET_NR_Linux + 278) | |
284 | +#define TARGET_NR_fallocate (TARGET_NR_Linux + 279) | ... | ... |
linux-user/mips64/target_signal.h
0 โ 100644
1 | +#ifndef TARGET_SIGNAL_H | |
2 | +#define TARGET_SIGNAL_H | |
3 | + | |
4 | +#include "cpu.h" | |
5 | + | |
6 | +/* this struct defines a stack used during syscall handling */ | |
7 | + | |
8 | +typedef struct target_sigaltstack { | |
9 | + target_long ss_sp; | |
10 | + target_ulong ss_size; | |
11 | + target_long ss_flags; | |
12 | +} target_stack_t; | |
13 | + | |
14 | + | |
15 | +/* | |
16 | + * sigaltstack controls | |
17 | + */ | |
18 | +#define TARGET_SS_ONSTACK 1 | |
19 | +#define TARGET_SS_DISABLE 2 | |
20 | + | |
21 | +#define TARGET_MINSIGSTKSZ 2048 | |
22 | +#define TARGET_SIGSTKSZ 8192 | |
23 | + | |
24 | +static inline target_ulong get_sp_from_cpustate(CPUMIPSState *state) | |
25 | +{ | |
26 | + return state->gpr[29][state->current_tc]; | |
27 | +} | |
28 | + | |
29 | +#endif /* TARGET_SIGNAL_H */ | ... | ... |
linux-user/mips64/termbits.h
0 โ 100644
1 | +/* from asm/termbits.h */ | |
2 | + | |
3 | +#define TARGET_NCCS 23 | |
4 | + | |
5 | +struct target_termios { | |
6 | + unsigned int c_iflag; /* input mode flags */ | |
7 | + unsigned int c_oflag; /* output mode flags */ | |
8 | + unsigned int c_cflag; /* control mode flags */ | |
9 | + unsigned int c_lflag; /* local mode flags */ | |
10 | + unsigned char c_line; /* line discipline */ | |
11 | + unsigned char c_cc[TARGET_NCCS]; /* control characters */ | |
12 | +}; | |
13 | + | |
14 | +/* c_iflag bits */ | |
15 | +#define TARGET_IGNBRK 0000001 | |
16 | +#define TARGET_BRKINT 0000002 | |
17 | +#define TARGET_IGNPAR 0000004 | |
18 | +#define TARGET_PARMRK 0000010 | |
19 | +#define TARGET_INPCK 0000020 | |
20 | +#define TARGET_ISTRIP 0000040 | |
21 | +#define TARGET_INLCR 0000100 | |
22 | +#define TARGET_IGNCR 0000200 | |
23 | +#define TARGET_ICRNL 0000400 | |
24 | +#define TARGET_IUCLC 0001000 | |
25 | +#define TARGET_IXON 0002000 | |
26 | +#define TARGET_IXANY 0004000 | |
27 | +#define TARGET_IXOFF 0010000 | |
28 | +#define TARGET_IMAXBEL 0020000 | |
29 | +#define TARGET_IUTF8 0040000 | |
30 | + | |
31 | +/* c_oflag bits */ | |
32 | +#define TARGET_OPOST 0000001 | |
33 | +#define TARGET_OLCUC 0000002 | |
34 | +#define TARGET_ONLCR 0000004 | |
35 | +#define TARGET_OCRNL 0000010 | |
36 | +#define TARGET_ONOCR 0000020 | |
37 | +#define TARGET_ONLRET 0000040 | |
38 | +#define TARGET_OFILL 0000100 | |
39 | +#define TARGET_OFDEL 0000200 | |
40 | +#define TARGET_NLDLY 0000400 | |
41 | +#define TARGET_NL0 0000000 | |
42 | +#define TARGET_NL1 0000400 | |
43 | +#define TARGET_CRDLY 0003000 | |
44 | +#define TARGET_CR0 0000000 | |
45 | +#define TARGET_CR1 0001000 | |
46 | +#define TARGET_CR2 0002000 | |
47 | +#define TARGET_CR3 0003000 | |
48 | +#define TARGET_TABDLY 0014000 | |
49 | +#define TARGET_TAB0 0000000 | |
50 | +#define TARGET_TAB1 0004000 | |
51 | +#define TARGET_TAB2 0010000 | |
52 | +#define TARGET_TAB3 0014000 | |
53 | +#define TARGET_XTABS 0014000 | |
54 | +#define TARGET_BSDLY 0020000 | |
55 | +#define TARGET_BS0 0000000 | |
56 | +#define TARGET_BS1 0020000 | |
57 | +#define TARGET_VTDLY 0040000 | |
58 | +#define TARGET_VT0 0000000 | |
59 | +#define TARGET_VT1 0040000 | |
60 | +#define TARGET_FFDLY 0100000 | |
61 | +#define TARGET_FF0 0000000 | |
62 | +#define TARGET_FF1 0100000 | |
63 | + | |
64 | +/* c_cflag bit meaning */ | |
65 | +#define TARGET_CBAUD 0010017 | |
66 | +#define TARGET_B0 0000000 /* hang up */ | |
67 | +#define TARGET_B50 0000001 | |
68 | +#define TARGET_B75 0000002 | |
69 | +#define TARGET_B110 0000003 | |
70 | +#define TARGET_B134 0000004 | |
71 | +#define TARGET_B150 0000005 | |
72 | +#define TARGET_B200 0000006 | |
73 | +#define TARGET_B300 0000007 | |
74 | +#define TARGET_B600 0000010 | |
75 | +#define TARGET_B1200 0000011 | |
76 | +#define TARGET_B1800 0000012 | |
77 | +#define TARGET_B2400 0000013 | |
78 | +#define TARGET_B4800 0000014 | |
79 | +#define TARGET_B9600 0000015 | |
80 | +#define TARGET_B19200 0000016 | |
81 | +#define TARGET_B38400 0000017 | |
82 | +#define TARGET_EXTA B19200 | |
83 | +#define TARGET_EXTB B38400 | |
84 | +#define TARGET_CSIZE 0000060 | |
85 | +#define TARGET_CS5 0000000 | |
86 | +#define TARGET_CS6 0000020 | |
87 | +#define TARGET_CS7 0000040 | |
88 | +#define TARGET_CS8 0000060 | |
89 | +#define TARGET_CSTOPB 0000100 | |
90 | +#define TARGET_CREAD 0000200 | |
91 | +#define TARGET_PARENB 0000400 | |
92 | +#define TARGET_PARODD 0001000 | |
93 | +#define TARGET_HUPCL 0002000 | |
94 | +#define TARGET_CLOCAL 0004000 | |
95 | +#define TARGET_CBAUDEX 0010000 | |
96 | +#define TARGET_BOTHER 0010000 | |
97 | +#define TARGET_B57600 0010001 | |
98 | +#define TARGET_B115200 0010002 | |
99 | +#define TARGET_B230400 0010003 | |
100 | +#define TARGET_B460800 0010004 | |
101 | +#define TARGET_B500000 0010005 | |
102 | +#define TARGET_B576000 0010006 | |
103 | +#define TARGET_B921600 0010007 | |
104 | +#define TARGET_B1000000 0010010 | |
105 | +#define TARGET_B1152000 0010011 | |
106 | +#define TARGET_B1500000 0010012 | |
107 | +#define TARGET_B2000000 0010013 | |
108 | +#define TARGET_B2500000 0010014 | |
109 | +#define TARGET_B3000000 0010015 | |
110 | +#define TARGET_B3500000 0010016 | |
111 | +#define TARGET_B4000000 0010017 | |
112 | +#define TARGET_CIBAUD 002003600000 /* input baud rate (not used) */ | |
113 | +#define TARGET_CMSPAR 010000000000 /* mark or space (stick) parity */ | |
114 | +#define TARGET_CRTSCTS 020000000000 /* flow control */ | |
115 | + | |
116 | +/* c_lflag bits */ | |
117 | +#define TARGET_ISIG 0000001 | |
118 | +#define TARGET_ICANON 0000002 | |
119 | +#define TARGET_XCASE 0000004 | |
120 | +#define TARGET_ECHO 0000010 | |
121 | +#define TARGET_ECHOE 0000020 | |
122 | +#define TARGET_ECHOK 0000040 | |
123 | +#define TARGET_ECHONL 0000100 | |
124 | +#define TARGET_NOFLSH 0000200 | |
125 | +#define TARGET_IEXTEN 0000400 | |
126 | +#define TARGET_ECHOCTL 0001000 | |
127 | +#define TARGET_ECHOPRT 0002000 | |
128 | +#define TARGET_ECHOKE 0004000 | |
129 | +#define TARGET_FLUSHO 0010000 | |
130 | +#define TARGET_PENDIN 0040000 | |
131 | +#define TARGET_TOSTOP 0100000 | |
132 | +#define TARGET_ITOSTOP TARGET_TOSTOP | |
133 | + | |
134 | +/* c_cc character offsets */ | |
135 | +#define TARGET_VINTR 0 | |
136 | +#define TARGET_VQUIT 1 | |
137 | +#define TARGET_VERASE 2 | |
138 | +#define TARGET_VKILL 3 | |
139 | +#define TARGET_VMIN 4 | |
140 | +#define TARGET_VTIME 5 | |
141 | +#define TARGET_VEOL2 6 | |
142 | +#define TARGET_VSWTC 7 | |
143 | +#define TARGET_VSTART 8 | |
144 | +#define TARGET_VSTOP 9 | |
145 | +#define TARGET_VSUSP 10 | |
146 | +/* VDSUSP not supported */ | |
147 | +#define TARGET_VREPRINT 12 | |
148 | +#define TARGET_VDISCARD 13 | |
149 | +#define TARGET_VWERASE 14 | |
150 | +#define TARGET_VLNEXT 15 | |
151 | +#define TARGET_VEOF 16 | |
152 | +#define TARGET_VEOL 17 | |
153 | + | |
154 | +/* ioctls */ | |
155 | + | |
156 | +#define TARGET_TCGETA 0x5401 | |
157 | +#define TARGET_TCSETA 0x5402 /* Clashes with SNDCTL_TMR_START sound ioctl */ | |
158 | +#define TARGET_TCSETAW 0x5403 | |
159 | +#define TARGET_TCSETAF 0x5404 | |
160 | + | |
161 | +#define TARGET_TCSBRK 0x5405 | |
162 | +#define TARGET_TCXONC 0x5406 | |
163 | +#define TARGET_TCFLSH 0x5407 | |
164 | + | |
165 | +#define TARGET_TCGETS 0x540d | |
166 | +#define TARGET_TCSETS 0x540e | |
167 | +#define TARGET_TCSETSW 0x540f | |
168 | +#define TARGET_TCSETSF 0x5410 | |
169 | + | |
170 | +#define TARGET_TIOCEXCL 0x740d /* set exclusive use of tty */ | |
171 | +#define TARGET_TIOCNXCL 0x740e /* reset exclusive use of tty */ | |
172 | +#define TARGET_TIOCOUTQ 0x7472 /* output queue size */ | |
173 | +#define TARGET_TIOCSTI 0x5472 /* simulate terminal input */ | |
174 | +#define TARGET_TIOCMGET 0x741d /* get all modem bits */ | |
175 | +#define TARGET_TIOCMBIS 0x741b /* bis modem bits */ | |
176 | +#define TARGET_TIOCMBIC 0x741c /* bic modem bits */ | |
177 | +#define TARGET_TIOCMSET 0x741a /* set all modem bits */ | |
178 | +#define TARGET_TIOCPKT 0x5470 /* pty: set/clear packet mode */ | |
179 | +#define TARGET_TIOCPKT_DATA 0x00 /* data packet */ | |
180 | +#define TARGET_TIOCPKT_FLUSHREAD 0x01 /* flush packet */ | |
181 | +#define TARGET_TIOCPKT_FLUSHWRITE 0x02 /* flush packet */ | |
182 | +#define TARGET_TIOCPKT_STOP 0x04 /* stop output */ | |
183 | +#define TARGET_TIOCPKT_START 0x08 /* start output */ | |
184 | +#define TARGET_TIOCPKT_NOSTOP 0x10 /* no more ^S, ^Q */ | |
185 | +#define TARGET_TIOCPKT_DOSTOP 0x20 /* now do ^S ^Q */ | |
186 | +/* #define TIOCPKT_IOCTL 0x40 state change of pty driver */ | |
187 | +#define TARGET_TIOCSWINSZ TARGET_IOW('t', 103, struct winsize) /* set window size */ | |
188 | +#define TARGET_TIOCGWINSZ TARGET_IOR('t', 104, struct winsize) /* get window size */ | |
189 | +#define TARGET_TIOCNOTTY 0x5471 /* void tty association */ | |
190 | +#define TARGET_TIOCSETD 0x7401 | |
191 | +#define TARGET_TIOCGETD 0x7400 | |
192 | + | |
193 | +#define TARGET_FIOCLEX 0x6601 | |
194 | +#define TARGET_FIONCLEX 0x6602 | |
195 | +#define TARGET_FIOASYNC 0x667d | |
196 | +#define TARGET_FIONBIO 0x667e | |
197 | +#define TARGET_FIOQSIZE 0x667f | |
198 | + | |
199 | +#define TARGET_TIOCGLTC 0x7474 /* get special local chars */ | |
200 | +#define TARGET_TIOCSLTC 0x7475 /* set special local chars */ | |
201 | +#define TARGET_TIOCSPGRP TARGET_IOW('t', 118, int) /* set pgrp of tty */ | |
202 | +#define TARGET_TIOCGPGRP TARGET_IOR('t', 119, int) /* get pgrp of tty */ | |
203 | +#define TARGET_TIOCCONS TARGET_IOW('t', 120, int) /* become virtual console */ | |
204 | + | |
205 | +#define TARGET_FIONREAD 0x467f | |
206 | +#define TARGET_TIOCINQ TARGET_FIONREAD | |
207 | + | |
208 | +#define TARGET_TIOCGETP 0x7408 | |
209 | +#define TARGET_TIOCSETP 0x7409 | |
210 | +#define TARGET_TIOCSETN 0x740a /* TIOCSETP wo flush */ | |
211 | + | |
212 | +/* #define TARGET_TIOCSETA TARGET_IOW('t', 20, struct termios) set termios struct */ | |
213 | +/* #define TARGET_TIOCSETAW TARGET_IOW('t', 21, struct termios) drain output, set */ | |
214 | +/* #define TARGET_TIOCSETAF TARGET_IOW('t', 22, struct termios) drn out, fls in, set */ | |
215 | +/* #define TARGET_TIOCGETD TARGET_IOR('t', 26, int) get line discipline */ | |
216 | +/* #define TARGET_TIOCSETD TARGET_IOW('t', 27, int) set line discipline */ | |
217 | + /* 127-124 compat */ | |
218 | + | |
219 | +#define TARGET_TIOCSBRK 0x5427 /* BSD compatibility */ | |
220 | +#define TARGET_TIOCCBRK 0x5428 /* BSD compatibility */ | |
221 | +#define TARGET_TIOCGSID 0x7416 /* Return the session ID of FD */ | |
222 | +#define TARGET_TIOCGPTN TARGET_IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | |
223 | +#define TARGET_TIOCSPTLCK TARGET_IOW('T',0x31, int) /* Lock/unlock Pty */ | |
224 | + | |
225 | +/* I hope the range from 0x5480 on is free ... */ | |
226 | +#define TARGET_TIOCSCTTY 0x5480 /* become controlling tty */ | |
227 | +#define TARGET_TIOCGSOFTCAR 0x5481 | |
228 | +#define TARGET_TIOCSSOFTCAR 0x5482 | |
229 | +#define TARGET_TIOCLINUX 0x5483 | |
230 | +#define TARGET_TIOCGSERIAL 0x5484 | |
231 | +#define TARGET_TIOCSSERIAL 0x5485 | |
232 | +#define TARGET_TCSBRKP 0x5486 /* Needed for POSIX tcsendbreak() */ | |
233 | +#define TARGET_TIOCSERCONFIG 0x5488 | |
234 | +#define TARGET_TIOCSERGWILD 0x5489 | |
235 | +#define TARGET_TIOCSERSWILD 0x548a | |
236 | +#define TARGET_TIOCGLCKTRMIOS 0x548b | |
237 | +#define TARGET_TIOCSLCKTRMIOS 0x548c | |
238 | +#define TARGET_TIOCSERGSTRUCT 0x548d /* For debugging only */ | |
239 | +#define TARGET_TIOCSERGETLSR 0x548e /* Get line status register */ | |
240 | +#define TARGET_TIOCSERGETMULTI 0x548f /* Get multiport config */ | |
241 | +#define TARGET_TIOCSERSETMULTI 0x5490 /* Set multiport config */ | |
242 | +#define TARGET_TIOCMIWAIT 0x5491 /* wait for a change on serial input line(s) */ | |
243 | +#define TARGET_TIOCGICOUNT 0x5492 /* read serial port inline interrupt counts */ | |
244 | +#define TARGET_TIOCGHAYESESP 0x5493 /* Get Hayes ESP configuration */ | |
245 | +#define TARGET_TIOCSHAYESESP 0x5494 /* Set Hayes ESP configuration */ | ... | ... |
linux-user/mipsn32/syscall.h
0 โ 100644
1 | + | |
2 | +/* this struct defines the way the registers are stored on the | |
3 | + stack during a system call. */ | |
4 | + | |
5 | +struct target_pt_regs { | |
6 | + /* Saved main processor registers. */ | |
7 | + target_ulong regs[32]; | |
8 | + | |
9 | + /* Saved special registers. */ | |
10 | + target_ulong cp0_status; | |
11 | + target_ulong lo; | |
12 | + target_ulong hi; | |
13 | + target_ulong cp0_badvaddr; | |
14 | + target_ulong cp0_cause; | |
15 | + target_ulong cp0_epc; | |
16 | +}; | |
17 | + | |
18 | +/* Target errno definitions taken from asm-mips/errno.h */ | |
19 | +#undef TARGET_ENOMSG | |
20 | +#define TARGET_ENOMSG 35 /* Identifier removed */ | |
21 | +#undef TARGET_EIDRM | |
22 | +#define TARGET_EIDRM 36 /* Identifier removed */ | |
23 | +#undef TARGET_ECHRNG | |
24 | +#define TARGET_ECHRNG 37 /* Channel number out of range */ | |
25 | +#undef TARGET_EL2NSYNC | |
26 | +#define TARGET_EL2NSYNC 38 /* Level 2 not synchronized */ | |
27 | +#undef TARGET_EL3HLT | |
28 | +#define TARGET_EL3HLT 39 /* Level 3 halted */ | |
29 | +#undef TARGET_EL3RST | |
30 | +#define TARGET_EL3RST 40 /* Level 3 reset */ | |
31 | +#undef TARGET_ELNRNG | |
32 | +#define TARGET_ELNRNG 41 /* Link number out of range */ | |
33 | +#undef TARGET_EUNATCH | |
34 | +#define TARGET_EUNATCH 42 /* Protocol driver not attached */ | |
35 | +#undef TARGET_ENOCSI | |
36 | +#define TARGET_ENOCSI 43 /* No CSI structure available */ | |
37 | +#undef TARGET_EL2HLT | |
38 | +#define TARGET_EL2HLT 44 /* Level 2 halted */ | |
39 | +#undef TARGET_EDEADLK | |
40 | +#define TARGET_EDEADLK 45 /* Resource deadlock would occur */ | |
41 | +#undef TARGET_ENOLCK | |
42 | +#define TARGET_ENOLCK 46 /* No record locks available */ | |
43 | +#undef TARGET_EBADE | |
44 | +#define TARGET_EBADE 50 /* Invalid exchange */ | |
45 | +#undef TARGET_EBADR | |
46 | +#define TARGET_EBADR 51 /* Invalid request descriptor */ | |
47 | +#undef TARGET_EXFULL | |
48 | +#define TARGET_EXFULL 52 /* TARGET_Exchange full */ | |
49 | +#undef TARGET_ENOANO | |
50 | +#define TARGET_ENOANO 53 /* No anode */ | |
51 | +#undef TARGET_EBADRQC | |
52 | +#define TARGET_EBADRQC 54 /* Invalid request code */ | |
53 | +#undef TARGET_EBADSLT | |
54 | +#define TARGET_EBADSLT 55 /* Invalid slot */ | |
55 | +#undef TARGET_EDEADLOCK | |
56 | +#define TARGET_EDEADLOCK 56 /* File locking deadlock error */ | |
57 | +#undef TARGET_EBFONT | |
58 | +#define TARGET_EBFONT 59 /* Bad font file format */ | |
59 | +#undef TARGET_ENOSTR | |
60 | +#define TARGET_ENOSTR 60 /* Device not a stream */ | |
61 | +#undef TARGET_ENODATA | |
62 | +#define TARGET_ENODATA 61 /* No data available */ | |
63 | +#undef TARGET_ETIME | |
64 | +#define TARGET_ETIME 62 /* Timer expired */ | |
65 | +#undef TARGET_ENOSR | |
66 | +#define TARGET_ENOSR 63 /* Out of streams resources */ | |
67 | +#undef TARGET_ENONET | |
68 | +#define TARGET_ENONET 64 /* Machine is not on the network */ | |
69 | +#undef TARGET_ENOPKG | |
70 | +#define TARGET_ENOPKG 65 /* Package not installed */ | |
71 | +#undef TARGET_EREMOTE | |
72 | +#define TARGET_EREMOTE 66 /* Object is remote */ | |
73 | +#undef TARGET_ENOLINK | |
74 | +#define TARGET_ENOLINK 67 /* Link has been severed */ | |
75 | +#undef TARGET_EADV | |
76 | +#define TARGET_EADV 68 /* Advertise error */ | |
77 | +#undef TARGET_ESRMNT | |
78 | +#define TARGET_ESRMNT 69 /* Srmount error */ | |
79 | +#undef TARGET_ECOMM | |
80 | +#define TARGET_ECOMM 70 /* Communication error on send */ | |
81 | +#undef TARGET_EPROTO | |
82 | +#define TARGET_EPROTO 71 /* Protocol error */ | |
83 | +#undef TARGET_EDOTDOT | |
84 | +#define TARGET_EDOTDOT 73 /* RFS specific error */ | |
85 | +#undef TARGET_EMULTIHOP | |
86 | +#define TARGET_EMULTIHOP 74 /* Multihop attempted */ | |
87 | +#undef TARGET_EBADMSG | |
88 | +#define TARGET_EBADMSG 77 /* Not a data message */ | |
89 | +#undef TARGET_ENAMETOOLONG | |
90 | +#define TARGET_ENAMETOOLONG 78 /* File name too long */ | |
91 | +#undef TARGET_EOVERFLOW | |
92 | +#define TARGET_EOVERFLOW 79 /* Value too large for defined data type */ | |
93 | +#undef TARGET_ENOTUNIQ | |
94 | +#define TARGET_ENOTUNIQ 80 /* Name not unique on network */ | |
95 | +#undef TARGET_EBADFD | |
96 | +#define TARGET_EBADFD 81 /* File descriptor in bad state */ | |
97 | +#undef TARGET_EREMCHG | |
98 | +#define TARGET_EREMCHG 82 /* Remote address changed */ | |
99 | +#undef TARGET_ELIBACC | |
100 | +#define TARGET_ELIBACC 83 /* Can not access a needed shared library */ | |
101 | +#undef TARGET_ELIBBAD | |
102 | +#define TARGET_ELIBBAD 84 /* Accessing a corrupted shared library */ | |
103 | +#undef TARGET_ELIBSCN | |
104 | +#define TARGET_ELIBSCN 85 /* .lib section in a.out corrupted */ | |
105 | +#undef TARGET_ELIBMAX | |
106 | +#define TARGET_ELIBMAX 86 /* Attempting to link in too many shared libraries */ | |
107 | +#undef TARGET_ELIBEXEC | |
108 | +#define TARGET_ELIBEXEC 87 /* Cannot exec a shared library directly */ | |
109 | +#undef TARGET_EILSEQ | |
110 | +#define TARGET_EILSEQ 88 /* Illegal byte sequence */ | |
111 | +#undef TARGET_ENOSYS | |
112 | +#define TARGET_ENOSYS 89 /* Function not implemented */ | |
113 | +#undef TARGET_ELOOP | |
114 | +#define TARGET_ELOOP 90 /* Too many symbolic links encountered */ | |
115 | +#undef TARGET_ERESTART | |
116 | +#define TARGET_ERESTART 91 /* Interrupted system call should be restarted */ | |
117 | +#undef TARGET_ESTRPIPE | |
118 | +#define TARGET_ESTRPIPE 92 /* Streams pipe error */ | |
119 | +#undef TARGET_ENOTEMPTY | |
120 | +#define TARGET_ENOTEMPTY 93 /* Directory not empty */ | |
121 | +#undef TARGET_EUSERS | |
122 | +#define TARGET_EUSERS 94 /* Too many users */ | |
123 | +#undef TARGET_ENOTSOCK | |
124 | +#define TARGET_ENOTSOCK 95 /* Socket operation on non-socket */ | |
125 | +#undef TARGET_EDESTADDRREQ | |
126 | +#define TARGET_EDESTADDRREQ 96 /* Destination address required */ | |
127 | +#undef TARGET_EMSGSIZE | |
128 | +#define TARGET_EMSGSIZE 97 /* Message too long */ | |
129 | +#undef TARGET_EPROTOTYPE | |
130 | +#define TARGET_EPROTOTYPE 98 /* Protocol wrong type for socket */ | |
131 | +#undef TARGET_ENOPROTOOPT | |
132 | +#define TARGET_ENOPROTOOPT 99 /* Protocol not available */ | |
133 | +#undef TARGET_EPROTONOSUPPORT | |
134 | +#define TARGET_EPROTONOSUPPORT 120 /* Protocol not supported */ | |
135 | +#undef TARGET_ESOCKTNOSUPPORT | |
136 | +#define TARGET_ESOCKTNOSUPPORT 121 /* Socket type not supported */ | |
137 | +#undef TARGET_EOPNOTSUPP | |
138 | +#define TARGET_EOPNOTSUPP 122 /* Operation not supported on transport endpoint */ | |
139 | +#undef TARGET_EPFNOSUPPORT | |
140 | +#define TARGET_EPFNOSUPPORT 123 /* Protocol family not supported */ | |
141 | +#undef TARGET_EAFNOSUPPORT | |
142 | +#define TARGET_EAFNOSUPPORT 124 /* Address family not supported by protocol */ | |
143 | +#undef TARGET_EADDRINUSE | |
144 | +#define TARGET_EADDRINUSE 125 /* Address already in use */ | |
145 | +#undef TARGET_EADDRNOTAVAIL | |
146 | +#define TARGET_EADDRNOTAVAIL 126 /* Cannot assign requested address */ | |
147 | +#undef TARGET_ENETDOWN | |
148 | +#define TARGET_ENETDOWN 127 /* Network is down */ | |
149 | +#undef TARGET_ENETUNREACH | |
150 | +#define TARGET_ENETUNREACH 128 /* Network is unreachable */ | |
151 | +#undef TARGET_ENETRESET | |
152 | +#define TARGET_ENETRESET 129 /* Network dropped connection because of reset */ | |
153 | +#undef TARGET_ECONNABORTED | |
154 | +#define TARGET_ECONNABORTED 130 /* Software caused connection abort */ | |
155 | +#undef TARGET_ECONNRESET | |
156 | +#define TARGET_ECONNRESET 131 /* Connection reset by peer */ | |
157 | +#undef TARGET_ENOBUFS | |
158 | +#define TARGET_ENOBUFS 132 /* No buffer space available */ | |
159 | +#undef TARGET_EISCONN | |
160 | +#define TARGET_EISCONN 133 /* Transport endpoint is already connected */ | |
161 | +#undef TARGET_ENOTCONN | |
162 | +#define TARGET_ENOTCONN 134 /* Transport endpoint is not connected */ | |
163 | +#undef TARGET_EUCLEAN | |
164 | +#define TARGET_EUCLEAN 135 /* Structure needs cleaning */ | |
165 | +#undef TARGET_ENOTNAM | |
166 | +#define TARGET_ENOTNAM 137 /* Not a XENIX named type file */ | |
167 | +#undef TARGET_ENAVAIL | |
168 | +#define TARGET_ENAVAIL 138 /* No XENIX semaphores available */ | |
169 | +#undef TARGET_EISNAM | |
170 | +#define TARGET_EISNAM 139 /* Is a named type file */ | |
171 | +#undef TARGET_EREMOTEIO | |
172 | +#define TARGET_EREMOTEIO 140 /* Remote I/O error */ | |
173 | +#undef TARGET_EINIT | |
174 | +#define TARGET_EINIT 141 /* Reserved */ | |
175 | +#undef TARGET_EREMDEV | |
176 | +#define TARGET_EREMDEV 142 /* TARGET_Error 142 */ | |
177 | +#undef TARGET_ESHUTDOWN | |
178 | +#define TARGET_ESHUTDOWN 143 /* Cannot send after transport endpoint shutdown */ | |
179 | +#undef TARGET_ETOOMANYREFS | |
180 | +#define TARGET_ETOOMANYREFS 144 /* Too many references: cannot splice */ | |
181 | +#undef TARGET_ETIMEDOUT | |
182 | +#define TARGET_ETIMEDOUT 145 /* Connection timed out */ | |
183 | +#undef TARGET_ECONNREFUSED | |
184 | +#define TARGET_ECONNREFUSED 146 /* Connection refused */ | |
185 | +#undef TARGET_EHOSTDOWN | |
186 | +#define TARGET_EHOSTDOWN 147 /* Host is down */ | |
187 | +#undef TARGET_EHOSTUNREACH | |
188 | +#define TARGET_EHOSTUNREACH 148 /* No route to host */ | |
189 | +#undef TARGET_EALREADY | |
190 | +#define TARGET_EALREADY 149 /* Operation already in progress */ | |
191 | +#undef TARGET_EINPROGRESS | |
192 | +#define TARGET_EINPROGRESS 150 /* Operation now in progress */ | |
193 | +#undef TARGET_ESTALE | |
194 | +#define TARGET_ESTALE 151 /* Stale NFS file handle */ | |
195 | +#undef TARGET_ECANCELED | |
196 | +#define TARGET_ECANCELED 158 /* AIO operation canceled */ | |
197 | +/* | |
198 | + * These error are Linux extensions. | |
199 | + */ | |
200 | +#undef TARGET_ENOMEDIUM | |
201 | +#define TARGET_ENOMEDIUM 159 /* No medium found */ | |
202 | +#undef TARGET_EMEDIUMTYPE | |
203 | +#define TARGET_EMEDIUMTYPE 160 /* Wrong medium type */ | |
204 | +#undef TARGET_ENOKEY | |
205 | +#define TARGET_ENOKEY 161 /* Required key not available */ | |
206 | +#undef TARGET_EKEYEXPIRED | |
207 | +#define TARGET_EKEYEXPIRED 162 /* Key has expired */ | |
208 | +#undef TARGET_EKEYREVOKED | |
209 | +#define TARGET_EKEYREVOKED 163 /* Key has been revoked */ | |
210 | +#undef TARGET_EKEYREJECTED | |
211 | +#define TARGET_EKEYREJECTED 164 /* Key was rejected by service */ | |
212 | + | |
213 | +/* for robust mutexes */ | |
214 | +#undef TARGET_EOWNERDEAD | |
215 | +#define TARGET_EOWNERDEAD 165 /* Owner died */ | |
216 | +#undef TARGET_ENOTRECOVERABLE | |
217 | +#define TARGET_ENOTRECOVERABLE 166 /* State not recoverable */ | |
218 | + | |
219 | + | |
220 | + | |
221 | +#define UNAME_MACHINE "mips64" | ... | ... |
linux-user/mipsn32/syscall_nr.h
0 โ 100644
1 | +/* | |
2 | + * Linux N32 syscalls are in the range from 6000 to 6999. | |
3 | + */ | |
4 | +#define TARGET_NR_Linux 6000 | |
5 | +#define TARGET_NR_read (TARGET_NR_Linux + 0) | |
6 | +#define TARGET_NR_write (TARGET_NR_Linux + 1) | |
7 | +#define TARGET_NR_open (TARGET_NR_Linux + 2) | |
8 | +#define TARGET_NR_close (TARGET_NR_Linux + 3) | |
9 | +#define TARGET_NR_stat (TARGET_NR_Linux + 4) | |
10 | +#define TARGET_NR_fstat (TARGET_NR_Linux + 5) | |
11 | +#define TARGET_NR_lstat (TARGET_NR_Linux + 6) | |
12 | +#define TARGET_NR_poll (TARGET_NR_Linux + 7) | |
13 | +#define TARGET_NR_lseek (TARGET_NR_Linux + 8) | |
14 | +#define TARGET_NR_mmap (TARGET_NR_Linux + 9) | |
15 | +#define TARGET_NR_mprotect (TARGET_NR_Linux + 10) | |
16 | +#define TARGET_NR_munmap (TARGET_NR_Linux + 11) | |
17 | +#define TARGET_NR_brk (TARGET_NR_Linux + 12) | |
18 | +#define TARGET_NR_rt_sigaction (TARGET_NR_Linux + 13) | |
19 | +#define TARGET_NR_rt_sigprocmask (TARGET_NR_Linux + 14) | |
20 | +#define TARGET_NR_ioctl (TARGET_NR_Linux + 15) | |
21 | +#define TARGET_NR_pread64 (TARGET_NR_Linux + 16) | |
22 | +#define TARGET_NR_pwrite64 (TARGET_NR_Linux + 17) | |
23 | +#define TARGET_NR_readv (TARGET_NR_Linux + 18) | |
24 | +#define TARGET_NR_writev (TARGET_NR_Linux + 19) | |
25 | +#define TARGET_NR_access (TARGET_NR_Linux + 20) | |
26 | +#define TARGET_NR_pipe (TARGET_NR_Linux + 21) | |
27 | +#define TARGET_NR__newselect (TARGET_NR_Linux + 22) | |
28 | +#define TARGET_NR_sched_yield (TARGET_NR_Linux + 23) | |
29 | +#define TARGET_NR_mremap (TARGET_NR_Linux + 24) | |
30 | +#define TARGET_NR_msync (TARGET_NR_Linux + 25) | |
31 | +#define TARGET_NR_mincore (TARGET_NR_Linux + 26) | |
32 | +#define TARGET_NR_madvise (TARGET_NR_Linux + 27) | |
33 | +#define TARGET_NR_shmget (TARGET_NR_Linux + 28) | |
34 | +#define TARGET_NR_shmat (TARGET_NR_Linux + 29) | |
35 | +#define TARGET_NR_shmctl (TARGET_NR_Linux + 30) | |
36 | +#define TARGET_NR_dup (TARGET_NR_Linux + 31) | |
37 | +#define TARGET_NR_dup2 (TARGET_NR_Linux + 32) | |
38 | +#define TARGET_NR_pause (TARGET_NR_Linux + 33) | |
39 | +#define TARGET_NR_nanosleep (TARGET_NR_Linux + 34) | |
40 | +#define TARGET_NR_getitimer (TARGET_NR_Linux + 35) | |
41 | +#define TARGET_NR_setitimer (TARGET_NR_Linux + 36) | |
42 | +#define TARGET_NR_alarm (TARGET_NR_Linux + 37) | |
43 | +#define TARGET_NR_getpid (TARGET_NR_Linux + 38) | |
44 | +#define TARGET_NR_sendfile (TARGET_NR_Linux + 39) | |
45 | +#define TARGET_NR_socket (TARGET_NR_Linux + 40) | |
46 | +#define TARGET_NR_connect (TARGET_NR_Linux + 41) | |
47 | +#define TARGET_NR_accept (TARGET_NR_Linux + 42) | |
48 | +#define TARGET_NR_sendto (TARGET_NR_Linux + 43) | |
49 | +#define TARGET_NR_recvfrom (TARGET_NR_Linux + 44) | |
50 | +#define TARGET_NR_sendmsg (TARGET_NR_Linux + 45) | |
51 | +#define TARGET_NR_recvmsg (TARGET_NR_Linux + 46) | |
52 | +#define TARGET_NR_shutdown (TARGET_NR_Linux + 47) | |
53 | +#define TARGET_NR_bind (TARGET_NR_Linux + 48) | |
54 | +#define TARGET_NR_listen (TARGET_NR_Linux + 49) | |
55 | +#define TARGET_NR_getsockname (TARGET_NR_Linux + 50) | |
56 | +#define TARGET_NR_getpeername (TARGET_NR_Linux + 51) | |
57 | +#define TARGET_NR_socketpair (TARGET_NR_Linux + 52) | |
58 | +#define TARGET_NR_setsockopt (TARGET_NR_Linux + 53) | |
59 | +#define TARGET_NR_getsockopt (TARGET_NR_Linux + 54) | |
60 | +#define TARGET_NR_clone (TARGET_NR_Linux + 55) | |
61 | +#define TARGET_NR_fork (TARGET_NR_Linux + 56) | |
62 | +#define TARGET_NR_execve (TARGET_NR_Linux + 57) | |
63 | +#define TARGET_NR_exit (TARGET_NR_Linux + 58) | |
64 | +#define TARGET_NR_wait4 (TARGET_NR_Linux + 59) | |
65 | +#define TARGET_NR_kill (TARGET_NR_Linux + 60) | |
66 | +#define TARGET_NR_uname (TARGET_NR_Linux + 61) | |
67 | +#define TARGET_NR_semget (TARGET_NR_Linux + 62) | |
68 | +#define TARGET_NR_semop (TARGET_NR_Linux + 63) | |
69 | +#define TARGET_NR_semctl (TARGET_NR_Linux + 64) | |
70 | +#define TARGET_NR_shmdt (TARGET_NR_Linux + 65) | |
71 | +#define TARGET_NR_msgget (TARGET_NR_Linux + 66) | |
72 | +#define TARGET_NR_msgsnd (TARGET_NR_Linux + 67) | |
73 | +#define TARGET_NR_msgrcv (TARGET_NR_Linux + 68) | |
74 | +#define TARGET_NR_msgctl (TARGET_NR_Linux + 69) | |
75 | +#define TARGET_NR_fcntl (TARGET_NR_Linux + 70) | |
76 | +#define TARGET_NR_flock (TARGET_NR_Linux + 71) | |
77 | +#define TARGET_NR_fsync (TARGET_NR_Linux + 72) | |
78 | +#define TARGET_NR_fdatasync (TARGET_NR_Linux + 73) | |
79 | +#define TARGET_NR_truncate (TARGET_NR_Linux + 74) | |
80 | +#define TARGET_NR_ftruncate (TARGET_NR_Linux + 75) | |
81 | +#define TARGET_NR_getdents (TARGET_NR_Linux + 76) | |
82 | +#define TARGET_NR_getcwd (TARGET_NR_Linux + 77) | |
83 | +#define TARGET_NR_chdir (TARGET_NR_Linux + 78) | |
84 | +#define TARGET_NR_fchdir (TARGET_NR_Linux + 79) | |
85 | +#define TARGET_NR_rename (TARGET_NR_Linux + 80) | |
86 | +#define TARGET_NR_mkdir (TARGET_NR_Linux + 81) | |
87 | +#define TARGET_NR_rmdir (TARGET_NR_Linux + 82) | |
88 | +#define TARGET_NR_creat (TARGET_NR_Linux + 83) | |
89 | +#define TARGET_NR_link (TARGET_NR_Linux + 84) | |
90 | +#define TARGET_NR_unlink (TARGET_NR_Linux + 85) | |
91 | +#define TARGET_NR_symlink (TARGET_NR_Linux + 86) | |
92 | +#define TARGET_NR_readlink (TARGET_NR_Linux + 87) | |
93 | +#define TARGET_NR_chmod (TARGET_NR_Linux + 88) | |
94 | +#define TARGET_NR_fchmod (TARGET_NR_Linux + 89) | |
95 | +#define TARGET_NR_chown (TARGET_NR_Linux + 90) | |
96 | +#define TARGET_NR_fchown (TARGET_NR_Linux + 91) | |
97 | +#define TARGET_NR_lchown (TARGET_NR_Linux + 92) | |
98 | +#define TARGET_NR_umask (TARGET_NR_Linux + 93) | |
99 | +#define TARGET_NR_gettimeofday (TARGET_NR_Linux + 94) | |
100 | +#define TARGET_NR_getrlimit (TARGET_NR_Linux + 95) | |
101 | +#define TARGET_NR_getrusage (TARGET_NR_Linux + 96) | |
102 | +#define TARGET_NR_sysinfo (TARGET_NR_Linux + 97) | |
103 | +#define TARGET_NR_times (TARGET_NR_Linux + 98) | |
104 | +#define TARGET_NR_ptrace (TARGET_NR_Linux + 99) | |
105 | +#define TARGET_NR_getuid (TARGET_NR_Linux + 100) | |
106 | +#define TARGET_NR_syslog (TARGET_NR_Linux + 101) | |
107 | +#define TARGET_NR_getgid (TARGET_NR_Linux + 102) | |
108 | +#define TARGET_NR_setuid (TARGET_NR_Linux + 103) | |
109 | +#define TARGET_NR_setgid (TARGET_NR_Linux + 104) | |
110 | +#define TARGET_NR_geteuid (TARGET_NR_Linux + 105) | |
111 | +#define TARGET_NR_getegid (TARGET_NR_Linux + 106) | |
112 | +#define TARGET_NR_setpgid (TARGET_NR_Linux + 107) | |
113 | +#define TARGET_NR_getppid (TARGET_NR_Linux + 108) | |
114 | +#define TARGET_NR_getpgrp (TARGET_NR_Linux + 109) | |
115 | +#define TARGET_NR_setsid (TARGET_NR_Linux + 110) | |
116 | +#define TARGET_NR_setreuid (TARGET_NR_Linux + 111) | |
117 | +#define TARGET_NR_setregid (TARGET_NR_Linux + 112) | |
118 | +#define TARGET_NR_getgroups (TARGET_NR_Linux + 113) | |
119 | +#define TARGET_NR_setgroups (TARGET_NR_Linux + 114) | |
120 | +#define TARGET_NR_setresuid (TARGET_NR_Linux + 115) | |
121 | +#define TARGET_NR_getresuid (TARGET_NR_Linux + 116) | |
122 | +#define TARGET_NR_setresgid (TARGET_NR_Linux + 117) | |
123 | +#define TARGET_NR_getresgid (TARGET_NR_Linux + 118) | |
124 | +#define TARGET_NR_getpgid (TARGET_NR_Linux + 119) | |
125 | +#define TARGET_NR_setfsuid (TARGET_NR_Linux + 120) | |
126 | +#define TARGET_NR_setfsgid (TARGET_NR_Linux + 121) | |
127 | +#define TARGET_NR_getsid (TARGET_NR_Linux + 122) | |
128 | +#define TARGET_NR_capget (TARGET_NR_Linux + 123) | |
129 | +#define TARGET_NR_capset (TARGET_NR_Linux + 124) | |
130 | +#define TARGET_NR_rt_sigpending (TARGET_NR_Linux + 125) | |
131 | +#define TARGET_NR_rt_sigtimedwait (TARGET_NR_Linux + 126) | |
132 | +#define TARGET_NR_rt_sigqueueinfo (TARGET_NR_Linux + 127) | |
133 | +#define TARGET_NR_rt_sigsuspend (TARGET_NR_Linux + 128) | |
134 | +#define TARGET_NR_sigaltstack (TARGET_NR_Linux + 129) | |
135 | +#define TARGET_NR_utime (TARGET_NR_Linux + 130) | |
136 | +#define TARGET_NR_mknod (TARGET_NR_Linux + 131) | |
137 | +#define TARGET_NR_personality (TARGET_NR_Linux + 132) | |
138 | +#define TARGET_NR_ustat (TARGET_NR_Linux + 133) | |
139 | +#define TARGET_NR_statfs (TARGET_NR_Linux + 134) | |
140 | +#define TARGET_NR_fstatfs (TARGET_NR_Linux + 135) | |
141 | +#define TARGET_NR_sysfs (TARGET_NR_Linux + 136) | |
142 | +#define TARGET_NR_getpriority (TARGET_NR_Linux + 137) | |
143 | +#define TARGET_NR_setpriority (TARGET_NR_Linux + 138) | |
144 | +#define TARGET_NR_sched_setparam (TARGET_NR_Linux + 139) | |
145 | +#define TARGET_NR_sched_getparam (TARGET_NR_Linux + 140) | |
146 | +#define TARGET_NR_sched_setscheduler (TARGET_NR_Linux + 141) | |
147 | +#define TARGET_NR_sched_getscheduler (TARGET_NR_Linux + 142) | |
148 | +#define TARGET_NR_sched_get_priority_max (TARGET_NR_Linux + 143) | |
149 | +#define TARGET_NR_sched_get_priority_min (TARGET_NR_Linux + 144) | |
150 | +#define TARGET_NR_sched_rr_get_interval (TARGET_NR_Linux + 145) | |
151 | +#define TARGET_NR_mlock (TARGET_NR_Linux + 146) | |
152 | +#define TARGET_NR_munlock (TARGET_NR_Linux + 147) | |
153 | +#define TARGET_NR_mlockall (TARGET_NR_Linux + 148) | |
154 | +#define TARGET_NR_munlockall (TARGET_NR_Linux + 149) | |
155 | +#define TARGET_NR_vhangup (TARGET_NR_Linux + 150) | |
156 | +#define TARGET_NR_pivot_root (TARGET_NR_Linux + 151) | |
157 | +#define TARGET_NR__sysctl (TARGET_NR_Linux + 152) | |
158 | +#define TARGET_NR_prctl (TARGET_NR_Linux + 153) | |
159 | +#define TARGET_NR_adjtimex (TARGET_NR_Linux + 154) | |
160 | +#define TARGET_NR_setrlimit (TARGET_NR_Linux + 155) | |
161 | +#define TARGET_NR_chroot (TARGET_NR_Linux + 156) | |
162 | +#define TARGET_NR_sync (TARGET_NR_Linux + 157) | |
163 | +#define TARGET_NR_acct (TARGET_NR_Linux + 158) | |
164 | +#define TARGET_NR_settimeofday (TARGET_NR_Linux + 159) | |
165 | +#define TARGET_NR_mount (TARGET_NR_Linux + 160) | |
166 | +#define TARGET_NR_umount2 (TARGET_NR_Linux + 161) | |
167 | +#define TARGET_NR_swapon (TARGET_NR_Linux + 162) | |
168 | +#define TARGET_NR_swapoff (TARGET_NR_Linux + 163) | |
169 | +#define TARGET_NR_reboot (TARGET_NR_Linux + 164) | |
170 | +#define TARGET_NR_sethostname (TARGET_NR_Linux + 165) | |
171 | +#define TARGET_NR_setdomainname (TARGET_NR_Linux + 166) | |
172 | +#define TARGET_NR_create_module (TARGET_NR_Linux + 167) | |
173 | +#define TARGET_NR_init_module (TARGET_NR_Linux + 168) | |
174 | +#define TARGET_NR_delete_module (TARGET_NR_Linux + 169) | |
175 | +#define TARGET_NR_get_kernel_syms (TARGET_NR_Linux + 170) | |
176 | +#define TARGET_NR_query_module (TARGET_NR_Linux + 171) | |
177 | +#define TARGET_NR_quotactl (TARGET_NR_Linux + 172) | |
178 | +#define TARGET_NR_nfsservctl (TARGET_NR_Linux + 173) | |
179 | +#define TARGET_NR_getpmsg (TARGET_NR_Linux + 174) | |
180 | +#define TARGET_NR_putpmsg (TARGET_NR_Linux + 175) | |
181 | +#define TARGET_NR_afs_syscall (TARGET_NR_Linux + 176) | |
182 | +#define TARGET_NR_reserved177 (TARGET_NR_Linux + 177) | |
183 | +#define TARGET_NR_gettid (TARGET_NR_Linux + 178) | |
184 | +#define TARGET_NR_readahead (TARGET_NR_Linux + 179) | |
185 | +#define TARGET_NR_setxattr (TARGET_NR_Linux + 180) | |
186 | +#define TARGET_NR_lsetxattr (TARGET_NR_Linux + 181) | |
187 | +#define TARGET_NR_fsetxattr (TARGET_NR_Linux + 182) | |
188 | +#define TARGET_NR_getxattr (TARGET_NR_Linux + 183) | |
189 | +#define TARGET_NR_lgetxattr (TARGET_NR_Linux + 184) | |
190 | +#define TARGET_NR_fgetxattr (TARGET_NR_Linux + 185) | |
191 | +#define TARGET_NR_listxattr (TARGET_NR_Linux + 186) | |
192 | +#define TARGET_NR_llistxattr (TARGET_NR_Linux + 187) | |
193 | +#define TARGET_NR_flistxattr (TARGET_NR_Linux + 188) | |
194 | +#define TARGET_NR_removexattr (TARGET_NR_Linux + 189) | |
195 | +#define TARGET_NR_lremovexattr (TARGET_NR_Linux + 190) | |
196 | +#define TARGET_NR_fremovexattr (TARGET_NR_Linux + 191) | |
197 | +#define TARGET_NR_tkill (TARGET_NR_Linux + 192) | |
198 | +#define TARGET_NR_reserved193 (TARGET_NR_Linux + 193) | |
199 | +#define TARGET_NR_futex (TARGET_NR_Linux + 194) | |
200 | +#define TARGET_NR_sched_setaffinity (TARGET_NR_Linux + 195) | |
201 | +#define TARGET_NR_sched_getaffinity (TARGET_NR_Linux + 196) | |
202 | +#define TARGET_NR_cacheflush (TARGET_NR_Linux + 197) | |
203 | +#define TARGET_NR_cachectl (TARGET_NR_Linux + 198) | |
204 | +#define TARGET_NR_sysmips (TARGET_NR_Linux + 199) | |
205 | +#define TARGET_NR_io_setup (TARGET_NR_Linux + 200) | |
206 | +#define TARGET_NR_io_destroy (TARGET_NR_Linux + 201) | |
207 | +#define TARGET_NR_io_getevents (TARGET_NR_Linux + 202) | |
208 | +#define TARGET_NR_io_submit (TARGET_NR_Linux + 203) | |
209 | +#define TARGET_NR_io_cancel (TARGET_NR_Linux + 204) | |
210 | +#define TARGET_NR_exit_group (TARGET_NR_Linux + 205) | |
211 | +#define TARGET_NR_lookup_dcookie (TARGET_NR_Linux + 206) | |
212 | +#define TARGET_NR_epoll_create (TARGET_NR_Linux + 207) | |
213 | +#define TARGET_NR_epoll_ctl (TARGET_NR_Linux + 208) | |
214 | +#define TARGET_NR_epoll_wait (TARGET_NR_Linux + 209) | |
215 | +#define TARGET_NR_remap_file_pages (TARGET_NR_Linux + 210) | |
216 | +#define TARGET_NR_rt_sigreturn (TARGET_NR_Linux + 211) | |
217 | +#define TARGET_NR_fcntl64 (TARGET_NR_Linux + 212) | |
218 | +#define TARGET_NR_set_tid_address (TARGET_NR_Linux + 213) | |
219 | +#define TARGET_NR_restart_syscall (TARGET_NR_Linux + 214) | |
220 | +#define TARGET_NR_semtimedop (TARGET_NR_Linux + 215) | |
221 | +#define TARGET_NR_fadvise64 (TARGET_NR_Linux + 216) | |
222 | +#define TARGET_NR_statfs64 (TARGET_NR_Linux + 217) | |
223 | +#define TARGET_NR_fstatfs64 (TARGET_NR_Linux + 218) | |
224 | +#define TARGET_NR_sendfile64 (TARGET_NR_Linux + 219) | |
225 | +#define TARGET_NR_timer_create (TARGET_NR_Linux + 220) | |
226 | +#define TARGET_NR_timer_settime (TARGET_NR_Linux + 221) | |
227 | +#define TARGET_NR_timer_gettime (TARGET_NR_Linux + 222) | |
228 | +#define TARGET_NR_timer_getoverrun (TARGET_NR_Linux + 223) | |
229 | +#define TARGET_NR_timer_delete (TARGET_NR_Linux + 224) | |
230 | +#define TARGET_NR_clock_settime (TARGET_NR_Linux + 225) | |
231 | +#define TARGET_NR_clock_gettime (TARGET_NR_Linux + 226) | |
232 | +#define TARGET_NR_clock_getres (TARGET_NR_Linux + 227) | |
233 | +#define TARGET_NR_clock_nanosleep (TARGET_NR_Linux + 228) | |
234 | +#define TARGET_NR_tgkill (TARGET_NR_Linux + 229) | |
235 | +#define TARGET_NR_utimes (TARGET_NR_Linux + 230) | |
236 | +#define TARGET_NR_mbind (TARGET_NR_Linux + 231) | |
237 | +#define TARGET_NR_get_mempolicy (TARGET_NR_Linux + 232) | |
238 | +#define TARGET_NR_set_mempolicy (TARGET_NR_Linux + 233) | |
239 | +#define TARGET_NR_mq_open (TARGET_NR_Linux + 234) | |
240 | +#define TARGET_NR_mq_unlink (TARGET_NR_Linux + 235) | |
241 | +#define TARGET_NR_mq_timedsend (TARGET_NR_Linux + 236) | |
242 | +#define TARGET_NR_mq_timedreceive (TARGET_NR_Linux + 237) | |
243 | +#define TARGET_NR_mq_notify (TARGET_NR_Linux + 238) | |
244 | +#define TARGET_NR_mq_getsetattr (TARGET_NR_Linux + 239) | |
245 | +#define TARGET_NR_vserver (TARGET_NR_Linux + 240) | |
246 | +#define TARGET_NR_waitid (TARGET_NR_Linux + 241) | |
247 | +/* #define TARGET_NR_sys_setaltroot (TARGET_NR_Linux + 242) */ | |
248 | +#define TARGET_NR_add_key (TARGET_NR_Linux + 243) | |
249 | +#define TARGET_NR_request_key (TARGET_NR_Linux + 244) | |
250 | +#define TARGET_NR_keyctl (TARGET_NR_Linux + 245) | |
251 | +#define TARGET_NR_set_thread_area (TARGET_NR_Linux + 246) | |
252 | +#define TARGET_NR_inotify_init (TARGET_NR_Linux + 247) | |
253 | +#define TARGET_NR_inotify_add_watch (TARGET_NR_Linux + 248) | |
254 | +#define TARGET_NR_inotify_rm_watch (TARGET_NR_Linux + 249) | |
255 | +#define TARGET_NR_migrate_pages (TARGET_NR_Linux + 250) | |
256 | +#define TARGET_NR_openat (TARGET_NR_Linux + 251) | |
257 | +#define TARGET_NR_mkdirat (TARGET_NR_Linux + 252) | |
258 | +#define TARGET_NR_mknodat (TARGET_NR_Linux + 253) | |
259 | +#define TARGET_NR_fchownat (TARGET_NR_Linux + 254) | |
260 | +#define TARGET_NR_futimesat (TARGET_NR_Linux + 255) | |
261 | +#define TARGET_NR_newfstatat (TARGET_NR_Linux + 256) | |
262 | +#define TARGET_NR_unlinkat (TARGET_NR_Linux + 257) | |
263 | +#define TARGET_NR_renameat (TARGET_NR_Linux + 258) | |
264 | +#define TARGET_NR_linkat (TARGET_NR_Linux + 259) | |
265 | +#define TARGET_NR_symlinkat (TARGET_NR_Linux + 260) | |
266 | +#define TARGET_NR_readlinkat (TARGET_NR_Linux + 261) | |
267 | +#define TARGET_NR_fchmodat (TARGET_NR_Linux + 262) | |
268 | +#define TARGET_NR_faccessat (TARGET_NR_Linux + 263) | |
269 | +#define TARGET_NR_pselect6 (TARGET_NR_Linux + 264) | |
270 | +#define TARGET_NR_ppoll (TARGET_NR_Linux + 265) | |
271 | +#define TARGET_NR_unshare (TARGET_NR_Linux + 266) | |
272 | +#define TARGET_NR_splice (TARGET_NR_Linux + 267) | |
273 | +#define TARGET_NR_sync_file_range (TARGET_NR_Linux + 268) | |
274 | +#define TARGET_NR_tee (TARGET_NR_Linux + 269) | |
275 | +#define TARGET_NR_vmsplice (TARGET_NR_Linux + 270) | |
276 | +#define TARGET_NR_move_pages (TARGET_NR_Linux + 271) | |
277 | +#define TARGET_NR_set_robust_list (TARGET_NR_Linux + 272) | |
278 | +#define TARGET_NR_get_robust_list (TARGET_NR_Linux + 273) | |
279 | +#define TARGET_NR_kexec_load (TARGET_NR_Linux + 274) | |
280 | +#define TARGET_NR_getcpu (TARGET_NR_Linux + 275) | |
281 | +#define TARGET_NR_epoll_pwait (TARGET_NR_Linux + 276) | |
282 | +#define TARGET_NR_ioprio_set (TARGET_NR_Linux + 277) | |
283 | +#define TARGET_NR_ioprio_get (TARGET_NR_Linux + 278) | |
284 | +#define TARGET_NR_utimensat (TARGET_NR_Linux + 279) | |
285 | +#define TARGET_NR_signalfd (TARGET_NR_Linux + 280) | |
286 | +#define TARGET_NR_timerfd (TARGET_NR_Linux + 281) | |
287 | +#define TARGET_NR_eventfd (TARGET_NR_Linux + 282) | |
288 | +#define TARGET_NR_fallocate (TARGET_NR_Linux + 283) | ... | ... |
linux-user/mipsn32/target_signal.h
0 โ 100644
1 | +#ifndef TARGET_SIGNAL_H | |
2 | +#define TARGET_SIGNAL_H | |
3 | + | |
4 | +#include "cpu.h" | |
5 | + | |
6 | +/* this struct defines a stack used during syscall handling */ | |
7 | + | |
8 | +typedef struct target_sigaltstack { | |
9 | + int32_t ss_sp; | |
10 | + uint32_t ss_size; | |
11 | + int32_t ss_flags; | |
12 | +} target_stack_t; | |
13 | + | |
14 | + | |
15 | +/* | |
16 | + * sigaltstack controls | |
17 | + */ | |
18 | +#define TARGET_SS_ONSTACK 1 | |
19 | +#define TARGET_SS_DISABLE 2 | |
20 | + | |
21 | +#define TARGET_MINSIGSTKSZ 2048 | |
22 | +#define TARGET_SIGSTKSZ 8192 | |
23 | + | |
24 | +static inline target_ulong get_sp_from_cpustate(CPUMIPSState *state) | |
25 | +{ | |
26 | + return state->gpr[29][state->current_tc]; | |
27 | +} | |
28 | + | |
29 | +#endif /* TARGET_SIGNAL_H */ | ... | ... |
linux-user/mipsn32/termbits.h
0 โ 100644
1 | +/* from asm/termbits.h */ | |
2 | + | |
3 | +#define TARGET_NCCS 23 | |
4 | + | |
5 | +struct target_termios { | |
6 | + unsigned int c_iflag; /* input mode flags */ | |
7 | + unsigned int c_oflag; /* output mode flags */ | |
8 | + unsigned int c_cflag; /* control mode flags */ | |
9 | + unsigned int c_lflag; /* local mode flags */ | |
10 | + unsigned char c_line; /* line discipline */ | |
11 | + unsigned char c_cc[TARGET_NCCS]; /* control characters */ | |
12 | +}; | |
13 | + | |
14 | +/* c_iflag bits */ | |
15 | +#define TARGET_IGNBRK 0000001 | |
16 | +#define TARGET_BRKINT 0000002 | |
17 | +#define TARGET_IGNPAR 0000004 | |
18 | +#define TARGET_PARMRK 0000010 | |
19 | +#define TARGET_INPCK 0000020 | |
20 | +#define TARGET_ISTRIP 0000040 | |
21 | +#define TARGET_INLCR 0000100 | |
22 | +#define TARGET_IGNCR 0000200 | |
23 | +#define TARGET_ICRNL 0000400 | |
24 | +#define TARGET_IUCLC 0001000 | |
25 | +#define TARGET_IXON 0002000 | |
26 | +#define TARGET_IXANY 0004000 | |
27 | +#define TARGET_IXOFF 0010000 | |
28 | +#define TARGET_IMAXBEL 0020000 | |
29 | +#define TARGET_IUTF8 0040000 | |
30 | + | |
31 | +/* c_oflag bits */ | |
32 | +#define TARGET_OPOST 0000001 | |
33 | +#define TARGET_OLCUC 0000002 | |
34 | +#define TARGET_ONLCR 0000004 | |
35 | +#define TARGET_OCRNL 0000010 | |
36 | +#define TARGET_ONOCR 0000020 | |
37 | +#define TARGET_ONLRET 0000040 | |
38 | +#define TARGET_OFILL 0000100 | |
39 | +#define TARGET_OFDEL 0000200 | |
40 | +#define TARGET_NLDLY 0000400 | |
41 | +#define TARGET_NL0 0000000 | |
42 | +#define TARGET_NL1 0000400 | |
43 | +#define TARGET_CRDLY 0003000 | |
44 | +#define TARGET_CR0 0000000 | |
45 | +#define TARGET_CR1 0001000 | |
46 | +#define TARGET_CR2 0002000 | |
47 | +#define TARGET_CR3 0003000 | |
48 | +#define TARGET_TABDLY 0014000 | |
49 | +#define TARGET_TAB0 0000000 | |
50 | +#define TARGET_TAB1 0004000 | |
51 | +#define TARGET_TAB2 0010000 | |
52 | +#define TARGET_TAB3 0014000 | |
53 | +#define TARGET_XTABS 0014000 | |
54 | +#define TARGET_BSDLY 0020000 | |
55 | +#define TARGET_BS0 0000000 | |
56 | +#define TARGET_BS1 0020000 | |
57 | +#define TARGET_VTDLY 0040000 | |
58 | +#define TARGET_VT0 0000000 | |
59 | +#define TARGET_VT1 0040000 | |
60 | +#define TARGET_FFDLY 0100000 | |
61 | +#define TARGET_FF0 0000000 | |
62 | +#define TARGET_FF1 0100000 | |
63 | + | |
64 | +/* c_cflag bit meaning */ | |
65 | +#define TARGET_CBAUD 0010017 | |
66 | +#define TARGET_B0 0000000 /* hang up */ | |
67 | +#define TARGET_B50 0000001 | |
68 | +#define TARGET_B75 0000002 | |
69 | +#define TARGET_B110 0000003 | |
70 | +#define TARGET_B134 0000004 | |
71 | +#define TARGET_B150 0000005 | |
72 | +#define TARGET_B200 0000006 | |
73 | +#define TARGET_B300 0000007 | |
74 | +#define TARGET_B600 0000010 | |
75 | +#define TARGET_B1200 0000011 | |
76 | +#define TARGET_B1800 0000012 | |
77 | +#define TARGET_B2400 0000013 | |
78 | +#define TARGET_B4800 0000014 | |
79 | +#define TARGET_B9600 0000015 | |
80 | +#define TARGET_B19200 0000016 | |
81 | +#define TARGET_B38400 0000017 | |
82 | +#define TARGET_EXTA B19200 | |
83 | +#define TARGET_EXTB B38400 | |
84 | +#define TARGET_CSIZE 0000060 | |
85 | +#define TARGET_CS5 0000000 | |
86 | +#define TARGET_CS6 0000020 | |
87 | +#define TARGET_CS7 0000040 | |
88 | +#define TARGET_CS8 0000060 | |
89 | +#define TARGET_CSTOPB 0000100 | |
90 | +#define TARGET_CREAD 0000200 | |
91 | +#define TARGET_PARENB 0000400 | |
92 | +#define TARGET_PARODD 0001000 | |
93 | +#define TARGET_HUPCL 0002000 | |
94 | +#define TARGET_CLOCAL 0004000 | |
95 | +#define TARGET_CBAUDEX 0010000 | |
96 | +#define TARGET_BOTHER 0010000 | |
97 | +#define TARGET_B57600 0010001 | |
98 | +#define TARGET_B115200 0010002 | |
99 | +#define TARGET_B230400 0010003 | |
100 | +#define TARGET_B460800 0010004 | |
101 | +#define TARGET_B500000 0010005 | |
102 | +#define TARGET_B576000 0010006 | |
103 | +#define TARGET_B921600 0010007 | |
104 | +#define TARGET_B1000000 0010010 | |
105 | +#define TARGET_B1152000 0010011 | |
106 | +#define TARGET_B1500000 0010012 | |
107 | +#define TARGET_B2000000 0010013 | |
108 | +#define TARGET_B2500000 0010014 | |
109 | +#define TARGET_B3000000 0010015 | |
110 | +#define TARGET_B3500000 0010016 | |
111 | +#define TARGET_B4000000 0010017 | |
112 | +#define TARGET_CIBAUD 002003600000 /* input baud rate (not used) */ | |
113 | +#define TARGET_CMSPAR 010000000000 /* mark or space (stick) parity */ | |
114 | +#define TARGET_CRTSCTS 020000000000 /* flow control */ | |
115 | + | |
116 | +/* c_lflag bits */ | |
117 | +#define TARGET_ISIG 0000001 | |
118 | +#define TARGET_ICANON 0000002 | |
119 | +#define TARGET_XCASE 0000004 | |
120 | +#define TARGET_ECHO 0000010 | |
121 | +#define TARGET_ECHOE 0000020 | |
122 | +#define TARGET_ECHOK 0000040 | |
123 | +#define TARGET_ECHONL 0000100 | |
124 | +#define TARGET_NOFLSH 0000200 | |
125 | +#define TARGET_IEXTEN 0000400 | |
126 | +#define TARGET_ECHOCTL 0001000 | |
127 | +#define TARGET_ECHOPRT 0002000 | |
128 | +#define TARGET_ECHOKE 0004000 | |
129 | +#define TARGET_FLUSHO 0010000 | |
130 | +#define TARGET_PENDIN 0040000 | |
131 | +#define TARGET_TOSTOP 0100000 | |
132 | +#define TARGET_ITOSTOP TARGET_TOSTOP | |
133 | + | |
134 | +/* c_cc character offsets */ | |
135 | +#define TARGET_VINTR 0 | |
136 | +#define TARGET_VQUIT 1 | |
137 | +#define TARGET_VERASE 2 | |
138 | +#define TARGET_VKILL 3 | |
139 | +#define TARGET_VMIN 4 | |
140 | +#define TARGET_VTIME 5 | |
141 | +#define TARGET_VEOL2 6 | |
142 | +#define TARGET_VSWTC 7 | |
143 | +#define TARGET_VSTART 8 | |
144 | +#define TARGET_VSTOP 9 | |
145 | +#define TARGET_VSUSP 10 | |
146 | +/* VDSUSP not supported */ | |
147 | +#define TARGET_VREPRINT 12 | |
148 | +#define TARGET_VDISCARD 13 | |
149 | +#define TARGET_VWERASE 14 | |
150 | +#define TARGET_VLNEXT 15 | |
151 | +#define TARGET_VEOF 16 | |
152 | +#define TARGET_VEOL 17 | |
153 | + | |
154 | +/* ioctls */ | |
155 | + | |
156 | +#define TARGET_TCGETA 0x5401 | |
157 | +#define TARGET_TCSETA 0x5402 /* Clashes with SNDCTL_TMR_START sound ioctl */ | |
158 | +#define TARGET_TCSETAW 0x5403 | |
159 | +#define TARGET_TCSETAF 0x5404 | |
160 | + | |
161 | +#define TARGET_TCSBRK 0x5405 | |
162 | +#define TARGET_TCXONC 0x5406 | |
163 | +#define TARGET_TCFLSH 0x5407 | |
164 | + | |
165 | +#define TARGET_TCGETS 0x540d | |
166 | +#define TARGET_TCSETS 0x540e | |
167 | +#define TARGET_TCSETSW 0x540f | |
168 | +#define TARGET_TCSETSF 0x5410 | |
169 | + | |
170 | +#define TARGET_TIOCEXCL 0x740d /* set exclusive use of tty */ | |
171 | +#define TARGET_TIOCNXCL 0x740e /* reset exclusive use of tty */ | |
172 | +#define TARGET_TIOCOUTQ 0x7472 /* output queue size */ | |
173 | +#define TARGET_TIOCSTI 0x5472 /* simulate terminal input */ | |
174 | +#define TARGET_TIOCMGET 0x741d /* get all modem bits */ | |
175 | +#define TARGET_TIOCMBIS 0x741b /* bis modem bits */ | |
176 | +#define TARGET_TIOCMBIC 0x741c /* bic modem bits */ | |
177 | +#define TARGET_TIOCMSET 0x741a /* set all modem bits */ | |
178 | +#define TARGET_TIOCPKT 0x5470 /* pty: set/clear packet mode */ | |
179 | +#define TARGET_TIOCPKT_DATA 0x00 /* data packet */ | |
180 | +#define TARGET_TIOCPKT_FLUSHREAD 0x01 /* flush packet */ | |
181 | +#define TARGET_TIOCPKT_FLUSHWRITE 0x02 /* flush packet */ | |
182 | +#define TARGET_TIOCPKT_STOP 0x04 /* stop output */ | |
183 | +#define TARGET_TIOCPKT_START 0x08 /* start output */ | |
184 | +#define TARGET_TIOCPKT_NOSTOP 0x10 /* no more ^S, ^Q */ | |
185 | +#define TARGET_TIOCPKT_DOSTOP 0x20 /* now do ^S ^Q */ | |
186 | +/* #define TIOCPKT_IOCTL 0x40 state change of pty driver */ | |
187 | +#define TARGET_TIOCSWINSZ TARGET_IOW('t', 103, struct winsize) /* set window size */ | |
188 | +#define TARGET_TIOCGWINSZ TARGET_IOR('t', 104, struct winsize) /* get window size */ | |
189 | +#define TARGET_TIOCNOTTY 0x5471 /* void tty association */ | |
190 | +#define TARGET_TIOCSETD 0x7401 | |
191 | +#define TARGET_TIOCGETD 0x7400 | |
192 | + | |
193 | +#define TARGET_FIOCLEX 0x6601 | |
194 | +#define TARGET_FIONCLEX 0x6602 | |
195 | +#define TARGET_FIOASYNC 0x667d | |
196 | +#define TARGET_FIONBIO 0x667e | |
197 | +#define TARGET_FIOQSIZE 0x667f | |
198 | + | |
199 | +#define TARGET_TIOCGLTC 0x7474 /* get special local chars */ | |
200 | +#define TARGET_TIOCSLTC 0x7475 /* set special local chars */ | |
201 | +#define TARGET_TIOCSPGRP TARGET_IOW('t', 118, int) /* set pgrp of tty */ | |
202 | +#define TARGET_TIOCGPGRP TARGET_IOR('t', 119, int) /* get pgrp of tty */ | |
203 | +#define TARGET_TIOCCONS TARGET_IOW('t', 120, int) /* become virtual console */ | |
204 | + | |
205 | +#define TARGET_FIONREAD 0x467f | |
206 | +#define TARGET_TIOCINQ TARGET_FIONREAD | |
207 | + | |
208 | +#define TARGET_TIOCGETP 0x7408 | |
209 | +#define TARGET_TIOCSETP 0x7409 | |
210 | +#define TARGET_TIOCSETN 0x740a /* TIOCSETP wo flush */ | |
211 | + | |
212 | +/* #define TARGET_TIOCSETA TARGET_IOW('t', 20, struct termios) set termios struct */ | |
213 | +/* #define TARGET_TIOCSETAW TARGET_IOW('t', 21, struct termios) drain output, set */ | |
214 | +/* #define TARGET_TIOCSETAF TARGET_IOW('t', 22, struct termios) drn out, fls in, set */ | |
215 | +/* #define TARGET_TIOCGETD TARGET_IOR('t', 26, int) get line discipline */ | |
216 | +/* #define TARGET_TIOCSETD TARGET_IOW('t', 27, int) set line discipline */ | |
217 | + /* 127-124 compat */ | |
218 | + | |
219 | +#define TARGET_TIOCSBRK 0x5427 /* BSD compatibility */ | |
220 | +#define TARGET_TIOCCBRK 0x5428 /* BSD compatibility */ | |
221 | +#define TARGET_TIOCGSID 0x7416 /* Return the session ID of FD */ | |
222 | +#define TARGET_TIOCGPTN TARGET_IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | |
223 | +#define TARGET_TIOCSPTLCK TARGET_IOW('T',0x31, int) /* Lock/unlock Pty */ | |
224 | + | |
225 | +/* I hope the range from 0x5480 on is free ... */ | |
226 | +#define TARGET_TIOCSCTTY 0x5480 /* become controlling tty */ | |
227 | +#define TARGET_TIOCGSOFTCAR 0x5481 | |
228 | +#define TARGET_TIOCSSOFTCAR 0x5482 | |
229 | +#define TARGET_TIOCLINUX 0x5483 | |
230 | +#define TARGET_TIOCGSERIAL 0x5484 | |
231 | +#define TARGET_TIOCSSERIAL 0x5485 | |
232 | +#define TARGET_TCSBRKP 0x5486 /* Needed for POSIX tcsendbreak() */ | |
233 | +#define TARGET_TIOCSERCONFIG 0x5488 | |
234 | +#define TARGET_TIOCSERGWILD 0x5489 | |
235 | +#define TARGET_TIOCSERSWILD 0x548a | |
236 | +#define TARGET_TIOCGLCKTRMIOS 0x548b | |
237 | +#define TARGET_TIOCSLCKTRMIOS 0x548c | |
238 | +#define TARGET_TIOCSERGSTRUCT 0x548d /* For debugging only */ | |
239 | +#define TARGET_TIOCSERGETLSR 0x548e /* Get line status register */ | |
240 | +#define TARGET_TIOCSERGETMULTI 0x548f /* Get multiport config */ | |
241 | +#define TARGET_TIOCSERSETMULTI 0x5490 /* Set multiport config */ | |
242 | +#define TARGET_TIOCMIWAIT 0x5491 /* wait for a change on serial input line(s) */ | |
243 | +#define TARGET_TIOCGICOUNT 0x5492 /* read serial port inline interrupt counts */ | |
244 | +#define TARGET_TIOCGHAYESESP 0x5493 /* Get Hayes ESP configuration */ | |
245 | +#define TARGET_TIOCSHAYESESP 0x5494 /* Set Hayes ESP configuration */ | ... | ... |
linux-user/signal.c
... | ... | @@ -1704,6 +1704,64 @@ long do_rt_sigreturn(CPUState *env) |
1704 | 1704 | return -ENOSYS; |
1705 | 1705 | } |
1706 | 1706 | |
1707 | +#elif defined(TARGET_MIPS64) | |
1708 | + | |
1709 | +# warning signal handling not implemented | |
1710 | + | |
1711 | +static void setup_frame(int sig, struct emulated_sigaction *ka, | |
1712 | + target_sigset_t *set, CPUState *env) | |
1713 | +{ | |
1714 | + fprintf(stderr, "setup_frame: not implemented\n"); | |
1715 | +} | |
1716 | + | |
1717 | +static void setup_rt_frame(int sig, struct emulated_sigaction *ka, | |
1718 | + target_siginfo_t *info, | |
1719 | + target_sigset_t *set, CPUState *env) | |
1720 | +{ | |
1721 | + fprintf(stderr, "setup_rt_frame: not implemented\n"); | |
1722 | +} | |
1723 | + | |
1724 | +long do_sigreturn(CPUState *env) | |
1725 | +{ | |
1726 | + fprintf(stderr, "do_sigreturn: not implemented\n"); | |
1727 | + return -ENOSYS; | |
1728 | +} | |
1729 | + | |
1730 | +long do_rt_sigreturn(CPUState *env) | |
1731 | +{ | |
1732 | + fprintf(stderr, "do_rt_sigreturn: not implemented\n"); | |
1733 | + return -ENOSYS; | |
1734 | +} | |
1735 | + | |
1736 | +#elif defined(TARGET_MIPSN32) | |
1737 | + | |
1738 | +# warning signal handling not implemented | |
1739 | + | |
1740 | +static void setup_frame(int sig, struct emulated_sigaction *ka, | |
1741 | + target_sigset_t *set, CPUState *env) | |
1742 | +{ | |
1743 | + fprintf(stderr, "setup_frame: not implemented\n"); | |
1744 | +} | |
1745 | + | |
1746 | +static void setup_rt_frame(int sig, struct emulated_sigaction *ka, | |
1747 | + target_siginfo_t *info, | |
1748 | + target_sigset_t *set, CPUState *env) | |
1749 | +{ | |
1750 | + fprintf(stderr, "setup_rt_frame: not implemented\n"); | |
1751 | +} | |
1752 | + | |
1753 | +long do_sigreturn(CPUState *env) | |
1754 | +{ | |
1755 | + fprintf(stderr, "do_sigreturn: not implemented\n"); | |
1756 | + return -ENOSYS; | |
1757 | +} | |
1758 | + | |
1759 | +long do_rt_sigreturn(CPUState *env) | |
1760 | +{ | |
1761 | + fprintf(stderr, "do_rt_sigreturn: not implemented\n"); | |
1762 | + return -ENOSYS; | |
1763 | +} | |
1764 | + | |
1707 | 1765 | #elif defined(TARGET_MIPS) |
1708 | 1766 | |
1709 | 1767 | struct target_sigcontext { | ... | ... |
linux-user/syscall_defs.h
... | ... | @@ -307,7 +307,9 @@ int do_sigaction(int sig, const struct target_sigaction *act, |
307 | 307 | #define TARGET_SA_NODEFER 0x40000000 |
308 | 308 | #define TARGET_SA_RESTART 0x10000000 |
309 | 309 | #define TARGET_SA_RESETHAND 0x80000000 |
310 | +#if !defined(TARGET_MIPSN32) && !defined(TARGET_MIPS64) | |
310 | 311 | #define TARGET_SA_RESTORER 0x04000000 /* Only for o32 */ |
312 | +#endif | |
311 | 313 | #else |
312 | 314 | #define TARGET_SA_NOCLDSTOP 0x00000001 |
313 | 315 | #define TARGET_SA_NOCLDWAIT 0x00000002 /* not supported yet */ |
... | ... | @@ -447,8 +449,12 @@ int do_sigaction(int sig, const struct target_sigaction *act, |
447 | 449 | #if defined(TARGET_MIPS) |
448 | 450 | |
449 | 451 | struct target_sigaction { |
450 | - target_ulong sa_flags; | |
452 | + uint32_t sa_flags; | |
453 | +#if defined(TARGET_MIPSN32) | |
454 | + uint32_t _sa_handler; | |
455 | +#else | |
451 | 456 | target_ulong _sa_handler; |
457 | +#endif | |
452 | 458 | target_sigset_t sa_mask; |
453 | 459 | }; |
454 | 460 | |
... | ... | @@ -860,6 +866,8 @@ struct target_winsize { |
860 | 866 | #define TARGET_MAP_EXECUTABLE 0x4000 /* mark it as an executable */ |
861 | 867 | #define TARGET_MAP_LOCKED 0x8000 /* pages are locked */ |
862 | 868 | #define TARGET_MAP_NORESERVE 0x0400 /* don't check for reservations */ |
869 | +#define TARGET_MAP_POPULATE 0x10000 /* populate (prefault) pagetables */ | |
870 | +#define TARGET_MAP_NONBLOCK 0x20000 /* do not block on IO */ | |
863 | 871 | #else |
864 | 872 | #define TARGET_MAP_ANONYMOUS 0x20 /* don't use a file */ |
865 | 873 | #define TARGET_MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
... | ... | @@ -872,6 +880,8 @@ struct target_winsize { |
872 | 880 | #define TARGET_MAP_LOCKED 0x2000 /* pages are locked */ |
873 | 881 | #define TARGET_MAP_NORESERVE 0x4000 /* don't check for reservations */ |
874 | 882 | #endif |
883 | +#define TARGET_MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | |
884 | +#define TARGET_MAP_NONBLOCK 0x10000 /* do not block on IO */ | |
875 | 885 | #endif |
876 | 886 | |
877 | 887 | #if defined(TARGET_I386) || defined(TARGET_ARM) |
... | ... | @@ -1184,6 +1194,116 @@ struct target_stat64 { |
1184 | 1194 | unsigned long long st_ino; |
1185 | 1195 | } __attribute__((packed)); |
1186 | 1196 | |
1197 | +#elif defined(TARGET_MIPS64) | |
1198 | + | |
1199 | +/* The memory layout is the same as of struct stat64 of the 32-bit kernel. */ | |
1200 | +struct target_stat { | |
1201 | + unsigned int st_dev; | |
1202 | + unsigned int st_pad0[3]; /* Reserved for st_dev expansion */ | |
1203 | + | |
1204 | + target_ulong st_ino; | |
1205 | + | |
1206 | + unsigned int st_mode; | |
1207 | + unsigned int st_nlink; | |
1208 | + | |
1209 | + int st_uid; | |
1210 | + int st_gid; | |
1211 | + | |
1212 | + unsigned int st_rdev; | |
1213 | + unsigned int st_pad1[3]; /* Reserved for st_rdev expansion */ | |
1214 | + | |
1215 | + target_ulong st_size; | |
1216 | + | |
1217 | + /* | |
1218 | + * Actually this should be timestruc_t st_atime, st_mtime and st_ctime | |
1219 | + * but we don't have it under Linux. | |
1220 | + */ | |
1221 | + unsigned int target_st_atime; | |
1222 | + unsigned int target_st_atime_nsec; | |
1223 | + | |
1224 | + unsigned int target_st_mtime; | |
1225 | + unsigned int target_st_mtime_nsec; | |
1226 | + | |
1227 | + unsigned int target_st_ctime; | |
1228 | + unsigned int target_st_ctime_nsec; | |
1229 | + | |
1230 | + unsigned int st_blksize; | |
1231 | + unsigned int st_pad2; | |
1232 | + | |
1233 | + target_ulong st_blocks; | |
1234 | +}; | |
1235 | + | |
1236 | +#elif defined(TARGET_MIPSN32) | |
1237 | + | |
1238 | +struct target_stat { | |
1239 | + unsigned st_dev; | |
1240 | + int st_pad1[3]; /* Reserved for network id */ | |
1241 | + unsigned int st_ino; | |
1242 | + unsigned int st_mode; | |
1243 | + unsigned int st_nlink; | |
1244 | + int st_uid; | |
1245 | + int st_gid; | |
1246 | + unsigned st_rdev; | |
1247 | + unsigned int st_pad2[2]; | |
1248 | + unsigned int st_size; | |
1249 | + unsigned int st_pad3; | |
1250 | + /* | |
1251 | + * Actually this should be timestruc_t st_atime, st_mtime and st_ctime | |
1252 | + * but we don't have it under Linux. | |
1253 | + */ | |
1254 | + unsigned int target_st_atime; | |
1255 | + unsigned int target_st_atime_nsec; | |
1256 | + unsigned int target_st_mtime; | |
1257 | + unsigned int target_st_mtime_nsec; | |
1258 | + unsigned int target_st_ctime; | |
1259 | + unsigned int target_st_ctime_nsec; | |
1260 | + unsigned int st_blksize; | |
1261 | + unsigned int st_blocks; | |
1262 | + unsigned int st_pad4[14]; | |
1263 | +}; | |
1264 | + | |
1265 | +/* | |
1266 | + * This matches struct stat64 in glibc2.1, hence the absolutely insane | |
1267 | + * amounts of padding around dev_t's. The memory layout is the same as of | |
1268 | + * struct stat of the 64-bit kernel. | |
1269 | + */ | |
1270 | + | |
1271 | +struct target_stat64 { | |
1272 | + unsigned int st_dev; | |
1273 | + unsigned int st_pad0[3]; /* Reserved for st_dev expansion */ | |
1274 | + | |
1275 | + target_ulong st_ino; | |
1276 | + | |
1277 | + unsigned int st_mode; | |
1278 | + unsigned int st_nlink; | |
1279 | + | |
1280 | + int st_uid; | |
1281 | + int st_gid; | |
1282 | + | |
1283 | + unsigned int st_rdev; | |
1284 | + unsigned int st_pad1[3]; /* Reserved for st_rdev expansion */ | |
1285 | + | |
1286 | + int st_size; | |
1287 | + | |
1288 | + /* | |
1289 | + * Actually this should be timestruc_t st_atime, st_mtime and st_ctime | |
1290 | + * but we don't have it under Linux. | |
1291 | + */ | |
1292 | + int target_st_atime; | |
1293 | + unsigned int target_st_atime_nsec; /* Reserved for st_atime expansion */ | |
1294 | + | |
1295 | + int target_st_mtime; | |
1296 | + unsigned int target_st_mtime_nsec; /* Reserved for st_mtime expansion */ | |
1297 | + | |
1298 | + int target_st_ctime; | |
1299 | + unsigned int target_st_ctime_nsec; /* Reserved for st_ctime expansion */ | |
1300 | + | |
1301 | + unsigned int st_blksize; | |
1302 | + unsigned int st_pad2; | |
1303 | + | |
1304 | + int st_blocks; | |
1305 | +}; | |
1306 | + | |
1187 | 1307 | #elif defined(TARGET_MIPS) |
1188 | 1308 | |
1189 | 1309 | struct target_stat { |
... | ... | @@ -1366,6 +1486,23 @@ typedef struct { |
1366 | 1486 | } target_fsid_t; |
1367 | 1487 | |
1368 | 1488 | #ifdef TARGET_MIPS |
1489 | +#ifdef TARGET_MIPSN32 | |
1490 | +struct target_statfs { | |
1491 | + int32_t f_type; | |
1492 | + int32_t f_bsize; | |
1493 | + int32_t f_frsize; /* Fragment size - unsupported */ | |
1494 | + int32_t f_blocks; | |
1495 | + int32_t f_bfree; | |
1496 | + int32_t f_files; | |
1497 | + int32_t f_ffree; | |
1498 | + int32_t f_bavail; | |
1499 | + | |
1500 | + /* Linux specials */ | |
1501 | + target_fsid_t f_fsid; | |
1502 | + int32_t f_namelen; | |
1503 | + int32_t f_spare[6]; | |
1504 | +}; | |
1505 | +#else | |
1369 | 1506 | struct target_statfs { |
1370 | 1507 | target_long f_type; |
1371 | 1508 | target_long f_bsize; |
... | ... | @@ -1381,6 +1518,7 @@ struct target_statfs { |
1381 | 1518 | target_long f_namelen; |
1382 | 1519 | target_long f_spare[6]; |
1383 | 1520 | }; |
1521 | +#endif | |
1384 | 1522 | |
1385 | 1523 | struct target_statfs64 { |
1386 | 1524 | uint32_t f_type; | ... | ... |
qemu-binfmt-conf.sh
... | ... | @@ -46,10 +46,14 @@ if [ $cpu != "ppc" ] ; then |
46 | 46 | fi |
47 | 47 | if [ $cpu != "m68k" ] ; then |
48 | 48 | echo 'Please check cpu value and header information for m68k!' |
49 | - echo ':m68k:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-m68k:' > /proc/sys/fs/binfmt_misc/register | |
49 | + echo ':m68k:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x04:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-m68k:' > /proc/sys/fs/binfmt_misc/register | |
50 | 50 | fi |
51 | 51 | if [ $cpu != "mips" ] ; then |
52 | 52 | # FIXME: We could use the other endianness on a MIPS host. |
53 | 53 | echo ':mips:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-mips:' > /proc/sys/fs/binfmt_misc/register |
54 | 54 | echo ':mipsel:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-mipsel:' > /proc/sys/fs/binfmt_misc/register |
55 | + echo ':mipsn32:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-mipsn32:' > /proc/sys/fs/binfmt_misc/register | |
56 | + echo ':mipsn32el:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-mipsn32el:' > /proc/sys/fs/binfmt_misc/register | |
57 | + echo ':mips64:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-mips64:' > /proc/sys/fs/binfmt_misc/register | |
58 | + echo ':mips64el:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-mips64el:' > /proc/sys/fs/binfmt_misc/register | |
55 | 59 | fi | ... | ... |
target-mips/TODO
target-mips/exec.h
... | ... | @@ -56,7 +56,7 @@ register target_ulong T2 asm(AREG3); |
56 | 56 | #include "softmmu_exec.h" |
57 | 57 | #endif /* !defined(CONFIG_USER_ONLY) */ |
58 | 58 | |
59 | -#ifdef TARGET_MIPS64 | |
59 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
60 | 60 | #if TARGET_LONG_BITS > HOST_LONG_BITS |
61 | 61 | void do_dsll (void); |
62 | 62 | void do_dsll32 (void); |
... | ... | @@ -84,7 +84,7 @@ void do_maddu (void); |
84 | 84 | void do_msub (void); |
85 | 85 | void do_msubu (void); |
86 | 86 | #endif |
87 | -#ifdef TARGET_MIPS64 | |
87 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
88 | 88 | void do_ddiv (void); |
89 | 89 | #if TARGET_LONG_BITS > HOST_LONG_BITS |
90 | 90 | void do_ddivu (void); |
... | ... | @@ -104,7 +104,7 @@ void do_lwl_raw (uint32_t); |
104 | 104 | void do_lwr_raw (uint32_t); |
105 | 105 | uint32_t do_swl_raw (uint32_t); |
106 | 106 | uint32_t do_swr_raw (uint32_t); |
107 | -#ifdef TARGET_MIPS64 | |
107 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
108 | 108 | void do_ldl_raw (uint64_t); |
109 | 109 | void do_ldr_raw (uint64_t); |
110 | 110 | uint64_t do_sdl_raw (uint64_t); |
... | ... | @@ -119,7 +119,7 @@ uint32_t do_swl_user (uint32_t); |
119 | 119 | uint32_t do_swl_kernel (uint32_t); |
120 | 120 | uint32_t do_swr_user (uint32_t); |
121 | 121 | uint32_t do_swr_kernel (uint32_t); |
122 | -#ifdef TARGET_MIPS64 | |
122 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
123 | 123 | void do_ldl_user (uint64_t); |
124 | 124 | void do_ldl_kernel (uint64_t); |
125 | 125 | void do_ldr_user (uint64_t); |
... | ... | @@ -267,7 +267,7 @@ static inline void compute_hflags(CPUState *env) |
267 | 267 | if (env->CP0_Status & (1 << CP0St_R0)) |
268 | 268 | env->hflags |= MIPS_HFLAG_SM; |
269 | 269 | } |
270 | -#ifdef TARGET_MIPS64 | |
270 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
271 | 271 | if (!(env->hflags & MIPS_HFLAG_UM) || |
272 | 272 | (env->CP0_Status & (1 << CP0St_PX)) || |
273 | 273 | (env->CP0_Status & (1 << CP0St_UX))) | ... | ... |
target-mips/helper.c
... | ... | @@ -76,7 +76,7 @@ int r4k_map_address (CPUState *env, target_ulong *physical, int *prot, |
76 | 76 | target_ulong mask = tlb->PageMask | ~(TARGET_PAGE_MASK << 1); |
77 | 77 | target_ulong tag = address & ~mask; |
78 | 78 | target_ulong VPN = tlb->VPN & ~mask; |
79 | -#ifdef TARGET_MIPS64 | |
79 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
80 | 80 | tag &= env->SEGMask; |
81 | 81 | #endif |
82 | 82 | |
... | ... | @@ -108,7 +108,7 @@ static int get_physical_address (CPUState *env, target_ulong *physical, |
108 | 108 | int user_mode = (env->hflags & MIPS_HFLAG_MODE) == MIPS_HFLAG_UM; |
109 | 109 | int supervisor_mode = (env->hflags & MIPS_HFLAG_MODE) == MIPS_HFLAG_SM; |
110 | 110 | int kernel_mode = !user_mode && !supervisor_mode; |
111 | -#ifdef TARGET_MIPS64 | |
111 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
112 | 112 | int UX = (env->CP0_Status & (1 << CP0St_UX)) != 0; |
113 | 113 | int SX = (env->CP0_Status & (1 << CP0St_SX)) != 0; |
114 | 114 | int KX = (env->CP0_Status & (1 << CP0St_KX)) != 0; |
... | ... | @@ -130,7 +130,7 @@ static int get_physical_address (CPUState *env, target_ulong *physical, |
130 | 130 | } else { |
131 | 131 | ret = env->tlb->map_address(env, physical, prot, address, rw, access_type); |
132 | 132 | } |
133 | -#ifdef TARGET_MIPS64 | |
133 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
134 | 134 | /* |
135 | 135 | XXX: Assuming : |
136 | 136 | - PABITS = 36 (correct for MIPS64R1) |
... | ... | @@ -308,7 +308,7 @@ int cpu_mips_handle_mmu_fault (CPUState *env, target_ulong address, int rw, |
308 | 308 | ((address >> 9) & 0x007ffff0); |
309 | 309 | env->CP0_EntryHi = |
310 | 310 | (env->CP0_EntryHi & 0xFF) | (address & (TARGET_PAGE_MASK << 1)); |
311 | -#ifdef TARGET_MIPS64 | |
311 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
312 | 312 | env->CP0_EntryHi &= env->SEGMask; |
313 | 313 | env->CP0_XContext = (env->CP0_XContext & ((~0ULL) << (env->SEGBITS - 7))) | |
314 | 314 | ((address & 0xC00000000000ULL) >> (env->SEGBITS - 9)) | |
... | ... | @@ -428,7 +428,7 @@ void do_interrupt (CPUState *env) |
428 | 428 | case EXCP_TLBL: |
429 | 429 | cause = 2; |
430 | 430 | if (env->error_code == 1 && !(env->CP0_Status & (1 << CP0St_EXL))) { |
431 | -#ifdef TARGET_MIPS64 | |
431 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
432 | 432 | int R = env->CP0_BadVAddr >> 62; |
433 | 433 | int UX = (env->CP0_Status & (1 << CP0St_UX)) != 0; |
434 | 434 | int SX = (env->CP0_Status & (1 << CP0St_SX)) != 0; |
... | ... | @@ -479,7 +479,7 @@ void do_interrupt (CPUState *env) |
479 | 479 | case EXCP_THREAD: |
480 | 480 | cause = 25; |
481 | 481 | if (env->error_code == 1 && !(env->CP0_Status & (1 << CP0St_EXL))) { |
482 | -#ifdef TARGET_MIPS64 | |
482 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
483 | 483 | int R = env->CP0_BadVAddr >> 62; |
484 | 484 | int UX = (env->CP0_Status & (1 << CP0St_UX)) != 0; |
485 | 485 | int SX = (env->CP0_Status & (1 << CP0St_SX)) != 0; |
... | ... | @@ -562,7 +562,7 @@ void r4k_invalidate_tlb (CPUState *env, int idx, int use_extra) |
562 | 562 | mask = tlb->PageMask | ~(TARGET_PAGE_MASK << 1); |
563 | 563 | if (tlb->V0) { |
564 | 564 | addr = tlb->VPN & ~mask; |
565 | -#ifdef TARGET_MIPS64 | |
565 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
566 | 566 | if (addr >= (0xFFFFFFFF80000000ULL & env->SEGMask)) { |
567 | 567 | addr |= 0x3FFFFF0000000000ULL; |
568 | 568 | } |
... | ... | @@ -575,7 +575,7 @@ void r4k_invalidate_tlb (CPUState *env, int idx, int use_extra) |
575 | 575 | } |
576 | 576 | if (tlb->V1) { |
577 | 577 | addr = (tlb->VPN & ~mask) | ((mask >> 1) + 1); |
578 | -#ifdef TARGET_MIPS64 | |
578 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
579 | 579 | if (addr >= (0xFFFFFFFF80000000ULL & env->SEGMask)) { |
580 | 580 | addr |= 0x3FFFFF0000000000ULL; |
581 | 581 | } | ... | ... |
target-mips/mips-defs.h
target-mips/op.c
... | ... | @@ -296,7 +296,7 @@ void op_addr_add (void) |
296 | 296 | /* For compatibility with 32-bit code, data reference in user mode |
297 | 297 | with Status_UX = 0 should be casted to 32-bit and sign extended. |
298 | 298 | See the MIPS64 PRA manual, section 4.10. */ |
299 | -#ifdef TARGET_MIPS64 | |
299 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
300 | 300 | if ((env->hflags & MIPS_HFLAG_UM) && |
301 | 301 | !(env->CP0_Status & (1 << CP0St_UX))) |
302 | 302 | T0 = (int64_t)(int32_t)(T0 + T1); |
... | ... | @@ -379,7 +379,7 @@ void op_divu (void) |
379 | 379 | RETURN(); |
380 | 380 | } |
381 | 381 | |
382 | -#ifdef TARGET_MIPS64 | |
382 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
383 | 383 | /* Arithmetic */ |
384 | 384 | void op_dadd (void) |
385 | 385 | { |
... | ... | @@ -448,7 +448,7 @@ void op_ddivu (void) |
448 | 448 | RETURN(); |
449 | 449 | } |
450 | 450 | #endif |
451 | -#endif /* TARGET_MIPS64 */ | |
451 | +#endif /* TARGET_MIPSN32 || TARGET_MIPS64 */ | |
452 | 452 | |
453 | 453 | /* Logical */ |
454 | 454 | void op_and (void) |
... | ... | @@ -569,7 +569,7 @@ void op_clz (void) |
569 | 569 | RETURN(); |
570 | 570 | } |
571 | 571 | |
572 | -#ifdef TARGET_MIPS64 | |
572 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
573 | 573 | |
574 | 574 | #if TARGET_LONG_BITS > HOST_LONG_BITS |
575 | 575 | /* Those might call libgcc functions. */ |
... | ... | @@ -770,7 +770,7 @@ void op_dclz (void) |
770 | 770 | } |
771 | 771 | RETURN(); |
772 | 772 | } |
773 | -#endif | |
773 | +#endif /* TARGET_MIPSN32 || TARGET_MIPS64 */ | |
774 | 774 | |
775 | 775 | /* 64 bits arithmetic */ |
776 | 776 | #if TARGET_LONG_BITS > HOST_LONG_BITS |
... | ... | @@ -873,7 +873,7 @@ void op_msubu (void) |
873 | 873 | } |
874 | 874 | #endif /* TARGET_LONG_BITS > HOST_LONG_BITS */ |
875 | 875 | |
876 | -#ifdef TARGET_MIPS64 | |
876 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
877 | 877 | void op_dmult (void) |
878 | 878 | { |
879 | 879 | CALL_FROM_TB4(muls64, &(env->HI[0][env->current_tc]), &(env->LO[0][env->current_tc]), T0, T1); |
... | ... | @@ -977,7 +977,7 @@ void op_save_btarget (void) |
977 | 977 | RETURN(); |
978 | 978 | } |
979 | 979 | |
980 | -#ifdef TARGET_MIPS64 | |
980 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
981 | 981 | void op_save_btarget64 (void) |
982 | 982 | { |
983 | 983 | env->btarget = ((uint64_t)PARAM1 << 32) | (uint32_t)PARAM2; |
... | ... | @@ -1804,7 +1804,7 @@ void op_mtc0_entryhi (void) |
1804 | 1804 | |
1805 | 1805 | /* 1k pages not implemented */ |
1806 | 1806 | val = T0 & ((TARGET_PAGE_MASK << 1) | 0xFF); |
1807 | -#ifdef TARGET_MIPS64 | |
1807 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
1808 | 1808 | val &= env->SEGMask; |
1809 | 1809 | #endif |
1810 | 1810 | old = env->CP0_EntryHi; |
... | ... | @@ -2031,7 +2031,7 @@ void op_mtc0_desave (void) |
2031 | 2031 | RETURN(); |
2032 | 2032 | } |
2033 | 2033 | |
2034 | -#ifdef TARGET_MIPS64 | |
2034 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
2035 | 2035 | void op_dmfc0_yqmask (void) |
2036 | 2036 | { |
2037 | 2037 | T0 = env->CP0_YQMask; |
... | ... | @@ -2145,7 +2145,7 @@ void op_dmfc0_errorepc (void) |
2145 | 2145 | T0 = env->CP0_ErrorEPC; |
2146 | 2146 | RETURN(); |
2147 | 2147 | } |
2148 | -#endif /* TARGET_MIPS64 */ | |
2148 | +#endif /* TARGET_MIPSN32 || TARGET_MIPS64 */ | |
2149 | 2149 | |
2150 | 2150 | /* MIPS MT functions */ |
2151 | 2151 | void op_mftgpr(void) |
... | ... | @@ -3059,7 +3059,7 @@ void op_save_pc (void) |
3059 | 3059 | RETURN(); |
3060 | 3060 | } |
3061 | 3061 | |
3062 | -#ifdef TARGET_MIPS64 | |
3062 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
3063 | 3063 | void op_save_pc64 (void) |
3064 | 3064 | { |
3065 | 3065 | env->PC[env->current_tc] = ((uint64_t)PARAM1 << 32) | (uint32_t)PARAM2; |
... | ... | @@ -3131,7 +3131,7 @@ void op_wsbh(void) |
3131 | 3131 | RETURN(); |
3132 | 3132 | } |
3133 | 3133 | |
3134 | -#ifdef TARGET_MIPS64 | |
3134 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
3135 | 3135 | void op_dext(void) |
3136 | 3136 | { |
3137 | 3137 | unsigned int pos = PARAM1; | ... | ... |
target-mips/op_helper.c
... | ... | @@ -74,7 +74,7 @@ void do_raise_exception_direct (uint32_t exception) |
74 | 74 | #undef MEMSUFFIX |
75 | 75 | #endif |
76 | 76 | |
77 | -#ifdef TARGET_MIPS64 | |
77 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
78 | 78 | #if TARGET_LONG_BITS > HOST_LONG_BITS |
79 | 79 | /* Those might call libgcc functions. */ |
80 | 80 | void do_dsll (void) |
... | ... | @@ -154,7 +154,7 @@ void do_drotrv (void) |
154 | 154 | T0 = T1; |
155 | 155 | } |
156 | 156 | #endif /* TARGET_LONG_BITS > HOST_LONG_BITS */ |
157 | -#endif /* TARGET_MIPS64 */ | |
157 | +#endif /* TARGET_MIPSN32 || TARGET_MIPS64 */ | |
158 | 158 | |
159 | 159 | /* 64 bits arithmetic for 32 bits hosts */ |
160 | 160 | #if TARGET_LONG_BITS > HOST_LONG_BITS |
... | ... | @@ -223,7 +223,7 @@ void do_div (void) |
223 | 223 | } |
224 | 224 | #endif |
225 | 225 | |
226 | -#ifdef TARGET_MIPS64 | |
226 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
227 | 227 | void do_ddiv (void) |
228 | 228 | { |
229 | 229 | if (T1 != 0) { |
... | ... | @@ -242,7 +242,7 @@ void do_ddivu (void) |
242 | 242 | } |
243 | 243 | } |
244 | 244 | #endif |
245 | -#endif /* TARGET_MIPS64 */ | |
245 | +#endif /* TARGET_MIPSN32 || TARGET_MIPS64 */ | |
246 | 246 | |
247 | 247 | #if defined(CONFIG_USER_ONLY) |
248 | 248 | void do_mfc0_random (void) |
... | ... | @@ -383,7 +383,7 @@ static void r4k_fill_tlb (int idx) |
383 | 383 | /* XXX: detect conflicting TLBs and raise a MCHECK exception when needed */ |
384 | 384 | tlb = &env->tlb->mmu.r4k.tlb[idx]; |
385 | 385 | tlb->VPN = env->CP0_EntryHi & (TARGET_PAGE_MASK << 1); |
386 | -#ifdef TARGET_MIPS64 | |
386 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
387 | 387 | tlb->VPN &= env->SEGMask; |
388 | 388 | #endif |
389 | 389 | tlb->ASID = env->CP0_EntryHi & 0xFF; | ... | ... |
target-mips/op_helper_mem.c
... | ... | @@ -124,7 +124,7 @@ uint32_t glue(do_swr, MEMSUFFIX) (uint32_t tmp) |
124 | 124 | return tmp; |
125 | 125 | } |
126 | 126 | |
127 | -#ifdef TARGET_MIPS64 | |
127 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
128 | 128 | |
129 | 129 | #ifdef TARGET_WORDS_BIGENDIAN |
130 | 130 | #define GET_LMASK64(v) ((v) & 7) |
... | ... | @@ -298,4 +298,4 @@ uint64_t glue(do_sdr, MEMSUFFIX) (uint64_t tmp) |
298 | 298 | return tmp; |
299 | 299 | } |
300 | 300 | |
301 | -#endif /* TARGET_MIPS64 */ | |
301 | +#endif /* TARGET_MIPSN32 || TARGET_MIPS64 */ | ... | ... |
target-mips/op_mem.c
... | ... | @@ -130,7 +130,7 @@ void glue(op_sc, MEMSUFFIX) (void) |
130 | 130 | RETURN(); |
131 | 131 | } |
132 | 132 | |
133 | -#ifdef TARGET_MIPS64 | |
133 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
134 | 134 | void glue(op_ld, MEMSUFFIX) (void) |
135 | 135 | { |
136 | 136 | T0 = glue(ldq, MEMSUFFIX)(T0); |
... | ... | @@ -198,7 +198,7 @@ void glue(op_scd, MEMSUFFIX) (void) |
198 | 198 | } |
199 | 199 | RETURN(); |
200 | 200 | } |
201 | -#endif /* TARGET_MIPS64 */ | |
201 | +#endif /* TARGET_MIPSN32 || TARGET_MIPS64 */ | |
202 | 202 | |
203 | 203 | void glue(op_lwc1, MEMSUFFIX) (void) |
204 | 204 | { | ... | ... |
target-mips/op_template.c
target-mips/translate.c
... | ... | @@ -590,7 +590,7 @@ do { \ |
590 | 590 | } \ |
591 | 591 | } while (0) |
592 | 592 | |
593 | -#ifdef TARGET_MIPS64 | |
593 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
594 | 594 | #define GEN_LOAD_IMM_TN(Tn, Imm) \ |
595 | 595 | do { \ |
596 | 596 | if (Imm == 0) { \ |
... | ... | @@ -638,7 +638,7 @@ do { \ |
638 | 638 | |
639 | 639 | static inline void gen_save_pc(target_ulong pc) |
640 | 640 | { |
641 | -#ifdef TARGET_MIPS64 | |
641 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
642 | 642 | if (pc == (int32_t)pc) { |
643 | 643 | gen_op_save_pc(pc); |
644 | 644 | } else { |
... | ... | @@ -651,7 +651,7 @@ static inline void gen_save_pc(target_ulong pc) |
651 | 651 | |
652 | 652 | static inline void gen_save_btarget(target_ulong btarget) |
653 | 653 | { |
654 | -#ifdef TARGET_MIPS64 | |
654 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
655 | 655 | if (btarget == (int32_t)btarget) { |
656 | 656 | gen_op_save_btarget(btarget); |
657 | 657 | } else { |
... | ... | @@ -808,7 +808,7 @@ static GenOpFunc *gen_op_s##width[] = { \ |
808 | 808 | } |
809 | 809 | #endif |
810 | 810 | |
811 | -#ifdef TARGET_MIPS64 | |
811 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
812 | 812 | OP_LD_TABLE(d); |
813 | 813 | OP_LD_TABLE(dl); |
814 | 814 | OP_LD_TABLE(dr); |
... | ... | @@ -858,7 +858,7 @@ static void gen_ldst (DisasContext *ctx, uint32_t opc, int rt, |
858 | 858 | /* Don't do NOP if destination is zero: we must perform the actual |
859 | 859 | memory access. */ |
860 | 860 | switch (opc) { |
861 | -#ifdef TARGET_MIPS64 | |
861 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
862 | 862 | case OPC_LWU: |
863 | 863 | op_ldst(lwu); |
864 | 864 | GEN_STORE_TN_REG(rt, T0); |
... | ... | @@ -1054,7 +1054,7 @@ static void gen_arith_imm (CPUState *env, DisasContext *ctx, uint32_t opc, |
1054 | 1054 | switch (opc) { |
1055 | 1055 | case OPC_ADDI: |
1056 | 1056 | case OPC_ADDIU: |
1057 | -#ifdef TARGET_MIPS64 | |
1057 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
1058 | 1058 | case OPC_DADDI: |
1059 | 1059 | case OPC_DADDIU: |
1060 | 1060 | #endif |
... | ... | @@ -1074,7 +1074,7 @@ static void gen_arith_imm (CPUState *env, DisasContext *ctx, uint32_t opc, |
1074 | 1074 | case OPC_SLL: |
1075 | 1075 | case OPC_SRA: |
1076 | 1076 | case OPC_SRL: |
1077 | -#ifdef TARGET_MIPS64 | |
1077 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
1078 | 1078 | case OPC_DSLL: |
1079 | 1079 | case OPC_DSRA: |
1080 | 1080 | case OPC_DSRL: |
... | ... | @@ -1097,7 +1097,7 @@ static void gen_arith_imm (CPUState *env, DisasContext *ctx, uint32_t opc, |
1097 | 1097 | gen_op_add(); |
1098 | 1098 | opn = "addiu"; |
1099 | 1099 | break; |
1100 | -#ifdef TARGET_MIPS64 | |
1100 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
1101 | 1101 | case OPC_DADDI: |
1102 | 1102 | save_cpu_state(ctx, 1); |
1103 | 1103 | gen_op_daddo(); |
... | ... | @@ -1161,7 +1161,7 @@ static void gen_arith_imm (CPUState *env, DisasContext *ctx, uint32_t opc, |
1161 | 1161 | break; |
1162 | 1162 | } |
1163 | 1163 | break; |
1164 | -#ifdef TARGET_MIPS64 | |
1164 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
1165 | 1165 | case OPC_DSLL: |
1166 | 1166 | gen_op_dsll(); |
1167 | 1167 | opn = "dsll"; |
... | ... | @@ -1266,7 +1266,7 @@ static void gen_arith (CPUState *env, DisasContext *ctx, uint32_t opc, |
1266 | 1266 | gen_op_sub(); |
1267 | 1267 | opn = "subu"; |
1268 | 1268 | break; |
1269 | -#ifdef TARGET_MIPS64 | |
1269 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
1270 | 1270 | case OPC_DADD: |
1271 | 1271 | save_cpu_state(ctx, 1); |
1272 | 1272 | gen_op_daddo(); |
... | ... | @@ -1352,7 +1352,7 @@ static void gen_arith (CPUState *env, DisasContext *ctx, uint32_t opc, |
1352 | 1352 | break; |
1353 | 1353 | } |
1354 | 1354 | break; |
1355 | -#ifdef TARGET_MIPS64 | |
1355 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
1356 | 1356 | case OPC_DSLLV: |
1357 | 1357 | gen_op_dsllv(); |
1358 | 1358 | opn = "dsllv"; |
... | ... | @@ -1457,7 +1457,7 @@ static void gen_muldiv (DisasContext *ctx, uint32_t opc, |
1457 | 1457 | gen_op_multu(); |
1458 | 1458 | opn = "multu"; |
1459 | 1459 | break; |
1460 | -#ifdef TARGET_MIPS64 | |
1460 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
1461 | 1461 | case OPC_DDIV: |
1462 | 1462 | gen_op_ddiv(); |
1463 | 1463 | opn = "ddiv"; |
... | ... | @@ -1518,7 +1518,7 @@ static void gen_cl (DisasContext *ctx, uint32_t opc, |
1518 | 1518 | gen_op_clz(); |
1519 | 1519 | opn = "clz"; |
1520 | 1520 | break; |
1521 | -#ifdef TARGET_MIPS64 | |
1521 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
1522 | 1522 | case OPC_DCLO: |
1523 | 1523 | gen_op_dclo(); |
1524 | 1524 | opn = "dclo"; |
... | ... | @@ -2325,7 +2325,7 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, int reg, int sel) |
2325 | 2325 | case 20: |
2326 | 2326 | switch (sel) { |
2327 | 2327 | case 0: |
2328 | -#ifdef TARGET_MIPS64 | |
2328 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
2329 | 2329 | check_insn(env, ctx, ISA_MIPS3); |
2330 | 2330 | gen_op_mfc0_xcontext(); |
2331 | 2331 | rn = "XContext"; |
... | ... | @@ -2907,7 +2907,7 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, int reg, int sel) |
2907 | 2907 | case 20: |
2908 | 2908 | switch (sel) { |
2909 | 2909 | case 0: |
2910 | -#ifdef TARGET_MIPS64 | |
2910 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
2911 | 2911 | check_insn(env, ctx, ISA_MIPS3); |
2912 | 2912 | gen_op_mtc0_xcontext(); |
2913 | 2913 | rn = "XContext"; |
... | ... | @@ -3117,7 +3117,7 @@ die: |
3117 | 3117 | generate_exception(ctx, EXCP_RI); |
3118 | 3118 | } |
3119 | 3119 | |
3120 | -#ifdef TARGET_MIPS64 | |
3120 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
3121 | 3121 | static void gen_dmfc0 (CPUState *env, DisasContext *ctx, int reg, int sel) |
3122 | 3122 | { |
3123 | 3123 | const char *rn = "invalid"; |
... | ... | @@ -4260,7 +4260,7 @@ die: |
4260 | 4260 | #endif |
4261 | 4261 | generate_exception(ctx, EXCP_RI); |
4262 | 4262 | } |
4263 | -#endif /* TARGET_MIPS64 */ | |
4263 | +#endif /* TARGET_MIPSN32 || TARGET_MIPS64 */ | |
4264 | 4264 | |
4265 | 4265 | static void gen_mftr(CPUState *env, DisasContext *ctx, int rt, |
4266 | 4266 | int u, int sel, int h) |
... | ... | @@ -4610,7 +4610,7 @@ static void gen_cp0 (CPUState *env, DisasContext *ctx, uint32_t opc, int rt, int |
4610 | 4610 | gen_mtc0(env, ctx, rd, ctx->opcode & 0x7); |
4611 | 4611 | opn = "mtc0"; |
4612 | 4612 | break; |
4613 | -#ifdef TARGET_MIPS64 | |
4613 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
4614 | 4614 | case OPC_DMFC0: |
4615 | 4615 | check_insn(env, ctx, ISA_MIPS3); |
4616 | 4616 | if (rt == 0) { |
... | ... | @@ -5884,7 +5884,7 @@ static void gen_flt3_arith (DisasContext *ctx, uint32_t opc, |
5884 | 5884 | /* MIPS16 extension to MIPS32 */ |
5885 | 5885 | /* SmartMIPS extension to MIPS32 */ |
5886 | 5886 | |
5887 | -#ifdef TARGET_MIPS64 | |
5887 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
5888 | 5888 | |
5889 | 5889 | /* MDMX extension to MIPS64 */ |
5890 | 5890 | /* MIPS-3D extension to MIPS64 */ |
... | ... | @@ -5995,7 +5995,7 @@ static void decode_opc (CPUState *env, DisasContext *ctx) |
5995 | 5995 | } |
5996 | 5996 | break; |
5997 | 5997 | |
5998 | -#ifdef TARGET_MIPS64 | |
5998 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
5999 | 5999 | /* MIPS64 specific opcodes */ |
6000 | 6000 | case OPC_DSLL: |
6001 | 6001 | case OPC_DSRL ... OPC_DSRA: |
... | ... | @@ -6051,7 +6051,7 @@ static void decode_opc (CPUState *env, DisasContext *ctx) |
6051 | 6051 | } |
6052 | 6052 | /* Treat as NOP. */ |
6053 | 6053 | break; |
6054 | -#ifdef TARGET_MIPS64 | |
6054 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
6055 | 6055 | case OPC_DCLZ ... OPC_DCLO: |
6056 | 6056 | check_insn(env, ctx, ISA_MIPS64); |
6057 | 6057 | check_mips_64(ctx); |
... | ... | @@ -6138,7 +6138,7 @@ static void decode_opc (CPUState *env, DisasContext *ctx) |
6138 | 6138 | gen_op_yield(); |
6139 | 6139 | GEN_STORE_TN_REG(rd, T0); |
6140 | 6140 | break; |
6141 | -#ifdef TARGET_MIPS64 | |
6141 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
6142 | 6142 | case OPC_DEXTM ... OPC_DEXT: |
6143 | 6143 | case OPC_DINSM ... OPC_DINS: |
6144 | 6144 | check_insn(env, ctx, ISA_MIPS64R2); |
... | ... | @@ -6200,7 +6200,7 @@ static void decode_opc (CPUState *env, DisasContext *ctx) |
6200 | 6200 | case OPC_MTC0: |
6201 | 6201 | case OPC_MFTR: |
6202 | 6202 | case OPC_MTTR: |
6203 | -#ifdef TARGET_MIPS64 | |
6203 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
6204 | 6204 | case OPC_DMFC0: |
6205 | 6205 | case OPC_DMTC0: |
6206 | 6206 | #endif |
... | ... | @@ -6321,7 +6321,7 @@ static void decode_opc (CPUState *env, DisasContext *ctx) |
6321 | 6321 | case OPC_CTC1: |
6322 | 6322 | gen_cp1(ctx, op1, rt, rd); |
6323 | 6323 | break; |
6324 | -#ifdef TARGET_MIPS64 | |
6324 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
6325 | 6325 | case OPC_DMFC1: |
6326 | 6326 | case OPC_DMTC1: |
6327 | 6327 | check_insn(env, ctx, ISA_MIPS3); |
... | ... | @@ -6404,7 +6404,7 @@ static void decode_opc (CPUState *env, DisasContext *ctx) |
6404 | 6404 | } |
6405 | 6405 | break; |
6406 | 6406 | |
6407 | -#ifdef TARGET_MIPS64 | |
6407 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
6408 | 6408 | /* MIPS64 opcodes */ |
6409 | 6409 | case OPC_LWU: |
6410 | 6410 | case OPC_LDL ... OPC_LDR: |
... | ... | @@ -6671,7 +6671,7 @@ void dump_fpu (CPUState *env) |
6671 | 6671 | } |
6672 | 6672 | } |
6673 | 6673 | |
6674 | -#if defined(TARGET_MIPS64) && defined(MIPS_DEBUG_SIGN_EXTENSIONS) | |
6674 | +#if (defined(TARGET_MIPSN32) || defined(TARGET_MIPS64)) && defined(MIPS_DEBUG_SIGN_EXTENSIONS) | |
6675 | 6675 | /* Debug help: The architecture requires 32bit code to maintain proper |
6676 | 6676 | sign-extened values on 64bit machines. */ |
6677 | 6677 | |
... | ... | @@ -6726,7 +6726,7 @@ void cpu_dump_state (CPUState *env, FILE *f, |
6726 | 6726 | env->CP0_Config0, env->CP0_Config1, env->CP0_LLAddr); |
6727 | 6727 | if (env->hflags & MIPS_HFLAG_FPU) |
6728 | 6728 | fpu_dump_state(env, f, cpu_fprintf, flags); |
6729 | -#if defined(TARGET_MIPS64) && defined(MIPS_DEBUG_SIGN_EXTENSIONS) | |
6729 | +#if (defined(TARGET_MIPSN32) || defined(TARGET_MIPS64)) && defined(MIPS_DEBUG_SIGN_EXTENSIONS) | |
6730 | 6730 | cpu_mips_check_sign_extensions(env, f, cpu_fprintf, flags); |
6731 | 6731 | #endif |
6732 | 6732 | } | ... | ... |
target-mips/translate_init.c
... | ... | @@ -201,7 +201,7 @@ static mips_def_t mips_defs[] = |
201 | 201 | (0x3fe << CP0SRSC4_SRS14) | (0x3fe << CP0SRSC4_SRS13), |
202 | 202 | .insn_flags = CPU_MIPS32R2 | ASE_MIPS16 | ASE_DSP, |
203 | 203 | }, |
204 | -#ifdef TARGET_MIPS64 | |
204 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
205 | 205 | { |
206 | 206 | .name = "R4000", |
207 | 207 | .CP0_PRid = 0x00000400, |
... | ... | @@ -416,7 +416,7 @@ int cpu_mips_register (CPUMIPSState *env, mips_def_t *def) |
416 | 416 | env->CP0_Status_rw_bitmask = def->CP0_Status_rw_bitmask; |
417 | 417 | env->CP0_TCStatus_rw_bitmask = def->CP0_TCStatus_rw_bitmask; |
418 | 418 | env->CP0_SRSCtl = def->CP0_SRSCtl; |
419 | -#ifdef TARGET_MIPS64 | |
419 | +#if defined(TARGET_MIPSN32) || defined(TARGET_MIPS64) | |
420 | 420 | if (def->insn_flags & ISA_MIPS3) |
421 | 421 | { |
422 | 422 | env->hflags |= MIPS_HFLAG_64; | ... | ... |