[cfe-dev] Stupid 64-bit divide question

per at lumai.se per at lumai.se
Thu Sep 30 03:16:43 PDT 2010


Hi all,

I am experimenting with compiling C code under Windows (MSVC env., _not_ 
mingw) via COFF -> exe file using clang x.c -emit-llvm and llc 
-filetype=obj followed by linking using the MSVC linker. This works well 
except that some 64 bit arithmetic operations generate libcalls to 
functions like __divdi3 which have different names/uses in the MSVC 
runtime (i.e. __divdi3 ~= __alldiv in libcmt.lib). I assume that 
__divdi3 is something GNU specific. Is there a simple way to influence 
which libcalls are emitted? Any attempts to define my own __divdi3 seem 
to be ignored.

cheers,
Per Lindén




More information about the cfe-dev mailing list