after switching to the latest NASM 2.07, my MacOSX program suddenly segfaulted all-over the place.
It turned out that 16-byte alignment doesn't work anymore in the latest NASM 2.07, breaking SSE instructions.
Here is the code snippet I use in the asm file (am I doing something wrong?):
section .data align=16
_ssg_step: dd 0,0,0,0
_ssg_cubelenm1vec: dd 0,0,0,0
_pme_gridbins: dd 0,0,0,0
After linking the NASM created Macho object code with GCC object code, the address of _ssg_step above was 16 byte aligned with my previous NASM version, but is 2 byte aligned with the latest NASM 2.07.
BTW, my previous nasm -v output was
NASM version 0.98.40 (Apple Computer, Inc. build 11) compiled on Jan 14 2007
I don't remember how or why I ended up with the version above, it could mean that I had the alignment problem already previously, and found that Apple provided a fixed/patched NASM version...?
How do others use SSE code in Macho objects?
Thanks for your help,