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

Side by Side Diff: crosstest/vectors.h

Issue 435353002: Subzero: Fix and clean up some cross tests. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Fix newlines and filename 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 unified diff | Download patch
« no previous file with comments | « crosstest/test_vector_ops_main.cpp ('k') | crosstest/vectors.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/vectors.h - Common SIMD vector utilies -*- C++ -*-===// 1 //===- subzero/crosstest/vectors.h - Common SIMD vector utilies -*- C++ -*-===//
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 file provides declarations for PNaCl portable SIMD vector types. In 10 // This file provides declarations for PNaCl portable SIMD vector types. In
11 // addition, this file provides utilies that may be useful for crosstesting 11 // addition, this file provides utilies that may be useful for crosstesting
12 // vector code. 12 // vector code.
13 // 13 //
14 //===----------------------------------------------------------------------===// 14 //===----------------------------------------------------------------------===//
15 15
16 #ifndef VECTORS_H 16 #ifndef VECTORS_H
17 #define VECTORS_H 17 #define VECTORS_H
18 18
19 #include <stdint.h> 19 #include <stdint.h>
20 #include <string> 20 #include <string>
21 #include <sstream> 21 #include <sstream>
22 22
23 // The driver and the test program may be compiled by different
24 // versions of clang, with different standard libraries that have
25 // different definitions of int8_t. Specifically, int8_t may be
26 // typedef'd as either 'char' or 'signed char', which mangle to
27 // different strings. Avoid int8_t and use an explicit myint8_t.
28 typedef signed char myint8_t;
29
23 #include "vectors.def" 30 #include "vectors.def"
24 31
25 // PNaCl portable vector types 32 // PNaCl portable vector types
26 // Types declared: v4si32, v4ui32, v8si16, v8ui16, v16si8, v16ui8, v4f32 33 // Types declared: v4si32, v4ui32, v8si16, v8ui16, v16si8, v16ui8, v4f32
27 #define X(ty, eltty, castty) typedef eltty ty __attribute__((vector_size(16))); 34 #define X(ty, eltty, castty) typedef eltty ty __attribute__((vector_size(16)));
28 VECTOR_TYPE_TABLE 35 VECTOR_TYPE_TABLE
29 #undef X 36 #undef X
30 37
31 // i1 vector types are not native C++ SIMD vector types. Instead, for 38 // i1 vector types are not native C++ SIMD vector types. Instead, for
32 // testing, they are expanded by the test code into native 128 bit 39 // testing, they are expanded by the test code into native 128 bit
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 return State; 108 return State;
102 } 109 }
103 110
104 private: 111 private:
105 uint32_t State; 112 uint32_t State;
106 }; 113 };
107 114
108 } // end anonymous namespace 115 } // end anonymous namespace
109 116
110 #endif // VECTORS_H 117 #endif // VECTORS_H
OLDNEW
« no previous file with comments | « crosstest/test_vector_ops_main.cpp ('k') | crosstest/vectors.def » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698