<p dir="ltr">i686 has been out for so long that worrying about i386 support is silly. MinGW-w64 uses i686 by default. Even i586 is *incredibly* conservative.</p>
<div class="gmail_quote">On Jul 16, 2014 11:34 PM, "Johan Tibell" <<a href="mailto:johan.tibell@gmail.com">johan.tibell@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
A perhaps silly question, *should* ghc-prim be built with i386 or i686?<br>
<br>
On Thu, Jul 17, 2014 at 8:33 AM, Niklas Larsson <<a href="mailto:metaniklas@gmail.com">metaniklas@gmail.com</a>> wrote:<br>
> I just found exactly the same thing! Well, I used i686 instead.<br>
><br>
> Sounds like it's worthwhile to see if this is limited to ghc-prim or if<br>
> there's more stuff that's built with i386.<br>
><br>
><br>
> 2014-07-17 8:21 GMT+02:00 Páli Gábor János <<a href="mailto:pali.gabor@gmail.com">pali.gabor@gmail.com</a>>:<br>
><br>
>> 2014-07-17 0:51 GMT+02:00 Páli Gábor János <<a href="mailto:pali.gabor@gmail.com">pali.gabor@gmail.com</a>>:<br>
>> > 2014-07-17 0:47 GMT+02:00 Niklas Larsson <<a href="mailto:metaniklas@gmail.com">metaniklas@gmail.com</a>>:<br>
>> >> I hope they can just be done away with at the source, that is to make<br>
>> >> gcc<br>
>> >> generate the assembly primitives. GHC should already be built with<br>
>> >> i686, but<br>
>> >> does that reach ghc-prim?<br>
>> ><br>
>> > This depends on GCC -- if no -march=XXX is explicitly set, I guess it<br>
>> > will take its default, which may vary platform by platform.<br>
>><br>
>> All right, I have finally got a Windows (x64) machine and installed<br>
>> the msys2 environment by the GHC wiki [1].  This has GCC 4.5.2 (as<br>
>> Niklas wrote earlier), where the default -march is i386.  You should<br>
>> see this line when trying to compile Johan's test program with the -v<br>
>> flag set:<br>
>><br>
>> COLLECT_GCC_OPTIONS= ... '-v' '-mtune=i386' '-march=i386'<br>
>><br>
>> With the -march=i586 flag explicitly set in the command line, no<br>
>> __sync_fetch_and_add_n() calls are generated.<br>
>><br>
>> [1]<br>
>> <a href="https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Windows/MSYS2" target="_blank">https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Windows/MSYS2</a><br>
><br>
><br>
_______________________________________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/ghc-devs" target="_blank">http://www.haskell.org/mailman/listinfo/ghc-devs</a><br>
</blockquote></div>