public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* How to load FP consts from memory?
@ 2001-12-05 15:04 Peter Barada
  2001-12-05 16:30 ` Richard Henderson
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Barada @ 2001-12-05 15:04 UTC (permalink / raw)
  Cc: gcc


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)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How to load FP consts from memory?
  2001-12-05 15:04 How to load FP consts from memory? Peter Barada
@ 2001-12-05 16:30 ` Richard Henderson
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 2001-12-05 16:30 UTC (permalink / raw)
  To: Peter Barada; +Cc: gcc

On Wed, Dec 05, 2001 at 06:03:05PM -0500, Peter Barada wrote:
> 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? 

m68k-elf with the -fpic option does this.


r~

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-12-06  0:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-05 15:04 How to load FP consts from memory? Peter Barada
2001-12-05 16:30 ` Richard Henderson

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).