Index: src/trusted/service_runtime/linux/mips/sel_segments.c |
diff --git a/src/trusted/service_runtime/linux/mips/sel_segments.c b/src/trusted/service_runtime/linux/mips/sel_segments.c |
new file mode 100644 |
index 0000000000000000000000000000000000000000..3ac94017f1908619a84d4691725fc09dd516bbfc |
--- /dev/null |
+++ b/src/trusted/service_runtime/linux/mips/sel_segments.c |
@@ -0,0 +1,25 @@ |
+/* |
+ * 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. |
+ */ |
+ |
+#include <stdint.h> |
+#include "native_client/src/trusted/service_runtime/sel_util.h" |
+ |
+uint32_t NaClGetStackPtr(void) { |
+ uint32_t sp; |
+ |
+ asm("move %0, $sp" : "=r" (sp)); |
+ |
+ return sp; |
+} |
+ |
+uint32_t NaClGetGlobalPtr(void) { |
+ uint32_t gp; |
+ |
+ asm("move %0, $gp" : "=r" (gp)); |
+ |
+ return gp; |
+} |
+ |