This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, testsuite] test g++.dg/tls for emutls targets.


On Mon, Apr 05, 2010 at 11:17:40PM -0400, Jack Howarth wrote:
> 
> Iain,
>     There are still a large number of tests in gcc/testsuite that need
> this fix...
> 
> testsuite/g++.dg/gomp/clause-3.C:// { dg-require-effective-target tls_native }
> testsuite/g++.dg/gomp/copyin-1.C:// { dg-require-effective-target tls_native }
> testsuite/g++.dg/gomp/pr35244.C:// { dg-require-effective-target tls_native }
> testsuite/g++.dg/gomp/sharing-1.C:/* { dg-require-effective-target tls_native } */
> testsuite/g++.dg/gomp/tls-1.C:// { dg-require-effective-target tls_native }
> testsuite/g++.dg/gomp/tls-2.C:/* { dg-require-effective-target tls_native } */
> testsuite/g++.dg/gomp/tls-3.C:// { dg-require-effective-target tls_native }
> testsuite/g++.dg/gomp/tls-4.C:// { dg-require-effective-target tls_native }
> testsuite/gcc.dg/gomp/appendix-a/a.22.1.c:/* { dg-require-effective-target tls_native } */
> testsuite/gcc.dg/gomp/appendix-a/a.22.2.c:/* { dg-require-effective-target tls_native } */
> testsuite/gcc.dg/gomp/appendix-a/a.24.1.c:/* { dg-require-effective-target tls_native } */
> testsuite/gcc.dg/gomp/appendix-a/a.32.1.c:/* { dg-require-effective-target tls_native } */
> testsuite/gcc.dg/gomp/appendix-a/a.33.1.c:/* { dg-require-effective-target tls_native } */
> testsuite/gcc.dg/gomp/clause-1.c:/* { dg-require-effective-target tls_native } */
> testsuite/gcc.dg/gomp/copyin-1.c:// { dg-require-effective-target tls_native }
> testsuite/gcc.dg/gomp/pr35244.c:/* { dg-require-effective-target tls_native } */
> testsuite/gcc.dg/gomp/sharing-1.c:/* { dg-require-effective-target tls_native } */
> testsuite/gcc.dg/gomp/tls-1.c:// { dg-require-effective-target tls_native }
> testsuite/gcc.dg/gomp/tls-2.c:/* { dg-require-effective-target tls_native } */
> testsuite/gcc.dg/tls/alpha-1.c:/* { dg-require-effective-target tls_native } */
> testsuite/gcc.dg/tls/opt-1.c:/* { dg-require-effective-target tls_native } */
> testsuite/gcc.dg/tls/opt-13.c:/* { dg-require-effective-target tls_native } */
> testsuite/gcc.dg/tls/opt-14.c:/* { dg-require-effective-target tls_native } */
> testsuite/gcc.dg/tls/opt-15.c:/* { dg-require-effective-target tls_native } */
> testsuite/gcc.dg/tls/opt-2.c:/* { dg-require-effective-target tls_native } */
> testsuite/gcc.dg/tls/opt-3.c:/* { dg-require-effective-target tls_native } */
> testsuite/gcc.dg/tls/opt-4.c:/* { dg-require-effective-target tls_native } */
> testsuite/gcc.dg/tls/opt-7.c:/* { dg-require-effective-target tls_native } */
> testsuite/gcc.dg/tls/section-1.c:/* { dg-require-effective-target tls_native } */
> testsuite/gfortran.dg/gomp/appendix-a/a.22.1.f90:! { dg-require-effective-target tls_native }
> testsuite/gfortran.dg/gomp/appendix-a/a.22.4.f90:! { dg-require-effective-target tls_native }
> testsuite/gfortran.dg/gomp/appendix-a/a.22.5.f90:! { dg-require-effective-target tls_native }
> testsuite/gfortran.dg/gomp/appendix-a/a.22.6.f90:! { dg-require-effective-target tls_native }
> testsuite/gfortran.dg/gomp/appendix-a/a.24.1.f90:! { dg-require-effective-target tls_native }
> testsuite/gfortran.dg/gomp/appendix-a/a.32.1.f90:! { dg-require-effective-target tls_native }
> testsuite/gfortran.dg/gomp/appendix-a/a.33.1.f90:! { dg-require-effective-target tls_native }
> testsuite/gfortran.dg/gomp/crayptr2.f90:! { dg-require-effective-target tls_native }
> testsuite/gfortran.dg/gomp/fixed-1.f:C { dg-require-effective-target tls_native }
> testsuite/gfortran.dg/gomp/free-1.f90:! { dg-require-effective-target tls_native }
> testsuite/gfortran.dg/gomp/omp_threadprivate1.f90:! { dg-require-effective-target tls_native }
> testsuite/gfortran.dg/gomp/omp_threadprivate2.f90:! { dg-require-effective-target tls_native }
> testsuite/gfortran.dg/gomp/reduction1.f90:! { dg-require-effective-target tls_native }
> testsuite/gfortran.dg/gomp/sharing-1.f90:! { dg-require-effective-target tls_native }
> 
> Can you fix these as well?
>             Jack

Iain,
   After manually changing all of these from tls_native to tls, I am finding in the testsuite/gcc.dg section
that only the additional failures...

FAIL: gcc.dg/tls/opt-4.c scan-assembler tcc1@
FAIL: gcc.dg/tls/opt-4.c scan-assembler tcc2@
FAIL: gcc.dg/tls/opt-4.c scan-assembler-not tcc1[^@]
FAIL: gcc.dg/tls/opt-4.c scan-assembler-not tcc2[^@]
FAIL: gcc.dg/tls/section-1.c conflict with user-defined section (test for errors, line 12)

