aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/X86
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-08-20 02:14:33 +0000
committerChris Lattner <sabre@nondot.org>2007-08-20 02:14:33 +0000
commitcf8ba696b32fe46d874ac83c1e1c7ab9ad0f18da (patch)
treed1dd08471ebbe2ab3a14199bf3ed8c1559e3f9d4 /lib/Target/X86
parentbd2636bd32d2865cd8472e2e5457af127d8d1158 (diff)
downloadexternal_llvm-cf8ba696b32fe46d874ac83c1e1c7ab9ad0f18da.zip
external_llvm-cf8ba696b32fe46d874ac83c1e1c7ab9ad0f18da.tar.gz
external_llvm-cf8ba696b32fe46d874ac83c1e1c7ab9ad0f18da.tar.bz2
add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41178 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86')
-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 5c75fc9..467e025 100644
--- a/lib/Target/X86/README.txt
+++ b/lib/Target/X86/README.txt
@@ -1116,3 +1116,21 @@ _test1:
addps %xmm1, %xmm0
ret
+//===---------------------------------------------------------------------===//
+
+Leaf functions that require one 4-byte spill slot have a prolog like this:
+
+_foo:
+ pushl %esi
+ subl $4, %esp
+...
+and an epilog like this:
+ addl $4, %esp
+ popl %esi
+ ret
+
+It would be smaller, and potentially faster, to push eax on entry and to
+pop into a dummy register instead of using addl/subl of esp. Just don't pop
+into any return registers :)
+
+//===---------------------------------------------------------------------===//