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

Side by Side Diff: wasm-tests/write_loop.c

Issue 1876413002: Subzero. WASM. Additional progress. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review feedback and merging with master Created 4 years, 8 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 | « wasm-tests/indirect.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
(Empty)
1 // This is derived from the loop in musl's __fwritex that looks for newlines.
2
3 int puts(const char *s);
4
5 int main(int argc, const char **argv) {
6 const char *p = (const char *)argv;
7 char *s = "Hello\nWorld";
8 unsigned i = 0;
9 // Depend on argc to avoid having this whole thing get dead-code-eliminated.
10 for (i = 14 - argc; i && p[i - 1] != '\n'; i--)
11 ;
12 puts(s);
13 return i;
14 }
OLDNEW
« no previous file with comments | « wasm-tests/indirect.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698