From patchwork Mon Jan 18 23:44:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Pluzhnikov X-Patchwork-Id: 10444 Received: (qmail 82622 invoked by alias); 18 Jan 2016 23:44:39 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 82603 invoked by uid 89); 18 Jan 2016 23:44:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.4 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, SPF_PASS, UNWANTED_LANGUAGE_BODY autolearn=ham version=3.3.2 spammy=*cond, 171, 7, 1717, 287 X-HELO: mail-wm0-f43.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=gXngzEmnrDI3NDp7Z+/x+9PWiGgy0Qb1HEz/siMUWVc=; b=CA8oaV2A7Cs5+iaDDRAw6u8fobuzzuw74LRBscnL3u6GDiMDX4gARVV8SB4vEcE0Qx swCf9COixhiKpu6Lejcwxn4jSxi5UKbWM2mLks+49qQtA9lbN0NvPr+392XArL/OtPDs U5vNVTDq7PjAGoacrEsWWt8fDZWLFwonb+vg3PFXzuQFafaGJawXlHM6du48Z5SxmPDl VYQB7UO6QR4+sNlFBjYDDnGwh+LJT7S26pwluRfrpQr5MBmU6DDpyqgQTaqkacuMA1rB Tz0G9CU1lVOAv18+Di5rN9SF/oLrJVJoT6eqg/uF4HOdw4l483DswsaDMFWW/1hBMQX6 zSJw== X-Gm-Message-State: AG10YOQFbx0ZyEpnFRjBiQ3iVRpXOZaLmOxPsHHDfn1OYIuxyU8y1VTYXxBVBbN0/CRKrUk5XfDViFPjNyyhhhqt X-Received: by 10.28.11.77 with SMTP id 74mr16682908wml.36.1453160673959; Mon, 18 Jan 2016 15:44:33 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <569D64D3.7030400@redhat.com> From: Paul Pluzhnikov Date: Mon, 18 Jan 2016 15:44:04 -0800 Message-ID: Subject: Re: [patch] Use ENTRY/END in sysdeps/x86_64/nptl/pthread_spin*.S To: "Carlos O'Donell" Cc: GLIBC Devel , Wei Mi On Mon, Jan 18, 2016 at 3:22 PM, Paul Pluzhnikov wrote: > On Mon, Jan 18, 2016 at 2:18 PM, Carlos O'Donell wrote: > >> It needs a public bug though. > > I opened https://sourceware.org/bugzilla/show_bug.cgi?id=19490 Updated patch with fixed ChangeLog, pthread_cond_{broadcast,signal} and BZ entry added. 2016-01-18 Paul Pluzhnikov [BZ #19490] * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S (pthread_cond_broadcast): Use ENTRY/END * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S (pthread_cond_signal): Likewise * sysdeps/x86_64/nptl/pthread_spin_lock.S (pthread_spin_lock): Likewise * sysdeps/x86_64/nptl/pthread_spin_trylock.S (pthread_spin_trylock): Likewise * sysdeps/x86_64/nptl/pthread_spin_unlock.S (pthread_spin_unlock): Likewise diff --git a/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S b/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S index b32397ca..de455dd 100644 --- a/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S +++ b/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S @@ -28,10 +28,7 @@ .text /* int pthread_cond_broadcast (pthread_cond_t *cond) */ - .globl __pthread_cond_broadcast - .type __pthread_cond_broadcast, @function - .align 16 -__pthread_cond_broadcast: +ENTRY(__pthread_cond_broadcast) LIBC_PROBE (cond_broadcast, 1, %rdi) @@ -174,6 +171,7 @@ __pthread_cond_broadcast: movl $SYS_futex, %eax syscall jmp 10b - .size __pthread_cond_broadcast, .-__pthread_cond_broadcast +END(__pthread_cond_broadcast) + versioned_symbol (libpthread, __pthread_cond_broadcast, pthread_cond_broadcast, GLIBC_2_3_2) diff --git a/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S b/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S index 84665d7..da14bc3 100644 --- a/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S +++ b/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S @@ -28,11 +28,7 @@ .text - /* int pthread_cond_signal (pthread_cond_t *cond) */ - .globl __pthread_cond_signal - .type __pthread_cond_signal, @function - .align 16 -__pthread_cond_signal: +ENTRY(__pthread_cond_signal) LIBC_PROBE (cond_signal, 1, %rdi) @@ -159,6 +155,7 @@ __pthread_cond_signal: cmovne %eax, %esi callq __lll_unlock_wake jmp 6b - .size __pthread_cond_signal, .-__pthread_cond_signal +END(__pthread_cond_signal) + versioned_symbol (libpthread, __pthread_cond_signal, pthread_cond_signal, GLIBC_2_3_2) diff --git a/sysdeps/x86_64/nptl/pthread_spin_lock.S b/sysdeps/x86_64/nptl/pthread_spin_lock.S index c9b9424..b871241 100644 --- a/sysdeps/x86_64/nptl/pthread_spin_lock.S +++ b/sysdeps/x86_64/nptl/pthread_spin_lock.S @@ -16,11 +16,9 @@ . */ #include +#include - .globl pthread_spin_lock - .type pthread_spin_lock,@function - .align 16 -pthread_spin_lock: +ENTRY(pthread_spin_lock) 1: LOCK decl 0(%rdi) jne 2f @@ -33,4 +31,4 @@ pthread_spin_lock: cmpl $0, 0(%rdi) jg 1b jmp 2b - .size pthread_spin_lock,.-pthread_spin_lock +END(pthread_spin_lock) diff --git a/sysdeps/x86_64/nptl/pthread_spin_trylock.S b/sysdeps/x86_64/nptl/pthread_spin_trylock.S index fc74d77..c9c5317 100644 --- a/sysdeps/x86_64/nptl/pthread_spin_trylock.S +++ b/sysdeps/x86_64/nptl/pthread_spin_trylock.S @@ -17,6 +17,7 @@ . */ #include +#include #ifdef UP @@ -25,10 +26,7 @@ # define LOCK lock #endif - .globl pthread_spin_trylock - .type pthread_spin_trylock,@function - .align 16 -pthread_spin_trylock: +ENTRY(pthread_spin_trylock) movl $1, %eax xorl %ecx, %ecx LOCK @@ -36,4 +34,4 @@ pthread_spin_trylock: movl $EBUSY, %eax cmovel %ecx, %eax retq - .size pthread_spin_trylock,.-pthread_spin_trylock +END(pthread_spin_trylock) diff --git a/sysdeps/x86_64/nptl/pthread_spin_unlock.S b/sysdeps/x86_64/nptl/pthread_spin_unlock.S index e341018..188de2e 100644 --- a/sysdeps/x86_64/nptl/pthread_spin_unlock.S +++ b/sysdeps/x86_64/nptl/pthread_spin_unlock.S @@ -16,14 +16,13 @@ License along with the GNU C Library; if not, see . */ - .globl pthread_spin_unlock - .type pthread_spin_unlock,@function - .align 16 -pthread_spin_unlock: +#include + +ENTRY(pthread_spin_unlock) movl $1, (%rdi) xorl %eax, %eax retq - .size pthread_spin_unlock,.-pthread_spin_unlock +END(pthread_spin_unlock) /* The implementation of pthread_spin_init is identical. */ .globl pthread_spin_init