The whole thing is frustrating. This code has been around and works fine on other platforms, so it has to be problem with our platform, rather nasm or GCC. BTW, I'm currently using GCC 5.5.0 as Paul did some more alignment fixes compared to 4.9.2. I've also switched to building Mozilla for the same reason.
One possibility I guess is that GCC is screwing up with -O3.