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 |
+ |