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

Side by Side Diff: crosstest/test_bitmanip.cpp

Issue 401533002: Lower byte swap intrinsic. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: rebased Created 6 years, 5 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_bitmanip.h ('k') | crosstest/test_bitmanip.def » ('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_bitmanip.cpp - Implementation for tests. ----===// 1 //===- subzero/crosstest/test_bitmanip.cpp - Implementation 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 // This aims to test that all the bit manipulation intrinsics work, via 10 // This aims to test that all the bit manipulation intrinsics work, via
(...skipping 20 matching lines...) Expand all
31 sum += buf[i]; \ 31 sum += buf[i]; \
32 } \ 32 } \
33 return sum; \ 33 return sum; \
34 } \ 34 } \
35 type test_const_##inst(type ignored) { \ 35 type test_const_##inst(type ignored) { \
36 return my_##inst(static_cast<type>(0x12340)); \ 36 return my_##inst(static_cast<type>(0x12340)); \
37 } 37 }
38 38
39 FOR_ALL_BMI_OP_TYPES(X) 39 FOR_ALL_BMI_OP_TYPES(X)
40 #undef X 40 #undef X
41
42 #define X(type, builtin_name) \
43 type test_bswap(type a) { return builtin_name(a); }
44 BSWAP_TABLE
45 #undef X
OLDNEW
« no previous file with comments | « crosstest/test_bitmanip.h ('k') | crosstest/test_bitmanip.def » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698