[llvm-commits] [llvm] r44637 - /llvm/trunk/lib/Target/X86/README.txt

Chris Lattner sabre at nondot.org
Wed Dec 5 14:58:20 PST 2007


Author: lattner
Date: Wed Dec  5 16:58:19 2007
New Revision: 44637

URL: http://llvm.org/viewvc/llvm-project?rev=44637&view=rev
Log:
add a note

Modified:
    llvm/trunk/lib/Target/X86/README.txt

Modified: llvm/trunk/lib/Target/X86/README.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/README.txt?rev=44637&r1=44636&r2=44637&view=diff

==============================================================================
--- llvm/trunk/lib/Target/X86/README.txt (original)
+++ llvm/trunk/lib/Target/X86/README.txt Wed Dec  5 16:58:19 2007
@@ -1532,3 +1532,23 @@
 	ret
 
 This should just fldl directly from the input stack slot.
+
+//===---------------------------------------------------------------------===//
+
+This code:
+int foo (int x) { return (x & 65535) | 255; }
+
+Should compile into:
+
+_foo:
+        movzwl  4(%esp), %eax
+        orb     $-1, %al           ;; 'orl 255' is also fine :)
+        ret
+
+instead of:
+_foo:
+        movl    $255, %eax
+        orl     4(%esp), %eax
+        andl    $65535, %eax
+        ret
+





More information about the llvm-commits mailing list