osprey-gcc-4.2.0/gcc/config/mt/mt.c File Reference

#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "rtl.h"
#include "regs.h"
#include "hard-reg-set.h"
#include "real.h"
#include "insn-config.h"
#include "conditions.h"
#include "insn-attr.h"
#include "recog.h"
#include "toplev.h"
#include "output.h"
#include "integrate.h"
#include "tree.h"
#include "function.h"
#include "expr.h"
#include "optabs.h"
#include "libfuncs.h"
#include "flags.h"
#include "tm_p.h"
#include "ggc.h"
#include "insn-flags.h"
#include "obstack.h"
#include "except.h"
#include "target.h"
#include "target-def.h"
#include "basic-block.h"
#include "gt-mt.h"

Include dependency graph for mt.c:

Go to the source code of this file.

Data Types

type  branch_info
type  label_info

Defines

#define FP_MASK   (1 << (GPR_FP))
#define LINK_MASK   (1 << (GPR_LINK))
#define ROUND_ADVANCE(SIZE)   (((SIZE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
#define MAX_LOOP_DEPTH   4
#define MAX_LOOP_LENGTH   (200 * 4)
#define TARGET_ATTRIBUTE_TABLE   mt_attribute_table
#define TARGET_STRUCT_VALUE_RTX   mt_struct_value_rtx
#define TARGET_PROMOTE_PROTOTYPES   hook_bool_tree_true
#define TARGET_PASS_BY_REFERENCE   mt_pass_by_reference
#define TARGET_MUST_PASS_IN_STACK   mt_pass_in_stack
#define TARGET_ARG_PARTIAL_BYTES   mt_arg_partial_bytes
#define TARGET_SETUP_INCOMING_VARARGS   mt_setup_incoming_varargs
#define TARGET_MACHINE_DEPENDENT_REORG   mt_machine_reorg

Typedefs

typedef struct loop_infoloop_info

Functions/Subroutines

