| OLD | NEW |
| 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 /* | 7 /* |
| 8 * get_x86_direction_flag() returns whether the x86 direction | 8 * get_x86_direction_flag() returns whether the x86 direction |
| 9 * flag is set. The normal way of reading the flag is to use | 9 * flag is set. The normal way of reading the flag is to use |
| 10 * "pushf", but this instruction is not allowed under NaCl. | 10 * "pushf", but this instruction is not allowed under NaCl. |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 mov %esp, %edi | 41 mov %esp, %edi |
| 42 movsb %ds:(%esi), %es:(%edi) | 42 movsb %ds:(%esi), %es:(%edi) |
| 43 | 43 |
| 44 /* Clear %eax */ | 44 /* Clear %eax */ |
| 45 xor %eax, %eax | 45 xor %eax, %eax |
| 46 /* This sets the bottom byte of %eax if %edi < %esp (unsigned) */ | 46 /* This sets the bottom byte of %eax if %edi < %esp (unsigned) */ |
| 47 cmp %esp, %edi | 47 cmp %esp, %edi |
| 48 setb %al | 48 setb %al |
| 49 | 49 |
| 50 add $4, %esp | 50 add $4, %esp |
| 51 #if defined(__native_client_nonsfi__) |
| 52 ret |
| 53 #else |
| 51 naclret | 54 naclret |
| 55 #endif |
| 52 | 56 |
| 53 #else | 57 #else |
| 54 # error Unknown platform | 58 # error Unknown platform |
| 55 #endif | 59 #endif |
| OLD | NEW |