__fixunsdfdi and etc with Visual Studio JIT?


We are running bitcode with JIT on visual studio project and we get
strange external function call problems (jit generates jump to
00000000 address as can be seen in debugger) for libgcc functions like
__fixunsdfdi, __divdi3 etc. Currently we have attached our own
implementations of these functions to overcome this problem. What
would be the correct way to do this on Visual Studio? Why does JIT
generate such function calls at all instead of native code that
executes needed operation?

Thank you,

x86-32 doesn't natively support, for example, 64-bit division; the
call replaces what would otherwise be a very long replacement



The bitcode was generated by llvm-gcc v2.6 for Mingw32/x86, which is
available for download at the llvm site.
Please let me know, if i should tell more.

Well, the answer is pretty obvious then. These calls are not generated
by JIT. They are already in your bitcode - they are generated by
llvm-gcc. The purpose of these calls were alreade explained by Eli.

You should either link libgcc in, ot provide your own implementation
for these functions.

PS: Note the "reply all" button, this way your reply will be sent to
the mailing list as well.

Thank you for clarification!
I will try to link in the libgcc library and see if there is any
success with that. Otherwise the own implementation will have to do


Some libgcc calls are added by the code generator, for example
I had to provide implementation for these functions (since I disabled
dlsym lookups):
    __divdi3, __udivdi3, __moddi3, __umoddi3, __muldi3, __ashrdi3,
__ashldi3, __lshrdi3
and from libc: memmove, memcpy, memset

Even if the original bitcode had none of these calls (they were
intrinsics, or just simple divides).

Best regards,