Home | History | Annotate | Download | only in crosstest

Lines Matching refs:cast

1 //===- subzero/crosstest/test_cast.cpp - Cast operator tests --------------===//
10 // Implementation for crosstesting cast operations.
22 ToType __attribute__((noinline)) cast(FromType a) {
32 ToType __attribute__((noinline)) cast(int i, FromType a, int j) {
46 // cast<A,B>() to be instantiated in the resulting bitcode file for
49 static ToType f(bool a) { return cast<bool, ToType>(a); }
50 static ToType f(myint8_t a) { return cast<myint8_t, ToType>(a); }
51 static ToType f(uint8_t a) { return cast<uint8_t, ToType>(a); }
52 static ToType f(int16_t a) { return cast<int16_t, ToType>(a); }
53 static ToType f(uint16_t a) { return cast<uint16_t, ToType>(a); }
54 static ToType f(int32_t a) { return cast<int32_t, ToType>(a); }
55 static ToType f(uint32_t a) { return cast<uint32_t, ToType>(a); }
56 static ToType f(int64 a) { return cast<int64, ToType>(a); }
57 static ToType f(uint64 a) { return cast<uint64, ToType>(a); }
58 static ToType f(float a) { return cast<float, ToType>(a); }
59 static ToType f(double a) { return cast<double, ToType>(a); }
60 static ToType f(int i, bool a) { return cast<bool, ToType>(i, a, i); }
61 static ToType f(int i, myint8_t a) { return cast<myint8_t, ToType>(i, a, i); }
62 static ToType f(int i, uint8_t a) { return cast<uint8_t, ToType>(i, a, i); }
63 static ToType f(int i, int16_t a) { return cast<int16_t, ToType>(i, a, i); }
64 static ToType f(int i, uint16_t a) { return cast<uint16_t, ToType>(i, a, i); }
65 static ToType f(int i, int32_t a) { return cast<int32_t, ToType>(i, a, i); }
66 static ToType f(int i, uint32_t a) { return cast<uint32_t, ToType>(i, a, i); }
67 static ToType f(int i, int64 a) { return cast<int64, ToType>(i, a, i); }
68 static ToType f(int i, uint64 a) { return cast<uint64, ToType>(i, a, i); }
69 static ToType f(int i, float a) { return cast<float, ToType>(i, a, i); }
70 static ToType f(int i, double a) { return cast<double, ToType>(i, a, i); }
74 // casts to bool using icmp instead of the desired cast instruction.