struct machine_function GTY (())
static rtx mt_struct_value_rtx (tree fndecl ATTRIBUTE_UNUSED, int incoming ATTRIBUTE_UNUSED)
rtx mt_return_addr_rtx (int count)
const char * mt_asm_output_opcode (FILE *f ATTRIBUTE_UNUSED, const char *ptr)
static enum attr_type mt_get_attr_type (rtx complete_insn)
static void insn_dependent_p_1 (rtx x, rtx pat ATTRIBUTE_UNUSED, void *data)
static bool insn_dependent_p (rtx x, rtx y)
static bool insn_true_dependent_p (rtx x, rtx y)
void mt_final_prescan_insn (rtx insn, rtx *opvec ATTRIBUTE_UNUSED, int noperands ATTRIBUTE_UNUSED)
static void mt_debug_stack (struct mt_frame_info *info)
static void mt_print_operand_simple_address (FILE *file, rtx addr)
void mt_print_operand_address (FILE *file, rtx addr)
void mt_print_operand (FILE *file, rtx x, int code)
void mt_init_cumulative_args (CUMULATIVE_ARGS *cum, tree fntype, rtx libname, tree fndecl ATTRIBUTE_UNUSED, int incoming)
static int mt_function_arg_slotno (const CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type, int named ATTRIBUTE_UNUSED, int incoming_p ATTRIBUTE_UNUSED, int *pregno)
rtx mt_function_arg (const CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type, int named, int incoming_p)
void mt_function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type ATTRIBUTE_UNUSED, int named)
static int mt_arg_partial_bytes (CUMULATIVE_ARGS *pcum, enum machine_mode mode, tree type, bool named ATTRIBUTE_UNUSED)
static bool mt_pass_by_reference (CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED, enum machine_mode mode ATTRIBUTE_UNUSED, tree type, bool named ATTRIBUTE_UNUSED)
int mt_function_arg_boundary (enum machine_mode mode ATTRIBUTE_UNUSED, tree type ATTRIBUTE_UNUSED)
int mt_reg_ok_for_base_p (rtx x, int strict)
static bool mt_legitimate_simple_address_p (enum machine_mode mode ATTRIBUTE_UNUSED, rtx xinsn, int strict)
int mt_legitimate_address_p (enum machine_mode mode, rtx xinsn, int strict)
int uns_arith_operand (rtx op, enum machine_mode mode)
int arith_operand (rtx op, enum machine_mode mode)
int reg_or_0_operand (rtx op, enum machine_mode mode)
int big_const_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
int single_const_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
static struct machine_functionmt_init_machine_status (void)
void mt_override_options (void)
static void mt_setup_incoming_varargs (CUMULATIVE_ARGS *cum, enum machine_mode mode ATTRIBUTE_UNUSED, tree type ATTRIBUTE_UNUSED, int *pretend_size, int no_rtl)
unsigned int mt_compute_frame_size (int size)
static void mt_emit_save_restore (enum save_direction direction, rtx reg, rtx mem, int stack_offset)
static void mt_emit_save_fp (enum save_direction direction, struct mt_frame_info info)
static void mt_emit_save_regs (enum save_direction direction, struct mt_frame_info info)
static bool mt_interrupt_function_p (tree func)
void mt_expand_prologue (void)
int mt_epilogue_uses (int regno)
void mt_expand_epilogue (enum epilogue_type eh_mode)
void mt_expand_eh_return (rtx *operands)
void mt_emit_eh_epilogue (rtx *operands ATTRIBUTE_UNUSED)
static tree mt_handle_interrupt_attribute (tree *node, tree name, tree args ATTRIBUTE_UNUSED, int flags ATTRIBUTE_UNUSED, bool *no_add_attrs)
int mt_initial_elimination_offset (int from, int to)
static rtx mt_generate_compare (enum rtx_code code, rtx op0, rtx op1)
void mt_emit_cbranch (enum rtx_code code, rtx loc, rtx op0, rtx op1)
static void mt_set_memflags_1 (rtx x, int in_struct_p, int volatile_p)
void mt_set_memflags (rtx ref)
enum reg_class mt_secondary_reload_class (enum reg_class class ATTRIBUTE_UNUSED, enum machine_mode mode, rtx x)
rtx mt_function_value (tree valtype, enum machine_mode mode, tree func_decl ATTRIBUTE_UNUSED)
void mt_split_words (enum machine_mode nmode, enum machine_mode omode, rtx *operands)
static bool mt_pass_in_stack (enum machine_mode mode ATTRIBUTE_UNUSED, tree type)
void mt_add_loop (void)
 DEF_VEC_P (loop_info)
 DEF_VEC_ALLOC_P (loop_info, heap)
 DEF_VEC_O (loop_work)
 DEF_VEC_ALLOC_O (loop_work, heap)
static bool mt_loop_nesting (loop_info loop)
static int mt_block_length (basic_block bb)
static bool mt_scan_loop (loop_info loop, rtx reg, rtx dbnz)
static void mt_reorg_loops (FILE *dump_file)
static int mt_add_branches (rtx *x, void *insn)
static rtx mt_check_delay_slot (rtx branch, rtx insn)
static void mt_reorg_hazard (void)
static void mt_machine_reorg (void)

Variables

struct rtx_def * mt_compare_op0
struct rtx_def * mt_compare_op1
struct mt_frame_info current_frame_info
struct mt_frame_info zero_frame_info
struct rtx_def * mt_ucmpsi3_libcall
static int mt_flag_delayed_branch
static int mt_nops_required = 0
static const char * mt_nop_reasons = ""
int interrupt_handler
enum processor_type mt_cpu
struct attribute_spec mt_attribute_table []
 loop_work
static label_infomt_labels
struct gcc_target targetm = TARGET_INITIALIZER


Define Documentation

#define FP_MASK   (1 << (GPR_FP))

Definition at line 53 of file mt.c.

#define LINK_MASK   (1 << (GPR_LINK))

