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

Side by Side Diff: src/untrusted/irt/aeabi_read_tp.S

Issue 8826003: Modify ARM .S code so it can be processed by both gnu-as and llvm-mc. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: '' Created 9 years 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 | Annotate | Revision Log
« no previous file with comments | « src/trusted/service_runtime/nacl.scons ('k') | no next file » | 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) 2011 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2011 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/trusted/service_runtime/nacl_config.h" 7 #include "native_client/src/trusted/service_runtime/nacl_config.h"
8 8
9 /* 9 /*
10 * The IRT uses its own private TLS, leaving r9 for the application. 10 * The IRT uses its own private TLS, leaving r9 for the application.
11 * We must define __aeabi_read_tp to get the private one instead of 11 * We must define __aeabi_read_tp to get the private one instead of
12 * the standard one. The EABI requires that this function preserve 12 * the standard one. The EABI requires that this function preserve
13 * all registers except r0 (the return value register). A normal 13 * all registers except r0 (the return value register). A normal
14 * function is permitted to clobber r1, r2, and r3 as well, so we 14 * function is permitted to clobber r1, r2, and r3 as well, so we
15 * cannot define this in C. 15 * cannot define this in C.
16 */ 16 */
17 17
18 .globl __aeabi_read_tp 18 .globl __aeabi_read_tp
19 .type __aeabi_read_tp,%function 19 .type __aeabi_read_tp,%function
20 .p2align NACL_BLOCK_SHIFT 20 .p2align NACL_BLOCK_SHIFT
21 __aeabi_read_tp: 21 __aeabi_read_tp:
22 push {r1, r2, r3, lr} 22 push {r1, r2, r3, lr}
23 23 nop
24 /* 24 nop
25 * Insert enough nops so the call is the last instruction in the bundle. 25 /* NOTE: The call must be last slot in the bundle.
26 * Consider using the pnacl specifc pseudo opcodes
27 * once we build this with llvm-mc only.
26 */ 28 */
27 .rept ((NACL_BLOCK_SIZE - (. - __aeabi_read_tp)) / 4) - 1
28 nop
29 .endr
30 bl __nacl_read_tp 29 bl __nacl_read_tp
31 30
32 pop {r1, r2, r3, lr} 31 pop {r1, r2, r3, lr}
33 bic lr, lr, #NACL_CONTROL_FLOW_MASK 32 bic lr, lr, #NACL_CONTROL_FLOW_MASK
34 bx lr 33 bx lr
OLDNEW
« no previous file with comments | « src/trusted/service_runtime/nacl.scons ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698