blob: 85e5a83463d5d5eb8ba02678c544a2fbab2de15b [file] [log] [blame]
Chris Lattnerff5380f2009-06-30 22:56:43 +00001<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
3<!-- Material used from: HTML 4.01 specs: http://www.w3.org/TR/html401/ -->
4<html>
5<head>
6 <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
Chris Lattnerc1346742009-07-01 17:16:20 +00007 <title>"compiler-rt" Runtime Library</title>
Chris Lattnerff5380f2009-06-30 22:56:43 +00008 <link type="text/css" rel="stylesheet" href="menu.css">
9 <link type="text/css" rel="stylesheet" href="content.css">
10</head>
Chris Lattner135bcdf2009-07-02 21:34:35 +000011
Chris Lattnerff5380f2009-06-30 22:56:43 +000012<body>
13<!--#include virtual="menu.html.incl"-->
14<div id="content">
15 <!--*********************************************************************-->
Chris Lattnerc1346742009-07-01 17:16:20 +000016 <h1>"compiler-rt" Runtime Library</h1>
Chris Lattnerff5380f2009-06-30 22:56:43 +000017 <!--*********************************************************************-->
18
Chris Lattnerc1346742009-07-01 17:16:20 +000019 <p>The compiler-rt project is a simple library that provides an implementation
Chris Lattnerff5380f2009-06-30 22:56:43 +000020 of the low-level target-specific hooks required by code generation and
21 other runtime components. For example, when compiling for a 32-bit target,
22 converting a double to a 64-bit unsigned integer is compiling into a runtime
Chris Lattnerc1346742009-07-01 17:16:20 +000023 call to the "__fixunsdfdi" function. The compiler-rt library provides
Chris Lattnerff5380f2009-06-30 22:56:43 +000024 optimized implementations of this and other low-level routines.</p>
Chris Lattnereb561be2009-07-02 21:29:19 +000025
Chris Lattner4b121962010-11-16 21:34:56 +000026 <p>All of the code in the compiler-rt project is <a
27 href="http://llvm.org/docs/DeveloperPolicy.html#license">dual licensed</a>
28 under the MIT license and the UIUC License (a BSD-like license).</p>
Daniel Dunbar0ec64ce2011-12-07 18:43:12 +000029
30 <!--=====================================================================-->
31 <h2 id="users">Clients</h2>
32 <!--=====================================================================-->
33
34 <p>Currently compiler-rt is primarily used by
35 the <a href="http://clang.llvm.org">Clang</a>
36 and <a href="http://llvm.org">LLVM</a> projects as the implementation for
37 the runtime compiler support libraries. The library currently provides both
38 the low-level target-specific hooks required by code generation, as well as
39 additional modules for supporting the runtime requirements of features like
40 code coverage, profiling, or address sanitizer (ASAN) instrumentation.</p>
41
42 <p>For more information on using compiler-rt with Clang, please see the Clang
43 <a href="http://clang.llvm.org/get_started.html">Getting Started</a>
44 page.</p>
Chris Lattnerff5380f2009-06-30 22:56:43 +000045
46 <!--=====================================================================-->
47 <h2 id="goals">Goals</h2>
48 <!--=====================================================================-->
49
Chris Lattnerc1346742009-07-01 17:16:20 +000050 <p>Different targets require different routines. The compiler-rt project aims
Chris Lattnerff5380f2009-06-30 22:56:43 +000051 to implement these routines in both target-independent C form as well as
52 providing heavily optimized assembly versions of the routines in some
Chris Lattnerc1346742009-07-01 17:16:20 +000053 cases. It should be very easy to bring compiler-rt to support a new
Chris Lattnerff5380f2009-06-30 22:56:43 +000054 target by adding the new routines needed by that target.</p>
55
Chris Lattnerc1346742009-07-01 17:16:20 +000056 <p>Where it make sense, the compiler-rt project aims to implement interfaces
Chris Lattnerff5380f2009-06-30 22:56:43 +000057 that are drop-in compatible with the libgcc interfaces.</p>
58
59 <!--=====================================================================-->
60 <h2 id="features">Features</h2>
61 <!--=====================================================================-->
62
Chris Lattnerc1346742009-07-01 17:16:20 +000063 <p>The current feature set of compiler-rt is:</p>
Chris Lattnerff5380f2009-06-30 22:56:43 +000064
65 <ul>
Edward O'Callaghanf361ff12009-08-04 04:48:38 +000066 <li>Full support for the libgcc interfaces on supported targets.</li>
Chris Lattnerff5380f2009-06-30 22:56:43 +000067 <li>High performance hand tuned implementations of commonly used functions
68 like __floatundidf in assembly that are dramatically faster than the
69 libgcc implementations.</li>
70 <li>A target-independent implementation of the Apple "Blocks" runtime
71 interfaces.</li>
72 </ul>
Edward O'Callaghanf9981562009-08-03 01:26:42 +000073
74 <!--=====================================================================-->
Edward O'Callaghanf361ff12009-08-04 04:48:38 +000075 <h2 id="requirements">Platform Support</h2>
76 <!--=====================================================================-->
77
78 <p>Compiler-RT is known to work on the following platforms:</p>
79
80 <li>Machine Architectures:
81 <ul>
82 <li>i386</li>
83 <li>X86-64</li>
Edward O'Callaghanee0093b2009-10-06 21:01:17 +000084 <li>SPARC64</li>
85 <li>ARM</li>
Edward O'Callaghanf361ff12009-08-04 04:48:38 +000086 <li>PowerPC</li>
87 <li>PowerPC 64</li>
88 </ul></li>
89
90 <table cellpadding="3" summary="Known Compiler-RT platforms">
91 <tr>
92 <th>OS</th>
93 <th>Arch</th>
94 </tr>
95 <tr>
96 <td>AuroraUX</td>
97 <td>All<sup>
98 </tr>
99 <tr>
Edward O'Callaghanac4c7942009-11-01 18:30:27 +0000100 <td>DragonFlyBSD</td>
101 <td>All<sup>
102 </tr>
103 <tr>
Edward O'Callaghan863dd142009-09-03 11:13:06 +0000104 <td>FreeBSD</td>
105 <td>All<sup>
106 </tr>
107 <tr>
Edward O'Callaghanee0093b2009-10-06 21:01:17 +0000108 <td>NetBSD</td>
109 <td>All<sup>
110 </tr>
111 <tr>
Edward O'Callaghanf361ff12009-08-04 04:48:38 +0000112 <td>Linux</td>
113 <td>All<sup>
114 </tr>
115 <tr>
116 <td>Darwin</td>
117 <td>All<sup>
118 </tr>
119 </table>
120
121 <!--=====================================================================-->
Edward O'Callaghanf9981562009-08-03 01:26:42 +0000122 <h2 id="dir-structure">Source Structure</h2>
123 <!--=====================================================================-->
124
125 <p>A short explanation of the directory structure of compiler-rt:</p>
126
127 <p>For testing it is possible to build a generic library and an optimized library.
128 The optimized library is formed by overlaying the optimized versions onto the generic library.
129 Of course, some architectures have additional functions,
130 so the optimized library may have functions not found in the generic version.</p>
131
132 <ul>
133 <li> lib/ Is a generic portable implementations.</li>
Edward O'Callaghan48adb322009-10-06 21:03:43 +0000134 <li> lib/(arch) has optimized version for the supported architectures.</li>
Edward O'Callaghanf9981562009-08-03 01:26:42 +0000135 </ul>
136
Chris Lattnerff5380f2009-06-30 22:56:43 +0000137 <!--=====================================================================-->
138 <h2>Get it and get involved!</h2>
139 <!--=====================================================================-->
140
Chris Lattnerc1346742009-07-01 17:16:20 +0000141 <p>To check out the code, use:</p>
142
143 <ul>
144 <li>svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt</li>
Edward O'Callaghan2d05d962009-09-23 05:04:26 +0000145 <li>mkdir build</li>
146 <li>cd build</li>
147 <li>cmake ../compiler-rt</li>
Chris Lattnerc1346742009-07-01 17:16:20 +0000148 <li>make</li>
Chris Lattner1bb4c382010-05-04 05:19:07 +0000149 </ul>
150
151 <p>To run the Compiler-RT Test Suit (recommended):</p>
152
153 <ul>
Edward O'Callaghan8c8d1aa2009-10-28 00:09:30 +0000154 <li>ctest</li>
Chris Lattner1bb4c382010-05-04 05:19:07 +0000155 </ul>
156
157 <p>To Install:</p>
158
159 <ul>
Edward O'Callaghan2d05d962009-09-23 05:04:26 +0000160 <li>make install</li>
Chris Lattnerc1346742009-07-01 17:16:20 +0000161 </ul>
162
Chris Lattnerc1346742009-07-01 17:16:20 +0000163 <p>compiler-rt doesn't have its own mailing list, if you have questions please
164 email the <a
165 href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">llvmdev</a> mailing
166 list. Commits to the compiler-rt SVN module are automatically sent to the
167 <a
168 href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">llvm-commits</a>
169 mailing list.</p>
Chris Lattnerff5380f2009-06-30 22:56:43 +0000170</div>
171</body>
172</html>