Chris Lattner | ff5380f | 2009-06-30 22:56:43 +0000 | [diff] [blame] | 1 | <!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 Lattner | c134674 | 2009-07-01 17:16:20 +0000 | [diff] [blame] | 7 | <title>"compiler-rt" Runtime Library</title> |
Chris Lattner | ff5380f | 2009-06-30 22:56:43 +0000 | [diff] [blame] | 8 | <link type="text/css" rel="stylesheet" href="menu.css"> |
| 9 | <link type="text/css" rel="stylesheet" href="content.css"> |
| 10 | </head> |
Chris Lattner | 135bcdf | 2009-07-02 21:34:35 +0000 | [diff] [blame] | 11 | |
Chris Lattner | ff5380f | 2009-06-30 22:56:43 +0000 | [diff] [blame] | 12 | <body> |
| 13 | <!--#include virtual="menu.html.incl"--> |
| 14 | <div id="content"> |
| 15 | <!--*********************************************************************--> |
Chris Lattner | c134674 | 2009-07-01 17:16:20 +0000 | [diff] [blame] | 16 | <h1>"compiler-rt" Runtime Library</h1> |
Chris Lattner | ff5380f | 2009-06-30 22:56:43 +0000 | [diff] [blame] | 17 | <!--*********************************************************************--> |
| 18 | |
Chris Lattner | c134674 | 2009-07-01 17:16:20 +0000 | [diff] [blame] | 19 | <p>The compiler-rt project is a simple library that provides an implementation |
Chris Lattner | ff5380f | 2009-06-30 22:56:43 +0000 | [diff] [blame] | 20 | 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 Lattner | c134674 | 2009-07-01 17:16:20 +0000 | [diff] [blame] | 23 | call to the "__fixunsdfdi" function. The compiler-rt library provides |
Chris Lattner | ff5380f | 2009-06-30 22:56:43 +0000 | [diff] [blame] | 24 | optimized implementations of this and other low-level routines.</p> |
Chris Lattner | eb561be | 2009-07-02 21:29:19 +0000 | [diff] [blame] | 25 | |
Chris Lattner | 4b12196 | 2010-11-16 21:34:56 +0000 | [diff] [blame] | 26 | <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 Dunbar | 0ec64ce | 2011-12-07 18:43:12 +0000 | [diff] [blame] | 29 | |
| 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 Lattner | ff5380f | 2009-06-30 22:56:43 +0000 | [diff] [blame] | 45 | |
| 46 | <!--=====================================================================--> |
| 47 | <h2 id="goals">Goals</h2> |
| 48 | <!--=====================================================================--> |
| 49 | |
Chris Lattner | c134674 | 2009-07-01 17:16:20 +0000 | [diff] [blame] | 50 | <p>Different targets require different routines. The compiler-rt project aims |
Chris Lattner | ff5380f | 2009-06-30 22:56:43 +0000 | [diff] [blame] | 51 | 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 Lattner | c134674 | 2009-07-01 17:16:20 +0000 | [diff] [blame] | 53 | cases. It should be very easy to bring compiler-rt to support a new |
Chris Lattner | ff5380f | 2009-06-30 22:56:43 +0000 | [diff] [blame] | 54 | target by adding the new routines needed by that target.</p> |
| 55 | |
Chris Lattner | c134674 | 2009-07-01 17:16:20 +0000 | [diff] [blame] | 56 | <p>Where it make sense, the compiler-rt project aims to implement interfaces |
Chris Lattner | ff5380f | 2009-06-30 22:56:43 +0000 | [diff] [blame] | 57 | that are drop-in compatible with the libgcc interfaces.</p> |
| 58 | |
| 59 | <!--=====================================================================--> |
| 60 | <h2 id="features">Features</h2> |
| 61 | <!--=====================================================================--> |
| 62 | |
Chris Lattner | c134674 | 2009-07-01 17:16:20 +0000 | [diff] [blame] | 63 | <p>The current feature set of compiler-rt is:</p> |
Chris Lattner | ff5380f | 2009-06-30 22:56:43 +0000 | [diff] [blame] | 64 | |
| 65 | <ul> |
Edward O'Callaghan | f361ff1 | 2009-08-04 04:48:38 +0000 | [diff] [blame] | 66 | <li>Full support for the libgcc interfaces on supported targets.</li> |
Chris Lattner | ff5380f | 2009-06-30 22:56:43 +0000 | [diff] [blame] | 67 | <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'Callaghan | f998156 | 2009-08-03 01:26:42 +0000 | [diff] [blame] | 73 | |
| 74 | <!--=====================================================================--> |
Edward O'Callaghan | f361ff1 | 2009-08-04 04:48:38 +0000 | [diff] [blame] | 75 | <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'Callaghan | ee0093b | 2009-10-06 21:01:17 +0000 | [diff] [blame] | 84 | <li>SPARC64</li> |
| 85 | <li>ARM</li> |
Edward O'Callaghan | f361ff1 | 2009-08-04 04:48:38 +0000 | [diff] [blame] | 86 | <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'Callaghan | ac4c794 | 2009-11-01 18:30:27 +0000 | [diff] [blame] | 100 | <td>DragonFlyBSD</td> |
| 101 | <td>All<sup> |
| 102 | </tr> |
| 103 | <tr> |
Edward O'Callaghan | 863dd14 | 2009-09-03 11:13:06 +0000 | [diff] [blame] | 104 | <td>FreeBSD</td> |
| 105 | <td>All<sup> |
| 106 | </tr> |
| 107 | <tr> |
Edward O'Callaghan | ee0093b | 2009-10-06 21:01:17 +0000 | [diff] [blame] | 108 | <td>NetBSD</td> |
| 109 | <td>All<sup> |
| 110 | </tr> |
| 111 | <tr> |
Edward O'Callaghan | f361ff1 | 2009-08-04 04:48:38 +0000 | [diff] [blame] | 112 | <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'Callaghan | f998156 | 2009-08-03 01:26:42 +0000 | [diff] [blame] | 122 | <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'Callaghan | 48adb32 | 2009-10-06 21:03:43 +0000 | [diff] [blame] | 134 | <li> lib/(arch) has optimized version for the supported architectures.</li> |
Edward O'Callaghan | f998156 | 2009-08-03 01:26:42 +0000 | [diff] [blame] | 135 | </ul> |
| 136 | |
Chris Lattner | ff5380f | 2009-06-30 22:56:43 +0000 | [diff] [blame] | 137 | <!--=====================================================================--> |
| 138 | <h2>Get it and get involved!</h2> |
| 139 | <!--=====================================================================--> |
| 140 | |
Chris Lattner | c134674 | 2009-07-01 17:16:20 +0000 | [diff] [blame] | 141 | <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'Callaghan | 2d05d96 | 2009-09-23 05:04:26 +0000 | [diff] [blame] | 145 | <li>mkdir build</li> |
| 146 | <li>cd build</li> |
| 147 | <li>cmake ../compiler-rt</li> |
Chris Lattner | c134674 | 2009-07-01 17:16:20 +0000 | [diff] [blame] | 148 | <li>make</li> |
Chris Lattner | 1bb4c38 | 2010-05-04 05:19:07 +0000 | [diff] [blame] | 149 | </ul> |
| 150 | |
| 151 | <p>To run the Compiler-RT Test Suit (recommended):</p> |
| 152 | |
| 153 | <ul> |
Edward O'Callaghan | 8c8d1aa | 2009-10-28 00:09:30 +0000 | [diff] [blame] | 154 | <li>ctest</li> |
Chris Lattner | 1bb4c38 | 2010-05-04 05:19:07 +0000 | [diff] [blame] | 155 | </ul> |
| 156 | |
| 157 | <p>To Install:</p> |
| 158 | |
| 159 | <ul> |
Edward O'Callaghan | 2d05d96 | 2009-09-23 05:04:26 +0000 | [diff] [blame] | 160 | <li>make install</li> |
Chris Lattner | c134674 | 2009-07-01 17:16:20 +0000 | [diff] [blame] | 161 | </ul> |
| 162 | |
Chris Lattner | c134674 | 2009-07-01 17:16:20 +0000 | [diff] [blame] | 163 | <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 Lattner | ff5380f | 2009-06-30 22:56:43 +0000 | [diff] [blame] | 170 | </div> |
| 171 | </body> |
| 172 | </html> |