Back to index

cell-binutils  2.17cvs20070401
Classes | Defines | Typedefs | Enumerations | Functions | Variables
bfin-defs.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  expression_cell
struct  bfin_insn
union  Expr_Node_Value
struct  expr_node_struct
struct  _register
struct  _macfunc
struct  _opt_mode

Defines

#define PCREL   1
#define CODE_FRAG_SIZE   4096 /* 1 page. */
#define T_REG_R   0x00
#define T_REG_P   0x10
#define T_REG_I   0x20
#define T_REG_B   0x30
#define T_REG_L   0x34
#define T_REG_M   0x24
#define T_REG_A   0x40
#define T_NOGROUP   0xa0
#define F_REG_ALL   0x1000
#define F_REG_HIGH   0x2000 /* Half register: high half. */
#define M_S2RND   1
#define M_T   2
#define M_W32   3
#define M_FU   4
#define M_TFU   6
#define M_IS   8
#define M_ISS2   9
#define M_IH   11
#define M_IU   12
#define CODE_MASK   0x07
#define CLASS_MASK   0xf0
#define REG_SAME(a, b)   ((a).regno == (b).regno)
#define REG_EQUAL(a, b)   (((a).regno & CODE_MASK) == ((b).regno & CODE_MASK))
#define REG_CLASS(a)   ((a.regno) & 0xf0)
#define IS_A1(a)   ((a).regno == REG_A1)
#define IS_H(a)   ((a).regno & F_REG_HIGH ? 1: 0)
#define IS_EVEN(r)   (r.regno % 2 == 0)
#define IS_HCOMPL(a, b)
#define _TYPECHECK(r, x)   (((r).regno & CLASS_MASK) == T_REG_##x)
#define IS_DREG(r)   _TYPECHECK(r, R)
#define IS_DREG_H(r)   (_TYPECHECK(r, R) && IS_H(r))
#define IS_DREG_L(r)   (_TYPECHECK(r, R) && !IS_H(r))
#define IS_PREG(r)   _TYPECHECK(r, P)
#define IS_IREG(r)   (((r).regno & 0xf4) == T_REG_I)
#define IS_MREG(r)   (((r).regno & 0xf4) == T_REG_M)
#define IS_BREG(r)   (((r).regno & 0xf4) == T_REG_B)
#define IS_LREG(r)   (((r).regno & 0xf4) == T_REG_L)
#define IS_CREG(r)   ((r).regno == REG_LC0 || (r).regno == REG_LC1)
#define IS_ALLREG(r)   ((r).regno < T_NOGROUP)
#define SYMBOL_T   symbolS*
#define INSTR_T   struct bfin_insn*
#define EXPR_T   struct expression_cell*
#define MKREF(x)   mkexpr (0,x)
#define ALLOCATE(x)   malloc (x)
#define NULL_CODE   ((INSTR_T) 0)
#define EXPR_VALUE(x)   (((x)->type == Expr_Node_Constant) ? ((x)->value.i_value) : 0)
#define EXPR_SYMBOL(x)   ((x)->symbol)

Typedefs

typedef struct expr_node_struct
typedef long reg_t
typedef struct _register Register
typedef struct _macfunc Macfunc
typedef struct _opt_mode Opt_mode

Enumerations

