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

Side by Side Diff: src/nonsfi/irt/irt_interfaces.c

Issue 1412503002: PNaCl. Enables Unsandboxed nonsfi ARM32. (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: Addresses comment. Created 5 years, 1 month 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
« no previous file with comments | « no previous file | toolchain_build/pnacl_targetlibs.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2013 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 <assert.h> 7 #include <assert.h>
8 #include <errno.h> 8 #include <errno.h>
9 #include <fcntl.h> 9 #include <fcntl.h>
10 #include <limits.h> 10 #include <limits.h>
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 return g_tls_value; 355 return g_tls_value;
356 } 356 }
357 357
358 /* For newlib based nonsfi_loader, we use the one defined in pnacl_irt.c. */ 358 /* For newlib based nonsfi_loader, we use the one defined in pnacl_irt.c. */
359 #if !defined(__native_client__) 359 #if !defined(__native_client__)
360 void *__nacl_read_tp(void) { 360 void *__nacl_read_tp(void) {
361 return g_tls_value; 361 return g_tls_value;
362 } 362 }
363 #endif 363 #endif
364 364
365 #if defined(__arm_nonsfi_linux__)
366
367 __asm__(".pushsection .text, \"ax\", %progbits\n"
368 ".global __aeabi_read_tp\n"
369 ".type __aeabi_read_tp, %function\n"
370 ".arm\n"
371 "__aeabi_read_tp:\n"
372 "push {r1-r3, lr}\n"
373 "vpush {d0-d7}\n"
374 "blx aeabi_read_tp_impl\n"
375 "vpop {d0-d7}\n"
376 "pop {r1-r3, pc}\n"
377 ".popsection\n");
378
379 void *aeabi_read_tp_impl(void) {
380 return g_tls_value;
381 }
382
383 #endif
384
385
365 struct thread_args { 386 struct thread_args {
366 void (*start_func)(void); 387 void (*start_func)(void);
367 void *thread_ptr; 388 void *thread_ptr;
368 }; 389 };
369 390
370 static void *start_thread(void *arg) { 391 static void *start_thread(void *arg) {
371 struct thread_args args = *(struct thread_args *) arg; 392 struct thread_args args = *(struct thread_args *) arg;
372 free(arg); 393 free(arg);
373 g_tls_value = args.thread_ptr; 394 g_tls_value = args.thread_ptr;
374 args.start_func(); 395 args.start_func();
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 884
864 #if defined(DEFINE_MAIN) 885 #if defined(DEFINE_MAIN)
865 int main(int argc, char **argv, char **environ) { 886 int main(int argc, char **argv, char **environ) {
866 nacl_irt_nonsfi_allow_dev_interfaces(); 887 nacl_irt_nonsfi_allow_dev_interfaces();
867 nacl_entry_func_t entry_func = USER_START; 888 nacl_entry_func_t entry_func = USER_START;
868 889
869 return nacl_irt_nonsfi_entry(argc, argv, environ, entry_func, 890 return nacl_irt_nonsfi_entry(argc, argv, environ, entry_func,
870 nacl_irt_query_core); 891 nacl_irt_query_core);
871 } 892 }
872 #endif 893 #endif
OLDNEW
« no previous file with comments | « no previous file | toolchain_build/pnacl_targetlibs.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698