index.html revision 2d05d968e18065b85320bbd8bb7bde97b5d87f07
1ff5380f65f639f043680868c74927c15f7428499Chris Lattner<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" 
2ff5380f65f639f043680868c74927c15f7428499Chris Lattner          "http://www.w3.org/TR/html4/strict.dtd">
3ff5380f65f639f043680868c74927c15f7428499Chris Lattner<!-- Material used from: HTML 4.01 specs: http://www.w3.org/TR/html401/ -->
4ff5380f65f639f043680868c74927c15f7428499Chris Lattner<html>
5ff5380f65f639f043680868c74927c15f7428499Chris Lattner<head>
6ff5380f65f639f043680868c74927c15f7428499Chris Lattner  <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
7c1346747862498226b5af3c4d4bd3c4dc429d5d7Chris Lattner  <title>"compiler-rt" Runtime Library</title>
8ff5380f65f639f043680868c74927c15f7428499Chris Lattner  <link type="text/css" rel="stylesheet" href="menu.css">
9ff5380f65f639f043680868c74927c15f7428499Chris Lattner  <link type="text/css" rel="stylesheet" href="content.css">
10ff5380f65f639f043680868c74927c15f7428499Chris Lattner</head>
11135bcdf9ca7584489050b23b2ee155cce6d6cce3Chris Lattner
12ff5380f65f639f043680868c74927c15f7428499Chris Lattner<body>
13ff5380f65f639f043680868c74927c15f7428499Chris Lattner<!--#include virtual="menu.html.incl"-->
14ff5380f65f639f043680868c74927c15f7428499Chris Lattner<div id="content">
15ff5380f65f639f043680868c74927c15f7428499Chris Lattner  <!--*********************************************************************-->
16c1346747862498226b5af3c4d4bd3c4dc429d5d7Chris Lattner  <h1>"compiler-rt" Runtime Library</h1>
17ff5380f65f639f043680868c74927c15f7428499Chris Lattner  <!--*********************************************************************-->
18ff5380f65f639f043680868c74927c15f7428499Chris Lattner  
19c1346747862498226b5af3c4d4bd3c4dc429d5d7Chris Lattner  <p>The compiler-rt project is a simple library that provides an implementation
20ff5380f65f639f043680868c74927c15f7428499Chris Lattner     of the low-level target-specific hooks required by code generation and
21ff5380f65f639f043680868c74927c15f7428499Chris Lattner     other runtime components.  For example, when compiling for a 32-bit target,
22ff5380f65f639f043680868c74927c15f7428499Chris Lattner    converting a double to a 64-bit unsigned integer is compiling into a runtime
23c1346747862498226b5af3c4d4bd3c4dc429d5d7Chris Lattner    call to the "__fixunsdfdi" function.  The compiler-rt library provides
24ff5380f65f639f043680868c74927c15f7428499Chris Lattner    optimized implementations of this and other low-level routines.</p>
25eb561bef8f503f399d1a429737f5657aa6e21369Chris Lattner
26eb561bef8f503f399d1a429737f5657aa6e21369Chris Lattner  <p>All of the code in the compiler-rt project is available under the standard
27eb561bef8f503f399d1a429737f5657aa6e21369Chris Lattner     <a href="http://llvm.org/docs/DeveloperPolicy.html#license">LLVM
28eb561bef8f503f399d1a429737f5657aa6e21369Chris Lattner     License</a>, a "BSD-style" license.</p>
29ff5380f65f639f043680868c74927c15f7428499Chris Lattner  
30ff5380f65f639f043680868c74927c15f7428499Chris Lattner  <!--=====================================================================-->
31ff5380f65f639f043680868c74927c15f7428499Chris Lattner  <h2 id="goals">Goals</h2>
32ff5380f65f639f043680868c74927c15f7428499Chris Lattner  <!--=====================================================================-->
33ff5380f65f639f043680868c74927c15f7428499Chris Lattner  
34c1346747862498226b5af3c4d4bd3c4dc429d5d7Chris Lattner  <p>Different targets require different routines.  The compiler-rt project aims
35ff5380f65f639f043680868c74927c15f7428499Chris Lattner     to implement these routines in both target-independent C form as well as
36ff5380f65f639f043680868c74927c15f7428499Chris Lattner     providing heavily optimized assembly versions of the routines in some
37c1346747862498226b5af3c4d4bd3c4dc429d5d7Chris Lattner     cases.  It should be very easy to bring compiler-rt to support a new
38ff5380f65f639f043680868c74927c15f7428499Chris Lattner     target by adding the new routines needed by that target.</p>
39ff5380f65f639f043680868c74927c15f7428499Chris Lattner     
40c1346747862498226b5af3c4d4bd3c4dc429d5d7Chris Lattner  <p>Where it make sense, the compiler-rt project aims to implement interfaces
41ff5380f65f639f043680868c74927c15f7428499Chris Lattner     that are drop-in compatible with the libgcc interfaces.</p>
42ff5380f65f639f043680868c74927c15f7428499Chris Lattner
43ff5380f65f639f043680868c74927c15f7428499Chris Lattner  <!--=====================================================================-->
44ff5380f65f639f043680868c74927c15f7428499Chris Lattner  <h2 id="features">Features</h2>
45ff5380f65f639f043680868c74927c15f7428499Chris Lattner  <!--=====================================================================-->
46ff5380f65f639f043680868c74927c15f7428499Chris Lattner
47c1346747862498226b5af3c4d4bd3c4dc429d5d7Chris Lattner   <p>The current feature set of compiler-rt is:</p>
48ff5380f65f639f043680868c74927c15f7428499Chris Lattner
49ff5380f65f639f043680868c74927c15f7428499Chris Lattner   <ul>
50f361ff15d3a8286e27f8adc8d02c9d3ed79fc8dbEdward O'Callaghan    <li>Full support for the libgcc interfaces on supported targets.</li>
51ff5380f65f639f043680868c74927c15f7428499Chris Lattner    <li>High performance hand tuned implementations of commonly used functions
52ff5380f65f639f043680868c74927c15f7428499Chris Lattner        like __floatundidf in assembly that are dramatically faster than the
53ff5380f65f639f043680868c74927c15f7428499Chris Lattner        libgcc implementations.</li>
54ff5380f65f639f043680868c74927c15f7428499Chris Lattner    <li>A target-independent implementation of the Apple "Blocks" runtime
55ff5380f65f639f043680868c74927c15f7428499Chris Lattner        interfaces.</li>
56ff5380f65f639f043680868c74927c15f7428499Chris Lattner   </ul>
57f998156715cdf8ba5d07ab8c853d803a22867e77Edward O'Callaghan
58f998156715cdf8ba5d07ab8c853d803a22867e77Edward O'Callaghan  <!--=====================================================================-->
59f361ff15d3a8286e27f8adc8d02c9d3ed79fc8dbEdward O'Callaghan  <h2 id="requirements">Platform Support</h2>
60f361ff15d3a8286e27f8adc8d02c9d3ed79fc8dbEdward O'Callaghan  <!--=====================================================================-->
61f361ff15d3a8286e27f8adc8d02c9d3ed79fc8dbEdward O'Callaghan
62f361ff15d3a8286e27f8adc8d02c9d3ed79fc8dbEdward O'Callaghan   <p>Compiler-RT is known to work on the following platforms:</p>
63f361ff15d3a8286e27f8adc8d02c9d3ed79fc8dbEdward O'Callaghan
64f361ff15d3a8286e27f8adc8d02c9d3ed79fc8dbEdward O'Callaghan   <li>Machine Architectures:
65f361ff15d3a8286e27f8adc8d02c9d3ed79fc8dbEdward O'Callaghan    <ul>
66f361ff15d3a8286e27f8adc8d02c9d3ed79fc8dbEdward O'Callaghan     <li>i386</li>
67f361ff15d3a8286e27f8adc8d02c9d3ed79fc8dbEdward O'Callaghan     <li>X86-64</li>
68f361ff15d3a8286e27f8adc8d02c9d3ed79fc8dbEdward O'Callaghan     <li>PowerPC</li>
69f361ff15d3a8286e27f8adc8d02c9d3ed79fc8dbEdward O'Callaghan     <li>PowerPC 64</li>
70f361ff15d3a8286e27f8adc8d02c9d3ed79fc8dbEdward O'Callaghan    </ul></li>
71f361ff15d3a8286e27f8adc8d02c9d3ed79fc8dbEdward O'Callaghan
72f361ff15d3a8286e27f8adc8d02c9d3ed79fc8dbEdward O'Callaghan   <table cellpadding="3" summary="Known Compiler-RT platforms">
73f361ff15d3a8286e27f8adc8d02c9d3ed79fc8dbEdward O'Callaghan   <tr>
74f361ff15d3a8286e27f8adc8d02c9d3ed79fc8dbEdward O'Callaghan     <th>OS</th>
75f361ff15d3a8286e27f8adc8d02c9d3ed79fc8dbEdward O'Callaghan     <th>Arch</th>
76f361ff15d3a8286e27f8adc8d02c9d3ed79fc8dbEdward O'Callaghan   </tr>
77f361ff15d3a8286e27f8adc8d02c9d3ed79fc8dbEdward O'Callaghan   <tr>
78f361ff15d3a8286e27f8adc8d02c9d3ed79fc8dbEdward O'Callaghan     <td>AuroraUX</td>
79f361ff15d3a8286e27f8adc8d02c9d3ed79fc8dbEdward O'Callaghan     <td>All<sup>
80f361ff15d3a8286e27f8adc8d02c9d3ed79fc8dbEdward O'Callaghan   </tr>
81f361ff15d3a8286e27f8adc8d02c9d3ed79fc8dbEdward O'Callaghan   <tr>
82863dd146bd186581ef71e38a4fac7df3c4c4e5efEdward O'Callaghan     <td>FreeBSD</td>
83863dd146bd186581ef71e38a4fac7df3c4c4e5efEdward O'Callaghan     <td>All<sup>
84863dd146bd186581ef71e38a4fac7df3c4c4e5efEdward O'Callaghan   </tr>
85863dd146bd186581ef71e38a4fac7df3c4c4e5efEdward O'Callaghan   <tr>
86f361ff15d3a8286e27f8adc8d02c9d3ed79fc8dbEdward O'Callaghan     <td>Linux</td>
87f361ff15d3a8286e27f8adc8d02c9d3ed79fc8dbEdward O'Callaghan     <td>All<sup>
88f361ff15d3a8286e27f8adc8d02c9d3ed79fc8dbEdward O'Callaghan   </tr>
89f361ff15d3a8286e27f8adc8d02c9d3ed79fc8dbEdward O'Callaghan   <tr>
90f361ff15d3a8286e27f8adc8d02c9d3ed79fc8dbEdward O'Callaghan     <td>Darwin</td>
91f361ff15d3a8286e27f8adc8d02c9d3ed79fc8dbEdward O'Callaghan     <td>All<sup>
92f361ff15d3a8286e27f8adc8d02c9d3ed79fc8dbEdward O'Callaghan   </tr>
93f361ff15d3a8286e27f8adc8d02c9d3ed79fc8dbEdward O'Callaghan   </table>
94f361ff15d3a8286e27f8adc8d02c9d3ed79fc8dbEdward O'Callaghan
95f361ff15d3a8286e27f8adc8d02c9d3ed79fc8dbEdward O'Callaghan  <!--=====================================================================-->
96f998156715cdf8ba5d07ab8c853d803a22867e77Edward O'Callaghan  <h2 id="dir-structure">Source Structure</h2>
97f998156715cdf8ba5d07ab8c853d803a22867e77Edward O'Callaghan  <!--=====================================================================-->
98f998156715cdf8ba5d07ab8c853d803a22867e77Edward O'Callaghan
99f998156715cdf8ba5d07ab8c853d803a22867e77Edward O'Callaghan   <p>A short explanation of the directory structure of compiler-rt:</p>
100f998156715cdf8ba5d07ab8c853d803a22867e77Edward O'Callaghan
101f998156715cdf8ba5d07ab8c853d803a22867e77Edward O'Callaghan   <p>For testing it is possible to build a generic library and an optimized library.
102f998156715cdf8ba5d07ab8c853d803a22867e77Edward O'Callaghan       The optimized library is formed by overlaying the optimized versions onto the generic library.
103f998156715cdf8ba5d07ab8c853d803a22867e77Edward O'Callaghan       Of course, some architectures have additional functions,
104f998156715cdf8ba5d07ab8c853d803a22867e77Edward O'Callaghan       so the optimized library may have functions not found in the generic version.</p>
105f998156715cdf8ba5d07ab8c853d803a22867e77Edward O'Callaghan
106f998156715cdf8ba5d07ab8c853d803a22867e77Edward O'Callaghan   <ul>   
107f998156715cdf8ba5d07ab8c853d803a22867e77Edward O'Callaghan    <li> lib/ Is a generic portable implementations.</li>
10818678da08fa7acd077b8c9884c7b8feffea46984Edward O'Callaghan    <li> lib/(arch) has optimized version for the following supported architectures:
109f998156715cdf8ba5d07ab8c853d803a22867e77Edward O'Callaghan      <ul>
110f998156715cdf8ba5d07ab8c853d803a22867e77Edward O'Callaghan      <li>i386</li>
111f998156715cdf8ba5d07ab8c853d803a22867e77Edward O'Callaghan      <li>X86-64</li>
112f998156715cdf8ba5d07ab8c853d803a22867e77Edward O'Callaghan      <li>PowerPC</li>
113f998156715cdf8ba5d07ab8c853d803a22867e77Edward O'Callaghan      <li>PowerPC 64</li>
114f998156715cdf8ba5d07ab8c853d803a22867e77Edward O'Callaghan      </ul></li>
115f998156715cdf8ba5d07ab8c853d803a22867e77Edward O'Callaghan   </ul>
116f998156715cdf8ba5d07ab8c853d803a22867e77Edward O'Callaghan    
117ff5380f65f639f043680868c74927c15f7428499Chris Lattner  <!--=====================================================================-->
118ff5380f65f639f043680868c74927c15f7428499Chris Lattner  <h2>Get it and get involved!</h2>
119ff5380f65f639f043680868c74927c15f7428499Chris Lattner  <!--=====================================================================-->
120ff5380f65f639f043680868c74927c15f7428499Chris Lattner  
121c1346747862498226b5af3c4d4bd3c4dc429d5d7Chris Lattner  <p>To check out the code, use:</p>
122c1346747862498226b5af3c4d4bd3c4dc429d5d7Chris Lattner  
123c1346747862498226b5af3c4d4bd3c4dc429d5d7Chris Lattner  <ul>
124c1346747862498226b5af3c4d4bd3c4dc429d5d7Chris Lattner  <li>svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt</li>
1252d05d968e18065b85320bbd8bb7bde97b5d87f07Edward O'Callaghan  <li>mkdir build</li>
1262d05d968e18065b85320bbd8bb7bde97b5d87f07Edward O'Callaghan  <li>cd build</li>
1272d05d968e18065b85320bbd8bb7bde97b5d87f07Edward O'Callaghan  <li>cmake /compiler-rt</li>
128c1346747862498226b5af3c4d4bd3c4dc429d5d7Chris Lattner  <li>make</li>
1292d05d968e18065b85320bbd8bb7bde97b5d87f07Edward O'Callaghan  <li>make install</li>
130c1346747862498226b5af3c4d4bd3c4dc429d5d7Chris Lattner  </ul>
131c1346747862498226b5af3c4d4bd3c4dc429d5d7Chris Lattner  
132c1346747862498226b5af3c4d4bd3c4dc429d5d7Chris Lattner  <p>Note that the library will probably only build out of the box on Darwin,
133c1346747862498226b5af3c4d4bd3c4dc429d5d7Chris Lattner     but patches to improve portability are definitely welcome.</p>
134c1346747862498226b5af3c4d4bd3c4dc429d5d7Chris Lattner  
135c1346747862498226b5af3c4d4bd3c4dc429d5d7Chris Lattner  <p>compiler-rt doesn't have its own mailing list, if you have questions please
136c1346747862498226b5af3c4d4bd3c4dc429d5d7Chris Lattner     email the <a
137c1346747862498226b5af3c4d4bd3c4dc429d5d7Chris Lattner    href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">llvmdev</a> mailing
138c1346747862498226b5af3c4d4bd3c4dc429d5d7Chris Lattner    list.  Commits to the compiler-rt SVN module are automatically sent to the
139c1346747862498226b5af3c4d4bd3c4dc429d5d7Chris Lattner    <a 
140c1346747862498226b5af3c4d4bd3c4dc429d5d7Chris Lattner  href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">llvm-commits</a>
141c1346747862498226b5af3c4d4bd3c4dc429d5d7Chris Lattner    mailing list.</p>
142ff5380f65f639f043680868c74927c15f7428499Chris Lattner</div>
143ff5380f65f639f043680868c74927c15f7428499Chris Lattner</body>
144ff5380f65f639f043680868c74927c15f7428499Chris Lattner</html>
145