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

Side by Side Diff: src/trusted/service_runtime/arch/mips/nacl_tls.c

Issue 1536713003: [MIPS] Make $t8 point to the address of TLS pointers (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client@master
Patch Set: Move EditMipsCode() below EditArmCode(). Created 4 years, 11 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 #include "native_client/src/include/nacl_platform.h" 7 #include "native_client/src/include/nacl_platform.h"
8 #include "native_client/src/include/nacl_macros.h" 8 #include "native_client/src/include/nacl_macros.h"
9 #include "native_client/src/include/portability.h" 9 #include "native_client/src/include/portability.h"
10 #include "native_client/src/shared/platform/nacl_check.h" 10 #include "native_client/src/shared/platform/nacl_check.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 * Bias by 1: successful return value is never 0. 101 * Bias by 1: successful return value is never 0.
102 */ 102 */
103 return idx + 1; 103 return idx + 1;
104 } 104 }
105 105
106 106
107 void NaClTlsFree(struct NaClAppThread *natp) { 107 void NaClTlsFree(struct NaClAppThread *natp) {
108 uint32_t idx = NaClGetThreadIdx(natp); 108 uint32_t idx = NaClGetThreadIdx(natp);
109 NaClLog(2, 109 NaClLog(2,
110 "NaClTlsFree: old idx %d $tp %x\n", 110 "NaClTlsFree: old idx %d $tp %x\n",
111 idx, natp->user.t8); 111 idx, natp->user.tls_value1);
112 112
113 NaClXMutexLock(&gNaClTlsMu); 113 NaClXMutexLock(&gNaClTlsMu);
114 gNaClThreadIdxInUse[idx - 1] = 0; 114 gNaClThreadIdxInUse[idx - 1] = 0;
115 NaClXMutexUnlock(&gNaClTlsMu); 115 NaClXMutexUnlock(&gNaClTlsMu);
116 116
117 natp->user.t8 = 0; 117 natp->user.t8 = 0;
118 } 118 }
119 119
120 120
121 void NaClTlsSetTlsValue1(struct NaClAppThread *natp, uint32_t value) { 121 void NaClTlsSetTlsValue1(struct NaClAppThread *natp, uint32_t value) {
122 natp->user.t8 = value; 122 natp->user.tls_value1 = value;
123 } 123 }
124 124
125 125
126 void NaClTlsSetTlsValue2(struct NaClAppThread *natp, uint32_t value) { 126 void NaClTlsSetTlsValue2(struct NaClAppThread *natp, uint32_t value) {
127 natp->user.tls_value2 = value; 127 natp->user.tls_value2 = value;
128 } 128 }
129 129
130 130
131 uint32_t NaClTlsGetTlsValue1(struct NaClAppThread *natp) { 131 uint32_t NaClTlsGetTlsValue1(struct NaClAppThread *natp) {
132 return natp->user.t8; 132 return natp->user.tls_value1;
133 } 133 }
134 134
135 135
136 uint32_t NaClTlsGetTlsValue2(struct NaClAppThread *natp) { 136 uint32_t NaClTlsGetTlsValue2(struct NaClAppThread *natp) {
137 return natp->user.tls_value2; 137 return natp->user.tls_value2;
138 } 138 }
OLDNEW
« no previous file with comments | « src/trusted/service_runtime/arch/mips/nacl_syscall.S ('k') | src/trusted/service_runtime/arch/mips/sel_rt.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698