From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14812 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] mips: add single-instruction math functions Date: Mon, 14 Oct 2019 10:18:59 -0400 Message-ID: <20191014141859.GM16318@brightrain.aerifal.cx> References: <20190911103224.504A15C44C@mx7.valuehost.ru> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="262401"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-14828-gllmg-musl=m.gmane.org@lists.openwall.com Mon Oct 14 16:19:15 2019 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1iK1Bq-0016A4-Nf for gllmg-musl@m.gmane.org; Mon, 14 Oct 2019 16:19:14 +0200 Original-Received: (qmail 26101 invoked by uid 550); 14 Oct 2019 14:19:12 -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 26083 invoked from network); 14 Oct 2019 14:19:11 -0000 Content-Disposition: inline In-Reply-To: <20190911103224.504A15C44C@mx7.valuehost.ru> Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:14812 Archived-At: On Wed, Sep 11, 2019 at 01:05:04PM +0300, info@mobile-stream.com wrote: > > non-commit text: > gcc puts annoying nop into the delay slot for these functions, e.g.: > abs.d $f0,$f12 > jr $ra > nop > is there any way to get rid of this without using pure .S? I'm taking care of merging this now, since it seems concerns about abs2008 being able to be treated as an isa level were adequately addressed, and one interesting thing is that I don't see the above happening. My mips toolchain is gcc 6.3.0 and I get: 00000000 : 0: 03e00008 jr ra 4: 46206005 abs.d $f0,$f12 Perhaps you have an older gcc, or there's some option that affects whether it can use delay slots? It looks like gcc is emitting the code as: #APP # 8 "../../src/math/mips/fabs.c" 1 abs.d $f0,$f12 # 0 "" 2 #NO_APP jr $31 but not using the noreorder directive, allowing the assembler to reorder into delay slots. Rich