Definition at line 56 of file mt.c.

Referenced by mt_emit_save_fp(), and mt_emit_save_regs().

#define MAX_LOOP_DEPTH   4

Definition at line 1652 of file mt.c.

#define MAX_LOOP_LENGTH   (200 * 4)

Definition at line 1655 of file mt.c.

#define ROUND_ADVANCE ( SIZE   )     (((SIZE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)

Definition at line 59 of file mt.c.

#define TARGET_ARG_PARTIAL_BYTES   mt_arg_partial_bytes

Definition at line 2479 of file mt.c.

#define TARGET_ATTRIBUTE_TABLE   mt_attribute_table

Definition at line 2469 of file mt.c.

#define TARGET_MACHINE_DEPENDENT_REORG   mt_machine_reorg

Definition at line 2483 of file mt.c.

#define TARGET_MUST_PASS_IN_STACK   mt_pass_in_stack

Definition at line 2477 of file mt.c.

#define TARGET_PASS_BY_REFERENCE   mt_pass_by_reference

Definition at line 2475 of file mt.c.

#define TARGET_PROMOTE_PROTOTYPES   hook_bool_tree_true

Definition at line 2473 of file mt.c.

#define TARGET_SETUP_INCOMING_VARARGS   mt_setup_incoming_varargs

Definition at line 2481 of file mt.c.

#define TARGET_STRUCT_VALUE_RTX   mt_struct_value_rtx

Definition at line 2471 of file mt.c.


Typedef Documentation

Definition at line 1658 of file mt.c.


Function Documentation

int arith_operand ( rtx  op,
enum machine_mode  mode 
)

Definition at line 719 of file mt.c.

References GET_CODE, register_operand(), and SMALL_INT.

int big_const_operand ( rtx  op,
enum machine_mode mode  ATTRIBUTE_UNUSED 
)

Definition at line 752 of file mt.c.

References CONST_OK_FOR_LETTER_P, GET_CODE, and INTVAL.

Referenced by single_const_operand().

DEF_VEC_ALLOC_O ( loop_work  ,
heap   
)

DEF_VEC_ALLOC_P ( loop_info  ,
heap   
)

DEF_VEC_O ( loop_work   ) 

DEF_VEC_P ( loop_info   ) 

struct machine_function GTY ( ()   )  [read, write]

Definition at line 63 of file mt.c.

References interrupt_handler, and machine_function::ra_needs_full_frame.

static bool insn_dependent_p ( rtx  x,
rtx  y 
) [static]

Definition at line 171 of file mt.c.

References insn_dependent_p_1(), INSN_P, note_stores(), NULL_RTX, PATTERN, and tmp.

static void insn_dependent_p_1 ( rtx  x,
rtx pat  ATTRIBUTE_UNUSED,
void data 
) [static]

Definition at line 159 of file mt.c.

References NULL_RTX, pinsn(), and reg_mentioned_p().

static bool insn_true_dependent_p ( rtx  x,
rtx  y 
) [static]

Definition at line 192 of file mt.c.

References insn_dependent_p_1(), INSN_P, note_stores(), NULL_RTX, PATTERN, and tmp.

Referenced by mt_final_prescan_insn().

static int mt_add_branches ( rtx x,
void insn 
) [static]

void mt_add_loop ( void   ) 

Definition at line 1645 of file mt.c.

References cfun.

static int mt_arg_partial_bytes ( CUMULATIVE_ARGS pcum,
enum machine_mode  mode,
tree  type,
bool named  ATTRIBUTE_UNUSED 
) [static]

const char* mt_asm_output_opcode ( FILE *f  ATTRIBUTE_UNUSED,
const char *  ptr 
)

Definition at line 114 of file mt.c.

References f, fprintf(), mt_nop_reasons, and mt_nops_required.

static int mt_block_length ( basic_block  bb  )  [static]

Definition at line 1791 of file mt.c.

