[llvm-commits] CVS: llvm/lib/Target/X86/README.txt
Chris Lattner
sabre at nondot.org
Mon Feb 12 12:26:51 PST 2007
Changes in directory llvm/lib/Target/X86:
README.txt updated: 1.154 -> 1.155
---
Log message:
add a note
---
Diffs of the changes: (+29 -0)
README.txt | 29 +++++++++++++++++++++++++++++
1 files changed, 29 insertions(+)
Index: llvm/lib/Target/X86/README.txt
diff -u llvm/lib/Target/X86/README.txt:1.154 llvm/lib/Target/X86/README.txt:1.155
--- llvm/lib/Target/X86/README.txt:1.154 Thu Feb 8 17:53:38 2007
+++ llvm/lib/Target/X86/README.txt Mon Feb 12 14:26:34 2007
@@ -868,3 +868,32 @@
//===---------------------------------------------------------------------===//
+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.
+
+//===---------------------------------------------------------------------===//
More information about the llvm-commits
mailing list