develooper Front page | perl.perl5.porters | Postings from September 2012

Re: unhappy darwin -Dusemorebits (was Re: Smoke [5.17.4]v5.17.3-184-g699aa44 FAIL(F) darwin 12.1.0 (Intel Core 2 Duo/))

Reini Urban
September 2, 2012 12:18
Re: unhappy darwin -Dusemorebits (was Re: Smoke [5.17.4]v5.17.3-184-g699aa44 FAIL(F) darwin 12.1.0 (Intel Core 2 Duo/))
Message ID:
On Sun, Sep 2, 2012 at 2:09 PM, Reini Urban <> wrote:
> On Sat, Sep 1, 2012 at 9:34 AM, Nicholas Clark <> wrote:
>> On Sun, Sep 02, 2012 at 12:14:47AM +1000, Tony Cook wrote:
>> OK, thanks. I don't know any x86_64 assembler, nor do I know its alignment
>> constrains or whatnot, so I'm not able to work out from this what went
>> wrong. And whether it's us doing something dodgy or them.
>> Is anyone else able to work backwards from this to what the cause is?
> Apple gcc contrary to the default or homebrew gcc defaults to 16bit
> stack alignment for performance reasons and easier SSE interaction.
> Similar to Sun cc.

Oops, -Os only.
The normal cause for this failure is -Os on darwin.
Only apple gcc and clang default to 16bit stack alignment
even with -Os, others not.

> Normally this should do no harm, unless you mix non-apple cc compiled
> code or if you change struct alignment manually. Or if you mix cflags.
> Our StructCopy relies on the compiler struct copy, which should work ok.
> In this case:
>   movaps (%rcx),%xmm0
> rcx is not properly aligned (0 as first char). SSE code requires 16
> bit alignment.
> BTW: The normal behaviour should be SIGBUS not SIGSEGV,
> but gcc is different.
> Unfortunately I gave my darwin pc away, so I cannot single step
> through it.
> If it's not one of these causes I would say it's one of these nasty
> compiler bugs, and I would use the old-style StructCopy with this
> config.
> Or compile with -mno-sse

Or remove -Os

Reini Urban Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About