blob: 7bfb8cb8681bb3f00fd8d10ffe8b2d698602f14e [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
26 <p>All of the code in the compiler-rt project is available under the standard
27 <a href="http://llvm.org/docs/DeveloperPolicy.html#license">LLVM
28 License</a>, a "BSD-style" license.</p>
Chris Lattnerff5380f2009-06-30 22:56:43 +000029
30 <!--=====================================================================-->
31 <h2 id="goals">Goals</h2>
32 <!--=====================================================================-->
33
Chris Lattnerc1346742009-07-01 17:16:20 +000034 <p>Different targets require different routines. The compiler-rt project aims
Chris Lattnerff5380f2009-06-30 22:56:43 +000035 to implement these routines in both target-independent C form as well as
36 providing heavily optimized assembly versions of the routines in some
Chris Lattnerc1346742009-07-01 17:16:20 +000037 cases. It should be very easy to bring compiler-rt to support a new
Chris Lattnerff5380f2009-06-30 22:56:43 +000038 target by adding the new routines needed by that target.</p>
39
Chris Lattnerc1346742009-07-01 17:16:20 +000040 <p>Where it make sense, the compiler-rt project aims to implement interfaces
Chris Lattnerff5380f2009-06-30 22:56:43 +000041 that are drop-in compatible with the libgcc interfaces.</p>
42
43 <!--=====================================================================-->
44 <h2 id="features">Features</h2>
45 <!--=====================================================================-->
46
Chris Lattnerc1346742009-07-01 17:16:20 +000047 <p>The current feature set of compiler-rt is:</p>
Chris Lattnerff5380f2009-06-30 22:56:43 +000048
49 <ul>
Edward O'Callaghanf361ff12009-08-04 04:48:38 +000050 <li>Full support for the libgcc interfaces on supported targets.</li>
Chris Lattnerff5380f2009-06-30 22:56:43 +000051 <li>High performance hand tuned implementations of commonly used functions
52 like __floatundidf in assembly that are dramatically faster than the
53 libgcc implementations.</li>
54 <li>A target-independent implementation of the Apple "Blocks" runtime
55 interfaces.</li>
56 </ul>
Edward O'Callaghanf9981562009-08-03 01:26:42 +000057
58 <!--=====================================================================-->
Edward O'Callaghanf361ff12009-08-04 04:48:38 +000059 <h2 id="requirements">Platform Support</h2>
60 <!--=====================================================================-->
61
62 <p>Compiler-RT is known to work on the following platforms:</p>
63
64 <li>Machine Architectures:
65 <ul>
66 <li>i386</li>
67 <li>X86-64</li>
68 <li>PowerPC</li>
69 <li>PowerPC 64</li>
70 </ul></li>
71
72 <table cellpadding="3" summary="Known Compiler-RT platforms">
73 <tr>
74 <th>OS</th>
75 <th>Arch</th>
76 </tr>
77 <tr>
78 <td>AuroraUX</td>
79 <td>All<sup>
80 </tr>
81 <tr>
Edward O'Callaghan863dd142009-09-03 11:13:06 +000082 <td>FreeBSD</td>
83 <td>All<sup>
84 </tr>
85 <tr>
Edward O'Callaghanf361ff12009-08-04 04:48:38 +000086 <td>Linux</td>
87 <td>All<sup>
88 </tr>
89 <tr>
90 <td>Darwin</td>
91 <td>All<sup>
92 </tr>
93 </table>
94
95 <!--=====================================================================-->
Edward O'Callaghanf9981562009-08-03 01:26:42 +000096 <h2 id="dir-structure">Source Structure</h2>
97 <!--=====================================================================-->
98
99 <p>A short explanation of the directory structure of compiler-rt:</p>
100
101 <p>For testing it is possible to build a generic library and an optimized library.
102 The optimized library is formed by overlaying the optimized versions onto the generic library.
103 Of course, some architectures have additional functions,
104 so the optimized library may have functions not found in the generic version.</p>
105
106 <ul>
107 <li> lib/ Is a generic portable implementations.</li>
Edward O'Callaghan18678da2009-08-03 01:29:04 +0000108 <li> lib/(arch) has optimized version for the following supported architectures:
Edward O'Callaghanf9981562009-08-03 01:26:42 +0000109 <ul>
110 <li>i386</li>
111 <li>X86-64</li>
112 <li>PowerPC</li>
113 <li>PowerPC 64</li>
114 </ul></li>
115 </ul>
116
Chris Lattnerff5380f2009-06-30 22:56:43 +0000117 <!--=====================================================================-->
118 <h2>Get it and get involved!</h2>
119 <!--=====================================================================-->
120
Chris Lattnerc1346742009-07-01 17:16:20 +0000121 <p>To check out the code, use:</p>
122
123 <ul>
124 <li>svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt</li>
Edward O'Callaghan2d05d962009-09-23 05:04:26 +0000125 <li>mkdir build</li>
126 <li>cd build</li>
127 <li>cmake ../compiler-rt</li>
Chris Lattnerc1346742009-07-01 17:16:20 +0000128 <li>make</li>
Edward O'Callaghan2d05d962009-09-23 05:04:26 +0000129 <li>make install</li>
Chris Lattnerc1346742009-07-01 17:16:20 +0000130 </ul>
131
Chris Lattnerc1346742009-07-01 17:16:20 +0000132 <p>compiler-rt doesn't have its own mailing list, if you have questions please
133 email the <a
134 href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">llvmdev</a> mailing
135 list. Commits to the compiler-rt SVN module are automatically sent to the
136 <a
137 href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">llvm-commits</a>
138 mailing list.</p>
Chris Lattnerff5380f2009-06-30 22:56:43 +0000139</div>
140</body>
141</html>