Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Mon, 14 Oct 2019 10:18:59 -0400
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: [PATCH] mips: add single-instruction math functions

On Wed, Sep 11, 2019 at 01:05:04PM +0300, info@...ile-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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.