OLD | NEW |
---|---|
(Empty) | |
1 /* | |
2 * Copyright 2012 The Native Client Authors. All rights reserved. | |
3 * Use of this source code is governed by a BSD-style license that can | |
4 * be found in the LICENSE file. | |
5 */ | |
6 | |
7 /* | |
8 * NaCl Secure Runtime | |
9 */ | |
10 | |
11 #ifndef __NATIVE_CLIENT_SERVICE_RUNTIME_ARCH_MIPS_SEL_RT_H__ | |
12 #define __NATIVE_CLIENT_SERVICE_RUNTIME_ARCH_MIPS_SEL_RT_H__ 1 | |
13 | |
14 #include "native_client/src/include/portability.h" | |
15 | |
16 uint32_t NaClGetStackPtr(void); | |
17 uint32_t NaClGetGlobalPtr(void); | |
18 | |
19 typedef uint32_t nacl_reg_t; | |
20 | |
21 #define NACL_PRIdNACL_REG NACL_PRId32 | |
22 #define NACL_PRIiNACL_REG NACL_PRIi32 | |
23 #define NACL_PRIoNACL_REG NACL_PRIo32 | |
24 #define NACL_PRIuNACL_REG NACL_PRIu32 | |
25 #define NACL_PRIxNACL_REG NACL_PRIx32 | |
26 #define NACL_PRIXNACL_REG NACL_PRIX32 | |
27 | |
28 /* | |
29 * NOTE: This struct needs to be synchronized with NACL_CALLEE_SAVE_LIST | |
30 */ | |
31 | |
32 struct NaClThreadContext { | |
33 nacl_reg_t t6, t7, s0, s1, s2, s3, s4, s5, s6, s7, t8, | |
34 /* 0 4 8 c 10 14 18 1c 20 24 28 */ | |
35 | |
36 global_ptr, stack_ptr, frame_ptr, prog_ctr; | |
37 /* 2c 30 34 38 */ | |
38 | |
39 /* | |
40 * sys_ret and new_prog_ctr are not a part of the thread's register set, | |
41 * but are needed by NaClSwitch. By including them here, the two | |
42 * use the same interface. | |
43 */ | |
44 uint32_t sysret; | |
45 /* 3c */ | |
46 uint32_t new_prog_ctr; | |
47 /* 40 */ | |
48 uint32_t trusted_stack_ptr; | |
49 /* 44 */ | |
50 uint32_t tls_idx; | |
51 /* 48 */ | |
Mark Seaborn
2012/09/08 02:43:14
As I noted elsewhere, can you add #defines for the
petarj
2012/09/11 16:58:13
Done.
Mark Seaborn
2012/09/13 19:44:36
Thanks. Can you add a NaClThreadContextOffsetChec
petarj
2012/09/18 00:22:15
Done.
| |
52 }; | |
53 | |
54 #endif /* __NATIVE_CLIENT_SERVICE_RUNTIME_ARCH_MIPS_SEL_RT_H___ */ | |
OLD | NEW |