public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Peter Barada <pbarada@mail.wm.sps.mot.com>
Cc: gcc@gcc.gnu.org
Subject: How to load FP consts from memory?
Date: Wed, 05 Dec 2001 15:04:00 -0000	[thread overview]
Message-ID: <200112052303.fB5N35o14369@hyper.wm.sps.mot.com> (raw)


I'm trying to add in ColdFire V4E FPU support to gcc-2.95.3, and I've
got a major question to ask.

The ColdFire FPU can only load/store an FPU register via register direct(if
the format is byte,word,longword or SFmode), register indirect,
postincrement, predecrement, register indirect with displacement, or
PC relative(for loads only).   This means that the fmove instruction
can *not* deal with absolute addresses or immediate values, or
data registers(for DFmode) as the source/desination of the load/store. 

I think I can figure out how to deal with loading/storing to absolute
addresses by forcing the address into a register and using register
indirect to access the value. What I've got a problem with is how to
get the FPU to deal with the DFmode constants.  I'd like to put them
together into a pool that is attached to the function and loaded via
PC relative addressing mode.  I'm starting to look at force_const_mem
and friends.

Anybody have a suggestion of where I can find example code in one of
the machine description directories that used the constant pool to
hold constants on a function-by-function basis using pc-relative
addressing, or if not, how best to go about it? 

Thanks in advance.

-- 
Peter Barada                                   Peter.Barada@motorola.com
Wizard                                         781-852-2768 (direct)
WaveMark Solutions(wholly owned by Motorola)   781-270-0193 (fax)

             reply	other threads:[~2001-12-05 23:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-05 15:04 Peter Barada [this message]
2001-12-05 16:30 ` Richard Henderson

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=200112052303.fB5N35o14369@hyper.wm.sps.mot.com \
    --to=pbarada@mail.wm.sps.mot.com \
    --cc=gcc@gcc.gnu.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 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 read-only IMAP folder(s) and NNTP newsgroup(s).