References BB_END, BB_HEAD, CALL_P, get_attr_length(), insn, INSN_P, length, MAX_LOOP_LENGTH, and NEXT_INSN.

Referenced by mt_reorg_loops().

static rtx mt_check_delay_slot ( rtx  branch,
rtx  insn 
) [static]

unsigned int mt_compute_frame_size ( int  size  ) 

static void mt_debug_stack ( struct mt_frame_info info  )  [static]

void mt_emit_cbranch ( enum rtx_code  code,
rtx  loc,
rtx  op0,
rtx  op1 
)

void mt_emit_eh_epilogue ( rtx *operands  ATTRIBUTE_UNUSED  ) 

Definition at line 1259 of file mt.c.

References cfun, EH_EPILOGUE, EH_RETURN_STACKADJ_RTX, and mt_expand_epilogue().

static void mt_emit_save_fp ( enum save_direction  direction,
struct mt_frame_info  info 
) [static]

static void mt_emit_save_regs ( enum save_direction  direction,
struct mt_frame_info  info 
) [static]

static void mt_emit_save_restore ( enum save_direction  direction,
rtx  reg,
rtx  mem,
int  stack_offset 
) [static]

int mt_epilogue_uses ( int  regno  ) 

Definition at line 1142 of file mt.c.

References cfun, GPR_LINK, and reload_completed.

void mt_expand_eh_return ( rtx operands  ) 

void mt_expand_epilogue ( enum epilogue_type  eh_mode  ) 

void mt_expand_prologue ( void   ) 

void mt_final_prescan_insn ( rtx  insn,
rtx *opvec  ATTRIBUTE_UNUSED,
int noperands  ATTRIBUTE_UNUSED 
)

rtx mt_function_arg ( const CUMULATIVE_ARGS cum,
enum machine_mode  mode,
tree  type,
int  named,
int  incoming_p 
)

Definition at line 554 of file mt.c.

References gen_rtx_REG(), mt_function_arg_slotno(), and NULL_RTX.

void mt_function_arg_advance ( CUMULATIVE_ARGS cum,
enum machine_mode  mode,
tree type  ATTRIBUTE_UNUSED,
int  named 
)

int mt_function_arg_boundary ( enum machine_mode mode  ATTRIBUTE_UNUSED,
tree type  ATTRIBUTE_UNUSED 
)

Definition at line 644 of file mt.c.

References BITS_PER_WORD.

static int mt_function_arg_slotno ( const CUMULATIVE_ARGS cum,
enum machine_mode  mode,
tree  type,
int named  ATTRIBUTE_UNUSED,
int incoming_p  ATTRIBUTE_UNUSED,
int *  pregno 
) [static]

rtx mt_function_value ( tree  valtype,
enum machine_mode  mode,
tree func_decl  ATTRIBUTE_UNUSED 
)

Definition at line 1468 of file mt.c.

References gen_rtx_MEM(), gen_rtx_REG(), RETURN_VALUE_REGNUM, and TYPE_MODE.

static rtx mt_generate_compare ( enum rtx_code  code,
rtx  op0,
rtx  op1 
) [static]

Definition at line 1315 of file mt.c.

References emit_insn(), force_reg(), GE, gen_addsi3(), GEN_INT, gen_reg_rtx(), gen_rtx_fmt_ee(), GT, LE, LT, and MT_MIN_INT.

Referenced by mt_emit_cbranch().

static enum attr_type mt_get_attr_type ( rtx  complete_insn  )  [static]

Definition at line 132 of file mt.c.

References CALL_P, GET_CODE, insn, JUMP_P, MEM, PATTERN, pc_rtx, SET, SET_DEST, SET_SRC, TYPE_ARITH, TYPE_BRANCH, TYPE_LOAD, and TYPE_STORE.

Referenced by mt_final_prescan_insn().

static tree mt_handle_interrupt_attribute ( tree node,
tree  name,
tree args  ATTRIBUTE_UNUSED,
int flags  ATTRIBUTE_UNUSED,
bool no_add_attrs 
) [static]

