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

Unified Diff: crosstest/test_arith.cpp

Issue 1469113003: Subzero. ARM32. Strength reduce multiplications. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addresses comments. Created 5 years, 1 month 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_arith.h ('k') | crosstest/test_arith.def » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crosstest/test_arith.cpp
diff --git a/crosstest/test_arith.cpp b/crosstest/test_arith.cpp
index 47fd47b4d7deb4228bdc7f7d7ced5487d652c5cc..6ef2cc6878a6ec6ef1a19dd9c90486144120e2b6 100644
--- a/crosstest/test_arith.cpp
+++ b/crosstest/test_arith.cpp
@@ -49,3 +49,37 @@ SINTOP_TABLE
v4f32 test##inst(v4f32 a, v4f32 b) { return func(a op b); }
FPOP_TABLE
#undef X
+
+#define X(mult_by) \
+ bool testMultiplyBy##mult_by(bool a, bool /*unused*/) { \
+ return a * (mult_by); \
+ } \
+ bool testMultiplyByNeg##mult_by(bool a, bool /*unused*/) { \
+ return a * (-(mult_by)); \
+ } \
+ uint8_t testMultiplyBy##mult_by(uint8_t a, uint8_t /*unused*/) { \
+ return a * (mult_by); \
+ } \
+ uint8_t testMultiplyByNeg##mult_by(uint8_t a, uint8_t /*unused*/) { \
+ return a * (-(mult_by)); \
+ } \
+ uint16_t testMultiplyBy##mult_by(uint16_t a, uint16_t /*unused*/) { \
+ return a * (mult_by); \
+ } \
+ uint16_t testMultiplyByNeg##mult_by(uint16_t a, uint16_t /*unused*/) { \
+ return a * (-(mult_by)); \
+ } \
+ uint32_t testMultiplyBy##mult_by(uint32_t a, uint32_t /*unused*/) { \
+ return a * (mult_by); \
+ } \
+ uint32_t testMultiplyByNeg##mult_by(uint32_t a, uint32_t /*unused*/) { \
+ return a * (-(mult_by)); \
+ } \
+ uint64_t testMultiplyBy##mult_by(uint64_t a, uint64_t /*unused*/) { \
+ return a * (mult_by); \
+ } \
+ uint64_t testMultiplyByNeg##mult_by(uint64_t a, uint64_t /*unused*/) { \
+ return a * (-(mult_by)); \
+ }
+MULIMM_TABLE
+#undef X
« no previous file with comments | « crosstest/test_arith.h ('k') | crosstest/test_arith.def » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698