summaryrefslogtreecommitdiffstats
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
commit78846b69ae617fbb242643de021f8b4c7f314afc (patch)
treec373f9a573c010e205a79d4975f4faf8084bd7f9
parent5946664ef212a85e9d788f94dffdaa3356c9bc58 (diff)
downloadbcm5719-llvm-78846b69ae617fbb242643de021f8b4c7f314afc.tar.gz
bcm5719-llvm-78846b69ae617fbb242643de021f8b4c7f314afc.zip
add a note
llvm-svn: 41178
-rw-r--r--llvm/lib/Target/X86/README.txt18
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/README.txt b/llvm/lib/Target/X86/README.txt
index 5c75fc96b42..467e0252399 100644
--- a/llvm/lib/Target/X86/README.txt
+++ b/llvm/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 :)
+
+//===---------------------------------------------------------------------===//
OpenPOWER on IntegriCloud