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

Side by Side Diff: runtime/szrt.c

Issue 877003003: Subzero: Use a "known" version of clang-format. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Add a clang-format blacklist. Fix formatting "errors". Created 5 years, 10 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_sync_atomic_main.cpp ('k') | src/IceCfg.h » ('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/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) { 18 void ice_unreachable(void) { abort(); }
19 abort();
20 }
21 19
22 uint32_t cvtftoui32(float value) { 20 uint32_t cvtftoui32(float value) { return (uint32_t)value; }
23 return (uint32_t) value;
24 }
25 21
26 uint32_t cvtdtoui32(double value) { 22 uint32_t cvtdtoui32(double value) { return (uint32_t)value; }
27 return (uint32_t) value;
28 }
29 23
30 int64_t cvtftosi64(float value) { 24 int64_t cvtftosi64(float value) { return (int64_t)value; }
31 return (int64_t) value;
32 }
33 25
34 int64_t cvtdtosi64(double value) { 26 int64_t cvtdtosi64(double value) { return (int64_t)value; }
35 return (int64_t) value;
36 }
37 27
38 uint64_t cvtftoui64(float value) { 28 uint64_t cvtftoui64(float value) { return (uint64_t)value; }
39 return (uint64_t) value;
40 }
41 29
42 uint64_t cvtdtoui64(double value) { 30 uint64_t cvtdtoui64(double value) { return (uint64_t)value; }
43 return (uint64_t) value;
44 }
45 31
46 float cvtui32tof(uint32_t value) { 32 float cvtui32tof(uint32_t value) { return (float)value; }
47 return (float) value;
48 }
49 33
50 float cvtsi64tof(int64_t value) { 34 float cvtsi64tof(int64_t value) { return (float)value; }
51 return (float) value;
52 }
53 35
54 float cvtui64tof(uint64_t value) { 36 float cvtui64tof(uint64_t value) { return (float)value; }
55 return (float) value;
56 }
57 37
58 double cvtui32tod(uint32_t value) { 38 double cvtui32tod(uint32_t value) { return (double)value; }
59 return (double) value;
60 }
61 39
62 double cvtsi64tod(int64_t value) { 40 double cvtsi64tod(int64_t value) { return (double)value; }
63 return (double) value;
64 }
65 41
66 double cvtui64tod(uint64_t value) { 42 double cvtui64tod(uint64_t value) { return (double)value; }
67 return (double) value;
68 }
69 43
70 /* TODO(stichnot): 44 /* TODO(stichnot):
71 Sz_bitcast_v8i1_to_i8 45 Sz_bitcast_v8i1_to_i8
72 Sz_bitcast_v16i1_to_i16 46 Sz_bitcast_v16i1_to_i16
73 Sz_bitcast_i8_to_v8i1 47 Sz_bitcast_i8_to_v8i1
74 Sz_bitcast_i16_to_v16i1 48 Sz_bitcast_i16_to_v16i1
75 */ 49 */
OLDNEW
« no previous file with comments | « crosstest/test_sync_atomic_main.cpp ('k') | src/IceCfg.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698