OLD | NEW |
1 //===- subzero/runtime/szrt.c - Subzero runtime source ----------*- C++ -*-===// | 1 //===- subzero/runtime/szrt.c - Subzero runtime source ----------*- 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 implements the runtime helper routines that are needed by | 10 // This file implements the runtime helper routines that are needed by |
11 // Subzero. This needs to be compiled by some non-Subzero compiler. | 11 // Subzero. This needs to be compiled by some non-Subzero compiler. |
12 // | 12 // |
13 //===----------------------------------------------------------------------===// | 13 //===----------------------------------------------------------------------===// |
14 | 14 |
15 #include <stdint.h> | 15 #include <stdint.h> |
16 #include <stdlib.h> | 16 #include <stdlib.h> |
17 | 17 |
18 void ice_unreachable(void) { abort(); } | |
19 | |
20 uint32_t cvtftoui32(float value) { return (uint32_t)value; } | 18 uint32_t cvtftoui32(float value) { return (uint32_t)value; } |
21 | 19 |
22 uint32_t cvtdtoui32(double value) { return (uint32_t)value; } | 20 uint32_t cvtdtoui32(double value) { return (uint32_t)value; } |
23 | 21 |
24 int64_t cvtftosi64(float value) { return (int64_t)value; } | 22 int64_t cvtftosi64(float value) { return (int64_t)value; } |
25 | 23 |
26 int64_t cvtdtosi64(double value) { return (int64_t)value; } | 24 int64_t cvtdtosi64(double value) { return (int64_t)value; } |
27 | 25 |
28 uint64_t cvtftoui64(float value) { return (uint64_t)value; } | 26 uint64_t cvtftoui64(float value) { return (uint64_t)value; } |
29 | 27 |
(...skipping 10 matching lines...) Expand all Loading... |
40 double cvtsi64tod(int64_t value) { return (double)value; } | 38 double cvtsi64tod(int64_t value) { return (double)value; } |
41 | 39 |
42 double cvtui64tod(uint64_t value) { return (double)value; } | 40 double cvtui64tod(uint64_t value) { return (double)value; } |
43 | 41 |
44 /* TODO(stichnot): | 42 /* TODO(stichnot): |
45 Sz_bitcast_v8i1_to_i8 | 43 Sz_bitcast_v8i1_to_i8 |
46 Sz_bitcast_v16i1_to_i16 | 44 Sz_bitcast_v16i1_to_i16 |
47 Sz_bitcast_i8_to_v8i1 | 45 Sz_bitcast_i8_to_v8i1 |
48 Sz_bitcast_i16_to_v16i1 | 46 Sz_bitcast_i16_to_v16i1 |
49 */ | 47 */ |
OLD | NEW |