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

Side by Side Diff: crosstest/test_stacksave_main.c

Issue 1273153002: Subzero. Native 64-bit int arithmetic on x86-64. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fixes tests & make format Created 5 years, 4 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 | « crosstest/test_select_main.cpp ('k') | crosstest/test_strengthreduce_main.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/crosstest/test_stacksave_main.c - Driver for tests ---------===// 1 //===- subzero/crosstest/test_stacksave_main.c - Driver for tests ---------===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 // 9 //
10 // Driver for cross testing stacksave/stackrestore intrinsics. 10 // Driver for cross testing stacksave/stackrestore intrinsics.
11 // 11 //
12 //===----------------------------------------------------------------------===// 12 //===----------------------------------------------------------------------===//
13 13
14 /* crosstest.py --test=test_stacksave.c --driver=test_stacksave_main.c \ 14 /* crosstest.py --test=test_stacksave.c --driver=test_stacksave_main.c \
15 --prefix=Subzero_ --output=test_stacksave */ 15 --prefix=Subzero_ --output=test_stacksave */
16 16
17 #include <inttypes.h> 17 #include <inttypes.h>
18 #include <stdint.h> 18 #include <stdint.h>
19 #include <stdio.h> 19 #include <stdio.h>
20 20
21 #include "test_stacksave.h" 21 #include "test_stacksave.h"
22 DECLARE_TESTS() 22 DECLARE_TESTS()
23 DECLARE_TESTS(Subzero_) 23 DECLARE_TESTS(Subzero_)
24 24
25 int main(int argc, char **argv) { 25 #ifdef X8664_STACK_HACK
26 int wrapped_main(int argc, char *argv[]) {
27 #else // !defined(X8664_STACK_HACK)
28 int main(int argc, char *argv[]) {
29 #endif // X8664_STACK_HACK
26 size_t TotalTests = 0; 30 size_t TotalTests = 0;
27 size_t Passes = 0; 31 size_t Passes = 0;
28 size_t Failures = 0; 32 size_t Failures = 0;
29 typedef uint32_t (*FuncType)(uint32_t, uint32_t, uint32_t); 33 typedef uint32_t (*FuncType)(uint32_t, uint32_t, uint32_t);
30 static struct { 34 static struct {
31 const char *Name; 35 const char *Name;
32 FuncType FuncLlc; 36 FuncType FuncLlc;
33 FuncType FuncSz; 37 FuncType FuncSz;
34 } Funcs[] = {{"test_basic_vla", test_basic_vla, Subzero_test_basic_vla}, 38 } Funcs[] = {{"test_basic_vla", test_basic_vla, Subzero_test_basic_vla},
35 {"test_vla_in_loop", test_vla_in_loop, Subzero_test_vla_in_loop}, 39 {"test_vla_in_loop", test_vla_in_loop, Subzero_test_vla_in_loop},
(...skipping 14 matching lines...) Expand all
50 printf("Failure %s: start=%" PRIu32 ", " 54 printf("Failure %s: start=%" PRIu32 ", "
51 "llc=%" PRIu32 ", sz=%" PRIu32 "\n", 55 "llc=%" PRIu32 ", sz=%" PRIu32 "\n",
52 Funcs[f].Name, start, llc_result, sz_result); 56 Funcs[f].Name, start, llc_result, sz_result);
53 } 57 }
54 } 58 }
55 } 59 }
56 printf("TotalTests=%zu Passes=%zu Failures=%zu\n", TotalTests, Passes, 60 printf("TotalTests=%zu Passes=%zu Failures=%zu\n", TotalTests, Passes,
57 Failures); 61 Failures);
58 return Failures; 62 return Failures;
59 } 63 }
OLDNEW
« no previous file with comments | « crosstest/test_select_main.cpp ('k') | crosstest/test_strengthreduce_main.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698