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

Unified Diff: tests/toolchain/needs_libgcc.c

Issue 454593002: PNaCl driver: Add libgcc to mixed native/bitcode links (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: fix 80col and comment typo Created 6 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 side-by-side diff with in-line comments
Download patch
Index: tests/toolchain/needs_libgcc.c
diff --git a/tests/toolchain/needs_libgcc.c b/tests/toolchain/needs_libgcc.c
new file mode 100644
index 0000000000000000000000000000000000000000..9d7aff2ef61074ac36c9698ac5eff2370d245ddd
--- /dev/null
+++ b/tests/toolchain/needs_libgcc.c
@@ -0,0 +1,18 @@
+/*
+ * Copyright (c) 2014 The Native Client Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+#include <stdint.h>
Mark Seaborn 2014/08/07 23:13:02 Nit: add empty line before this
Derek Schuff 2014/08/08 21:11:55 Done.
+#include <stdlib.h>
+
+int main(int argc, char *argv[]) {
+ if (argc < 3)
+ return 1;
+ uint64_t a = atoll(argv[1]);
+ uint64_t b = atoll(argv[2]);
+ /* 64-bit divide uses a libgcc/compiler-rt call on x86-32 and ARM. */
+ if (a / b == 3ULL)
+ return 0;
+ return 1;
+}

Powered by Google App Engine
This is Rietveld 408576698