osprey-gcc/gcc/config/mn10300/mn10300.c File Reference

#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "rtl.h"
#include "tree.h"
#include "regs.h"
#include "hard-reg-set.h"
#include "real.h"
#include "insn-config.h"
#include "conditions.h"
#include "output.h"
#include "insn-attr.h"
#include "flags.h"
#include "recog.h"
#include "expr.h"
#include "optabs.h"
#include "function.h"
#include "obstack.h"
#include "toplev.h"
#include "tm_p.h"
#include "target.h"
#include "target-def.h"

Include dependency graph for mn10300.c:

Go to the source code of this file.

Defines

#define REG_SAVE_BYTES
#define TARGET_ASM_ALIGNED_HI_OP   "\t.hword\t"
#define TARGET_RTX_COSTS   mn10300_rtx_costs
#define TARGET_ADDRESS_COST   mn10300_address_cost
#define TARGET_ASM_FILE_START   mn10300_file_start
#define TARGET_ASM_FILE_START_FILE_DIRECTIVE   true
#define TARGET_ENCODE_SECTION_INFO   mn10300_encode_section_info
#define TARGET_PROMOTE_PROTOTYPES   hook_bool_tree_true
#define TARGET_RETURN_IN_MEMORY   mn10300_return_in_memory
#define TARGET_PASS_BY_REFERENCE   mn10300_pass_by_reference
#define TARGET_CALLEE_COPIES   hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true
#define TARGET_ARG_PARTIAL_BYTES   mn10300_arg_partial_bytes
#define TARGET_EXPAND_BUILTIN_SAVEREGS   mn10300_builtin_saveregs
#define SIZE_ADD_AX(S)
#define SIZE_ADD_SP(S)
#define SIZE_FMOV_LIMIT(S, N, L, SIZE1, SIZE2, ELSE)
#define SIZE_FMOV_SP_(S, N)
#define SIZE_FMOV_SP(S, N)   (SIZE_FMOV_SP_ ((unsigned HOST_WIDE_INT)(S), (N)))

Functions/Subroutines

static int mn10300_address_cost_1 (rtx, int *)
static int mn10300_address_cost (rtx)
static bool mn10300_rtx_costs (rtx, int, int, int *)
static void mn10300_file_start (void)
static bool mn10300_return_in_memory (tree, tree)
static rtx mn10300_builtin_saveregs (void)
static bool mn10300_pass_by_reference (CUMULATIVE_ARGS *, enum machine_mode, tree, bool)
static int mn10300_arg_partial_bytes (CUMULATIVE_ARGS *, enum machine_mode, tree, bool)
static void mn10300_encode_section_info (tree, rtx, int)
void print_operand (FILE *file, rtx x, int code)
void print_operand_address (FILE *file, rtx addr)
static int fp_regs_to_save (void)
void mn10300_print_reg_list (FILE *file, int mask)
int can_use_return_insn (void)
int mn10300_get_live_callee_saved_regs (void)
void mn10300_gen_multiple_store (int mask)
void expand_prologue (void)
void expand_epilogue (void)
void notice_update_cc (rtx body, rtx insn)
int store_multiple_operation (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
int call_address_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
enum reg_class secondary_reload_class (enum reg_class class, enum machine_mode mode, rtx in)
int initial_offset (int from, int to)
static bool mn10300_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
void mn10300_va_start (tree valist, rtx nextarg)
static bool mn10300_pass_by_reference (CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED, enum machine_mode mode, tree type, bool named ATTRIBUTE_UNUSED)
rtx function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type, int named ATTRIBUTE_UNUSED)
static int mn10300_arg_partial_bytes (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type, bool named ATTRIBUTE_UNUSED)
const char * output_tst (rtx operand, rtx insn)
int impossible_plus_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
int const_8bit_operand (register rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
int const_1f_operand (register rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
int mask_ok_for_mem_btst (int len, int bit)
int symbolic_operand (register rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx legitimize_pic_address (rtx orig, rtx reg)
int legitimate_pic_operand_p (rtx x)
bool legitimate_address_p (enum machine_mode mode, rtx x, int strict)
bool mn10300_wide_const_load_uses_clr (rtx operands[2])
static void mn10300_encode_section_info (tree decl, rtx rtl, int first ATTRIBUTE_UNUSED)

Variables

int mn10300_unspec_int_label_counter
int mn10300_protect_label
struct gcc_target targetm = TARGET_INITIALIZER


Define Documentation

#define REG_SAVE_BYTES

Value:

(4 * regs_ever_live[2] \
      + 4 * regs_ever_live[3] \
            + 4 * regs_ever_live[6] \
      + 4 * regs_ever_live[7] \
      + 16 * (regs_ever_live[14] || regs_ever_live[15] \
        || regs_ever_live[16] || regs_ever_live[17]))

Definition at line 60 of file mn10300.c.

#define SIZE_ADD_AX ( S   ) 

Value:

((((S) >= (1 << 15)) || ((S) < -(1 << 15))) ? 6 \
      : (((S) >= (1 << 7)) || ((S) < -(1 << 7))) ? 4 : 2)

Referenced by expand_epilogue(), and expand_prologue().

#define SIZE_ADD_SP ( S   ) 

Value:

((((S) >= (1 << 15)) || ((S) < -(1 << 15))) ? 6 \
      : (((S) >= (1 << 7)) || ((S) < -(1 << 7))) ? 4 : 3)

Referenced by expand_epilogue(), and expand_prologue().

#define SIZE_FMOV_LIMIT ( S,
N,
L,
SIZE1,
SIZE2,
ELSE   ) 

Value:

(((S) >= (L)) ? (SIZE1) * (N) \
   : ((S) + 4 * (N) >= (L)) ? (((L) - (S)) / 4 * (SIZE2) \
             + ((S) + 4 * (N) - (L)) / 4 * (SIZE1)) \
   : (ELSE))

#define SIZE_FMOV_SP ( S,
 )     (SIZE_FMOV_SP_ ((unsigned HOST_WIDE_INT)(S), (N)))

Referenced by expand_epilogue(), and expand_prologue().

#define SIZE_FMOV_SP_ ( S,
 ) 

