From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/8698 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] convert arm memcpy asm to UAL, remove .word hacks Date: Mon, 19 Oct 2015 17:15:53 -0400 Message-ID: <20151019211553.GO8645@brightrain.aerifal.cx> References: <20151019001743.GA4363@brightrain.aerifal.cx> <7CC703B4-FA8E-413E-BBFE-73E2107D36EF@gmail.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1445289372 31695 80.91.229.3 (19 Oct 2015 21:16:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 19 Oct 2015 21:16:12 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-8710-gllmg-musl=m.gmane.org@lists.openwall.com Mon Oct 19 23:16:12 2015 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 1ZoHmq-00073h-Dx for gllmg-musl@m.gmane.org; Mon, 19 Oct 2015 23:16:08 +0200 Original-Received: (qmail 15813 invoked by uid 550); 19 Oct 2015 21:16:06 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 15780 invoked from network); 19 Oct 2015 21:16:05 -0000 Content-Disposition: inline In-Reply-To: <7CC703B4-FA8E-413E-BBFE-73E2107D36EF@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:8698 Archived-At: On Mon, Oct 19, 2015 at 02:07:53PM -0700, Khem Raj wrote: > > > On Oct 18, 2015, at 5:17 PM, Rich Felker wrote: > > > > I've found that, contrary to the message in commit > > 9367fe926196f407705bb07cd29c6e40eb1774dd, all relevant gas versions > > actually do support .syntax unified, and assemble memcpy.s > > successfully with the attached patch applied. If there are no > > objections I'd like to go ahead and commit it. The only remaining > > .word hacks I'm aware of are in setjmp and longjmp, but they may still > > be needed to avoid wrongly flagging plain EABI (softfloat) binaries > > as needing hard float. > > IIRC .syntax should not affect the fp ABI assumptions, Its plainly > for unifying arm/thumb-ness in asm files and .eabi_attribute is the > directive which could set FP ABI and I don’t see it being set in asm > file which means it will be set depending on compiler cmdline. Right now setjmp and longjmp use .word to encode the instrutions: stc p11, cr8, [ip], #64 ldc p11, cr8, [ip], #64 because UAL does not permit them. Switching to the forms: vstmia ip!, {d8-d15} vldmia ip!, {d8-d15} would of course work, but these are floating point instructions, so they're not accessible without using .fpu, and then the object file is tagged as needing fpu, despite these instructions being needed even for no-fpu builds and only executed conditionally. (They're needed conditionally because, even if libc is soft ABI, the caller could be using "softfp" model, and in that case longjmp needs to be able to restore call-saved fp registers that have been modified between setjmp and longjmp.) Do you know a viable way to include these instructions without the file getting an ABI-tag marking it as requiring fpu? Rich