diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-11 00:22:57 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-11 00:22:57 +0000 |
commit | ac9a939425836d0f340b13df9b631f4329608bc0 (patch) | |
tree | 2e33d188b2f1afbb93bd58e3fcd8e8d6e2db6521 /docs | |
parent | d2436aace0508a6f157cb35bc7230aef8d942790 (diff) | |
download | external_llvm-ac9a939425836d0f340b13df9b631f4329608bc0.zip external_llvm-ac9a939425836d0f340b13df9b631f4329608bc0.tar.gz external_llvm-ac9a939425836d0f340b13df9b631f4329608bc0.tar.bz2 |
add support, testcases, and dox for the new GHC calling
convention. Patch by David Terei!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98212 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r-- | docs/CodeGenerator.html | 3 | ||||
-rw-r--r-- | docs/LangRef.html | 26 |
2 files changed, 25 insertions, 4 deletions
diff --git a/docs/CodeGenerator.html b/docs/CodeGenerator.html index f26d0ab..0568667 100644 --- a/docs/CodeGenerator.html +++ b/docs/CodeGenerator.html @@ -1679,7 +1679,8 @@ $ llc -regalloc=linearscan file.bc -o ln.s; supported on x86/x86-64 and PowerPC. It is performed if:</p> <ul> - <li>Caller and callee have the calling convention <tt>fastcc</tt>.</li> + <li>Caller and callee have the calling convention <tt>fastcc</tt> or + <tt>cc 10</tt> (GHC call convention).</li> <li>The call is a tail call - in tail position (ret immediately follows call and ret uses value of call or is void).</li> diff --git a/docs/LangRef.html b/docs/LangRef.html index eec06fc..adaf44a 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -691,9 +691,9 @@ define i32 @main() { <i>; i32()* </i> target, without having to conform to an externally specified ABI (Application Binary Interface). <a href="CodeGenerator.html#tailcallopt">Tail calls can only be optimized - when this convention is used.</a> This calling convention does not - support varargs and requires the prototype of all callees to exactly match - the prototype of the function definition.</dd> + when this or the GHC convention is used.</a> This calling convention + does not support varargs and requires the prototype of all callees to + exactly match the prototype of the function definition.</dd> <dt><b>"<tt>coldcc</tt>" - The cold calling convention</b>:</dt> <dd>This calling convention attempts to make code in the caller as efficient @@ -703,6 +703,26 @@ define i32 @main() { <i>; i32()* </i> does not support varargs and requires the prototype of all callees to exactly match the prototype of the function definition.</dd> + <dt><b>"<tt>cc <em>10</em></tt>" - GHC convention</b>:</dt> + <dd>This calling convention has been implemented specifically for use by the + <a href="http://www.haskell.org/ghc">Glasgow Haskell Compiler (GHC)</a>. + It passes everything in registers, going to extremes to achieve this by + disabling callee save registers. This calling convention should not be + used lightly but only for specific situations such as an alternative to + the <em>register pinning</em> performance technique often used when + implementing functional programming languages.At the moment only X86 + supports this convention and it has the following limitations: + <ul> + <li>On <em>X86-32</em> only supports up to 4 bit type parameters. No + floating point types are supported.</li> + <li>On <em>X86-64</em> only supports up to 10 bit type parameters and + 6 floating point parameters.</li> + </ul> + This calling convention supports + <a href="CodeGenerator.html#tailcallopt">tail call optimization</a> but + requires both the caller and callee are using it. + </dd> + <dt><b>"<tt>cc <<em>n</em>></tt>" - Numbered convention</b>:</dt> <dd>Any calling convention may be specified by number, allowing target-specific calling conventions to be used. Target specific calling |