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

Side by Side Diff: native_client/src/trusted/service_runtime/arch/arm/tramp.S

Issue 293009: Mark assembly routines that don't need to be exported as hidden (Closed) Base URL: http://nativeclient.googlecode.com/svn/trunk/src/native_client/
Patch Set: '' Created 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright 2009, Google Inc. 2 * Copyright 2009, Google Inc.
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 26 matching lines...) Expand all
37 * Each trampoline code segment corresponds to a system call, so the trampoline 37 * Each trampoline code segment corresponds to a system call, so the trampoline
38 * region is full of identical trampoline code segments. Service runtime 38 * region is full of identical trampoline code segments. Service runtime
39 * distinguish which system call is requested using the address of an executed 39 * distinguish which system call is requested using the address of an executed
40 * trampoline (it is saved on stack in NaClSyscallSeg()). 40 * trampoline (it is saved on stack in NaClSyscallSeg()).
41 */ 41 */
42 42
43 #include "native_client/src/trusted/service_runtime/nacl_config.h" 43 #include "native_client/src/trusted/service_runtime/nacl_config.h"
44 44
45 45
46 .text 46 .text
47 .globl IDENTIFIER(NaCl_trampoline_seg_code)
48 .globl IDENTIFIER(NaCl_trampoline_seg_end)
49 47
48 .globl IDENTIFIER(NaCl_trampoline_seg_code)
49 HIDDEN(NaCl_trampoline_seg_code)
50 IDENTIFIER(NaCl_trampoline_seg_code): 50 IDENTIFIER(NaCl_trampoline_seg_code):
51 /* 51 /*
52 * ARM passes parameters to a callee in registers r0-r3. If there are more 52 * ARM passes parameters to a callee in registers r0-r3. If there are more
53 * than 4 parameters, the first four args are passed in registers the rest are 53 * than 4 parameters, the first four args are passed in registers the rest are
54 * placed on the stack. This code pushes all parameters from registers into the 54 * placed on the stack. This code pushes all parameters from registers into the
55 * stack; thus, we keep all parameters on the stack as follows: 55 * stack; thus, we keep all parameters on the stack as follows:
56 * top - arg0, arg1, arg2, arg3 .... argN 56 * top - arg0, arg1, arg2, arg3 .... argN
57 * 57 *
58 * On top of that we push the return address, so we will know where to return 58 * On top of that we push the return address, so we will know where to return
59 * after the system call. 59 * after the system call.
(...skipping 17 matching lines...) Expand all
77 push {r0, r1, r2, r3} 77 push {r0, r1, r2, r3}
78 push {lr} 78 push {lr}
79 79
80 ldr r0, [pc, #4] 80 ldr r0, [pc, #4]
81 blx r0 81 blx r0
82 82
83 /* NORETURN */ 83 /* NORETURN */
84 NACL_HALT 84 NACL_HALT
85 85
86 .word NaClSyscallSeg 86 .word NaClSyscallSeg
87 .globl IDENTIFIER(NaCl_trampoline_seg_end)
88 HIDDEN(NaCl_trampoline_seg_end)
87 IDENTIFIER(NaCl_trampoline_seg_end): 89 IDENTIFIER(NaCl_trampoline_seg_end):
88
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698