2 * Copyright 2010 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can
4 * be found in the LICENSE file.
8 * NaCl test for super simple program not using newlib
11 #include "barebones.h"
14 /* globals are intentional to confuse optimizer */
24 myhextochar(l, buffer);
26 myprint(" expected ");
27 myhextochar(count, buffer);
38 int dump(const char *fmt, ...) {
49 for (i = 0; fmt[i]; ++i) {
51 long l = va_arg(ap, long);
53 } else if (fmt[i] == 'Q') {
54 long long ll = (long long) va_arg(ap, long long);
55 errors += cmp((long)((ll >> 32) & 0xffffffffL));
56 errors += cmp((long)(ll & 0xffffffffL));
58 myprint("Error bad format");
69 errors += dump("QQQL",
75 errors += dump("QQLQ",
79 0x0000000600000007LL);
81 errors += dump("QLQQ",
85 0x0000000600000007LL);
87 errors += dump("LQQQ",
91 0x0000000600000007LL);
96 0x0000000500000006LL);
98 errors += dump("LLLLLL",
110 NACL_SYSCALL(exit)(errors);