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

Side by Side Diff: newlib/libc/string/memset.c

Issue 855013002: Make mem{cpy,move,set} pnacl bitcode disablement apply to biased bitcode. (Closed) Base URL: https://chromium.googlesource.com/native_client/nacl-newlib.git@master
Patch Set: comment everywhere Created 5 years, 11 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
« no previous file with comments | « newlib/libc/string/memmove.c ('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 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
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
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 */
OLDNEW
« no previous file with comments | « newlib/libc/string/memmove.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698