Value:

(SIZE_FMOV_LIMIT ((S), (N), (1 << 24), 7, 6, \
                   SIZE_FMOV_LIMIT ((S), (N), (1 << 8), 6, 4, \
            (S) ? 4 * (N) : 3 + 4 * ((N) - 1))))

#define TARGET_ADDRESS_COST   mn10300_address_cost

Definition at line 86 of file mn10300.c.

#define TARGET_ARG_PARTIAL_BYTES   mn10300_arg_partial_bytes

Definition at line 105 of file mn10300.c.

#define TARGET_ASM_ALIGNED_HI_OP   "\t.hword\t"

Definition at line 81 of file mn10300.c.

#define TARGET_ASM_FILE_START   mn10300_file_start

Definition at line 89 of file mn10300.c.

#define TARGET_ASM_FILE_START_FILE_DIRECTIVE   true

Definition at line 91 of file mn10300.c.

#define TARGET_CALLEE_COPIES   hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true

Definition at line 103 of file mn10300.c.

#define TARGET_ENCODE_SECTION_INFO   mn10300_encode_section_info

Definition at line 94 of file mn10300.c.

#define TARGET_EXPAND_BUILTIN_SAVEREGS   mn10300_builtin_saveregs

Definition at line 108 of file mn10300.c.

#define TARGET_PASS_BY_REFERENCE   mn10300_pass_by_reference

Definition at line 101 of file mn10300.c.

#define TARGET_PROMOTE_PROTOTYPES   hook_bool_tree_true

Definition at line 97 of file mn10300.c.

#define TARGET_RETURN_IN_MEMORY   mn10300_return_in_memory

Definition at line 99 of file mn10300.c.

#define TARGET_RTX_COSTS   mn10300_rtx_costs

Definition at line 84 of file mn10300.c.


Function Documentation

int call_address_operand ( rtx  op,
enum machine_mode mode  ATTRIBUTE_UNUSED 
)

Definition at line 1301 of file mn10300.c.

References EXTRA_CONSTRAINT, flag_pic, GET_CODE, and REG.

int can_use_return_insn ( void   ) 

int const_1f_operand ( register rtx  op,
enum machine_mode mode  ATTRIBUTE_UNUSED 
)

Definition at line 1691 of file mn10300.c.

References CONST1_RTX.

int const_8bit_operand ( register rtx  op,
enum machine_mode mode  ATTRIBUTE_UNUSED 
)

Definition at line 1682 of file mn10300.c.

References GET_CODE, and INTVAL.

void expand_epilogue ( void   ) 

void expand_prologue ( void   ) 

static int fp_regs_to_save ( void   )  [static]

rtx function_arg ( CUMULATIVE_ARGS cum,
enum machine_mode  mode,
tree  type,
int named  ATTRIBUTE_UNUSED 
)

int impossible_plus_operand ( rtx  op,
enum machine_mode mode  ATTRIBUTE_UNUSED 
)

Definition at line 1666 of file mn10300.c.

