------- Comment #26 from dannysmith at users dot sourceforge dot net  
2008-10-01 01:33 -------
(In reply to comment #14)
> Hi Guys,
> 
>   I am not able to reproduce the build problems that were reported with the
> first version of my patch, but then again I do not have a native cygwin build
> system or a system in which I can bootstrap mingw32.  I think that Brian may
> well be right however in that the patch is behaving badly when it manually
> switches into the .bss section.  I have uploaded a revised version of the 
> patch
> which uses the correct gcc function to perform the section switch, so please
> can anyone who is interested give this new patch a run.


This latter patch, applied to R139853 [*] (just before the big IRA merge) does
not cause the build problems of the prior patch but does not solve the problem
either.

With this patch, using your _align.c test case which I uploaded in previous
comment:

gcc -DHAVE_ALIGNED_COMMON _align.c  && a.exe
fails.

The assembler code, specifically the .balign 32 directive applied to the
_common object looks like it should do the right thing, but doesn't (:

        .file   "_align.c"
        .bss
        .balign 1
        .comm   _a, 1
        .balign 32
        .comm   _common, 64
.globl _b
        .section        .bss,"w"
_b:
        .space 1
.globl _bss
        .align 32
_bss:
        .space 64
.globl _c
        .data
_c:
        .byte   1
.globl _data
        .align 32
_data:
        .long   1
        .space 4
        .long   2
        .space 4
        .long   3
        .space 12
        .long   4
        .space 28
        .text
.globl _test
        .def    _test;  .scl    2;      .type   32;     .endef
_test:
        pushl   %ebp
        movl    %esp, %ebp
        subl    $8, %esp
        movl    8(%ebp), %eax
        addl    $8, %eax
        andl    $7, %eax
        testl   %eax, %eax
        jne     L2
        movl    8(%ebp), %eax
        addl    $16, %eax
        andl    $15, %eax
        testl   %eax, %eax
        jne     L2
        movl    8(%ebp), %eax
        addl    $32, %eax
        andl    $31, %eax
        testl   %eax, %eax
        je      L4
L2:
        call    _abort
L4:
        leave
        ret
        .def    ___main;        .scl    2;      .type   32;     .endef
.globl _main
        .def    _main;  .scl    2;      .type   32;     .endef
_main:
        pushl   %ebp
        movl    %esp, %ebp
        andl    $-16, %esp
        subl    $16, %esp
        call    ___main
        movl    $_common, (%esp)
        call    _test
        movl    $_bss, (%esp)
        call    _test
        movl    $_data, (%esp)
        call    _test
        movl    $0, (%esp)
        call    _exit
        .def    _abort; .scl    2;      .type   32;     .endef
        .def    _exit;  .scl    2;      .type   32;     .endef




[*] Since the IRA merge, mingw32  has been broken, failing to compile libstdc++
and raising many (>500 in gcc.dg) new testcase errors.  


-- 


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

Reply via email to