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

Chris Lattner sabre at nondot.org
Fri Nov 23 22:13:34 PST 2007


Author: lattner
Date: Sat Nov 24 00:13:33 2007
New Revision: 44299

URL: http://llvm.org/viewvc/llvm-project?rev=44299&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=44299&r1=44298&r2=44299&view=diff

==============================================================================
--- llvm/trunk/lib/Target/X86/README.txt (original)
+++ llvm/trunk/lib/Target/X86/README.txt Sat Nov 24 00:13:33 2007
@@ -1511,3 +1511,24 @@
         cmpl    $262144, %eax
 
 //===---------------------------------------------------------------------===//
+
+define i64 @test(double %X) {
+	%Y = fptosi double %X to i64
+	ret i64 %Y
+}
+
+compiles to:
+
+_test:
+	subl	$20, %esp
+	movsd	24(%esp), %xmm0
+	movsd	%xmm0, 8(%esp)
+	fldl	8(%esp)
+	fisttpll	(%esp)
+	movl	4(%esp), %edx
+	movl	(%esp), %eax
+	addl	$20, %esp
+	#FP_REG_KILL
+	ret
+
+This should just fldl directly from the input stack slot.





More information about the llvm-commits mailing list