From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18354 invoked by alias); 5 Dec 2001 23:04:32 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 17331 invoked from network); 5 Dec 2001 23:03:08 -0000 Received: from unknown (HELO motgate3.mot.com) (144.189.100.103) by sources.redhat.com with SMTP; 5 Dec 2001 23:03:08 -0000 Received: [from pobox4.mot.com (pobox4.mot.com [10.64.251.243]) by motgate3.mot.com (motgate3 2.1) with ESMTP id PAA00876 for ; Wed, 5 Dec 2001 15:53:38 -0700 (MST)] Received: [from mail.wm.sps.mot.com ([199.10.246.2]) by pobox4.mot.com (MOT-pobox4 2.0) with ESMTP id QAA23775 for ; Wed, 5 Dec 2001 16:03:07 -0700 (MST)] Received: from hyper.wm.sps.mot.com (hyper.wm.sps.mot.com [199.10.246.43]) by mail.wm.sps.mot.com (8.9.3/8.9.3) with ESMTP id SAA11259 for ; Wed, 5 Dec 2001 18:02:58 -0500 Received: by hyper.wm.sps.mot.com (8.11.2) id fB5N35o14369; Wed, 5 Dec 2001 18:03:05 -0500 Date: Wed, 05 Dec 2001 15:04:00 -0000 Message-Id: <200112052303.fB5N35o14369@hyper.wm.sps.mot.com> From: Peter Barada CC: gcc@gcc.gnu.org Subject: How to load FP consts from memory? X-SW-Source: 2001-12/txt/msg00244.txt.bz2 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)