References GET_CODE, PLUS, stack_pointer_rtx, and XEXP.

int initial_offset ( int  from,
int  to 
)

bool legitimate_address_p ( enum machine_mode mode  ,
rtx  x,
int  strict 
)

int legitimate_pic_operand_p ( rtx  x  ) 

rtx legitimize_address ( rtx ,
rtx oldx  ATTRIBUTE_UNUSED,
enum machine_mode mode  ATTRIBUTE_UNUSED 
)

rtx legitimize_pic_address ( rtx  orig,
rtx  reg 
)

int mask_ok_for_mem_btst ( int  len,
int  bit 
)

Definition at line 1699 of file mn10300.c.

static int mn10300_address_cost ( rtx  x  )  [static]

Definition at line 1971 of file mn10300.c.

References mn10300_address_cost_1(), and s.

static int mn10300_address_cost_1 ( rtx  x,
int *  unsig 
) [static]

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

Definition at line 1539 of file mn10300.c.

References align, GET_MODE_SIZE, int_size_in_bytes(), nregs, NULL_TREE, size, and UNITS_PER_WORD.

static int mn10300_arg_partial_bytes ( CUMULATIVE_ARGS ,
enum  machine_mode,
tree  ,
bool   
) [static]

static rtx mn10300_builtin_saveregs ( void   )  [static]

Definition at line 859 of file mn10300.c.

static void mn10300_encode_section_info ( tree  decl,
rtx  rtl,
int first  ATTRIBUTE_UNUSED 
) [static]

Definition at line 2075 of file mn10300.c.

References gcc_target::binds_local_p, flag_pic, GET_CODE, MEM, SYMBOL_REF_FLAG, and XEXP.

static void mn10300_encode_section_info ( tree  ,
rtx  ,
int   
) [static]

static void mn10300_file_start ( void   )  [static]

Definition at line 114 of file mn10300.c.

References asm_out_file, default_file_start(), fprintf(), TARGET_AM33, and TARGET_AM33_2.

void mn10300_gen_multiple_store ( int  mask  ) 

int mn10300_get_live_callee_saved_regs ( void   ) 

Definition at line 573 of file mn10300.c.

References call_used_regs, i, LAST_EXTENDED_REGNUM, and regs_ever_live.

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

Definition at line 1471 of file mn10300.c.

References GET_MODE_SIZE, HOST_WIDE_INT, int_size_in_bytes(), and size.

static bool mn10300_pass_by_reference ( CUMULATIVE_ARGS ,
enum  machine_mode,
tree  ,
bool   
) [static]

void mn10300_print_reg_list ( FILE file,
int  mask 
)

Definition at line 515 of file mn10300.c.

References abort, FIRST_EXTENDED_REGNUM, fputc(), fputs(), i, and reg_names.

static bool mn10300_return_in_memory ( tree  type,
tree fntype  ATTRIBUTE_UNUSED 
) [static]

Definition at line 1423 of file mn10300.c.

References int_size_in_bytes(), and TYPE_MODE.

static bool mn10300_return_in_memory ( tree  ,
tree   
) [static]

static bool mn10300_rtx_costs ( rtx  x,
int  code,
int  outer_code,
int *  total 
) [static]

Definition at line 1978 of file mn10300.c.

References CONST, DIV, INT_16_BITS, INT_8_BITS, INTVAL, MOD, and SET.

void mn10300_va_start ( tree  valist,
rtx  nextarg 
)

Definition at line 1462 of file mn10300.c.

References expand_builtin_saveregs(), and std_expand_builtin_va_start().

bool mn10300_wide_const_load_uses_clr ( rtx  operands[2]  ) 

void notice_update_cc ( rtx body  ,
rtx  insn 
)

const char* output_tst ( rtx  operand,
rtx  insn 
)

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

void print_operand_address ( FILE file,
rtx  addr 
)

enum reg_class secondary_reload_class ( enum reg_class  class,
enum machine_mode mode  ,
rtx  in 
)

int store_multiple_operation ( rtx  op,
enum machine_mode mode  ATTRIBUTE_UNUSED 
)

int symbolic_operand ( register rtx  op,
enum machine_mode mode  ATTRIBUTE_UNUSED 
)

Definition at line 1721 of file mn10300.c.

References CONST, GET_CODE, and XEXP.


Variable Documentation

Definition at line 55 of file mn10300.c.

Definition at line 49 of file mn10300.c.

struct gcc_target targetm = TARGET_INITIALIZER

Definition at line 111 of file mn10300.c.


Generated on Wed Apr 8 15:23:12 2009 for Open64 by  doxygen 1.5.6