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

Unified Diff: crosstest/test_icmp.cpp

Issue 265703002: Add Om1 lowering with no optimizations (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Merge changed from Karl's committed CL Created 6 years, 7 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
« no previous file with comments | « crosstest/test_icmp.h ('k') | crosstest/test_icmp.def » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crosstest/test_icmp.cpp
diff --git a/crosstest/test_icmp.cpp b/crosstest/test_icmp.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..f1b144d4ded29010a3c82b4efd18deb98bcf75c5
--- /dev/null
+++ b/crosstest/test_icmp.cpp
@@ -0,0 +1,21 @@
+// This aims to test the icmp bitcode instruction across all PNaCl
+// primitive integer types.
+
+#include <stdint.h>
+
+#include "test_icmp.h"
+
+#define X(cmp, op) \
+ bool icmp##cmp(uint8_t a, uint8_t b) { return a op b; } \
+ bool icmp##cmp(uint16_t a, uint16_t b) { return a op b; } \
+ bool icmp##cmp(uint32_t a, uint32_t b) { return a op b; } \
+ bool icmp##cmp(uint64_t a, uint64_t b) { return a op b; }
+ICMP_U_TABLE
+#undef X
+#define X(cmp, op) \
+ bool icmp##cmp(int8_t a, int8_t b) { return a op b; } \
+ bool icmp##cmp(int16_t a, int16_t b) { return a op b; } \
+ bool icmp##cmp(int32_t a, int32_t b) { return a op b; } \
+ bool icmp##cmp(int64_t a, int64_t b) { return a op b; }
+ICMP_S_TABLE
+#undef X
« no previous file with comments | « crosstest/test_icmp.h ('k') | crosstest/test_icmp.def » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698