aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-02-12 20:26:34 +0000
committerChris Lattner <sabre@nondot.org>2007-02-12 20:26:34 +0000
commit08ba1de2d2d1a4a6a22e41f851fa1b88cef325cd (patch)
treee0836166c7fe21337e9bdcead81c906ded00b1e9
parentd93f00c35dbd1ea415bb2b39435253aef9428d71 (diff)
add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34202 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/X86/README.txt29
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/Target/X86/README.txt b/lib/Target/X86/README.txt
index 46ef8b2225..2f8cb7e918 100644
--- a/lib/Target/X86/README.txt
+++ b/lib/Target/X86/README.txt
@@ -868,3 +868,32 @@ _f2:
//===---------------------------------------------------------------------===//
+This code:
+
+void test(int X) {
+ if (X) abort();
+}
+
+is currently compiled to (with -static):
+
+_test:
+ subl $12, %esp
+ cmpl $0, 16(%esp)
+ jne LBB1_1 #cond_true
+ addl $12, %esp
+ ret
+LBB1_1: #cond_true
+ call L_abort$stub
+
+It would be better to produce:
+
+_test:
+ subl $12, %esp
+ cmpl $0, 16(%esp)
+ jne L_abort$stub
+ addl $12, %esp
+ ret
+
+This can be applied to any no-return function call that takes no arguments etc.
+
+//===---------------------------------------------------------------------===//