enum  const_forms_t {
  c_0, c_1, c_4, c_2,
  c_uimm2, c_uimm3, c_imm3, c_pcrel4,
  c_imm4, c_uimm4s4, c_uimm4, c_uimm4s2,
  c_negimm5s4, c_imm5, c_uimm5, c_imm6,
  c_imm7, c_imm8, c_uimm8, c_pcrel8,
  c_uimm8s4, c_pcrel8s4, c_lppcrel10, c_pcrel10,
  c_pcrel12, c_imm16s4, c_luimm16, c_imm16,
  c_huimm16, c_rimm16, c_imm16s2, c_uimm16s4,
  c_uimm16, c_pcrel24, c_0, c_1,
  c_4, c_2, c_uimm2, c_uimm3,
  c_imm3, c_pcrel4, c_imm4, c_uimm4s4,
  c_uimm4, c_uimm4s2, c_negimm5s4, c_imm5,
  c_uimm5, c_imm6, c_imm7, c_imm8,
  c_uimm8, c_pcrel8, c_uimm8s4, c_pcrel8s4,
  c_lppcrel10, c_pcrel10, c_pcrel12, c_imm16s4,
  c_luimm16, c_imm16, c_huimm16, c_rimm16,
  c_imm16s2, c_uimm16s4, c_uimm16, c_pcrel24
}
enum  machine_registers {
  REG_R0 = T_REG_R, REG_R1, REG_R2, REG_R3,
  REG_R4, REG_R5, REG_R6, REG_R7,
  REG_P0 = T_REG_P, REG_P1, REG_P2, REG_P3,
  REG_P4, REG_P5, REG_SP, REG_FP,
  REG_I0 = T_REG_I, REG_I1, REG_I2, REG_I3,
  REG_M0 = T_REG_M, REG_M1, REG_M2, REG_M3,
  REG_B0 = T_REG_B, REG_B1, REG_B2, REG_B3,
  REG_L0 = T_REG_L, REG_L1, REG_L2, REG_L3,
  REG_A0x = T_REG_A, REG_A0w, REG_A1x, REG_A1w,
  REG_ASTAT = 0x46, REG_RETS = 0x47, REG_LC0 = 0x60, REG_LT0,
  REG_LB0, REG_LC1, REG_LT1, REG_LB1,
  REG_CYCLES, REG_CYCLES2, REG_USP = 0x70, REG_SEQSTAT,
  REG_SYSCFG, REG_RETI, REG_RETX, REG_RETN,
  REG_RETE, REG_EMUDAT, REG_sftreset = T_NOGROUP, REG_omode,
  REG_excause, REG_emucause, REG_idle_req, REG_hwerrcause,
  REG_A0 = 0xc0, REG_A1, REG_CC, REG_RL0,
  REG_RL1, REG_RL2, REG_RL3, REG_RL4,
  REG_RL5, REG_RL6, REG_RL7, REG_RH0,
  REG_RH1, REG_RH2, REG_RH3, REG_RH4,
  REG_RH5, REG_RH6, REG_RH7, REG_LASTREG,
  REG_RL0, REG_RL1, REG_RL2, REG_RL3,
  REG_RL4, REG_RL5, REG_RL6, REG_RL7,
  REG_RH0, REG_RH1, REG_RH2, REG_RH3,
  REG_RH4, REG_RH5, REG_RH6, REG_RH7,
  REG_R0, REG_R1, REG_R2, REG_R3,
  REG_R4, REG_R5, REG_R6, REG_R7,
  REG_R1_0, REG_R3_2, REG_R5_4, REG_R7_6,
  REG_P0, REG_P1, REG_P2, REG_P3,
  REG_P4, REG_P5, REG_SP, REG_FP,
  REG_A0x, REG_A1x, REG_A0w, REG_A1w,
  REG_A0, REG_A1, REG_I0, REG_I1,
  REG_I2, REG_I3, REG_M0, REG_M1,
  REG_M2, REG_M3, REG_B0, REG_B1,
  REG_B2, REG_B3, REG_L0, REG_L1,
  REG_L2, REG_L3, REG_AZ, REG_AN,
  REG_AC0, REG_AC1, REG_AV0, REG_AV1,
  REG_AV0S, REG_AV1S, REG_AQ, REG_V,
  REG_VS, REG_sftreset, REG_omode, REG_excause,
  REG_emucause, REG_idle_req, REG_hwerrcause, REG_CC,
  REG_LC0, REG_LC1, REG_GP, REG_ASTAT,
  REG_RETS, REG_LT0, REG_LB0, REG_LT1,
  REG_LB1, REG_CYCLES, REG_CYCLES2, REG_USP,
  REG_SEQSTAT, REG_SYSCFG, REG_RETI, REG_RETX,
  REG_RETN, REG_RETE, REG_EMUDAT, REG_BR0,
  REG_BR1, REG_BR2, REG_BR3, REG_BR4,
  REG_BR5, REG_BR6, REG_BR7, REG_PL0,
  REG_PL1, REG_PL2, REG_PL3, REG_PL4,
  REG_PL5, REG_SLP, REG_FLP, REG_PH0,
  REG_PH1, REG_PH2, REG_PH3, REG_PH4,
  REG_PH5, REG_SHP, REG_FHP, REG_IL0,
  REG_IL1, REG_IL2, REG_IL3, REG_ML0,
  REG_ML1, REG_ML2, REG_ML3, REG_BL0,
  REG_BL1, REG_BL2, REG_BL3, REG_LL0,
  REG_LL1, REG_LL2, REG_LL3, REG_IH0,
  REG_IH1, REG_IH2, REG_IH3, REG_MH0,
  REG_MH1, REG_MH2, REG_MH3, REG_BH0,
  REG_BH1, REG_BH2, REG_BH3, REG_LH0,
  REG_LH1, REG_LH2, REG_LH3, REG_LASTREG
}
enum  statusflags {
  S_AZ = 0, S_AN, S_AQ = 6, S_AC0 = 12,
  S_AC1, S_AV0 = 16, S_AV0S, S_AV1,
  S_AV1S, S_V = 24, S_VS = 25
}
enum  reg_class {
  rc_dregs_lo, rc_dregs_hi, rc_dregs, rc_dregs_pair,
  rc_pregs, rc_spfp, rc_dregs_hilo, rc_accum_ext,
  rc_accum_word, rc_accum, rc_iregs, rc_mregs,
  rc_bregs, rc_lregs, rc_dpregs, rc_gregs,
  rc_regs, rc_statbits, rc_ignore_bits, rc_ccstat,
  rc_counters, rc_dregs2_sysregs1, rc_open, rc_sysregs2,
  rc_sysregs3, rc_allregs, LIM_REG_CLASSES, rc_dregs_lo,
  rc_dregs_hi, rc_dregs, rc_dregs_pair, rc_pregs,
  rc_spfp, rc_dregs_hilo, rc_accum_ext, rc_accum_word,
  rc_accum, rc_iregs, rc_mregs, rc_bregs,
  rc_lregs, rc_dpregs, rc_gregs, rc_regs,
  rc_statbits, rc_ignore_bits, rc_ccstat, rc_counters,
  rc_dregs2_sysregs1, rc_open, rc_sysregs2, rc_sysregs3,
  rc_allregs, LIM_REG_CLASSES
}
enum  expr_opcodes_t {
  ones_compl, twos_compl, mult, divide,
  mod, add, sub, lsh,
  rsh, logand, logior, logxor
}
enum  Expr_Node_Type {
  Expr_Node_Binop, Expr_Node_Unop, Expr_Node_Reloc, Expr_Node_GOT_Reloc,
  Expr_Node_Constant
}
enum  Expr_Op_Type {
  Expr_Op_Type_Add, Expr_Op_Type_Sub, Expr_Op_Type_Mult, Expr_Op_Type_Div,
  Expr_Op_Type_Mod, Expr_Op_Type_Lshift, Expr_Op_Type_Rshift, Expr_Op_Type_BAND,
  Expr_Op_Type_BOR, Expr_Op_Type_BXOR, Expr_Op_Type_LAND, Expr_Op_Type_LOR,
  Expr_Op_Type_NEG, Expr_Op_Type_COMP
}
enum  parse_state { SEMANTIC_ERROR, NO_INSN_GENERATED, INSN_GENERATED }

