This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc 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]

[Bug libc/16150] New: __mpn_mul_1 and others resolve to VIS3 optimized routines at hosts without VIS3 insns available in non-shared case


https://sourceware.org/bugzilla/show_bug.cgi?id=16150

            Bug ID: 16150
           Summary: __mpn_mul_1 and others resolve to VIS3 optimized
                    routines at hosts without VIS3 insns available in
                    non-shared case
           Product: glibc
           Version: 2.18
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: ilmalakhov at yandex dot ru
                CC: drepper.fsp at gmail dot com

Hi

 There seems to be a misprint in `sysdeps/sparc/sparc64/multiarch/mul_1.S' and
a number of similar files added by the commit
`32fcb36dbf4f729d0b0e6d5c386fd1d68486463d', which makes statically-linked
programs executing at hosts lacking VIS3 insns crash with SIGILL. As one can
see, the resolver function below returns a pointer to `__mpn_mul_1_vis3' in
non-shared case even if `(_dl_hwcap & HWCAP_SPARC_VIS3) == 0'.

$ cat sysdeps/sparc/sparc64/multiarch/mul_1.S
. . .
ENTRY(__mpn_mul_1)
        .type   __mpn_mul_1, @gnu_indirect_function
. . .
        set     HWCAP_SPARC_VIS3, %o1
        andcc   %o0, %o1, %g0
        be      1f
. . .
1:
# ifdef SHARED
        sethi   %gdop_hix22(__mpn_mul_1_generic), %o1
        xor     %o1, %gdop_lox10(__mpn_mul_1_generic), %o1
# else  
        set     __mpn_mul_1_vis3, %o1
# endif

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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