From a179e4d0a8029bb4004d92343fb2c110f77060d7 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 11 Mar 2010 00:22:57 +0000 Subject: add support, testcases, and dox for the new GHC calling convention. Patch by David Terei! llvm-svn: 98212 --- llvm/docs/LangRef.html | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'llvm/docs/LangRef.html') diff --git a/llvm/docs/LangRef.html b/llvm/docs/LangRef.html index eec06fcc023..adaf44ab870 100644 --- a/llvm/docs/LangRef.html +++ b/llvm/docs/LangRef.html @@ -691,9 +691,9 @@ define i32 @main() { ; i32()* target, without having to conform to an externally specified ABI (Application Binary Interface). Tail calls can only be optimized - when this convention is used. This calling convention does not - support varargs and requires the prototype of all callees to exactly match - the prototype of the function definition. + when this or the GHC convention is used. This calling convention + does not support varargs and requires the prototype of all callees to + exactly match the prototype of the function definition.
"coldcc" - The cold calling convention:
This calling convention attempts to make code in the caller as efficient @@ -703,6 +703,26 @@ define i32 @main() { ; i32()* does not support varargs and requires the prototype of all callees to exactly match the prototype of the function definition.
+
"cc 10" - GHC convention:
+
This calling convention has been implemented specifically for use by the + Glasgow Haskell Compiler (GHC). + 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 register pinning performance technique often used when + implementing functional programming languages.At the moment only X86 + supports this convention and it has the following limitations: + + This calling convention supports + tail call optimization but + requires both the caller and callee are using it. +
+
"cc <n>" - Numbered convention:
Any calling convention may be specified by number, allowing target-specific calling conventions to be used. Target specific calling -- cgit v1.2.3