mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: [PATCH] mips: add single-instruction math functions
Date: Mon, 14 Oct 2019 10:18:59 -0400	[thread overview]
Message-ID: <20191014141859.GM16318@brightrain.aerifal.cx> (raw)
In-Reply-To: <20190911103224.504A15C44C@mx7.valuehost.ru>

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 <fabs>:
   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


      parent reply	other threads:[~2019-10-14 14:18 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-11 10:05 info
2019-09-11 11:46 ` Rich Felker
2019-09-12 17:57 ` Rich Felker
2019-09-13 11:46   ` info
2019-09-13 18:31 ` Rich Felker
2019-09-13 18:56   ` Rich Felker
2019-09-13 19:12     ` James Y Knight
2019-09-13 20:01       ` Rich Felker
2019-09-13 20:23         ` Rich Felker
2019-09-18 13:07   ` info
2019-09-18 13:49     ` Rich Felker
2019-09-18 17:18   ` info
2019-09-18 20:04     ` Rich Felker
2019-09-19 12:54       ` info
2019-09-19 13:14         ` Rich Felker
2019-09-19 13:25           ` Rich Felker
2019-09-19 18:26           ` info
2019-09-19 19:10             ` Rich Felker
2019-10-14 14:18 ` Rich Felker [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191014141859.GM16318@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).