Migration of GCC cross compiler to 3.4.6

Mohamed Shafi <shafitvm@yahoo.com>
24 Aug 2006 18:15:41 -0400

          From comp.compilers

Related articles
Migration of GCC cross compiler to 3.4.6 shafitvm@yahoo.com (Mohamed Shafi) (2006-08-24)
Re: Migration of GCC cross compiler to 3.4.6 rmathew@gmail.com (Ranjit Mathew) (2006-08-25)
| List of all articles for this month |
From: Mohamed Shafi <shafitvm@yahoo.com>
Newsgroups: comp.compilers
Date: 24 Aug 2006 18:15:41 -0400
Organization: Compilers Central
Keywords: GCC, question
Posted-Date: 24 Aug 2006 18:15:41 EDT

Hello everyone,


I am upgrading a cross compiler from 3.2 to 3.4.6
I had to change some of the TARGET description macros
in target.h file
for otherwise while building i am getting "attempt to
use poisoned" errors


Presently what is written in target.h is


1. #define CPP_PREDEFINES \
"-Dtargetname -D__targetname__ -Amachine=targetname"


corresponding macro in 3.4.6 is
"TARGET_CPU_CPP_BUILTINS"




2. #define CONST_COSTS(RTX, CODE, OUTER_CODE) \
     case CONST_INT: \
         return target_const_costs (RTX, OUTER_CODE);
\
     case CONST: \
         return 5; \
     case LABEL_REF: \
         return 1; \
     case SYMBOL_REF: \
         return ((TARGET_SMALL_MODEL)? 2: 3); \
     case CONST_DOUBLE: \
             return 10;


             i dont know the corresponding macro in 3.4.6


3. #define ADDRESS_COST(RTX) 1




corresponding macro in 3.4.6 is "int
TARGET_ADDRESS_COST (rtx address)"




4. #define RTX_COSTS(X, CODE, OUTER_CODE) \
     case MULT:
      \
     return COSTS_N_INSNS (2);
  \
     case DIV: \
     case UDIV: \
     case MOD: \
     case UMOD: \
     return COSTS_N_INSNS (30); \
     case FLOAT: \
     case FIX: \
     return COSTS_N_INSNS (100);




     corresponding macro in 3.4.6 is "bool
TARGET_RTX_COSTS (rtx x, int code, int outer_code, int
*total)"




    5. #define ASM_GLOBALIZE_LABEL(STREAM,NAME) \
     do \
     { \
     fputs ("\t.globl ", STREAM); \
     assemble_name (STREAM, NAME); \
     fputs ("\n", STREAM); \
     } \
     while (0)




     corresponding macro in 3.4.6 is "void
TARGET_ASM_GLOBALIZE_LABEL (FILE *stream, const char
*name)"






    Now to my problem :


    except for TARGET_CPU_CPP_BUILTINS i dont know how
to rewrite the existing macros for 3.4.6


    Can anybody help me in this regard?




    Thanks in advance


regards,
shafi


Post a followup to this message

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