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 string/18880] New: Wrong selector in x86_64/multiarch/memcpy.S


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

            Bug ID: 18880
           Summary: Wrong selector in x86_64/multiarch/memcpy.S
           Product: glibc
           Version: 2.23
            Status: NEW
          Severity: normal
          Priority: P2
         Component: string
          Assignee: unassigned at sourceware dot org
          Reporter: hjl.tools at gmail dot com
  Target Milestone: ---

x86_64/multiarch/memcpy.S has

ENTRY(__new_memcpy)
        .type   __new_memcpy, @gnu_indirect_function
        LOAD_RTLD_GLOBAL_RO_RDX
        leaq    __memcpy_avx_unaligned(%rip), %rax
        HAS_ARCH_FEATURE (AVX_Fast_Unaligned_Load)
        jz 1f
        ret
1:      leaq    __memcpy_sse2(%rip), %rax
        HAS_ARCH_FEATURE (Slow_BSF)
        jnz     2f
        leaq    __memcpy_sse2_unaligned(%rip), %rax
        ret
2:      HAS_CPU_FEATURE (SSSE3)
        jz 3f
        leaq    __memcpy_ssse3(%rip), %rax
3:      ret
END(__new_memcpy)

But Slow_BSF feature has nothing to do with any memcpy implementations.
It should be

ENTRY(__new_memcpy)
        .type   __new_memcpy, @gnu_indirect_function
        LOAD_RTLD_GLOBAL_RO_RDX
        leaq    __memcpy_avx_unaligned(%rip), %rax
        HAS_ARCH_FEATURE (AVX_Fast_Unaligned_Load)
        jz 1f
        ret
1:      leaq    __memcpy_sse2_unaligned(%rip), %rax
        HAS_ARCH_FEATURE (Fast_Unaligned_Load)
        jz      2f
        ret
2:      leaq    __memcpy_sse2(%rip), %rax
        HAS_CPU_FEATURE (SSSE3)
        jz 3f
        leaq    __memcpy_ssse3(%rip), %rax
3:      ret
END(__new_memcpy)

-- 
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]