Functions

INSTR_T gencode (unsigned long x)
INSTR_T conscode (INSTR_T head, INSTR_T tail)
INSTR_T conctcode (INSTR_T head, INSTR_T tail)
INSTR_T note_reloc (INSTR_T code, Expr_Node *, int reloc, int pcrel)
INSTR_T note_reloc1 (INSTR_T code, const char *sym, int reloc, int pcrel)
INSTR_T note_reloc2 (INSTR_T code, const char *symbol, int reloc, int value, int pcrel)
Expr_Node * Expr_Node_Create (Expr_Node_Type type, Expr_Node_Value value, Expr_Node *Left_Child, Expr_Node *Right_Child)
INSTR_T Expr_Node_Gen_Reloc (Expr_Node *head, int parent_reloc)
void error (char *format,...)
void warn (char *format,...)
int semantic_error (char *syntax)
void semantic_error_2 (char *syntax)
EXPR_T mkexpr (int, SYMBOL_T)
void set_start_state (void)

Variables

int debug_codeselection

Class Documentation

struct expression_cell

Definition at line 226 of file bfin-defs.h.

Class Members
SYMBOL_T symbol
int value
struct bfin_insn

Definition at line 233 of file bfin-defs.h.

Collaboration diagram for bfin_insn:
Class Members
struct expression_cell * exp
struct bfin_insn * next
int pcrel
int reloc
unsigned long value
union Expr_Node_Value

Definition at line 287 of file bfin-defs.h.

Class Members
int i_value
Expr_Op_Type op_value
const char * s_value
struct expr_node_struct

Definition at line 295 of file bfin-defs.h.

