[LLVMdev] llvm.exp.f32 didn't work

空明流转 wuye9036 at gmail.com
Fri Mar 30 19:51:40 PDT 2012


And sorry, my platform is MSVC 2010, x86, debug, windows 7, LLVM 3.0.

在 2012年3月31日 上午10:50,空明流转 <wuye9036 at gmail.com>写道:

> Hi,
>
> I found that llvm.exp.f32 didn't work but sqrt works well.
>
> I implemented a function like
>
> define inlinehint float "my_exp"(float %.value) {
> .body:
>   %0 = call float @llvm.exp.f32(float %.value)
>   ret float %0
> }
>
> declare float @llvm.exp.f32(float) nounwind readonly
>
> But it generates following ASM:
>
> 00280072  movups      xmm0,xmmword ptr [esp+8]
> 00280077  movss       dword ptr [esp],xmm0
> 0028007C  call        00000000
> 00280081  pop         eax
>
> As you seen, line 0028007C will call CRT exp I think, but it calls NULL
> pointer.
>
> But sqrt is right.
>
> 005000D1  movss       xmm0,dword ptr [esp+0Ch]
> 005000D7  movss       dword ptr [esp],xmm0
> 005000DC  call           00490018
> 005000E1  mov           eax,dword ptr [esp+8]
>
> Could you give me some help ? Thanks !
>
> --
> Ye Wu
> CELL: +86 159 9957 0103
>



-- 
Ye Wu
CELL: +86 159 9957 0103
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120331/78a158a2/attachment.html>


More information about the llvm-dev mailing list