Message ID | 1419270604.27606.32.camel@ubuntu-sellcey |
---|---|
State | Committed |
Headers |
Received: (qmail 27300 invoked by alias); 22 Dec 2014 17:50:11 -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 27285 invoked by uid 89); 22 Dec 2014 17:50:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mailapp01.imgtec.com Message-ID: <1419270604.27606.32.camel@ubuntu-sellcey> Subject: RE: [Patch, MIPS] Modify memset.S for mips32r6/mips64r6 From: Steve Ellcey <sellcey@imgtec.com> Reply-To: <sellcey@imgtec.com> To: Joseph Myers <joseph@codesourcery.com> CC: Matthew Fortune <Matthew.Fortune@imgtec.com>, "libc-alpha@sourceware.org" <libc-alpha@sourceware.org> Date: Mon, 22 Dec 2014 09:50:04 -0800 In-Reply-To: <alpine.DEB.2.10.1412200020590.29462@digraph.polyomino.org.uk> References: <2923c970-026c-4e00-be7a-0650e82421b5@BAMAIL02.ba.imgtec.org> <6D39441BF12EF246A7ABCE6654B0235320F8CECA@LEMAIL01.le.imgtec.org> <alpine.DEB.2.10.1412200020590.29462@digraph.polyomino.org.uk> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 |
Commit Message
Steve Ellcey
Dec. 22, 2014, 5:50 p.m. UTC
On Sat, 2014-12-20 at 00:23 +0000, Joseph Myers wrote: > Please put this in a central place (a single header that defines > __mips_isa_rev to 0 if not already defined, for example) rather than > duplicating "defined" tests in different places ("defined" tests are > typo-prone and so discouraged in glibc). Would sysdeps/unix/mips/sysdep.h be an appropriate place to define __mips_isa_rev? That header is already used by memcpy and memset. I thought about using asm.h but that header is visible to users and defining it there would be a visible change that could affect user programs. sysdep.h is internal to glibc and so does not have that problem. If we add it here there would be no changes needed to memcpy.S or memset.S, though Ondrej had some useful performance comments I would like to look at later (once we have the basic functionality checked in). Steve Ellcey sellcey@imgtec.com 2014-12-22 Steve Ellcey <sellcey@imgtec.com> * sysdeps/unix/mips/sysdep.h (__mips_isa_rev): Set to zero if not already defined.
Comments
On Mon, 22 Dec 2014, Steve Ellcey wrote: > Would sysdeps/unix/mips/sysdep.h be an appropriate place to define > __mips_isa_rev? That header is already used by memcpy and memset. > I thought about using asm.h but that header is visible to users and > defining it there would be a visible change that could affect user > programs. sysdep.h is internal to glibc and so does not have that > problem. Seems reasonable. This sysdep.h patch is OK. Does it fix all __mips_isa_rev -Wundef warnings in the build (for the older MIPS versions for which this was an issue) or do some files need changing to include sysdep.h.
On Mon, 2014-12-22 at 17:58 +0000, Joseph Myers wrote: > On Mon, 22 Dec 2014, Steve Ellcey wrote: > > > Would sysdeps/unix/mips/sysdep.h be an appropriate place to define > > __mips_isa_rev? That header is already used by memcpy and memset. > > I thought about using asm.h but that header is visible to users and > > defining it there would be a visible change that could affect user > > programs. sysdep.h is internal to glibc and so does not have that > > problem. > > Seems reasonable. This sysdep.h patch is OK. Does it fix all > __mips_isa_rev -Wundef warnings in the build (for the older MIPS versions > for which this was an issue) or do some files need changing to include > sysdep.h. It should fix all the _mips_isa_rev -Wundef warnings except for the check I added last week to sysdeps/mips/machine-gmon.h. Neither that header nor gmon/mcount.c which uses that header includes sysdep.h. Steve Ellcey sellcey@imgtec.com
diff --git a/sysdeps/unix/mips/sysdep.h b/sysdeps/unix/mips/sysdep.h index d59fac0..dc70c0f 100644 --- a/sysdeps/unix/mips/sysdep.h +++ b/sysdeps/unix/mips/sysdep.h @@ -78,4 +78,8 @@ # define L(label) .L ## label #endif +#ifndef __mips_isa_rev +# define __mips_isa_rev 0 +#endif + #endif