This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
How to load FP consts from memory?
- From: Peter Barada <pbarada at mail dot wm dot sps dot mot dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 5 Dec 2001 18:03:05 -0500
- Subject: How to load FP consts from memory?
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)