------- Comment #8 from hjl dot tools at gmail dot com  2010-08-16 13:19 -------
Created an attachment (id=21490)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21490&action=view)
The preprocessed source

It should be compiled with

-march=i486 -ftls-model=initial-exec -mtune=i586 -O2 -fPIC

The bad assembly has

        lock cmpxchgl   %edx, (%ecx)
        je      .L2 
        subl    $12, %esp
        pushl   %ecx
        call    gomp_mutex_lock_slow
        addl    $16, %esp
.L2:
        testl   $1, %esi
        je      .L3
        movl    1224(%edi), %eax
        testl   %eax, %eax
        je      .L21
        movl    68(%edi), %edx
        orl     $2, %edx
        movl    %edx, 68(%edi)
.L3:
        movl    %esi, %eax
        sete    -33(%ebp)
...
        lock cmpxchgl   %edx, (%ecx)
        addl    $16, %esp
        cmpb    $0, -33(%ebp)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45292

Reply via email to