Collaboration diagram for expr_node_struct:
Class Members
Expr_Node * Left_Child
Expr_Node * Right_Child
Expr_Node_Type type
Expr_Node_Value value
struct _register

Definition at line 329 of file bfin-defs.h.

Class Members
int flags
char * name
unsigned char opcode
reg_t regno
unsigned char regtype
struct _macfunc

Definition at line 336 of file bfin-defs.h.

Collaboration diagram for _macfunc:
Class Members
Register dst
char n
char op
char P
Register s0
Register s1
char w
struct _opt_mode

Definition at line 347 of file bfin-defs.h.

Class Members
int MM
int mod

Define Documentation

#define _TYPECHECK (   r,
  x 
)    (((r).regno & CLASS_MASK) == T_REG_##x)

Definition at line 191 of file bfin-defs.h.

#define ALLOCATE (   x)    malloc (x)

Definition at line 314 of file bfin-defs.h.

#define CLASS_MASK   0xf0

Definition at line 179 of file bfin-defs.h.

#define CODE_FRAG_SIZE   4096 /* 1 page. */

Definition at line 26 of file bfin-defs.h.

#define CODE_MASK   0x07

Definition at line 178 of file bfin-defs.h.

#define EXPR_SYMBOL (   x)    ((x)->symbol)

Definition at line 322 of file bfin-defs.h.

#define EXPR_T   struct expression_cell*

Definition at line 243 of file bfin-defs.h.

#define EXPR_VALUE (   x)    (((x)->type == Expr_Node_Constant) ? ((x)->value.i_value) : 0)

Definition at line 319 of file bfin-defs.h.

#define F_REG_ALL   0x1000

Definition at line 85 of file bfin-defs.h.

#define F_REG_HIGH   0x2000 /* Half register: high half. */

Definition at line 86 of file bfin-defs.h.

#define INSTR_T   struct bfin_insn*

Definition at line 242 of file bfin-defs.h.

#define IS_A1 (   a)    ((a).regno == REG_A1)

Definition at line 184 of file bfin-defs.h.

#define IS_ALLREG (   r)    ((r).regno < T_NOGROUP)

Definition at line 202 of file bfin-defs.h.

#define IS_BREG (   r)    (((r).regno & 0xf4) == T_REG_B)

Definition at line 199 of file bfin-defs.h.

#define IS_CREG (   r)    ((r).regno == REG_LC0 || (r).regno == REG_LC1)

Definition at line 201 of file bfin-defs.h.

#define IS_DREG (   r)    _TYPECHECK(r, R)

Definition at line 193 of file bfin-defs.h.

#define IS_DREG_H (   r)    (_TYPECHECK(r, R) && IS_H(r))

Definition at line 194 of file bfin-defs.h.

#define IS_DREG_L (   r)    (_TYPECHECK(r, R) && !IS_H(r))

Definition at line 195 of file bfin-defs.h.

#define IS_EVEN (   r)    (r.regno % 2 == 0)

Definition at line 186 of file bfin-defs.h.

#define IS_H (   a)    ((a).regno & F_REG_HIGH ? 1: 0)

Definition at line 185 of file bfin-defs.h.

#define IS_HCOMPL (   a,
  b 
)
Value:
(REG_EQUAL(a, b) && \
                         ((a).regno & F_REG_HIGH) != ((b).regno & F_REG_HIGH))

Definition at line 187 of file bfin-defs.h.

#define IS_IREG (   r)    (((r).regno & 0xf4) == T_REG_I)

Definition at line 197 of file bfin-defs.h.

#define IS_LREG (   r)    (((r).regno & 0xf4) == T_REG_L)

Definition at line 200 of file bfin-defs.h.

#define IS_MREG (   r)    (((r).regno & 0xf4) == T_REG_M)

Definition at line 198 of file bfin-defs.h.

#define IS_PREG (   r)    _TYPECHECK(r, P)

Definition at line 196 of file bfin-defs.h.

#define M_FU   4

Definition at line 169 of file bfin-defs.h.

#define M_IH   11

Definition at line 173 of file bfin-defs.h.

#define M_IS   8

Definition at line 171 of file bfin-defs.h.

#define M_ISS2   9

Definition at line 172 of file bfin-defs.h.

#define M_IU   12

Definition at line 174 of file bfin-defs.h.

#define M_S2RND   1

Definition at line 166 of file bfin-defs.h.

#define M_T   2

Definition at line 167 of file bfin-defs.h.

#define M_TFU   6

Definition at line 170 of file bfin-defs.h.

