[llvm-commits] CVS: llvm/lib/Target/X86/README.txt
Chris Lattner
lattner at cs.uiuc.edu
Wed Feb 8 09:47:34 PST 2006
Changes in directory llvm/lib/Target/X86:
README.txt updated: 1.49 -> 1.50
---
Log message:
add a simple optimization
---
Diffs of the changes: (+16 -0)
README.txt | 16 ++++++++++++++++
1 files changed, 16 insertions(+)
Index: llvm/lib/Target/X86/README.txt
diff -u llvm/lib/Target/X86/README.txt:1.49 llvm/lib/Target/X86/README.txt:1.50
--- llvm/lib/Target/X86/README.txt:1.49 Wed Feb 8 01:12:07 2006
+++ llvm/lib/Target/X86/README.txt Wed Feb 8 11:47:22 2006
@@ -411,3 +411,19 @@
*target &= ~(1 << bit);
}
+//===---------------------------------------------------------------------===//
+
+Easy: Global addresses are not always allowed as immediates. For this:
+
+int dst = 0; int *ptr = 0;
+void foo() { ptr = &dst; }
+
+we get this:
+
+_foo:
+ movl $_dst, %eax
+ movl %eax, _ptr
+ ret
+
+When: "movl $_dst, _ptr" is sufficient.
+
More information about the llvm-commits
mailing list