From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13622 invoked by alias); 16 Sep 2004 05:45:18 -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 13613 invoked from network); 16 Sep 2004 05:45:17 -0000 Received: from unknown (HELO baradas.org) (66.166.225.55) by sourceware.org with SMTP; 16 Sep 2004 05:45:17 -0000 Received: by baradas.org (Postfix, from userid 500) id 50E05988B3; Thu, 16 Sep 2004 01:45:17 -0400 (EDT) From: Peter Barada To: schwab@suse.de Cc: C.Jaiprakash@noida.hcltech.com, gcc@gcc.gnu.org In-reply-to: (message from Andreas Schwab on Wed, 15 Sep 2004 21:42:17 +0200) Subject: Re: PIC code for coldfire v4e References: <33BC33A9E76474479B76AD0DE8A169728DD2@exch-ntd.nec.noida.hcltech.com> Message-Id: <20040916054517.50E05988B3@baradas.org> Date: Thu, 16 Sep 2004 07:38:00 -0000 X-SW-Source: 2004-09/txt/msg00973.txt.bz2 >> Hi, >> I am trying to provide PIC support for coldfire v4e. Curently movsi pattern generates PIC code , basically it generates a RTX like PLUS(a5, symbolic_operand) where a5 is PIC offset table pointer. And at the final assembly o/p @GOT is appended to the symbol if base register is a5. For coldfire v4e this can not be done because only 16 bit offset is allowed. May be something like >> lea running@GOT.w, %register >> move.l (%a5,%register), %a0 >> instead of >> move.l running@GOT.w(%a5),%a0 > ^^ > >This is already a 16 bit offset. For -fpic (as opposed to -fPIC) you >don't have to change anything here. You could just declare -fPIC >unsupported for this coldfire model (like it is done for m680[01]0.) See: http://gcc.gnu.org/ml/gcc/2002-12/msg00343.html for the start of a thread where I tried to implement this back in 2002. Perhaps it will shortcut some of the issues you are about to get run over by. Unfortunately I ran out of time before I was able to fully implement/test it... Andres, see: http://gcc.gnu.org/ml/gcc/2002-12/msg00345.html for my response to your same suggestion :) -- Peter Barada peter@the-baradas.com