Back to index

cell-binutils  2.17cvs20070401
Defines | Functions | Variables
cpu-avr.c File Reference
#include "bfd.h"
#include "sysdep.h"
#include "libbfd.h"

Go to the source code of this file.

Defines

#define N(addr_bits, machine, print, default, next)

Functions

static const bfd_arch_info_typecompatible (const bfd_arch_info_type *a, const bfd_arch_info_type *b)

Variables

static const bfd_arch_info_type arch_info_struct []
const bfd_arch_info_type bfd_avr_arch

Define Documentation

#define N (   addr_bits,
  machine,
  print,
  default,
  next 
)
Value:
{                                                       \
  8,                        /* 8 bits in a word.  */    \
  addr_bits,                /* bits in an address.  */  \
  8,                        /* 8 bits in a byte.  */    \
  bfd_arch_avr,                                                \
  machine,                  /* Machine number.  */             \
  "avr",                    /* Architecture name.   */  \
  print,                    /* Printable name.  */             \
  1,                        /* Section align power.  */ \
  default,                  /* Is this the default ?  */       \
  compatible,                                           \
  bfd_default_scan,                                     \
  next                                                  \
}

Definition at line 54 of file cpu-avr.c.


Function Documentation

Definition at line 30 of file cpu-avr.c.

{
  /* If a & b are for different architectures we can do nothing.  */
  if (a->arch != b->arch)
    return NULL;

  /* Special case for ATmega[16]03 (avr:3) and ATmega83 (avr:4).  */
  if ((a->mach == bfd_mach_avr3 && b->mach == bfd_mach_avr4)
      || (a->mach == bfd_mach_avr4 && b->mach == bfd_mach_avr3))
    return NULL;

  /* So far all newer AVR architecture cores are supersets of previous
     cores.  */
  if (a->mach <= b->mach)
    return b;

  if (a->mach >= b->mach)
    return a;

  /* Never reached!  */
  return NULL;
}

Variable Documentation

Initial value:
{
  
  N (16, bfd_mach_avr1, "avr:1", FALSE, & arch_info_struct[1]),

  
  N (16, bfd_mach_avr2, "avr:2", FALSE, & arch_info_struct[2]),

  
  N (22, bfd_mach_avr3, "avr:3", FALSE, & arch_info_struct[3]),

  
  N (16, bfd_mach_avr4, "avr:4", FALSE, & arch_info_struct[4]),

  
  N (22, bfd_mach_avr5, "avr:5", FALSE, & arch_info_struct[5]),

  

}

Definition at line 70 of file cpu-avr.c.

Initial value:
  N (16, bfd_mach_avr2, "avr", TRUE, & arch_info_struct[0])

Definition at line 91 of file cpu-avr.c.