aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-07-19 21:29:30 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-07-19 21:29:30 +0000
commitabb4d7829f3480aef03dcb5c16abdf279bb966e6 (patch)
tree3e617352c0f7c703602d2dba961a42e9142165c7
parentc06fe8a5ac41ff407af25395f58d15c650f5b266 (diff)
New entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29215 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/X86/README.txt25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/Target/X86/README.txt b/lib/Target/X86/README.txt
index 5f2d2c897e..84b91d5c3c 100644
--- a/lib/Target/X86/README.txt
+++ b/lib/Target/X86/README.txt
@@ -709,3 +709,28 @@ Use cpuid to auto-detect CPU features such as SSE, SSE2, and SSE3.
JIT should resolve __cxa_atexit on Mac OS X. In a non-jit environment, the
symbol is a dynamically resolved by the linker.
+
+//===---------------------------------------------------------------------===//
+
+u32 to float conversion improvement:
+
+float uint32_2_float( unsigned u ) {
+ float fl = (int) (u & 0xffff);
+ float fh = (int) (u >> 16);
+ fh *= 0x1.0p16f;
+ return fh + fl;
+}
+
+00000000 subl $0x04,%esp
+00000003 movl 0x08(%esp,1),%eax
+00000007 movl %eax,%ecx
+00000009 shrl $0x10,%ecx
+0000000c cvtsi2ss %ecx,%xmm0
+00000010 andl $0x0000ffff,%eax
+00000015 cvtsi2ss %eax,%xmm1
+00000019 mulss 0x00000078,%xmm0
+00000021 addss %xmm1,%xmm0
+00000025 movss %xmm0,(%esp,1)
+0000002a flds (%esp,1)
+0000002d addl $0x04,%esp
+00000030 ret