Message ID | 57221FF1.7030902@linux.vnet.ibm.com |
---|---|
State | Committed |
Delegated to: | Tulio Magno Quites Machado Filho |
Headers |
Received: (qmail 79914 invoked by alias); 28 Apr 2016 14:36:48 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <libc-alpha.sourceware.org> List-Unsubscribe: <mailto:libc-alpha-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:libc-alpha-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 79882 invoked by uid 89); 28 Apr 2016 14:36:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=murphy, Hx-languages-length:969 X-HELO: e19.ny.us.ibm.com X-IBM-Helo: d01dlp02.pok.ibm.com X-IBM-MailFrom: murphyp@linux.vnet.ibm.com X-IBM-RcptTo: libc-alpha@sourceware.org From: "Paul E. Murphy" <murphyp@linux.vnet.ibm.com> Subject: [PATCH] powerpc: Add missing insn in swapcontext [BZ #20004] To: "libc-alpha@sourceware.org" <libc-alpha@sourceware.org>, Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com> Message-ID: <57221FF1.7030902@linux.vnet.ibm.com> Date: Thu, 28 Apr 2016 09:36:33 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16042814-0057-0000-0000-0000042DA86A X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused |
Commit Message
Paul E. Murphy
April 28, 2016, 2:36 p.m. UTC
A missing instruction was discovered in the compat version of swapcontext while running the GCC test suite. 2016-04-28 Paul E. Murphy <murphyp@linux.vnet.ibm.com> Segher Boessenkool <segher@gcc.gnu.org> [BZ #20004] * sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S: (__novec_swapcontext): Add missing load. --- sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S | 1 + 1 file changed, 1 insertion(+)
Comments
On 04/28/2016 10:36 AM, Paul E. Murphy wrote: > A missing instruction was discovered in the compat version of > swapcontext while running the GCC test suite. > > 2016-04-28 Paul E. Murphy <murphyp@linux.vnet.ibm.com> > Segher Boessenkool <segher@gcc.gnu.org> > > [BZ #20004] > * sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S: > (__novec_swapcontext): Add missing load. > --- > sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S > index a166dcc..a05a9cc 100644 > --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S > +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S > @@ -163,6 +163,7 @@ ENTRY(__novec_swapcontext) > cmpdi r0,0 > bne L(nv_do_sigret) > > + ld r8,.LC__dl_hwcap@toc(r2) > # ifdef SHARED > /* Load _rtld-global._dl_hwcap. */ > ld r8,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET(r8) > How did you test this?
On 04/28/2016 10:37 AM, Carlos O'Donell wrote: > On 04/28/2016 10:36 AM, Paul E. Murphy wrote: >> A missing instruction was discovered in the compat version of >> swapcontext while running the GCC test suite. >> >> 2016-04-28 Paul E. Murphy <murphyp@linux.vnet.ibm.com> >> Segher Boessenkool <segher@gcc.gnu.org> >> >> [BZ #20004] >> * sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S: >> (__novec_swapcontext): Add missing load. >> --- >> sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S >> index a166dcc..a05a9cc 100644 >> --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S >> +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S >> @@ -163,6 +163,7 @@ ENTRY(__novec_swapcontext) >> cmpdi r0,0 >> bne L(nv_do_sigret) >> >> + ld r8,.LC__dl_hwcap@toc(r2) >> # ifdef SHARED >> /* Load _rtld-global._dl_hwcap. */ >> ld r8,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET(r8) >> > > How did you test this? A slightly hacked up, debate-ably correct, example provided by the makecontext man page, which is modified to explicitly call the old version. I directly linked the generated object files. Without this patch it segfaults. With it, seemingly expected output.
On 04/28/2016 12:39 PM, Paul E. Murphy wrote: > On 04/28/2016 10:37 AM, Carlos O'Donell wrote: >> On 04/28/2016 10:36 AM, Paul E. Murphy wrote: >>> A missing instruction was discovered in the compat version of >>> swapcontext while running the GCC test suite. >>> >>> 2016-04-28 Paul E. Murphy <murphyp@linux.vnet.ibm.com> >>> Segher Boessenkool <segher@gcc.gnu.org> >>> >>> [BZ #20004] >>> * sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S: >>> (__novec_swapcontext): Add missing load. >>> --- >>> sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S | 1 + >>> 1 file changed, 1 insertion(+) >>> >>> diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S >>> index a166dcc..a05a9cc 100644 >>> --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S >>> +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S >>> @@ -163,6 +163,7 @@ ENTRY(__novec_swapcontext) >>> cmpdi r0,0 >>> bne L(nv_do_sigret) >>> >>> + ld r8,.LC__dl_hwcap@toc(r2) >>> # ifdef SHARED >>> /* Load _rtld-global._dl_hwcap. */ >>> ld r8,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET(r8) >>> >> >> How did you test this? > > A slightly hacked up, debate-ably correct, example provided by the > makecontext man page, which is modified to explicitly call the old > version. I directly linked the generated object files. > > Without this patch it segfaults. With it, seemingly expected output. Looks good to me then :-)
"Paul E. Murphy" <murphyp@linux.vnet.ibm.com> writes: > A missing instruction was discovered in the compat version of > swapcontext while running the GCC test suite. > > 2016-04-28 Paul E. Murphy <murphyp@linux.vnet.ibm.com> > Segher Boessenkool <segher@gcc.gnu.org> > > [BZ #20004] > * sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S: > (__novec_swapcontext): Add missing load. LGTM.
Committed as cbc06bc486635347ee0da51d04a82eedf51602d5. On 04/28/2016 09:36 AM, Paul E. Murphy wrote: > A missing instruction was discovered in the compat version of > swapcontext while running the GCC test suite. > > 2016-04-28 Paul E. Murphy <murphyp@linux.vnet.ibm.com> > Segher Boessenkool <segher@gcc.gnu.org> > > [BZ #20004] > * sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S: > (__novec_swapcontext): Add missing load. > --- > sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S > index a166dcc..a05a9cc 100644 > --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S > +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S > @@ -163,6 +163,7 @@ ENTRY(__novec_swapcontext) > cmpdi r0,0 > bne L(nv_do_sigret) > > + ld r8,.LC__dl_hwcap@toc(r2) > # ifdef SHARED > /* Load _rtld-global._dl_hwcap. */ > ld r8,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET(r8) >
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S index a166dcc..a05a9cc 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S @@ -163,6 +163,7 @@ ENTRY(__novec_swapcontext) cmpdi r0,0 bne L(nv_do_sigret) + ld r8,.LC__dl_hwcap@toc(r2) # ifdef SHARED /* Load _rtld-global._dl_hwcap. */ ld r8,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET(r8)