#define M_W32   3

Definition at line 168 of file bfin-defs.h.

#define MKREF (   x)    mkexpr (0,x)

Definition at line 313 of file bfin-defs.h.

#define NULL_CODE   ((INSTR_T) 0)

Definition at line 316 of file bfin-defs.h.

#define PCREL   1

Definition at line 25 of file bfin-defs.h.

#define REG_CLASS (   a)    ((a.regno) & 0xf0)

Definition at line 183 of file bfin-defs.h.

#define REG_EQUAL (   a,
  b 
)    (((a).regno & CODE_MASK) == ((b).regno & CODE_MASK))

Definition at line 182 of file bfin-defs.h.

#define REG_SAME (   a,
  b 
)    ((a).regno == (b).regno)

Definition at line 181 of file bfin-defs.h.

#define SYMBOL_T   symbolS*

Definition at line 224 of file bfin-defs.h.

#define T_NOGROUP   0xa0

Definition at line 82 of file bfin-defs.h.

#define T_REG_A   0x40

Definition at line 78 of file bfin-defs.h.

#define T_REG_B   0x30

Definition at line 75 of file bfin-defs.h.

#define T_REG_I   0x20

Definition at line 74 of file bfin-defs.h.

#define T_REG_L   0x34

Definition at line 76 of file bfin-defs.h.

#define T_REG_M   0x24

Definition at line 77 of file bfin-defs.h.

#define T_REG_P   0x10

Definition at line 73 of file bfin-defs.h.

#define T_REG_R   0x00

Definition at line 72 of file bfin-defs.h.


Typedef Documentation

Definition at line 245 of file bfin-defs.h.

typedef long reg_t

Definition at line 326 of file bfin-defs.h.


Enumeration Type Documentation

Enumerator:
c_0 
c_1 
c_4 
c_2 
c_uimm2 
c_uimm3 
c_imm3 
c_pcrel4 
c_imm4 
c_uimm4s4 
c_uimm4 
c_uimm4s2 
c_negimm5s4 
c_imm5 
c_uimm5 
c_imm6 
c_imm7 
c_imm8 
c_uimm8 
c_pcrel8 
c_uimm8s4 
c_pcrel8s4 
c_lppcrel10 
c_pcrel10 
c_pcrel12 
c_imm16s4 
c_luimm16 
c_imm16 
c_huimm16 
c_rimm16 
c_imm16s2 
c_uimm16s4 
c_uimm16 
c_pcrel24 
c_0 
c_1 
c_4 
c_2 
c_uimm2 
c_uimm3 
c_imm3 
c_pcrel4 
c_imm4 
c_uimm4s4 
c_uimm4 
c_uimm4s2 
c_negimm5s4 
c_imm5 
c_uimm5 
c_imm6 
c_imm7 
c_imm8 
c_uimm8 
c_pcrel8 
c_uimm8s4 
c_pcrel8s4 
c_lppcrel10 
c_pcrel10 
c_pcrel12 
c_imm16s4 
c_luimm16 
c_imm16 
c_huimm16 
c_rimm16 
c_imm16s2 
c_uimm16s4 
c_uimm16 
c_pcrel24 

Definition at line 30 of file bfin-defs.h.

Enumerator:
Expr_Node_Binop 
Expr_Node_Unop 
Expr_Node_Reloc 
Expr_Node_GOT_Reloc 
Expr_Node_Constant 

Definition at line 258 of file bfin-defs.h.

{
  Expr_Node_Binop,          /* Binary operator.  */
  Expr_Node_Unop,           /* Unary operator.  */
  Expr_Node_Reloc,          /* Symbol to be relocated.  */
  Expr_Node_GOT_Reloc,             /* Symbol to be relocated using the GOT.  */
  Expr_Node_Constant               /* Constant.  */
} Expr_Node_Type;
Enumerator:
Expr_Op_Type_Add 
Expr_Op_Type_Sub 
Expr_Op_Type_Mult 
Expr_Op_Type_Div 
Expr_Op_Type_Mod 
Expr_Op_Type_Lshift 
Expr_Op_Type_Rshift 
Expr_Op_Type_BAND 
Expr_Op_Type_BOR 
Expr_Op_Type_BXOR 
Expr_Op_Type_LAND 
Expr_Op_Type_LOR 
Expr_Op_Type_NEG 
Expr_Op_Type_COMP 

Definition at line 268 of file bfin-defs.h.

