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

Unified Diff: pnacl/support/tls_get_addr.S

Issue 11039026: [MIPS] Untrusted versions of setjmp and longjmp. (Closed) Base URL: http://src.chromium.org/native_client/trunk/src/native_client/
Patch Set: Created 8 years, 2 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
« pnacl/support/setjmp_mips32.S ('K') | « pnacl/support/setjmp_mips32.S ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pnacl/support/tls_get_addr.S
diff --git a/pnacl/support/tls_get_addr.S b/pnacl/support/tls_get_addr.S
new file mode 100644
index 0000000000000000000000000000000000000000..bda31bbbc6875752a5e19bfe5b65125d5224b90f
--- /dev/null
+++ b/pnacl/support/tls_get_addr.S
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 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 "nacl_mips_defs.h"
+
+/* ====================================================================== */
+/* Some runtime code for Mips */
+/* Access to tls. */
+/* ====================================================================== */
+ .text
+ .align NACL_BLOCK_SHIFT
+ .global __tls_get_addr
+
+__tls_get_addr:
Mark Seaborn 2012/10/03 00:46:33 This function returns the thread's user thread poi
petarj 2012/10/03 16:50:01 Correct.
Mark Seaborn 2012/10/03 20:02:54 Wow, that's a long time ago! We renamed the wrong
+ move $v0, $t8
+ addiu $v0, $v0, 0x7000
Mark Seaborn 2012/10/03 00:46:33 What is 0x7000 for?
petarj 2012/10/03 16:50:01 $t8 points to the start of the TLS data area. The
Mark Seaborn 2012/10/03 20:02:54 Hmm, yes, I found some references to that by searc
petarj 2012/10/05 17:26:44 The best documentation I can point you to is: htt
+ and $ra, $ra, JUMP_MASK
+ jr $ra
+ nop
+
« pnacl/support/setjmp_mips32.S ('K') | « pnacl/support/setjmp_mips32.S ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698