All of lore.kernel.org
 help / color / mirror / Atom feed
From: Grant Grundler <grundler@parisc-linux.org>
To: John David Anglin <dave@hiauly1.hia.nrc.ca>
Cc: parisc-linux@lists.parisc-linux.org
Subject: Re: [parisc-linux] [gcc] should we teach gcc some new tricks?
Date: Thu, 24 Mar 2005 15:33:46 -0700	[thread overview]
Message-ID: <20050324223346.GE29361@colo.lackof.org> (raw)
In-Reply-To: <200503242133.j2OLXl4R020985@hiauly1.hia.nrc.ca>

On Thu, Mar 24, 2005 at 04:33:46PM -0500, John David Anglin wrote:
> > > 4.0 has a
> > > new option, -mfixed_range=, that was introduced so that a small range
> > > of fp registers could be used for the xmpyu multiplication insn.  It
> > > might be useful to experiment with this option to see if it useful.
> > 
> > I don't know enough about ABI to understand the issues here.
> > AFAIK, we currently are using FP registers because that's
> > the way multiplication is implemented in the integer math libs
> > we inherited.
> 
> No.  Currently in kernel builds, the use of FP registers is completely
> disabled and integer multiplication is done using the millicode library.

Erm...objdump disagrees:
grundler <541>hppa64-linux-objdump -rD vmlinux | fgrep xmpy | wc
   1654   11578   82683

First occurance is here:
000000001010bca0 <__muldi3>:
    1010bca0:   37 de 00 80     ldo 40(sp),sp
    1010bca4:   db 56 07 e0     extrd,s r26,31,32,r22
    1010bca8:   73 d6 3f 91     std r22,-38(sp)
    1010bcac:   53 d6 3f 93     fldd -38(sp),fr22
    1010bcb0:   73 d9 3f 91     std r25,-38(sp)
    1010bcb4:   53 d7 3f 93     fldd -38(sp),fr23
    1010bcb8:   3a d7 57 96     xmpyu fr22R,fr23R,fr22
    1010bcbc:   d3 53 1b f0     extrw,u r26,31,16,r19
    1010bcc0:   73 d6 3f 93     fstd fr22,-38(sp)
    1010bcc4:   53 d6 3f 91     ldd -38(sp),r22
...

objdump output is on still on gsyprf11:/tmp/2.6.12-rc1-objdump
In case you want to browse it more.

> However with a few FP regs, integer multiplication (32 bit) can be
> done in hardware except of course on machines that don't have FP
> hardware.  The downside is that the kernel has to save whatever
> FP registers it uses.

Yeah, I thought that was happening already.
I'm hoping "save_fp         %r25" in arch/parisc/kernel/entry.S
takes care of that.

> The -mfixed_range= option "fixes" a range if registers.  GCC won't
> use registers that are fixed.

Yeah, it might make sense to "document" current usage
and limit which FP regs the kernel can use. Ie we
could reduce FP state that needs to be save when
entering the kernel. Context switch would need to save
the rest.

thanks,
grant
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

  parent reply	other threads:[~2005-03-24 22:33 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-24 13:07 [parisc-linux] [gcc] should we teach gcc some new tricks? Randolph Chung
2005-03-24 13:27 ` James A. Morrison
2005-03-24 16:19   ` John David Anglin
2005-03-24 16:59     ` Grant Grundler
2005-03-24 17:35       ` John David Anglin
2005-03-24 21:23         ` Grant Grundler
     [not found]           ` <200503242133.j2OLXl4R020985@hiauly1.hia.nrc.ca>
2005-03-24 22:33             ` Grant Grundler [this message]
2005-03-24 23:34               ` John David Anglin
2005-03-24 23:55                 ` Randolph Chung
2005-03-24 23:59                   ` Randolph Chung
2005-03-25  0:07                   ` John David Anglin
2005-06-22 19:54             ` Joel Soete
2005-06-23  3:23               ` John David Anglin
2005-06-23  5:27               ` Grant Grundler
2005-06-23  6:10                 ` Joel Soete
2005-03-24 19:37       ` James A. Morrison
2005-03-24 21:33         ` Grant Grundler
2005-03-26  8:55       ` Matthias Klose
2005-03-26 15:48         ` John David Anglin
2005-03-26 21:35           ` Grant Grundler
     [not found]           ` <16971.44399.144991.110733@gargle.gargle.HOWL>
2005-03-29  1:36             ` John David Anglin
2005-03-31 12:08             ` Michael S. Zick
2005-05-02 18:37           ` Joel Soete
2005-05-02 19:01             ` John David Anglin
2005-05-02 20:20               ` John David Anglin
2005-05-02 20:46                 ` John David Anglin
2005-05-05 16:20                   ` Joel Soete
2005-05-05 17:07                     ` John David Anglin
2005-05-05 18:41                       ` Joel Soete
     [not found] <200505031334.j43DYRBT004104@hiauly1.hia.nrc.ca>
2005-05-03 17:58 ` Joel Soete
2005-05-03 19:00   ` John David Anglin
  -- strict thread matches above, loose matches on Subject: below --
2005-06-23  7:19 Joel Soete
2005-06-23 13:09 ` John David Anglin
     [not found] <42B91C1400000F85@mail-1-bnl.tiscali.it>
2005-06-25  6:46 ` John David Anglin
2005-06-25  8:29   ` Joel Soete
2005-07-01 13:43     ` Joel Soete
     [not found] <42C81991.6030502@tiscali.be>
2005-07-03 18:47 ` John David Anglin
2005-07-04 14:51   ` Joel Soete
2005-07-05 14:59     ` Joel Soete
2005-07-07  1:27     ` John David Anglin
     [not found] <200507051816.j65IGuIY028621@hiauly1.hia.nrc.ca>
2005-07-06 16:40 ` Joel Soete
2005-07-06 17:00   ` John David Anglin
     [not found] <42B91C1400005075@mail-1-bnl.tiscali.it>
2005-07-09 15:42 ` Joel Soete

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=20050324223346.GE29361@colo.lackof.org \
    --to=grundler@parisc-linux.org \
    --cc=dave@hiauly1.hia.nrc.ca \
    --cc=parisc-linux@lists.parisc-linux.org \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.