Enumerator:
ones_compl 
twos_compl 
mult 
divide 
mod 
add 
sub 
lsh 
rsh 
logand 
logior 
logxor 

Definition at line 206 of file bfin-defs.h.

Enumerator:
REG_R0 
REG_R1 
REG_R2 
REG_R3 
REG_R4 
REG_R5 
REG_R6 
REG_R7 
REG_P0 
REG_P1 
REG_P2 
REG_P3 
REG_P4 
REG_P5 
REG_SP 
REG_FP 
REG_I0 
REG_I1 
REG_I2 
REG_I3 
REG_M0 
REG_M1 
REG_M2 
REG_M3 
REG_B0 
REG_B1 
REG_B2 
REG_B3 
REG_L0 
REG_L1 
REG_L2 
REG_L3 
REG_A0x 
REG_A0w 
REG_A1x 
REG_A1w 
REG_ASTAT 
REG_RETS 
REG_LC0 
REG_LT0 
REG_LB0 
REG_LC1 
REG_LT1 
REG_LB1 
REG_CYCLES 
REG_CYCLES2 
REG_USP 
REG_SEQSTAT 
REG_SYSCFG 
REG_RETI 
REG_RETX 
REG_RETN 
REG_RETE 
REG_EMUDAT 
REG_sftreset 
REG_omode 
REG_excause 
REG_emucause 
REG_idle_req 
REG_hwerrcause 
REG_A0 
REG_A1 
REG_CC 
REG_RL0 
REG_RL1 
REG_RL2 
REG_RL3 
REG_RL4 
REG_RL5 
REG_RL6 
REG_RL7 
REG_RH0 
REG_RH1 
REG_RH2 
REG_RH3 
REG_RH4 
REG_RH5 
REG_RH6 
REG_RH7 
REG_LASTREG 
REG_RL0 
REG_RL1 
REG_RL2 
REG_RL3 
REG_RL4 
REG_RL5 
REG_RL6 
REG_RL7 
REG_RH0 
REG_RH1 
REG_RH2 
REG_RH3 
REG_RH4 
REG_RH5 
REG_RH6 
REG_RH7 
REG_R0 
REG_R1 
REG_R2 
REG_R3 
REG_R4 
REG_R5 
REG_R6 
REG_R7 
REG_R1_0 
REG_R3_2 
REG_R5_4 
REG_R7_6 
REG_P0 
REG_P1 
REG_P2 
REG_P3 
REG_P4 
REG_P5 
REG_SP 
REG_FP 
REG_A0x 
REG_A1x 
REG_A0w 
REG_A1w 
REG_A0 
REG_A1 
REG_I0 
REG_I1 
REG_I2 
REG_I3 
REG_M0 
REG_M1 
REG_M2 
REG_M3 
REG_B0 
REG_B1 
REG_B2 
REG_B3 
REG_L0 
REG_L1 
REG_L2 
REG_L3 
REG_AZ 
REG_AN 
REG_AC0 
REG_AC1 
REG_AV0 
REG_AV1 
REG_AV0S 
REG_AV1S 
REG_AQ 
REG_V 
REG_VS 
REG_sftreset 
REG_omode 
REG_excause 
REG_emucause 
REG_idle_req 
REG_hwerrcause 
REG_CC 
REG_LC0 
REG_LC1 
REG_GP 
REG_ASTAT 
REG_RETS 
REG_LT0 
REG_LB0 
REG_LT1 
REG_LB1 
REG_CYCLES 
REG_CYCLES2 
REG_USP 
REG_SEQSTAT 
REG_SYSCFG 
REG_RETI 
REG_RETX 
REG_RETN 
REG_RETE 
REG_EMUDAT 
REG_BR0 
REG_BR1 
REG_BR2 
REG_BR3 
REG_BR4 
REG_BR5 
REG_BR6 
REG_BR7 
REG_PL0 
REG_PL1 
REG_PL2 
REG_PL3 
REG_PL4 
REG_PL5 
REG_SLP 
REG_FLP 
REG_PH0 
REG_PH1 
REG_PH2 
REG_PH3 
REG_PH4 
REG_PH5 
REG_SHP 
REG_FHP 
REG_IL0 
REG_IL1 
REG_IL2 
REG_IL3 
REG_ML0 
REG_ML1 
REG_ML2 
REG_ML3 
REG_BL0 
REG_BL1 
REG_BL2 
REG_BL3 
REG_LL0 
REG_LL1 
REG_LL2 
REG_LL3 
REG_IH0 
REG_IH1 
REG_IH2 
REG_IH3 
REG_MH0 
REG_MH1 
REG_MH2 
REG_MH3 
REG_BH0 
REG_BH1 
REG_BH2 
REG_BH3 
REG_LH0 
REG_LH1 
REG_LH2 
REG_LH3 
REG_LASTREG 