Definition at line 1267 of file mt.c.

References IDENTIFIER_POINTER, NULL_TREE, TREE_CODE, and warning.

void mt_init_cumulative_args ( CUMULATIVE_ARGS cum,
tree  fntype,
rtx  libname,
tree fndecl  ATTRIBUTE_UNUSED,
int  incoming 
)

Definition at line 487 of file mt.c.

References cfun, fprintf(), fputs(), GET_CODE, putc(), TARGET_DEBUG_ARG, TREE_CODE, tree_code_name, TREE_TYPE, and XSTR.

static struct machine_function* mt_init_machine_status ( void   )  [static, read]

Definition at line 781 of file mt.c.

References f, and ggc_alloc_cleared.

Referenced by mt_override_options().

int mt_initial_elimination_offset ( int  from,
int  to 
)

static bool mt_interrupt_function_p ( tree  func  )  [static]

Definition at line 1048 of file mt.c.

References a, DECL_ATTRIBUTES, lookup_attribute(), NULL_TREE, and TREE_CODE.

Referenced by mt_expand_prologue().

int mt_legitimate_address_p ( enum machine_mode  mode,
rtx  xinsn,
int  strict 
)

Definition at line 689 of file mt.c.

References AND, GET_CODE, INTVAL, mt_legitimate_simple_address_p(), and XEXP.

static bool mt_legitimate_simple_address_p ( enum machine_mode mode  ATTRIBUTE_UNUSED,
rtx  xinsn,
int  strict 
) [static]

Definition at line 662 of file mt.c.

References debug_rtx(), fprintf(), GET_CODE, mt_reg_ok_for_base_p(), PLUS, REG, SMALL_INT, TARGET_DEBUG, and XEXP.

Referenced by mt_legitimate_address_p().

static bool mt_loop_nesting ( loop_info  loop  )  [static]

Definition at line 1734 of file mt.c.

References EDGE_COUNT, EDGE_FALLTHRU, EDGE_PRED, EDGE_SUCC, MAX_LOOP_DEPTH, MAX_LOOP_LENGTH, NULL, and VEC_iterate.

Referenced by mt_reorg_loops().

static void mt_machine_reorg ( void   )  [static]

void mt_override_options ( void   ) 

static bool mt_pass_by_reference ( CUMULATIVE_ARGS *cum  ATTRIBUTE_UNUSED,
enum machine_mode mode  ATTRIBUTE_UNUSED,
tree  type,
bool named  ATTRIBUTE_UNUSED 
) [static]

Definition at line 634 of file mt.c.

References int_size_in_bytes(), and UNITS_PER_WORD.

static bool mt_pass_in_stack ( enum machine_mode mode  ATTRIBUTE_UNUSED,
tree  type 
) [static]

Definition at line 1635 of file mt.c.

References TREE_ADDRESSABLE, TREE_CODE, and TYPE_SIZE.

void mt_print_operand ( FILE file,
rtx  x,
int  code 
)

void mt_print_operand_address ( FILE file,
rtx  addr 
)

Definition at line 402 of file mt.c.

References AND, GET_CODE, INTVAL, mt_print_operand_simple_address(), and XEXP.

Referenced by mt_print_operand().

static void mt_print_operand_simple_address ( FILE file,
rtx  addr 
) [static]

int mt_reg_ok_for_base_p ( rtx  x,
int  strict 
)

Definition at line 652 of file mt.c.

References FIRST_PSEUDO_REGISTER, and REGNO.

Referenced by mt_legitimate_simple_address_p().

static void mt_reorg_hazard ( void   )  [static]

static void mt_reorg_loops ( FILE dump_file  )  [static]

rtx mt_return_addr_rtx ( int  count  ) 

Definition at line 98 of file mt.c.

References get_hard_reg_initial_val(), GPR_LINK, NULL_RTX, and Pmode.

static bool mt_scan_loop ( loop_info  loop,
rtx  reg,
rtx  dbnz 
) [static]

