Ignore:
Timestamp:
Aug 16, 2003, 6:59:22 PM (22 years ago)
Author:
bird
Message:

binutils v2.14 - offical sources.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/binutils/bfd/cpu-powerpc.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/* BFD PowerPC CPU definition
    2    Copyright 1994, 1995, 1996, 2000 Free Software Foundation, Inc.
     2   Copyright 1994, 1995, 1996, 2000, 2001, 2002
     3   Free Software Foundation, Inc.
    34   Contributed by Ian Lance Taylor, Cygnus Support.
    45
     
    4142      return bfd_default_compatible (a, b);
    4243    case bfd_arch_rs6000:
    43       if (a->mach == 0)
     44      if (a->mach == bfd_mach_ppc)
    4445        return a;
    4546      return NULL;
     
    4849}
    4950
    50 static const bfd_arch_info_type arch_info_struct[] =
     51const bfd_arch_info_type bfd_powerpc_archs[] =
    5152{
     53#if BFD_DEFAULT_TARGET_SIZE == 64
     54  /* Default arch must come first.  */
     55  {
     56    64, /* 64 bits in a word */
     57    64, /* 64 bits in an address */
     58    8,  /* 8 bits in a byte */
     59    bfd_arch_powerpc,
     60    bfd_mach_ppc64,
     61    "powerpc",
     62    "powerpc:common64",
     63    3,
     64    TRUE, /* default for 64 bit target */
     65    powerpc_compatible,
     66    bfd_default_scan,
     67    &bfd_powerpc_archs[1]
     68  },
     69  /* elf32-ppc:ppc_elf_object_p relies on the default 32 bit arch
     70     being immediately after the 64 bit default.  */
     71  {
     72    32, /* 32 bits in a word */
     73    32, /* 32 bits in an address */
     74    8,  /* 8 bits in a byte */
     75    bfd_arch_powerpc,
     76    bfd_mach_ppc, /* for the POWER/PowerPC common architecture */
     77    "powerpc",
     78    "powerpc:common",
     79    3,
     80    FALSE,
     81    powerpc_compatible,
     82    bfd_default_scan,
     83    &bfd_powerpc_archs[2],
     84  },
     85#else
     86  /* Default arch must come first.  */
     87  {
     88    32, /* 32 bits in a word */
     89    32, /* 32 bits in an address */
     90    8,  /* 8 bits in a byte */
     91    bfd_arch_powerpc,
     92    bfd_mach_ppc, /* for the POWER/PowerPC common architecture */
     93    "powerpc",
     94    "powerpc:common",
     95    3,
     96    TRUE, /* default for 32 bit target */
     97    powerpc_compatible,
     98    bfd_default_scan,
     99    &bfd_powerpc_archs[1],
     100  },
     101  /* elf64-ppc:ppc64_elf_object_p relies on the default 64 bit arch
     102     being immediately after the 32 bit default.  */
     103  {
     104    64, /* 64 bits in a word */
     105    64, /* 64 bits in an address */
     106    8,  /* 8 bits in a byte */
     107    bfd_arch_powerpc,
     108    bfd_mach_ppc64,
     109    "powerpc",
     110    "powerpc:common64",
     111    3,
     112    FALSE,
     113    powerpc_compatible,
     114    bfd_default_scan,
     115    &bfd_powerpc_archs[2]
     116  },
     117#endif
    52118  {
    53119    32, /* 32 bits in a word */
     
    59125    "powerpc:603",
    60126    3,
    61     false, /* not the default */
    62     powerpc_compatible,
    63     bfd_default_scan,
    64     &arch_info_struct[1]
     127    FALSE, /* not the default */
     128    powerpc_compatible,
     129    bfd_default_scan,
     130    &bfd_powerpc_archs[3]
    65131  },
    66132  {
     
    73139    "powerpc:EC603e",
    74140    3,
    75     false, /* not the default */
    76     powerpc_compatible,
    77     bfd_default_scan,
    78     &arch_info_struct[2]
     141    FALSE, /* not the default */
     142    powerpc_compatible,
     143    bfd_default_scan,
     144    &bfd_powerpc_archs[4]
    79145  },
    80146  {
     
    87153    "powerpc:604",
    88154    3,
    89     false, /* not the default */
    90     powerpc_compatible,
    91     bfd_default_scan,
    92     &arch_info_struct[3]
     155    FALSE, /* not the default */
     156    powerpc_compatible,
     157    bfd_default_scan,
     158    &bfd_powerpc_archs[5]
    93159  },
    94160  {
     
    101167    "powerpc:403",
    102168    3,
    103     false, /* not the default */
    104     powerpc_compatible,
    105     bfd_default_scan,
    106     &arch_info_struct[4]
     169    FALSE, /* not the default */
     170    powerpc_compatible,
     171    bfd_default_scan,
     172    &bfd_powerpc_archs[6]
    107173  },
    108174  {
     
    115181    "powerpc:601",
    116182    3,
    117     false, /* not the default */
    118     powerpc_compatible,
    119     bfd_default_scan,
    120     &arch_info_struct[5]
     183    FALSE, /* not the default */
     184    powerpc_compatible,
     185    bfd_default_scan,
     186    &bfd_powerpc_archs[7]
    121187  },
    122188  {
     
    129195    "powerpc:620",
    130196    3,
    131     false, /* not the default */
    132     powerpc_compatible,
    133     bfd_default_scan,
    134     &arch_info_struct[6]
     197    FALSE, /* not the default */
     198    powerpc_compatible,
     199    bfd_default_scan,
     200    &bfd_powerpc_archs[8]
    135201  },
    136202  {
     
    143209    "powerpc:630",
    144210    3,
    145     false, /* not the default */
    146     powerpc_compatible,
    147     bfd_default_scan,
    148     &arch_info_struct[7]
     211    FALSE, /* not the default */
     212    powerpc_compatible,
     213    bfd_default_scan,
     214    &bfd_powerpc_archs[9]
    149215  },
    150216  {
     
    157223    "powerpc:a35",
    158224    3,
    159     false, /* not the default */
    160     powerpc_compatible,
    161     bfd_default_scan,
    162     &arch_info_struct[8]
     225    FALSE, /* not the default */
     226    powerpc_compatible,
     227    bfd_default_scan,
     228    &bfd_powerpc_archs[10]
    163229  },
    164230  {
     
    171237    "powerpc:rs64ii",
    172238    3,
    173     false, /* not the default */
    174     powerpc_compatible,
    175     bfd_default_scan,
    176     &arch_info_struct[9]
     239    FALSE, /* not the default */
     240    powerpc_compatible,
     241    bfd_default_scan,
     242    &bfd_powerpc_archs[11]
    177243  },
    178244  {
     
    185251    "powerpc:rs64iii",
    186252    3,
    187     false, /* not the default */
    188     powerpc_compatible,
    189     bfd_default_scan,
    190     &arch_info_struct[10]
     253    FALSE, /* not the default */
     254    powerpc_compatible,
     255    bfd_default_scan,
     256    &bfd_powerpc_archs[12]
    191257  },
    192258  {
     
    199265    "powerpc:7400",
    200266    3,
    201     false, /* not the default */
    202     powerpc_compatible,
    203     bfd_default_scan,
    204     &arch_info_struct[11]
     267    FALSE, /* not the default */
     268    powerpc_compatible,
     269    bfd_default_scan,
     270    &bfd_powerpc_archs[13]
     271  },
     272  {
     273    32, /* 32 bits in a word */
     274    32, /* 32 bits in an address */
     275    8,  /* 8 bits in a byte */
     276    bfd_arch_powerpc,
     277    bfd_mach_ppc_e500,
     278    "powerpc",
     279    "powerpc:e500",
     280    3,
     281    FALSE,
     282    powerpc_compatible,
     283    bfd_default_scan,
     284    &bfd_powerpc_archs[14]
    205285  },
    206286  {
     
    213293    "powerpc:MPC8XX",
    214294    3,
    215     false, /* not the default */
     295    FALSE, /* not the default */
    216296    powerpc_compatible,
    217297    bfd_default_scan,
     
    219299  }
    220300};
    221 
    222 const bfd_arch_info_type bfd_powerpc_arch =
    223   {
    224     32, /* 32 bits in a word */
    225     32, /* 32 bits in an address */
    226     8,  /* 8 bits in a byte */
    227     bfd_arch_powerpc,
    228     bfd_mach_ppc, /* for the POWER/PowerPC common architecture */
    229     "powerpc",
    230     "powerpc:common",
    231     3,
    232     true, /* the default */
    233     powerpc_compatible,
    234     bfd_default_scan,
    235     &arch_info_struct[0]
    236   };
Note: See TracChangeset for help on using the changeset viewer.