From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 705 invoked by alias); 10 Dec 2001 22:35:44 -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 32743 invoked from network); 10 Dec 2001 22:34:27 -0000 Received: from unknown (HELO motgate3.mot.com) (144.189.100.103) by sources.redhat.com with SMTP; 10 Dec 2001 22:34:27 -0000 Received: [from pobox2.mot.com (pobox2.mot.com [136.182.15.8]) by motgate3.mot.com (motgate3 2.1) with ESMTP id PAA24639; Mon, 10 Dec 2001 15:24:51 -0700 (MST)] Received: [from mail.wm.sps.mot.com ([199.10.246.2]) by pobox2.mot.com (MOT-pobox2 2.0) with ESMTP id PAA20167; Mon, 10 Dec 2001 15:34:25 -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 RAA12268; Mon, 10 Dec 2001 17:34:18 -0500 Received: by hyper.wm.sps.mot.com (8.11.2) id fBAMYNB29939; Mon, 10 Dec 2001 17:34:23 -0500 Date: Mon, 10 Dec 2001 15:06:00 -0000 Message-Id: <200112102234.fBAMYNB29939@hyper.wm.sps.mot.com> From: Peter Barada To: rth@redhat.com CC: Peter.Barada@motorola.com, gcc@gcc.gnu.org In-reply-to: <200112102157.fBALvF319525@hyper.wm.sps.mot.com> (message from Peter Barada on Mon, 10 Dec 2001 16:57:15 -0500) Subject: Re: Restricted addressing modes in ColdFire FPU for DFmode References: <200112080107.fB817Vs12521@hyper.wm.sps.mot.com> <20011208190919.B16973@redhat.com> <200112101607.fBAG7Pv24134@hyper.wm.sps.mot.com> <20011210131020.C23739@redhat.com> <200112102157.fBALvF319525@hyper.wm.sps.mot.com> X-SW-Source: 2001-12/txt/msg00560.txt.bz2 > >I'd have thought that check_v4e_legitimate_address() would have >rejected double indexed addressing (addressing mode 6), but I'm >confident I can figure out what's gone wrong... I modified LEGITIMIZE_ADDRESS to be the following(change marked with 'v4e') to force reg+reg into a register, and everything seems to work(modulo *extremely* limited testing). #define COPY_ONCE(Y) if (!copied) { Y = copy_rtx (Y); copied = ch = 1; } #define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN) \ { register int ch = (X) != (OLDX); \ if (GET_CODE (X) == PLUS) \ { int copied = 0; \ if (GET_CODE (XEXP (X, 0)) == MULT) \ { COPY_ONCE (X); XEXP (X, 0) = force_operand (XEXP (X, 0), 0);} \ if (GET_CODE (XEXP (X, 1)) == MULT) \ { COPY_ONCE (X); XEXP (X, 1) = force_operand (XEXP (X, 1), 0);} \ /* v4e */ if (TARGET_FPU_V4E && GET_MODE_CLASS (MODE) == MODE_FLOAT) \ /* v4e */ { X = force_reg(Pmode, X); goto WIN; } \ if (ch && GET_CODE (XEXP (X, 1)) == REG \ && GET_CODE (XEXP (X, 0)) == REG) \ goto WIN; \ if (ch) { GO_IF_LEGITIMATE_ADDRESS (MODE, X, WIN); } \ if (GET_CODE (XEXP (X, 0)) == REG \ || (GET_CODE (XEXP (X, 0)) == SIGN_EXTEND \ && GET_CODE (XEXP (XEXP (X, 0), 0)) == REG \ && GET_MODE (XEXP (XEXP (X, 0), 0)) == HImode)) \ { register rtx temp = gen_reg_rtx (Pmode); \ register rtx val = force_operand (XEXP (X, 1), 0); \ emit_move_insn (temp, val); \ COPY_ONCE (X); \ XEXP (X, 1) = temp; \ goto WIN; } \ else if (GET_CODE (XEXP (X, 1)) == REG \ || (GET_CODE (XEXP (X, 1)) == SIGN_EXTEND \ && GET_CODE (XEXP (XEXP (X, 1), 0)) == REG \ && GET_MODE (XEXP (XEXP (X, 1), 0)) == HImode)) \ { register rtx temp = gen_reg_rtx (Pmode); \ register rtx val = force_operand (XEXP (X, 0), 0); \ emit_move_insn (temp, val); \ COPY_ONCE (X); \ XEXP (X, 0) = temp; \ goto WIN; }}} Once I write the rest of the code, I'll come back and see if I can improve on the current solution. Again, thanx to everyone for all your help! -- Peter Barada Peter.Barada@motorola.com Wizard 781-852-2768 (direct) WaveMark Solutions(wholly owned by Motorola) 781-270-0193 (fax)