Definition at line 1819 of file mt.c.

References BB_END, BB_HEAD, insn, INSN_P, NEXT_INSN, NULL_RTX, PATTERN, reg_mentioned_p(), and VEC_iterate.

Referenced by mt_reorg_loops().

enum reg_class mt_secondary_reload_class ( enum reg_class class  ATTRIBUTE_UNUSED,
enum machine_mode  mode,
rtx  x 
)

Definition at line 1447 of file mt.c.

References GENERAL_REGS, GET_CODE, MEM, NO_REGS, REG, SUBREG_REG, and true_regnum().

void mt_set_memflags ( rtx  ref  ) 

Definition at line 1424 of file mt.c.

References GET_CODE, get_insns(), insn, MEM, MEM_IN_STRUCT_P, MEM_VOLATILE_P, mt_set_memflags_1(), and NEXT_INSN.

static void mt_set_memflags_1 ( rtx  x,
int  in_struct_p,
int  volatile_p 
) [static]

Definition at line 1382 of file mt.c.

References GET_CODE, i, MEM, MEM_IN_STRUCT_P, MEM_VOLATILE_P, PATTERN, SET, SET_DEST, SET_SRC, XVECEXP, and XVECLEN.

Referenced by mt_set_memflags().

static void mt_setup_incoming_varargs ( CUMULATIVE_ARGS cum,
enum machine_mode mode  ATTRIBUTE_UNUSED,
tree type  ATTRIBUTE_UNUSED,
int *  pretend_size,
int  no_rtl 
) [static]

void mt_split_words ( enum machine_mode  nmode,
enum machine_mode  omode,
rtx operands 
)

static rtx mt_struct_value_rtx ( tree fndecl  ATTRIBUTE_UNUSED,
int incoming  ATTRIBUTE_UNUSED 
) [static]

Definition at line 90 of file mt.c.

References gen_rtx_REG(), Pmode, and RETVAL_REGNUM.

int reg_or_0_operand ( rtx  op,
enum machine_mode  mode 
)

Definition at line 730 of file mt.c.

References GET_CODE, INTVAL, REG, and register_operand().

int single_const_operand ( rtx  op,
enum machine_mode mode  ATTRIBUTE_UNUSED 
)

Definition at line 764 of file mt.c.

References big_const_operand(), CONST, GET_CODE, and mode.

int uns_arith_operand ( rtx  op,
enum machine_mode  mode 
)

Definition at line 707 of file mt.c.

References GET_CODE, register_operand(), and SMALL_INT_UNSIGNED.


Variable Documentation

Definition at line 78 of file mt.c.

int interrupt_handler

Definition at line 777 of file mt.c.

Definition at line 1724 of file mt.c.

Referenced by mt_reorg_loops().

Initial value:

{
  
  { "interrupt",  0,   0,   false, false, false, mt_handle_interrupt_attribute },
  { NULL,         0,   0,   false, false, false, NULL }
}

Definition at line 1285 of file mt.c.

Definition at line 74 of file mt.c.

Definition at line 75 of file mt.c.

Definition at line 778 of file mt.c.

Referenced by mt_override_options().

int mt_flag_delayed_branch [static]

Definition at line 86 of file mt.c.

Referenced by mt_machine_reorg(), and mt_override_options().

label_info* mt_labels [static]

Definition at line 2159 of file mt.c.

const char* mt_nop_reasons = "" [static]

Definition at line 110 of file mt.c.

Referenced by mt_asm_output_opcode(), and mt_final_prescan_insn().

int mt_nops_required = 0 [static]

Definition at line 109 of file mt.c.

Referenced by mt_asm_output_opcode(), and mt_final_prescan_insn().

Definition at line 84 of file mt.c.

struct gcc_target targetm = TARGET_INITIALIZER

Definition at line 2485 of file mt.c.

Definition at line 81 of file mt.c.


Generated on Wed Apr 8 14:18:22 2009 for Open64 by  doxygen 1.5.6