From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10294 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: build musl for armv7m Date: Tue, 5 Jul 2016 16:08:47 -0400 Message-ID: <20160705200847.GV15995@brightrain.aerifal.cx> References: <20160614163252.GQ22574@port70.net> <0e13c593-33fa-be67-5e73-cec7d7edfe15@codeaurora.org> <20160620195832.GN10893@brightrain.aerifal.cx> <20160622191940.GS10893@brightrain.aerifal.cx> <34aab271-7305-3376-f5ad-7ae161c93428@codeaurora.org> <20160622232640.GV10893@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1467749351 5029 80.91.229.3 (5 Jul 2016 20:09:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 Jul 2016 20:09:11 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-10307-gllmg-musl=m.gmane.org@lists.openwall.com Tue Jul 05 22:09:06 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1bKWeX-0002Tk-Vo for gllmg-musl@m.gmane.org; Tue, 05 Jul 2016 22:09:06 +0200 Original-Received: (qmail 24202 invoked by uid 550); 5 Jul 2016 20:09:02 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 24161 invoked from network); 5 Jul 2016 20:09:00 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:10294 Archived-At: On Wed, Jun 22, 2016 at 05:21:54PM -0700, Zhao, Weiming wrote: > diff --git a/src/string/arm/memcpy_le.S b/src/string/arm/memcpy_le.S > index 4db4844..df9f5c8 100644 > --- a/src/string/arm/memcpy_le.S > +++ b/src/string/arm/memcpy_le.S > @@ -241,7 +241,12 @@ non_congruent: > beq 2f > ldr r5, [r1], #4 > sub r2, r2, #4 > +#if !defined(__thumb2__) || (__ARM_ARCH_7A__ || __ARM_ARCH_7R__ || __ARM_ARCH > 7) > orr r4, r3, r5, lsl lr > +#else > + lsl r4, r5, lr > + orr r4, r3, r4 > +#endif I don't see how this new logic makes sense at all. The goal is to use the less-efficient code for the case where you're building as thumb and thumb2 is not supported (i.e. limited to thumb1). That would be: #if defined(__thumb2__) || !defined(__thumb__) orr r4, r3, r5, lsl lr #else lsl r4, r5, lr orr r4, r3, r4 #endif Does that look right? I'm trying to wrap up the 1.1.15 release right now so I don't think these changes will make it in, but I want to finish addressing _all_ of the thumb/cortex-m compat issues soon, hopefully in the next release cycle. Let's start a new thread figuring out what's still needed. Rich