Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1179)

Unified Diff: src/trusted/service_runtime/arch/mips/sel_rt.h

Issue 10919162: [MIPS] Implementation of sel_ldr for MIPS architecture. (Closed) Base URL: http://src.chromium.org/native_client/trunk/src/native_client/
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/trusted/service_runtime/arch/mips/sel_rt.h
diff --git a/src/trusted/service_runtime/arch/mips/sel_rt.h b/src/trusted/service_runtime/arch/mips/sel_rt.h
new file mode 100644
index 0000000000000000000000000000000000000000..1db2c570a5ba1fc8f2cb5d09ec71a0ae69c6f35c
--- /dev/null
+++ b/src/trusted/service_runtime/arch/mips/sel_rt.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2012 The Native Client Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can
+ * be found in the LICENSE file.
+ */
+
+/*
+ * NaCl Secure Runtime
+ */
+
+#ifndef __NATIVE_CLIENT_SERVICE_RUNTIME_ARCH_MIPS_SEL_RT_H__
+#define __NATIVE_CLIENT_SERVICE_RUNTIME_ARCH_MIPS_SEL_RT_H__ 1
+
+#include "native_client/src/include/portability.h"
+
+uint32_t NaClGetStackPtr(void);
+uint32_t NaClGetGlobalPtr(void);
+
+typedef uint32_t nacl_reg_t;
+
+#define NACL_PRIdNACL_REG NACL_PRId32
+#define NACL_PRIiNACL_REG NACL_PRIi32
+#define NACL_PRIoNACL_REG NACL_PRIo32
+#define NACL_PRIuNACL_REG NACL_PRIu32
+#define NACL_PRIxNACL_REG NACL_PRIx32
+#define NACL_PRIXNACL_REG NACL_PRIX32
+
+/*
+ * NOTE: This struct needs to be synchronized with NACL_CALLEE_SAVE_LIST
+ */
+
+struct NaClThreadContext {
+ nacl_reg_t t6, t7, s0, s1, s2, s3, s4, s5, s6, s7, t8,
+ /* 0 4 8 c 10 14 18 1c 20 24 28 */
+
+ global_ptr, stack_ptr, frame_ptr, prog_ctr;
+ /* 2c 30 34 38 */
+
+ /*
+ * sys_ret and new_prog_ctr are not a part of the thread's register set,
+ * but are needed by NaClSwitch. By including them here, the two
+ * use the same interface.
+ */
+ uint32_t sysret;
+ /* 3c */
+ uint32_t new_prog_ctr;
+ /* 40 */
+ uint32_t trusted_stack_ptr;
+ /* 44 */
+ uint32_t tls_idx;
+ /* 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.
+};
+
+#endif /* __NATIVE_CLIENT_SERVICE_RUNTIME_ARCH_MIPS_SEL_RT_H___ */

Powered by Google App Engine
This is Rietveld 408576698