In article <[EMAIL PROTECTED]>
>> Oops. I wanted to say: Every software which has a problem with ld
>> dumping core uses nasm (so far). The core dump is a bug in ld, but I
>> didn't know if the condition which triggers the core dump is a problem
>> with nasm, the input of nasm, or a bug in ld.
>If someone could provide me with the minal input to nasm which then fed
>to `ld' dumps core, it would really speed up a fix. :-)

Not only nasm, but also gas has same problem. In case of 
ports/audio/gogo and ports/audio/lame, nasm outputs object which
make ld dumps core. While gcc+gas outputs object which can't link
by ld. I think the problem occures when "SSE instructions" and
"align" are used. (Unfortunatry, most SSE instructions need
16Byte(=128bit) alined operands.) For example:
==> bug.C <==
/* test program for SSE by kaz @
        % c++ -g bug.C && ./a.out
  But it fails. So,
        % c++ -g -S bug.C
  And change loop.s to avoid bug of gcc (may be):
        -       movaps ($A.15),%xmm0
        -       movaps ($B.16),%xmm1
        +       movaps A.15,%xmm0
        +       movaps B.16,%xmm1
        % c++ loop.s && ./a.out

#include <stdio.h>
#include <sys/time.h>
#include <unistd.h>
#include <stdlib.h>
#include <limits.h>

static float __attribute__((aligned(16)))

        int i;

        printf("float A=(");
        for(i=0;i<4;i++)        printf("%f,",A[i]);

        printf("float B=(");
        for(i=0;i<4;i++)        printf("%f,",B[i]);

        asm("movaps (%0),%%xmm0"                                //SSE
        asm("movaps (%0),%%xmm1"                                //SSE

        asm("addps %xmm1,%xmm0");                               //SSE
//      asm("mulps %xmm1,%xmm0");                               //SSE
        asm("movaps %%xmm0,%0":"=g"(C));                        //SSE
        printf("float C=(");
        for(i=0;i<4;i++)        printf("%f,",C[i]);
<mailto:[EMAIL PROTECTED]>       NAKAMURA Kazushi@KOBE

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to