appear. In the case of gcc.dg/tls/opt-4.c, for...

 /sw/src/fink.build/gcc45-4.4.999-20100405/darwin_objdir/gcc/xgcc -B/sw/src/fink.build/gcc45-4.4.999-20100405/darwin_objdir/gcc/ /sw/src/fink.build/gcc45-4.4.999-20100405/gcc-4.5-20100405/gcc/testsuite/gcc.dg/tls/opt-4.c   -O2 -S  -m32 -o opt-4.s

I get...

        .text
        .align 4,0x90
.globl _baz
_baz:
        pushl   %ebp
        movl    %esp, %ebp
        pushl   %edi
        pushl   %esi
        pushl   %ebx
        subl    $76, %esp
        movl    8(%ebp), %edx
        call    ___i686.get_pc_thunk.bx
"L00000000001$pb":
        movl    12(%ebp), %ecx
        movl    (%edx), %edi
        testl   %edi, %edi
        je      L2
        movl    %edx, %esi
        movl    %ecx, -60(%ebp)
        .align 4,0x90
L7:
        testb   $8, 4(%edx)
        jne     L3
        testb   $8, 4(%esi)
        jne     L3
        testl   %edi, %edi
        jle     L3
        movl    L___emutls_v.tcc1$non_lazy_ptr-"L00000000001$pb"(%ebx), %eax
        movl    %edx, -32(%ebp)
        movl    %eax, (%esp)
        call    L___emutls_get_address$stub
        movl    -32(%ebp), %edx
        movl    (%eax), %eax
        testl   %eax, %eax
        movl    %eax, -28(%ebp)
        je      L12
L5:
        movl    -28(%ebp), %eax
        testb   $64, (%eax,%edi)
        je      L3
        movl    (%esi), %eax
        movl    -60(%ebp), %ecx
        movb    %al, (%ecx)
        movl    (%edx), %eax
        addl    $1, %ecx
        movl    %ecx, -60(%ebp)
        testl   %eax, %eax
        jne     L8
L9:
        movl    -60(%ebp), %eax
        movb    $0, (%eax)
L3:
        addl    $8, %esi
        movl    (%esi), %edi
        testl   %edi, %edi
        jne     L7
L2:
        addl    $76, %esp
        xorl    %eax, %eax
        popl    %ebx
        popl    %esi
        popl    %edi
        popl    %ebp
        ret
        .align 4,0x90
L8:
        movl    -60(%ebp), %ecx
        movb    $58, (%ecx)
        addl    $1, %ecx
        movl    %ecx, -60(%ebp)
        jmp     L9
        .align 4,0x90
L12:
        movl    L___emutls_v.tcc2$non_lazy_ptr-"L00000000001$pb"(%ebx), %eax
        movl    %eax, (%esp)
        call    L___emutls_get_address$stub
        movl    L___emutls_v.tcc1$non_lazy_ptr-"L00000000001$pb"(%ebx), %ecx
        movl    (%eax), %eax
        movl    (%eax), %eax
        movl    %ecx, (%esp)
        subl    $-128, %eax
        movl    %eax, -28(%ebp)
        call    L___emutls_get_address$stub
        movl    -28(%ebp), %ecx
        movl    -32(%ebp), %edx
        movl    %ecx, (%eax)
        jmp     L5
        .section __TEXT,__textcoal_nt,coalesced,pure_instructions
        .weak_definition        ___i686.get_pc_thunk.bx
        .private_extern ___i686.get_pc_thunk.bx
___i686.get_pc_thunk.bx:
        movl    (%esp), %ebx
        ret
        .picsymbol_stub
L___emutls_get_address$stub:
        .indirect_symbol ___emutls_get_address
        call    LPC$1
LPC$1:  popl    %eax
        movl    L1$lz-LPC$1(%eax),%edx
        jmp     *%edx
L___emutls_get_address$stub_binder:
        lea     L1$lz-LPC$1(%eax),%eax
        pushl   %eax
        jmp     dyld_stub_binding_helper
        .lazy_symbol_pointer
L1$lz:
        .indirect_symbol ___emutls_get_address
        .long   L___emutls_get_address$stub_binder
        .non_lazy_symbol_pointer
L___emutls_v.tcc1$non_lazy_ptr:
        .indirect_symbol ___emutls_v.tcc1
        .long   0
L___emutls_v.tcc2$non_lazy_ptr:
        .indirect_symbol ___emutls_v.tcc2
        .long   0
        .subsections_via_symbols

and for gcc.dg/tls/section-1.c with...

/sw/src/fink.build/gcc45-4.4.999-20100405/darwin_objdir/gcc/xgcc -B/sw/src/fink.build/gcc45-4.4.999-20100405/darwin_objdir/gcc/ /sw/src/fink.build/gcc45-4.4.999-20100405/gcc-4.5-20100405/gcc/testsuite/gcc.dg/tls/section-1.c    -ansi -pedantic-errors -S  -m32 -o section-1.s

I get...

        .section foo
        .align 2
___emutls_t.i:
        .space 4
.globl ___emutls_v.i
        .data
        .align 2
___emutls_v.i:
        .long   4
        .long   4
        .long   0
        .long   ___emutls_t.i
        .section .data
        .align 2
___emutls_t.j:
        .space 4
.globl ___emutls_v.j
        .data
        .align 2
___emutls_v.j:
        .long   4
        .long   4
        .long   0
        .long   ___emutls_t.j
.globl _k
        .section bar
        .align 2
_k:
        .space 4
        .align 2
___emutls_t.l:
        .space 4
.globl ___emutls_v.l
        .data
        .align 2
___emutls_v.l:
        .long   4
        .long   4
        .long   0
        .long   ___emutls_t.l
        .subsections_via_symbols


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]