Definition at line 88 of file bfin-defs.h.

Enumerator:
SEMANTIC_ERROR 
NO_INSN_GENERATED 
INSN_GENERATED 

Definition at line 353 of file bfin-defs.h.

enum reg_class
Enumerator:
rc_dregs_lo 
rc_dregs_hi 
rc_dregs 
rc_dregs_pair 
rc_pregs 
rc_spfp 
rc_dregs_hilo 
rc_accum_ext 
rc_accum_word 
rc_accum 
rc_iregs 
rc_mregs 
rc_bregs 
rc_lregs 
rc_dpregs 
rc_gregs 
rc_regs 
rc_statbits 
rc_ignore_bits 
rc_ccstat 
rc_counters 
rc_dregs2_sysregs1 
rc_open 
rc_sysregs2 
rc_sysregs3 
rc_allregs 
LIM_REG_CLASSES 
rc_dregs_lo 
rc_dregs_hi 
rc_dregs 
rc_dregs_pair 
rc_pregs 
rc_spfp 
rc_dregs_hilo 
rc_accum_ext 
rc_accum_word 
rc_accum 
rc_iregs 
rc_mregs 
rc_bregs 
rc_lregs 
rc_dpregs 
rc_gregs 
rc_regs 
rc_statbits 
rc_ignore_bits 
rc_ccstat 
rc_counters 
rc_dregs2_sysregs1 
rc_open 
rc_sysregs2 
rc_sysregs3 
rc_allregs 
LIM_REG_CLASSES 

Definition at line 134 of file bfin-defs.h.

Enumerator:
S_AZ 
S_AN 
S_AQ 
S_AC0 
S_AC1 
S_AV0 
S_AV0S 
S_AV1 
S_AV1S 
S_V 
S_VS 

Definition at line 118 of file bfin-defs.h.

{
  S_AZ = 0,
  S_AN,
  S_AQ = 6,
  S_AC0 = 12,
  S_AC1,
  S_AV0 = 16,
  S_AV0S,
  S_AV1,
  S_AV1S,
  S_V = 24,
  S_VS = 25
}; 

Function Documentation

INSTR_T conctcode ( INSTR_T  head,
INSTR_T  tail 
)

Definition at line 956 of file tc-bfin.c.

{
  INSTR_T temp = (head);
  if (!head)
    return tail;
  while (temp->next)
    temp = temp->next;
  temp->next = tail;

  return head;
}

Here is the caller graph for this function:

INSTR_T conscode ( INSTR_T  head,
INSTR_T  tail 
)

Definition at line 947 of file tc-bfin.c.

{
  if (!head)
    return tail;
  head->next = tail;
  return head;
}

Here is the caller graph for this function:

void error ( char *  format,
  ... 
)
Expr_Node* Expr_Node_Create ( Expr_Node_Type  type,
Expr_Node_Value  value,
Expr_Node *  Left_Child,
Expr_Node *  Right_Child 
)

Definition at line 1016 of file tc-bfin.c.

{


  Expr_Node *node = (Expr_Node *) allocate (sizeof (Expr_Node));
  node->type = type;
  node->value = value;
  node->Left_Child = Left_Child;
  node->Right_Child = Right_Child;
  return node;
}

Here is the call graph for this function:

Here is the caller graph for this function:

INSTR_T Expr_Node_Gen_Reloc ( Expr_Node *  head,
int  parent_reloc 
)

Definition at line 1037 of file tc-bfin.c.

