| OLD | NEW |
| 1 /* | 1 /* |
| 2 FUNCTION | 2 FUNCTION |
| 3 <<memset>>---set an area of memory | 3 <<memset>>---set an area of memory |
| 4 | 4 |
| 5 INDEX | 5 INDEX |
| 6 memset | 6 memset |
| 7 | 7 |
| 8 ANSI_SYNOPSIS | 8 ANSI_SYNOPSIS |
| 9 #include <string.h> | 9 #include <string.h> |
| 10 void *memset(void *<[dst]>, int <[c]>, size_t <[length]>); | 10 void *memset(void *<[dst]>, int <[c]>, size_t <[length]>); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 <<memset>> is ANSI C. | 28 <<memset>> is ANSI C. |
| 29 | 29 |
| 30 <<memset>> requires no supporting OS subroutines. | 30 <<memset>> requires no supporting OS subroutines. |
| 31 | 31 |
| 32 QUICKREF | 32 QUICKREF |
| 33 memset ansi pure | 33 memset ansi pure |
| 34 */ | 34 */ |
| 35 | 35 |
| 36 /* | 36 /* |
| 37 * The body of this function should not appear in PNaCl bitcode. | 37 * The body of this function should not appear in PNaCl bitcode. |
| 38 * We use PNACL_BITCODE instead of __le32__ or __pnacl__ since this |
| 39 * should also apply to biased bitcode. |
| 38 * See https://code.google.com/p/nativeclient/issues/detail?id=3493 | 40 * See https://code.google.com/p/nativeclient/issues/detail?id=3493 |
| 39 */ | 41 */ |
| 40 #ifndef __pnacl__ | 42 #ifndef PNACL_BITCODE |
| 41 | 43 |
| 42 #include <string.h> | 44 #include <string.h> |
| 43 #include "local.h" | 45 #include "local.h" |
| 44 | 46 |
| 45 #define LBLOCKSIZE (sizeof(long)) | 47 #define LBLOCKSIZE (sizeof(long)) |
| 46 #define UNALIGNED(X) ((long)X & (LBLOCKSIZE - 1)) | 48 #define UNALIGNED(X) ((long)X & (LBLOCKSIZE - 1)) |
| 47 #define TOO_SMALL(LEN) ((LEN) < LBLOCKSIZE) | 49 #define TOO_SMALL(LEN) ((LEN) < LBLOCKSIZE) |
| 48 | 50 |
| 49 _PTR | 51 _PTR |
| 50 __inhibit_loop_to_libcall | 52 __inhibit_loop_to_libcall |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 } | 104 } |
| 103 | 105 |
| 104 #endif /* not PREFER_SIZE_OVER_SPEED */ | 106 #endif /* not PREFER_SIZE_OVER_SPEED */ |
| 105 | 107 |
| 106 while (n--) | 108 while (n--) |
| 107 *s++ = (char) c; | 109 *s++ = (char) c; |
| 108 | 110 |
| 109 return m; | 111 return m; |
| 110 } | 112 } |
| 111 | 113 |
| 112 #endif /* __pnacl__ */ | 114 #endif /* PNACL_BITCODE */ |
| OLD | NEW |