[llvm-commits] Patch to build 64bit LLVM with MinGW64 compiler

Syoyo Fujita syoyofujita at gmail.com
Wed Jan 26 01:52:22 PST 2011


64bit libgcc on x86 does not define such a function(e.g. __divdi3) and
also 64bit gcc compiler does not emit a code calling such a function.
(I've checked it with 64bit mingw on windows and 64bit gcc on x86 linux)

For instance, when int64 division expression is given,

 * x86 32bit gcc emits __divdi3()
 * x86 64bit gcc emits idivq instruction.

So you don't need to define stub functions of __divdi3 and so on in
64bit mingw environment.

Things might be different on non x86 environment such like ARM, but
its out of scope of my patch.

On Wed, Jan 26, 2011 at 6:09 PM, Anton Korobeynikov
<anton at korobeynikov.info> wrote:
> CC'ing llvm-commits
>> In 64bit Mingw env, you should not to define stub functions(e.g.
>> __divdi3), this is just needed for 32bit Mingw env.
> Why? Won't this make JIT stop working? How the name resolution for
> these functions will work?
> --
> With best regards, Anton Korobeynikov
> Faculty of Mathematics and Mechanics, Saint Petersburg State University

More information about the llvm-commits mailing list