{
  /* Top level reloction expression generator VDSP style.
   If the relocation is just by itself, generate one item
   else generate this convoluted expression.  */

  INSTR_T note = NULL_CODE;
  INSTR_T note1 = NULL_CODE;
  int pcrel = 1;  /* Is the parent reloc pcrelative?
                This calculation here and HOWTO should match.  */

  if (parent_reloc)
    {
      /*  If it's 32 bit quantity then 16bit code needs to be added.  */
      int value = 0;

      if (head->type == Expr_Node_Constant)
       {
         /* If note1 is not null code, we have to generate a right
             aligned value for the constant. Otherwise the reloc is
             a part of the basic command and the yacc file
             generates this.  */
         value = head->value.i_value;
       }
      switch (parent_reloc)
       {
         /*  Some relocations will need to allocate extra words.  */
       case BFD_RELOC_BFIN_16_IMM:
       case BFD_RELOC_BFIN_16_LOW:
       case BFD_RELOC_BFIN_16_HIGH:
         note1 = conscode (gencode (value), NULL_CODE);
         pcrel = 0;
         break;
       case BFD_RELOC_BFIN_PLTPC:
         note1 = conscode (gencode (value), NULL_CODE);
         pcrel = 0;
         break;
       case BFD_RELOC_16:
       case BFD_RELOC_BFIN_GOT:
       case BFD_RELOC_BFIN_GOT17M4:
       case BFD_RELOC_BFIN_FUNCDESC_GOT17M4:
         note1 = conscode (gencode (value), NULL_CODE);
         pcrel = 0;
         break;
       case BFD_RELOC_24_PCREL:
       case BFD_RELOC_BFIN_24_PCREL_JUMP_L:
       case BFD_RELOC_BFIN_24_PCREL_CALL_X:
         /* These offsets are even numbered pcrel.  */
         note1 = conscode (gencode (value >> 1), NULL_CODE);
         break;
       default:
         note1 = NULL_CODE;
       }
    }
  if (head->type == Expr_Node_Constant)
    note = note1;
  else if (head->type == Expr_Node_Reloc)
    {
      note = note_reloc1 (gencode (0), head->value.s_value, parent_reloc, pcrel);
      if (note1 != NULL_CODE)
       note = conscode (note1, note);
    }
  else if (head->type == Expr_Node_Binop
          && (head->value.op_value == Expr_Op_Type_Add
              || head->value.op_value == Expr_Op_Type_Sub)
          && head->Left_Child->type == Expr_Node_Reloc
          && head->Right_Child->type == Expr_Node_Constant)
    {
      int val = head->Right_Child->value.i_value;
      if (head->value.op_value == Expr_Op_Type_Sub)
       val = -val;
      note = conscode (note_reloc2 (gencode (0), head->Left_Child->value.s_value,
                                parent_reloc, val, 0),
                     NULL_CODE);
      if (note1 != NULL_CODE)
       note = conscode (note1, note);
    }
  else
    {
      /* Call the recursive function.  */
      note = note_reloc1 (gencode (0), op, parent_reloc, pcrel);
      if (note1 != NULL_CODE)
       note = conscode (note1, note);
      note = conctcode (Expr_Node_Gen_Reloc_R (head), note);
    }
  return note;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 997 of file tc-bfin.c.

{
  INSTR_T cell = (INSTR_T) obstack_alloc (&mempool, sizeof (struct bfin_insn));
  memset (cell, 0, sizeof (struct bfin_insn));
  cell->value = (x);
  return cell;
}

Here is the call graph for this function:

Here is the caller graph for this function:

EXPR_T mkexpr ( int  ,
SYMBOL_T   
)

Here is the caller graph for this function:

INSTR_T note_reloc ( INSTR_T  code,
Expr_Node *  ,
int  reloc,
int  pcrel 
)

Definition at line 969 of file tc-bfin.c.

{
  /* Assert that the symbol is not an operator.  */
  assert (symbol->type == Expr_Node_Reloc);

  return note_reloc1 (code, symbol->value.s_value, reloc, pcrel);

}

Here is the call graph for this function:

Here is the caller graph for this function:

INSTR_T note_reloc1 ( INSTR_T  code,
const char *  sym,
int  reloc,
int  pcrel 
)

Definition at line 979 of file tc-bfin.c.

{
  code->reloc = reloc;
  code->exp = mkexpr (0, symbol_find_or_make (symbol));
  code->pcrel = pcrel;
  return code;
}

Here is the call graph for this function:

Here is the caller graph for this function:

INSTR_T note_reloc2 ( INSTR_T  code,
const char *  symbol,
int  reloc,
int  value,
int  pcrel 
)

Definition at line 988 of file tc-bfin.c.

{
  code->reloc = reloc;
  code->exp = mkexpr (value, symbol_find_or_make (symbol));
  code->pcrel = pcrel;
  return code;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int semantic_error ( char *  syntax)
void semantic_error_2 ( char *  syntax)
void set_start_state ( void  )

Here is the caller graph for this function:

void warn ( char *  format,
  ... 
)

Variable Documentation