summaryrefslogtreecommitdiff
path: root/lib/Target/X86/README.txt
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-11-21 18:59:20 +0000
committerChris Lattner <sabre@nondot.org>2010-11-21 18:59:20 +0000
commit8bc1e4529528a22c16dc7803951a91fafbde11bb (patch)
tree6430e630eeb4e52d9a31c76d706e355287b83e5c /lib/Target/X86/README.txt
parentdd061b28548434579e8547aa7aed83f78741ae6f (diff)
downloadllvm-8bc1e4529528a22c16dc7803951a91fafbde11bb.tar.gz
llvm-8bc1e4529528a22c16dc7803951a91fafbde11bb.tar.bz2
llvm-8bc1e4529528a22c16dc7803951a91fafbde11bb.tar.xz
apparently tailcalls are better on darwin/x86-64 than on linux?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119947 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/README.txt')
-rw-r--r--lib/Target/X86/README.txt18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/Target/X86/README.txt b/lib/Target/X86/README.txt
index a305ae6ec5..e67fab1090 100644
--- a/lib/Target/X86/README.txt
+++ b/lib/Target/X86/README.txt
@@ -895,6 +895,24 @@ compare:
//===---------------------------------------------------------------------===//
+Linux is missing some basic tail call support:
+
+#include <math.h>
+double foo(double a) { return sin(a); }
+
+This compiles into this on x86-64 Linux (but not darwin):
+foo:
+ subq $8, %rsp
+ call sin
+ addq $8, %rsp
+ ret
+vs:
+
+foo:
+ jmp sin
+
+//===---------------------------------------------------------------------===//
+
Tail call optimization improvements: Tail call optimization currently
pushes all arguments on the top of the stack (their normal place for
non-tail call optimized calls) that source from the callers arguments