Re: GCC porting question

Ken Rose <kenrose@tfb.com>
17 Jul 2003 00:28:50 -0400

          From comp.compilers

Related articles
GCC porting question cjaiprakash@noida.hcltech.com (C Jaiprakash, Noida) (2003-07-13)
Re: GCC porting question o8ue2fg702@sneakemail.com (Tim Olson) (2003-07-15)
Re: GCC porting question kenrose@tfb.com (Ken Rose) (2003-07-17)
Re: GCC porting question mrmnews@the-meissners.org (Michael Meissner) (2003-07-17)
| List of all articles for this month |

From: Ken Rose <kenrose@tfb.com>
Newsgroups: comp.compilers
Date: 17 Jul 2003 00:28:50 -0400
Organization: Posted via Supernews, http://www.supernews.com
References: 03-07-086
Keywords: GCC, architecture
Posted-Date: 17 Jul 2003 00:28:50 EDT

"C Jaiprakash, Noida" wrote:
>
> Hi,
> Can gcc be ported to a machine which do not have diaplacement
> addressing mode?


Yes. I've done it.


> If yes then what sould macros related to base register be defined as?
> for ex ( REG_OK_FOR_BASE_P, BASE_REG_CLASS )


I was working with a machine where the 32 GP registers were OK for an
indirect load, hence the otherwise-magical 32s below. Here are the
relevant lines from tm.h.


#define BASE_REG_CLASS ALL_REGS


#define REGNO_OK_FOR_BASE_P(REGNO) \
    ((REGNO) < 32 || (unsigned) reg_renumber[REGNO] < 32)
#ifndef REG_OK_STRICT
# define REG_OK_FOR_BASE_P(X) 1
#else
# define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P (REGNO (X))
#endif


Tag me off-group if I can help further. (or on-group, if John would
prefer that?)


  - ken


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.