OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The Native Client Authors. All rights reserved. | 2 * Copyright 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 #include "native_client/src/trusted/service_runtime/include/bits/nacl_syscalls.h
" | 6 #include "native_client/src/trusted/service_runtime/include/bits/nacl_syscalls.h
" |
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 #if defined(PNACL_AS) | 9 #if defined(PNACL_AS) |
10 #define call naclcall | 10 #define call naclcall |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 | 121 |
122 leaq end_of_text, %rsi | 122 leaq end_of_text, %rsi |
123 movq $1, %rdi | 123 movq $1, %rdi |
124 call write_num_16 | 124 call write_num_16 |
125 | 125 |
126 movq $'\n', %rsi | 126 movq $'\n', %rsi |
127 movq $1, %rdi | 127 movq $1, %rdi |
128 call write_char | 128 call write_char |
129 | 129 |
130 movq $0, %rdi | 130 movq $0, %rdi |
131 movq $NACL_SYSCALL_ADDR(NACL_sys_sysbrk), %r10 | 131 movq $NACL_SYSCALL_ADDR(NACL_sys_brk), %r10 |
132 naclcall %r10d,%r15 | 132 naclcall %r10d,%r15 |
133 | 133 |
134 xorq %r12, %r12 /* r12 holds our eventual exit status */ | 134 xorq %r12, %r12 /* r12 holds our eventual exit status */ |
135 cmpl $EXPECTED_BREAK, %eax | 135 cmpl $EXPECTED_BREAK, %eax |
136 je brk_sane | 136 je brk_sane |
137 movq $1, %r12 | 137 movq $1, %r12 |
138 brk_sane: | 138 brk_sane: |
139 | 139 |
140 movq %rax, %rsi | 140 movq %rax, %rsi |
141 movq $1, %rdi | 141 movq $1, %rdi |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 #else | 199 #else |
200 .skip TEXT_EXTEND - (. - start_of_text), 0xf4 | 200 .skip TEXT_EXTEND - (. - start_of_text), 0xf4 |
201 #endif | 201 #endif |
202 end_of_text: | 202 end_of_text: |
203 | 203 |
204 #if defined(EXPECTED_RODATA) | 204 #if defined(EXPECTED_RODATA) |
205 .section .rodata | 205 .section .rodata |
206 ro_str: .ascii "Hello world\n" | 206 ro_str: .ascii "Hello world\n" |
207 /* 123456789012 */ | 207 /* 123456789012 */ |
208 #endif | 208 #endif |
OLD | NEW |