<s> invert = true ; break ; case GT : case LT : case LE : if ( op1 == CONST0_RTX ( mode ) && TARGET_SUPPORT_FPV2 ) op1 = force_reg ( mode , op1 ) ; break ; case ORDERED : code = UNORDERED ; invert = true ; break ; default : break ; }

emit_insn ( gen_rtx_SET ( cc_reg , gen_rtx_fmt_ee ( code , CCmode , op0 , op1 ) ) ) ;


<s> static const char * csky_mangle_type ( const_tree type ) { if ( TREE_CODE ( type ) == REAL_TYPE && TYPE_PRECISION ( type ) == <NUM_LIT> && TYPE_MAIN_VARIANT ( type ) != float16_type_node ) return <STR_LIT> ;


<s> static const char * csky_mangle_type ( const_tree type ) { if ( TREE_CODE ( type ) == REAL_TYPE && TYPE_PRECISION ( type ) == <NUM_LIT> && TYPE_MAIN_VARIANT ( type ) != float16_type_node ) return <STR_LIT> ; return NULL ;


<s> } if ( TARGET_HARD_FLOAT ) { const struct csky_fpu_desc * csky_selected_fpu = NULL ; if ( csky_fpu_index == TARGET_FPU_auto ) { const char * target_fpu_name ; bool ok ; int fpu_index ; target_fpu_name = CSKY_FPUTYPE_DEFAULT ; target_fpu_name = <STR_LIT> ; if ( csky_active_target . core_name != NULL && ! strchr ( csky_active_target . core_name , 'f' ) ) target_fpu_name = <STR_LIT> ; else if ( CSKY_TARGET_ARCH ( CK803 ) || ! TARGET_DOUBLE_FLOAT ) target_fpu_name = <STR_LIT> ; else if ( TARGET_DOUBLE_FLOAT && TARGET_FDIVDU ) target_fpu_name = <STR_LIT> ; ok = opt_enum_arg_to_value ( OPT_mfpu_ , target_fpu_name , & fpu_index , CL_TARGET ) ; gcc_assert ( ok ) ; csky_fpu_index = ( enum csky_fpu_type ) fpu_index ; } if ( CSKY_TARGET_ARCH ( CK801 ) || CSKY_TARGET_ARCH ( CK802 ) ) error ( <STR_LIT> , <STR_LIT> , csky_active_target . arch_pp_name ) ; else if ( csky_fpu_index == TARGET_FPU_auto ) error ( <STR_LIT> ) ; else { csky_selected_fpu = & all_fpus [ csky_fpu_index ] ; sbitmap fpu_bits = sbitmap_alloc ( CSKY_ISA_FEATURE_GET ( max ) ) ; csky_initialize_isa ( fpu_bits , csky_selected_fpu -> isa_bits ) ; bitmap_ior ( csky_active_target . isa , csky_active_target . isa , fpu_bits ) ; sbitmap_free ( fpu_bits ) ; }


<s> CUMULATIVE_ARGS local_cum ; cumulative_args_t local_cum_v = pack_cumulative_args ( & local_cum ) ; int regs_to_push ; cfun -> machine -> uses_anonymous_args = <NUM_LIT> ; local_cum = * pcum ; if ( ! TYPE_NO_NAMED_ARGS_STDARG_P ( TREE_TYPE ( current_function_decl ) ) ) csky_function_arg_advance ( local_cum_v , arg ) ; regs_to_push = CSKY_NPARM_REGS - local_cum . reg ;


<s> int param_size = csky_num_arg_regs ( mode , type ) ; if ( * pcum < CSKY_NPARM_REGS && * pcum + param_size > CSKY_NPARM_REGS ) return ( CSKY_NPARM_REGS - * pcum ) * UNITS_PER_WORD ; return <NUM_LIT> ;


<s> call_really_used_regs [ CSKY_HI_REGNUM ] = <NUM_LIT> ; fixed_regs [ CSKY_LO_REGNUM ] = <NUM_LIT> ; call_used_regs [ CSKY_LO_REGNUM ] = <NUM_LIT> ; call_really_used_regs [ CSKY_LO_REGNUM ] = <NUM_LIT> ; } if ( ! TARGET_HARD_FLOAT ) { int regno ; for ( regno = CSKY_FIRST_VFP_REGNUM ; regno <= CSKY_LAST_VFP_REGNUM ; regno ++ ) { fixed_regs [ regno ] = <NUM_LIT> ; call_used_regs [ regno ] = <NUM_LIT> ; call_really_used_regs [ regno ] = <NUM_LIT> ; } } if ( flag_pic ) { fixed_regs [ PIC_OFFSET_TABLE_REGNUM ] = <NUM_LIT> ; call_used_regs [ PIC_OFFSET_TABLE_REGNUM ] = <NUM_LIT> ; call_really_used_regs [ PIC_OFFSET_TABLE_REGNUM ] = <NUM_LIT> ; }


<s> CUMULATIVE_ARGS * pcum = get_cumulative_args ( pcum_v ) ;

if ( * pcum < CSKY_NPARM_REGS ) return gen_rtx_REG ( mode , CSKY_FIRST_PARM_REGNUM + * pcum ) ;


<s> int param_size = csky_num_arg_regs ( mode , type ) ; if ( * pcum + param_size > CSKY_NPARM_REGS ) * pcum = CSKY_NPARM_REGS ;


<s> if ( * pcum + param_size > CSKY_NPARM_REGS ) * pcum = CSKY_NPARM_REGS ; else * pcum += param_size ;


<s> maxoff = <NUM_LIT> ; if ( vcall_offset > maxoff || vcall_offset < - maxoff ) fprintf ( file , <STR_LIT> ) ; else if ( delta > maxoff || delta < - maxoff ) fprintf ( file , <STR_LIT> ) ; } if ( aggregate_value_p ( TREE_TYPE ( TREE_TYPE ( function ) ) , function ) ) thiz = <STR_LIT> ; if ( delta != <NUM_LIT> ) { if ( delta > maxoff || delta < - maxoff ) { fprintf ( file , <STR_LIT> , reg0 , ( long ) delta ) ; fprintf ( file , <STR_LIT> , thiz , thiz , reg0 ) ; } else fprintf ( file , <STR_LIT> , ( delta > <NUM_LIT> ? <STR_LIT> : <STR_LIT> ) , thiz , thiz , ( long ) ( delta > <NUM_LIT> ? delta : - delta ) ) ; } if ( vcall_offset != <NUM_LIT> ) { fprintf ( file , <STR_LIT> , reg0 , thiz ) ; if ( vcall_offset > maxoff || vcall_offset < - maxoff ) { fprintf ( file , <STR_LIT> , reg1 , ( long ) vcall_offset ) ; fprintf ( file , <STR_LIT> , reg0 , reg0 , reg1 ) ; } else fprintf ( file , <STR_LIT> , ( vcall_offset > <NUM_LIT> ? <STR_LIT> : <STR_LIT> ) , reg0 , reg0 , ( long ) ( vcall_offset > <NUM_LIT> ? vcall_offset : - vcall_offset ) ) ;

fprintf ( file , <STR_LIT> , reg0 , reg0 ) ;


<s> if ( aggregate_value_p ( TREE_TYPE ( TREE_TYPE ( function ) ) , function ) ) thiz = <STR_LIT> ; if ( delta != <NUM_LIT> ) { if ( delta > maxoff || delta < - maxoff ) { fprintf ( file , <STR_LIT> , reg0 , ( long ) delta ) ; fprintf ( file , <STR_LIT> , thiz , thiz , reg0 ) ; } else fprintf ( file , <STR_LIT> , ( delta > <NUM_LIT> ? <STR_LIT> : <STR_LIT> ) , thiz , thiz , ( long ) ( delta > <NUM_LIT> ? delta : - delta ) ) ; } if ( vcall_offset != <NUM_LIT> ) { fprintf ( file , <STR_LIT> , reg0 , thiz ) ; if ( vcall_offset > maxoff || vcall_offset < - maxoff ) { fprintf ( file , <STR_LIT> , reg1 , ( long ) vcall_offset ) ; fprintf ( file , <STR_LIT> , reg0 , reg0 , reg1 ) ; } else fprintf ( file , <STR_LIT> , ( vcall_offset > <NUM_LIT> ? <STR_LIT> : <STR_LIT> ) , reg0 , reg0 , ( long ) ( vcall_offset > <NUM_LIT> ? vcall_offset : - vcall_offset ) ) ; fprintf ( file , <STR_LIT> , reg0 , reg0 ) ; fprintf ( file , <STR_LIT> , thiz , thiz , reg0 ) ; } if ( CSKY_TARGET_ARCH ( CK801 ) ) { if ( vcall_offset > maxoff || vcall_offset < - maxoff ) { fprintf ( file , <STR_LIT> ) ; fprintf ( file , <STR_LIT> ) ; fprintf ( file , <STR_LIT> ) ; } else if ( delta > maxoff || delta < - maxoff ) {


<s> csky_function_arg_advance ( local_cum_v , mode , type , true ) ; regs_to_push = CSKY_NPARM_REGS - local_cum ; if ( regs_to_push ) * pretend_size = regs_to_push * UNITS_PER_WORD ;


<s> cumulative_args_t local_cum_v = pack_cumulative_args ( & local_cum ) ; int regs_to_push ; cfun -> machine -> uses_anonymous_args = <NUM_LIT> ; local_cum = * pcum ; csky_function_arg_advance ( local_cum_v , mode , type , true ) ; regs_to_push = CSKY_NPARM_REGS - local_cum ;


<s> for ( reg = <NUM_LIT> ; reg < CSKY_NGPR_REGS ; reg ++ ) { bool save = false ; if ( CSKY_TARGET_ARCH ( CK801 ) && reg > <NUM_LIT> && reg < <NUM_LIT> ) continue ; if ( ( CSKY_TARGET_ARCH ( CK801 ) || CSKY_TARGET_ARCH ( CK802 ) || CSKY_TARGET_ARCH ( CK803 ) ) && reg > <NUM_LIT> ) break ; if ( df_regs_ever_live_p ( reg ) && ! call_really_used_regs [ reg ] ) save = true ; else if ( frame_pointer_needed && reg == FRAME_POINTER_REGNUM ) save = true ; else if ( crtl -> calls_eh_return && reg == FRAME_POINTER_REGNUM ) save = true ; else if ( ( CSKY_TARGET_ARCH ( CK801 ) || CSKY_TARGET_ARCH ( CK802 ) ) && reg == CSKY_LR_REGNUM && ( ! crtl -> is_leaf || csky_far_jump_used_p ( ) ) ) save = true ; else if ( crtl -> calls_eh_return && reg >= CSKY_FIRST_EH_RETDATA_REGNUM && reg <= CSKY_LAST_EH_RETDATA_REGNUM ) save = true ;

if ( reg == CSKY_STACKADJUST_REGNUM && cfun -> machine -> reg_offset > CSKY_MAX_SP_ADJUST * <NUM_LIT> ) save = true ;


<s> mp -> value = fix -> value ; mp -> refcount = <NUM_LIT> ; mp -> min_address = - <NUM_LIT> ; if ( max_mp == NULL ) { mp -> max_address = max_address ; mp -> next = NULL ; mp -> prev = minipool_vector_tail ; if ( mp -> prev == NULL ) { minipool_vector_head = mp ; minipool_vector_label = gen_csky_constpool_label ( gen_rtx_CONST_INT ( VOIDmode , constpool_label_no ++ ) ) ; } else mp -> prev -> next = mp ; minipool_vector_tail = mp ; } else { if ( max_address > max_mp -> max_address - mp -> fix_size ) mp -> max_address = max_mp -> max_address - mp -> fix_size ; else mp -> max_address = max_address ; mp -> next = max_mp ; mp -> prev = max_mp -> prev ; max_mp -> prev = mp ; if ( mp -> prev != NULL ) mp -> prev -> next = mp ; else minipool_vector_head = mp ; }


<s> if ( max_mp == NULL ) { mp -> max_address = max_address ; mp -> next = NULL ; mp -> prev = minipool_vector_tail ; if ( mp -> prev == NULL ) { minipool_vector_head = mp ; minipool_vector_label = gen_csky_constpool_label ( gen_rtx_CONST_INT ( VOIDmode , constpool_label_no ++ ) ) ; } else mp -> prev -> next = mp ; minipool_vector_tail = mp ; } else { if ( max_address > max_mp -> max_address - mp -> fix_size ) mp -> max_address = max_mp -> max_address - mp -> fix_size ; else mp -> max_address = max_address ; mp -> next = max_mp ; mp -> prev = max_mp -> prev ; max_mp -> prev = mp ;

if ( mp -> prev != NULL ) mp -> prev -> next = mp ;


<s> static void assign_csky_minipool_offsets ( Mfix * barrier ) { HOST_WIDE_INT offset = <NUM_LIT> ; Mnode * mp ; minipool_barrier = barrier ; for ( mp = minipool_vector_head ; mp != NULL ; mp = mp -> next ) {


<s> minipool_barrier = barrier ; for ( mp = minipool_vector_head ; mp != NULL ; mp = mp -> next ) {


<s> static int ck801_legitimate_index_p ( machine_mode mode , rtx index , int strict_p ATTRIBUTE_UNUSED ) { enum rtx_code code = GET_CODE ( index ) ;

if ( GET_MODE_SIZE ( mode ) >= <NUM_LIT> ) return ( code == CONST_INT && INTVAL ( index ) < CSKY_LD16_MAX_OFFSET ( SImode ) && INTVAL ( index ) >= <NUM_LIT> && ( INTVAL ( index ) & <NUM_LIT> ) == <NUM_LIT> ) ;


<s> return false ; case SIGN_EXTEND : case ZERO_EXTEND : * total = COSTS_N_INSNS ( CSKY_NUM_REGS ( mode ) ) ; return false ; case SIGN_EXTRACT : case ZERO_EXTRACT : if ( REG_P ( XEXP ( x , <NUM_LIT> ) ) && CONST_INT_P ( XEXP ( x , <NUM_LIT> ) ) && CONST_INT_P ( XEXP ( x , <NUM_LIT> ) ) && INTVAL ( XEXP ( x , <NUM_LIT> ) ) == <NUM_LIT> && INTVAL ( XEXP ( x , <NUM_LIT> ) ) % <NUM_LIT> == <NUM_LIT> ) { * total = COSTS_N_INSNS ( <NUM_LIT> ) ; return true ; } * total = COSTS_N_INSNS ( CSKY_NUM_REGS ( mode ) ) ; return false ; case CONST_INT : { unsigned HOST_WIDE_INT t = ( unsigned HOST_WIDE_INT ) ( INTVAL ( x ) ) ; if ( outer_code == COMPARE ) { if ( t < <NUM_LIT> ) * total = <NUM_LIT> ; else * total = COSTS_N_INSNS ( <NUM_LIT> ) ; } else if ( outer_code == AND || outer_code == IOR || outer_code == XOR ) { if ( t < <NUM_LIT> ) { if ( outer_code == AND && ( t == <NUM_LIT> || t == <NUM_LIT> ) ) { * total = <NUM_LIT> ; return true ; } * total = <NUM_LIT> ; } else if ( t < <NUM_LIT> ) * total = COSTS_N_INSNS ( <NUM_LIT> ) ; else * total = COSTS_N_INSNS ( <NUM_LIT> ) ; } else if ( outer_code == PLUS || outer_code == MINUS ) { if ( t < <NUM_LIT> ) * total = <NUM_LIT> ; else if ( t < <NUM_LIT> ) * total = <NUM_LIT> ; else if ( t < <NUM_LIT> ) * total = COSTS_N_INSNS ( <NUM_LIT> ) ; else * total = COSTS_N_INSNS ( <NUM_LIT> ) ; } else if ( outer_code == ROTATE || outer_code == ROTATERT || outer_code == LSHIFTRT || outer_code == ASHIFTRT || outer_code == ASHIFT ) { if ( t < <NUM_LIT> ) * total = <NUM_LIT> ; else * total = COSTS_N_INSNS ( <NUM_LIT> ) ; } else { if ( t < <NUM_LIT> ) if ( outer_code == SET && t < <NUM_LIT> ) * total = <NUM_LIT> ; else * total = COSTS_N_INSNS ( <NUM_LIT> ) ; else * total = COSTS_N_INSNS ( <NUM_LIT> ) ; } } return true ;


<s> static int ck802_legitimate_index_p ( machine_mode mode , rtx index , int strict_p ATTRIBUTE_UNUSED ) { enum rtx_code code = GET_CODE ( index ) ; if ( GET_MODE_SIZE ( mode ) >= <NUM_LIT> ) return ( code == CONST_INT && INTVAL ( index ) < CSKY_LD32_MAX_OFFSET ( SImode ) && INTVAL ( index ) >= <NUM_LIT> && ( INTVAL ( index ) & <NUM_LIT> ) == <NUM_LIT> ) ; if ( code == CONST_INT && GET_MODE_SIZE ( mode ) > <NUM_LIT> && INTVAL ( index ) <= CSKY_LD32_MAX_OFFSET ( mode ) && INTVAL ( index ) >= <NUM_LIT> ) return ( ( INTVAL ( index ) % GET_MODE_SIZE ( mode ) ) == <NUM_LIT> ) ; return <NUM_LIT> ;


<s> if ( REG_P ( XEXP ( sub_exp , <NUM_LIT> ) ) && REG_P ( XEXP ( sub_exp , <NUM_LIT> ) ) ) { * total = COSTS_N_INSNS ( <NUM_LIT> ) ; return true ; } } return false ; case MULT : if ( REG_P ( XEXP ( x , <NUM_LIT> ) ) && CONST_INT_P ( XEXP ( x , <NUM_LIT> ) ) ) { HOST_WIDE_INT val = INTVAL ( XEXP ( x , <NUM_LIT> ) ) ;

if ( val % <NUM_LIT> == <NUM_LIT> && val < <NUM_LIT> && val > <NUM_LIT> ) {


<s> static bool ck803_rtx_costs ( rtx x , int code , int outer_code ATTRIBUTE_UNUSED , int * total , bool speed ATTRIBUTE_UNUSED ) { switch ( code ) { case SET : if ( MEM_P ( XEXP ( x , <NUM_LIT> ) ) ) { struct csky_address op1 ; bool address_valid = decompose_csky_address ( XEXP ( XEXP ( x , <NUM_LIT> ) , <NUM_LIT> ) , & op1 ) ; if ( op1 . index ) { * total = COSTS_N_INSNS ( <NUM_LIT> ) ; return true ; } else if ( address_valid ) {


<s> static bool ck807_ck810_rtx_costs ( rtx x , int code , int outer_code ATTRIBUTE_UNUSED , int * total , bool speed ATTRIBUTE_UNUSED ) { switch ( code ) { case MULT : if ( REG_P ( XEXP ( x , <NUM_LIT> ) ) && CONST_INT_P ( XEXP ( x , <NUM_LIT> ) ) ) { HOST_WIDE_INT val = INTVAL ( XEXP ( x , <NUM_LIT> ) ) ; if ( val % <NUM_LIT> == <NUM_LIT> && val < <NUM_LIT> && val > <NUM_LIT> ) { * total = COSTS_N_INSNS ( <NUM_LIT> ) ; return true ;


<s> if ( val % <NUM_LIT> == <NUM_LIT> && val < <NUM_LIT> && val > <NUM_LIT> ) { * total = COSTS_N_INSNS ( <NUM_LIT> ) ; return true ; } } return false ; case CONST : case LABEL_REF : case SYMBOL_REF : * total = COSTS_N_INSNS ( <NUM_LIT> ) ; return true ; default : return false ;


<s> static int ck810_legitimate_index_p ( machine_mode mode , rtx index , int strict_p ) { enum rtx_code code = GET_CODE ( index ) ; if ( code == CONST_INT && TARGET_HARD_FLOAT && CSKY_VREG_MODE_P ( mode ) ) return ( INTVAL ( index ) < <NUM_LIT> && INTVAL ( index ) >= <NUM_LIT> && ( INTVAL ( index ) & <NUM_LIT> ) == <NUM_LIT> ) ; if ( code == CONST_INT ) { if ( GET_MODE_SIZE ( mode ) >= <NUM_LIT> ) return ( INTVAL ( index ) < CSKY_LD32_MAX_OFFSET ( SImode ) && INTVAL ( index ) >= <NUM_LIT> && ( INTVAL ( index ) & <NUM_LIT> ) == <NUM_LIT> ) ; if ( GET_MODE_SIZE ( mode ) > <NUM_LIT> && INTVAL ( index ) <= CSKY_LD32_MAX_OFFSET ( mode ) && INTVAL ( index ) >= <NUM_LIT> ) return ( ( INTVAL ( index ) % GET_MODE_SIZE ( mode ) ) == <NUM_LIT> ) ; } else if ( code == UNSPEC ) return ( flag_pic == <NUM_LIT> && ( XINT ( index , <NUM_LIT> ) == UNSPEC_PIC_SYMBOL_PLT || XINT ( index , <NUM_LIT> ) == UNSPEC_PIC_SYMBOL_GOT ) ) ; else if ( GET_MODE_SIZE ( mode ) <= <NUM_LIT> || ( TARGET_HARD_FLOAT && CSKY_VREG_MODE_P ( mode ) ) ) { if ( is_csky_address_register_rtx_p ( index , strict_p ) ) return <NUM_LIT> ; else if ( code == MULT || code == ASHIFT ) { rtx xiop0 = XEXP ( index , <NUM_LIT> ) ; rtx xiop1 = XEXP ( index , <NUM_LIT> ) ; return ( is_csky_address_register_rtx_p ( xiop0 , strict_p ) && CONST_INT_P ( xiop1 ) && is_ldr_shift_p ( INTVAL ( xiop1 ) , code ) ) ; } }


<s> switch ( code ) { case PLUS : if ( GET_CODE ( XEXP ( x , <NUM_LIT> ) ) == MULT && REG_P ( XEXP ( x , <NUM_LIT> ) ) && speed ) { rtx mul_op0 = XEXP ( XEXP ( x , <NUM_LIT> ) , <NUM_LIT> ) ; rtx mul_op1 = XEXP ( XEXP ( x , <NUM_LIT> ) , <NUM_LIT> ) ; if ( REG_P ( mul_op0 ) && REG_P ( mul_op1 ) ) {


<s> if ( CSKY_CONST_OK_FOR_Uc ( value ) && value != - <NUM_LIT> ) return <NUM_LIT> ; if ( CSKY_CONST_OK_FOR_I ( value ) ) return <NUM_LIT> ; if ( CSKY_CONST_OK_FOR_MOVIH ( value ) ) return <NUM_LIT> ; return <NUM_LIT> ;


<s> HOST_WIDE_INT count = ( fix ? fix -> address : <NUM_LIT> ) ; HOST_WIDE_INT max_count = max_address ; rtx_code_label * label = gen_label_rtx ( ) ; selected_cost = get_csky_barrier_cost ( from ) ; while ( from && count < max_count ) { int new_cost ; rtx_jump_table_data * table ; count += get_attr_length ( from ) ; if ( tablejump_p ( from , NULL , & table ) ) { count += get_csky_jump_table_size ( table ) ; new_cost = get_csky_barrier_cost ( from ) ; if ( count < max_count && ( ! selected || new_cost <= selected_cost ) ) { selected = table ; selected_cost = new_cost ; selected_address = count ; } from = NEXT_INSN ( table ) ; continue ;


<s> static Mfix * create_csky_fix_barrier ( Mfix * fix , Mfix * fix_next , HOST_WIDE_INT max_address ) { rtx_barrier * barrier ; rtx_insn * from = ( fix ? fix -> insn : get_insns ( ) ) ; rtx_insn * selected = NULL ; int selected_cost ; HOST_WIDE_INT selected_address = <NUM_LIT> ; Mfix * new_fix ; HOST_WIDE_INT count = ( fix ? fix -> address : <NUM_LIT> ) ; HOST_WIDE_INT max_count = max_address ; rtx_code_label * label = gen_label_rtx ( ) ; selected_cost = get_csky_barrier_cost ( from ) ; while ( from && count < max_count ) { int new_cost ; rtx_jump_table_data * table ; count += get_attr_length ( from ) ;

if ( tablejump_p ( from , NULL , & table ) ) {


<s> enum rtx_code code = GET_CODE ( x ) ; if ( code == REG ) return COSTS_N_INSNS ( <NUM_LIT> ) ; if ( code == PLUS && REG_P ( XEXP ( x , <NUM_LIT> ) ) && CONST_INT_P ( XEXP ( x , <NUM_LIT> ) ) ) return COSTS_N_INSNS ( <NUM_LIT> ) ; return COSTS_N_INSNS ( <NUM_LIT> ) ;


<s> minipool_startobj = ( char * ) obstack_alloc ( & minipool_obstack , <NUM_LIT> ) ;


<s> static void csky_add_gc_roots ( void ) { gcc_obstack_init ( & minipool_obstack ) ;

minipool_startobj = ( char * ) obstack_alloc ( & minipool_obstack , <NUM_LIT> ) ;


<s> return ! CSKY_FUNCTION_IS_NAKED ( get_csky_current_func_type ( ) ) ;


<s> int param_size = csky_num_arg_regs ( arg . mode , arg . type , pcum -> is_stdarg ) ; int reg = pcum -> reg ;

if ( FUNCTION_VARG_MODE_P ( arg . mode ) && ! pcum -> is_stdarg ) return <NUM_LIT> ;


<s> int reg = pcum -> reg ; if ( FUNCTION_VARG_MODE_P ( arg . mode ) && ! pcum -> is_stdarg ) return <NUM_LIT> ; if ( reg < CSKY_NPARM_REGS && reg + param_size > CSKY_NPARM_REGS ) return ( CSKY_NPARM_REGS - reg ) * UNITS_PER_WORD ;


<s> static void csky_asm_trampoline_template ( FILE * f ) { if ( CSKY_ISA_FEATURE ( <NUM_LIT> ) ) { fprintf ( f , <STR_LIT> , reg_names [ STATIC_CHAIN_REGNUM ] ) ; fprintf ( f , <STR_LIT> ) ; } else if ( CSKY_TARGET_ARCH ( CK801 ) ) { sorry ( <STR_LIT> ) ; } else { fprintf ( f , <STR_LIT> , reg_names [ CSKY_T1_REGNUM ] ) ; fprintf ( f , <STR_LIT> , reg_names [ STATIC_CHAIN_REGNUM ] ) ; fprintf ( f , <STR_LIT> , reg_names [ CSKY_T1_REGNUM ] ) ; fprintf ( f , <STR_LIT> ) ; } fprintf ( f , <STR_LIT> ) ; fprintf ( f , <STR_LIT> ) ;


<s> } else if ( CSKY_TARGET_ARCH ( CK801 ) ) { sorry ( <STR_LIT> ) ; } else { fprintf ( f , <STR_LIT> , reg_names [ CSKY_T1_REGNUM ] ) ; fprintf ( f , <STR_LIT> , reg_names [ STATIC_CHAIN_REGNUM ] ) ; fprintf ( f , <STR_LIT> , reg_names [ CSKY_T1_REGNUM ] ) ; fprintf ( f , <STR_LIT> ) ; } fprintf ( f , <STR_LIT> ) ; fprintf ( f , <STR_LIT> ) ; fprintf ( f , <STR_LIT> ) ;


<s> label = gen_rtx_UNSPEC ( Pmode , gen_rtvec ( <NUM_LIT> , labelno ) , UNSPEC_TLS_LABEL ) ; unspec = gen_rtx_UNSPEC ( Pmode , gen_rtvec ( <NUM_LIT> , x , GEN_INT ( reloc ) , label ) , UNSPEC_TLS ) ; tmp = gen_reg_rtx ( SImode ) ; emit_move_insn ( reg , unspec ) ; emit_move_insn ( tmp , label ) ; emit_insn ( gen_addsi3 ( reg , reg , tmp ) ) ; * valuep = emit_library_call_value ( get_tls_get_addr ( ) , NULL_RTX , LCT_PURE , Pmode , reg , Pmode ) ; insns = get_insns ( ) ; end_sequence ( ) ;


<s> emit_insn ( gen_addsi3 ( reg , reg , tmp ) ) ; * valuep = emit_library_call_value ( get_tls_get_addr ( ) , NULL_RTX , LCT_PURE , Pmode , reg , Pmode ) ; insns = get_insns ( ) ; end_sequence ( ) ; return insns ;


<s> static bool csky_cannot_copy_insn_p ( rtx_insn * insn ) { subrtx_iterator :: array_type array ; FOR_EACH_SUBRTX ( iter , array , PATTERN ( insn ) , ALL ) { const_rtx x = * iter ;

if ( GET_CODE ( x ) == UNSPEC && ( XINT ( x , <NUM_LIT> ) == UNSPEC_TLS_LABEL || XINT ( x , <NUM_LIT> ) == UNSPEC_PIC_SYMBOL_GOTPC_GRS ) ) return true ;


<s> subrtx_iterator :: array_type array ; FOR_EACH_SUBRTX ( iter , array , PATTERN ( insn ) , ALL ) { const_rtx x = * iter ; if ( GET_CODE ( x ) == UNSPEC && ( XINT ( x , <NUM_LIT> ) == UNSPEC_TLS_LABEL || XINT ( x , <NUM_LIT> ) == UNSPEC_PIC_SYMBOL_GOTPC_GRS ) ) return true ; } return false ;


<s> static bool csky_cannot_force_const_mem ( machine_mode mode ATTRIBUTE_UNUSED , rtx x ) {


<s> static bool csky_can_change_mode_class ( machine_mode from , machine_mode to , reg_class_t rclass ) { return ( GET_MODE_SIZE ( from ) == GET_MODE_SIZE ( to ) || ! reg_classes_intersect_p ( V_REGS , rclass ) ) ;


<s> return ( GET_MODE_SIZE ( from ) == GET_MODE_SIZE ( to ) || ! reg_classes_intersect_p ( V_REGS , rclass ) ) ;


<s> static bool csky_can_use_ldstm ( int mask , int * br , int * er ) { int regno ; int begin_reg = <NUM_LIT> , end_reg = <NUM_LIT> ; int count = <NUM_LIT> ; if ( ! TARGET_MULTIPLE_STLD ) return false ;


<s> static bool csky_can_use_ldstm ( int mask , int * br , int * er ) { int regno ; int begin_reg = <NUM_LIT> , end_reg = <NUM_LIT> ; int count = <NUM_LIT> ; if ( ! TARGET_MULTIPLE_STLD ) return false ; if ( mask & <NUM_LIT> ) return false ; for ( regno = <NUM_LIT> ; regno <= <NUM_LIT> ; regno ++ ) {


<s> int i ; int end_reg ; if ( ! TARGET_PUSHPOP ) return false ; if ( mask == <NUM_LIT> ) return false ; if ( mask & <NUM_LIT> ) return false ; for ( end_reg = <NUM_LIT> , i = <NUM_LIT> ; i >= <NUM_LIT> ; i -- ) { if ( ! end_reg && ( mask & ( <NUM_LIT> << i ) ) ) end_reg = i ; if ( end_reg && ! ( mask & ( <NUM_LIT> << i ) ) ) return false ; } for ( end_reg = <NUM_LIT> , i = <NUM_LIT> ; i >= <NUM_LIT> ; i -- ) { if ( ! end_reg && ( mask & ( <NUM_LIT> << i ) ) ) end_reg = i ;


<s> static bool csky_class_likely_spilled_p ( reg_class_t rclass ) {

if ( ( TARGET_MINI_REGISTERS && rclass == MINI_REGS ) || rclass == C_REGS ) return true ;


<s> static unsigned char csky_class_max_nregs ( reg_class_t rclass , machine_mode mode ) { if ( rclass == V_REGS ) return <NUM_LIT> ;


<s> for ( ; indx > first_indx ; indx -- ) { regno = REGNO ( XEXP ( XVECEXP ( parallel_op , <NUM_LIT> , indx ) , <NUM_LIT> ) ) ; if ( regno > CSKY_LR_REGNUM ) return <NUM_LIT> ; } return <NUM_LIT> ;


<s> int i ; for ( i = ( CSKY_LAST_MINI_REGNUM + <NUM_LIT> ) ; i < <NUM_LIT> ; i ++ ) { fixed_regs [ i ] = <NUM_LIT> ; call_used_regs [ i ] = <NUM_LIT> ; } } else if ( CSKY_TARGET_ARCH ( CK802 ) || CSKY_TARGET_ARCH ( CK803 ) || ! TARGET_HIGH_REGISTERS ) { int i ; for ( i = CSKY_FIRST_HIGH_REGNUM ; i <= CSKY_LAST_HIGH_REGNUM ; i ++ ) { fixed_regs [ i ] = <NUM_LIT> ; call_used_regs [ i ] = <NUM_LIT> ; } } if ( CSKY_TARGET_ARCH ( CK801 ) || CSKY_TARGET_ARCH ( CK802 ) ) { fixed_regs [ CSKY_LR_REGNUM ] = <NUM_LIT> ; call_used_regs [ CSKY_LR_REGNUM ] = <NUM_LIT> ; } if ( ! TARGET_DSP ) { fixed_regs [ CSKY_HI_REGNUM ] = <NUM_LIT> ; call_used_regs [ CSKY_HI_REGNUM ] = <NUM_LIT> ; fixed_regs [ CSKY_LO_REGNUM ] = <NUM_LIT> ; call_used_regs [ CSKY_LO_REGNUM ] = <NUM_LIT> ; }


<s> } if ( csky_selected_cpu ) { if ( csky_selected_arch && ( csky_selected_cpu -> base_arch != csky_selected_arch -> base_arch ) ) warning ( <NUM_LIT> , <STR_LIT> , csky_selected_cpu -> name , csky_selected_arch -> name ) ; if ( ! csky_selected_arch ) csky_selected_arch = & all_architectures [ csky_selected_cpu -> base_arch ] ; csky_initialize_isa ( all_sbits , csky_selected_arch -> isa_bits ) ; target -> core_name = csky_selected_cpu -> name ; } else if ( csky_selected_arch ) { csky_selected_cpu = csky_selected_arch ; target -> arch_name = csky_selected_arch -> name ; } else { csky_selected_cpu = & all_cores [ TARGET_CPU_DEFAULT ] ; csky_selected_arch = & all_architectures [ csky_selected_cpu -> base_arch ] ; csky_initialize_isa ( all_sbits , csky_selected_arch -> isa_bits ) ; target -> core_name = csky_selected_cpu -> name ; } if ( ! csky_selected_tune ) csky_selected_tune = & all_cores [ csky_selected_cpu -> core ] ; gcc_assert ( csky_selected_tune ) ; gcc_assert ( csky_selected_arch ) ; gcc_assert ( csky_selected_cpu ) ;

csky_initialize_isa ( target -> isa , csky_selected_cpu -> isa_bits ) ;


<s> builtin_define ( <STR_LIT> ) ; } if ( TARGET_HARD_FLOAT ) { builtin_define ( <STR_LIT> ) ; builtin_define ( <STR_LIT> ) ; if ( TARGET_HARD_FLOAT_ABI ) { builtin_define ( <STR_LIT> ) ; builtin_define ( <STR_LIT> ) ; } if ( TARGET_SINGLE_FPU ) { builtin_define ( <STR_LIT> ) ; builtin_define ( <STR_LIT> ) ; } } else { builtin_define ( <STR_LIT> ) ; builtin_define ( <STR_LIT> ) ; } if ( CSKY_ISA_FEATURE ( fpv2_sf ) ) { builtin_define ( <STR_LIT> ) ; builtin_define ( <STR_LIT> ) ; } if ( TARGET_SUPPORT_FPV3 ) { builtin_define ( <STR_LIT> ) ; builtin_define ( <STR_LIT> ) ; } if ( TARGET_ELRW ) { builtin_define ( <STR_LIT> ) ; builtin_define ( <STR_LIT> ) ; } if ( TARGET_ISTACK ) { builtin_define ( <STR_LIT> ) ; builtin_define ( <STR_LIT> ) ; } if ( TARGET_MP ) { builtin_define ( <STR_LIT> ) ; builtin_define ( <STR_LIT> ) ; } if ( TARGET_CP ) { builtin_define ( <STR_LIT> ) ; builtin_define ( <STR_LIT> ) ; } if ( TARGET_CACHE ) { builtin_define ( <STR_LIT> ) ; builtin_define ( <STR_LIT> ) ; } if ( TARGET_SECURITY ) { builtin_define ( <STR_LIT> ) ; builtin_define ( <STR_LIT> ) ; } if ( TARGET_TRUST ) { builtin_define ( <STR_LIT> ) ; builtin_define ( <STR_LIT> ) ; } if ( TARGET_DSP ) { builtin_define ( <STR_LIT> ) ; builtin_define ( <STR_LIT> ) ; } if ( TARGET_EDSP ) { builtin_define ( <STR_LIT> ) ; builtin_define ( <STR_LIT> ) ; } if ( TARGET_VDSP ) { builtin_define ( <STR_LIT> ) ;


<s> return BRANCH_COST ( optimize_function_for_speed_p ( cfun ) , false ) >= <NUM_LIT> ;


<s> } else { parts [ i ] = gen_rtx_REG ( SImode , regno + i ) ; parts [ i + <NUM_LIT> ] = gen_rtx_REG ( SImode , regno + i + <NUM_LIT> ) ; } } else { nregs = GET_MODE_SIZE ( mode ) / <NUM_LIT> ; for ( i = <NUM_LIT> ; i < nregs ; i += <NUM_LIT> ) if ( TARGET_BIG_ENDIAN ) { parts [ i ] = gen_rtx_REG ( SImode , regno + i - <NUM_LIT> ) ;

parts [ i + <NUM_LIT> ] = gen_rtx_REG ( SImode , regno + i ) ;


<s> rtx parts [ <NUM_LIT> ] ; int nregs ; int i ; regno = REGNO ( rtl ) ; if ( ! CSKY_VREG_P ( regno ) ) return NULL_RTX ; if ( CSKY_VREG_HI_P ( regno ) ) regno += <NUM_LIT> ; mode = GET_MODE ( rtl ) ; if ( GET_MODE_SIZE ( mode ) < <NUM_LIT> ) return NULL_RTX ; if ( TARGET_SINGLE_FPU ) { nregs = GET_MODE_SIZE ( mode ) / <NUM_LIT> ; for ( i = <NUM_LIT> ; i < nregs ; i += <NUM_LIT> ) if ( TARGET_BIG_ENDIAN ) { parts [ i ] = gen_rtx_REG ( SImode , regno + i + <NUM_LIT> ) ; parts [ i + <NUM_LIT> ] = gen_rtx_REG ( SImode , regno + i ) ; } else { parts [ i ] = gen_rtx_REG ( SImode , regno + i ) ; parts [ i + <NUM_LIT> ] = gen_rtx_REG ( SImode , regno + i + <NUM_LIT> ) ; } } else { nregs = GET_MODE_SIZE ( mode ) / <NUM_LIT> ;


<s> case LE : code = GT ; invert = true ; case GT : if ( GET_CODE ( op1 ) == CONST_INT ) op1 = force_reg ( SImode , op1 ) ; break ; case GE : code = LT ; invert = true ; case LT : if ( GET_CODE ( op1 ) == CONST_INT && INTVAL ( op1 ) != <NUM_LIT> && ( TARGET_MINI_REGISTERS ? ! csky_literal_J_operand ( op1 , SImode ) : ! csky_literal_Uk_operand ( op1 , SImode ) ) ) op1 = force_reg ( SImode , op1 ) ; break ; case GTU : gcc_assert ( GET_CODE ( op1 ) != CONST_INT || INTVAL ( op1 ) != <NUM_LIT> ) ; code = LEU ; invert = true ; case LEU : if ( GET_CODE ( op1 ) == CONST_INT && INTVAL ( op1 ) != <NUM_LIT> ) op1 = force_reg ( SImode , op1 ) ; break ; case LTU : code = GEU ; invert = true ; case GEU : if ( GET_CODE ( op1 ) == CONST_INT && INTVAL ( op1 ) != <NUM_LIT> && ( TARGET_MINI_REGISTERS ? ! csky_literal_J_operand ( op1 , SImode ) : ! csky_literal_Uk_operand ( op1 , SImode ) ) ) op1 = force_reg ( SImode , op1 ) ; break ; default : break ;


<s> if ( TARGET_MINI_REGISTERS ? CSKY_CONST_OK_FOR_J ( val + <NUM_LIT> ) : CSKY_CONST_OK_FOR_Uk ( val + <NUM_LIT> ) ) { op1 = GEN_INT ( val + <NUM_LIT> ) ; code = code == LE ? LT : GE ; } break ; default : break ; } } if ( CONSTANT_P ( op1 ) && GET_CODE ( op1 ) != CONST_INT ) op1 = force_reg ( GET_MODE ( op1 ) , op1 ) ; invert = false ; switch ( code ) { case EQ : code = NE ; invert = true ; case NE : if ( GET_CODE ( op1 ) == CONST_INT && ( TARGET_MINI_REGISTERS ? ! csky_literal_K_operand ( op1 , SImode ) : ! csky_literal_I_operand ( op1 , SImode ) ) ) op1 = force_reg ( SImode , op1 ) ; break ; case LE : code = GT ; invert = true ; case GT : if ( GET_CODE ( op1 ) == CONST_INT ) op1 = force_reg ( SImode , op1 ) ; break ; case GE : code = LT ; invert = true ; case LT : if ( GET_CODE ( op1 ) == CONST_INT && INTVAL ( op1 ) != <NUM_LIT> && ( TARGET_MINI_REGISTERS ? ! csky_literal_J_operand ( op1 , SImode ) : ! csky_literal_Uk_operand ( op1 , SImode ) ) ) op1 = force_reg ( SImode , op1 ) ; break ; case GTU : gcc_assert ( GET_CODE ( op1 ) != CONST_INT || INTVAL ( op1 ) != <NUM_LIT> ) ; code = LEU ; invert = true ; case LEU : if ( GET_CODE ( op1 ) == CONST_INT && INTVAL ( op1 ) != <NUM_LIT> ) op1 = force_reg ( SImode , op1 ) ;


<s> case GT : case LT : case LE : if ( op1 == CONST0_RTX ( mode ) && ( CSKY_ISA_FEATURE_GET ( fpv2_sf ) || CSKY_ISA_FEATURE_GET ( fpv2_df ) || CSKY_ISA_FEATURE_GET ( fpv2_divd ) ) ) op1 = force_reg ( mode , op1 ) ; break ; case ORDERED : code = UNORDERED ; invert = true ; break ; default : break ;


<s> Mfix * fix ; minipool_fix_head = minipool_fix_tail = NULL ; insn = get_insns ( ) ; gcc_assert ( NOTE_P ( insn ) ) ; for ( insn = next_nonnote_insn ( insn ) ; insn ; insn = next_nonnote_insn ( insn ) ) { if ( BARRIER_P ( insn ) ) push_csky_minipool_barrier ( insn , address ) ; else if ( INSN_P ( insn ) ) { rtx_jump_table_data * table ; note_csky_invalid_constants ( insn , address , true ) ; address += get_attr_length ( insn ) ; if ( tablejump_p ( insn , NULL , & table ) ) { address += get_csky_jump_table_size ( table ) ; insn = table ; } } } fix = minipool_fix_head ; while ( fix ) { Mfix * ftmp ; Mfix * last_added_fix ; Mfix * last_barrier = NULL ; Mfix * this_fix ; Mnode * mp ; bool has_pending_const = false ; for ( mp = minipool_vector_head ; mp ; mp = mp -> next ) if ( mp -> refcount > <NUM_LIT> ) { has_pending_const = true ; break ; } if ( has_pending_const == false ) { while ( fix && BARRIER_P ( fix -> insn ) ) fix = fix -> next ; if ( fix == NULL ) break ; } last_added_fix = NULL ; for ( ftmp = fix ; ftmp ; ftmp = ftmp -> next ) { if ( BARRIER_P ( ftmp -> insn ) ) { if ( minipool_vector_head && ftmp -> address >= minipool_vector_head -> max_address ) break ; last_barrier = ftmp ; } else { ftmp -> minipool = add_csky_minipool_forward_ref ( ftmp ) ; if ( ftmp -> minipool == NULL ) break ; }


<s> } } if ( ldm_p ) { rtx par = gen_rtx_PARALLEL ( VOIDmode , rtvec_alloc ( ldm_regs ) ) ; int regno , slot ; for ( regno = sreg , slot = <NUM_LIT> ; regno <= ereg ; regno ++ , slot ++ ) { rtx reg = gen_rtx_REG ( SImode , regno ) ; rtx addr = plus_constant ( Pmode , stack_pointer_rtx , slot * <NUM_LIT> ) ; rtx set = gen_rtx_SET ( reg , gen_frame_mem ( SImode , addr ) ) ; XVECEXP ( par , <NUM_LIT> , slot ) = set ; } insn = emit_insn ( par ) ; RTX_FRAME_RELATED_P ( insn ) = <NUM_LIT> ; for ( regno = sreg ; regno <= ereg ; regno ++ ) { rtx reg = gen_rtx_REG ( SImode , regno ) ; add_reg_note ( insn , REG_CFA_RESTORE , reg ) ; } } } expand_csky_stack_adjust ( adjust ) ;

if ( crtl -> calls_eh_return ) emit_insn ( gen_addsi3 ( stack_pointer_rtx , stack_pointer_rtx , EH_RETURN_STACKADJ_RTX ) ) ;


<s> for ( ; regno > ereg ; regno -- ) if ( reg_mask & ( <NUM_LIT> << regno ) ) { rtx src = gen_frame_mem ( SImode , plus_constant ( Pmode , stack_pointer_rtx , offset ) ) ; rtx reg = gen_rtx_REG ( SImode , regno ) ; insn = emit_move_insn ( reg , src ) ; RTX_FRAME_RELATED_P ( insn ) = <NUM_LIT> ; add_reg_note ( insn , REG_CFA_RESTORE , reg ) ; if ( offset == ldm_size ) break ; offset -= <NUM_LIT> ; } } if ( ldm_p ) { rtx par = gen_rtx_PARALLEL ( VOIDmode , rtvec_alloc ( ldm_regs ) ) ; int regno , slot ; for ( regno = sreg , slot = <NUM_LIT> ; regno <= ereg ; regno ++ , slot ++ ) { rtx reg = gen_rtx_REG ( SImode , regno ) ; rtx addr = plus_constant ( Pmode , stack_pointer_rtx , slot * <NUM_LIT> ) ; rtx set = gen_rtx_SET ( reg , gen_frame_mem ( SImode , addr ) ) ; XVECEXP ( par , <NUM_LIT> , slot ) = set ; } insn = emit_insn ( par ) ;


<s> for ( offset -= <NUM_LIT> ; offset >= <NUM_LIT> ; offset -= <NUM_LIT> , rn -- ) { rtx dst = gen_frame_mem ( SImode , plus_constant ( Pmode , stack_pointer_rtx , offset ) ) ; insn = emit_move_insn ( dst , gen_rtx_REG ( SImode , rn ) ) ; RTX_FRAME_RELATED_P ( insn ) = <NUM_LIT> ; } } } if ( csky_can_use_pushpop ( reg_mask ) ) emit_csky_regs_push ( reg_mask ) ; else if ( reg_size ) { int sreg = - <NUM_LIT> , ereg = - <NUM_LIT> ; bool stm_p = csky_can_use_ldstm ( reg_mask , & sreg , & ereg ) ; int stm_regs = stm_p ? ereg - sreg + <NUM_LIT> : <NUM_LIT> ; int stm_size = stm_regs * <NUM_LIT> ; expand_csky_stack_adjust ( - reg_size ) ; if ( reg_size > stm_size ) { int offset = reg_size - <NUM_LIT> ; int regno = <NUM_LIT> ; for ( ; regno > ereg ; regno -- ) if ( reg_mask & ( <NUM_LIT> << regno ) ) { rtx dst = gen_rtx_MEM ( SImode , plus_constant ( Pmode , stack_pointer_rtx , offset ) ) ; rtx insn = emit_insn ( gen_movsi ( dst , gen_rtx_REG ( SImode , regno ) ) ) ;


<s> for ( ; regno > ereg ; regno -- ) if ( reg_mask & ( <NUM_LIT> << regno ) ) { rtx dst = gen_rtx_MEM ( SImode , plus_constant ( Pmode , stack_pointer_rtx , offset ) ) ; rtx insn = emit_insn ( gen_movsi ( dst , gen_rtx_REG ( SImode , regno ) ) ) ; RTX_FRAME_RELATED_P ( insn ) = <NUM_LIT> ; if ( offset == stm_size ) break ; offset -= <NUM_LIT> ; } } if ( stm_p ) { rtx par = gen_rtx_PARALLEL ( VOIDmode , rtvec_alloc ( stm_regs ) ) ; int regno , slot ; for ( regno = sreg , slot = <NUM_LIT> ; regno <= ereg ; regno ++ , slot ++ ) { rtx reg = gen_rtx_REG ( SImode , regno ) ; rtx addr = plus_constant ( Pmode , stack_pointer_rtx , slot * <NUM_LIT> ) ; rtx set = gen_rtx_SET ( gen_frame_mem ( SImode , addr ) , reg ) ; RTX_FRAME_RELATED_P ( set ) = <NUM_LIT> ; XVECEXP ( par , <NUM_LIT> , slot ) = set ; } insn = emit_insn ( par ) ; RTX_FRAME_RELATED_P ( insn ) = <NUM_LIT> ; } } if ( frame_pointer_needed ) { insn = emit_insn ( gen_movsi ( hard_frame_pointer_rtx , stack_pointer_rtx ) ) ; RTX_FRAME_RELATED_P ( insn ) = <NUM_LIT> ; } expand_csky_stack_adjust ( - cfun -> machine -> reg_offset ) ; if ( flag_pic && ( reg_mask & ( <NUM_LIT> << PIC_OFFSET_TABLE_REGNUM ) ) ) { rtx l1 = gen_label_rtx ( ) ; rtx grs_label = gen_rtx_LABEL_REF ( SImode , l1 ) ; rtx reg_gb = gen_rtx_REG ( SImode , PIC_OFFSET_TABLE_REGNUM ) ; rtx reg_temp = gen_rtx_REG ( SImode , <NUM_LIT> ) ; rtx tmp0_unspec = gen_rtx_UNSPEC ( Pmode , gen_rtvec ( <NUM_LIT> , grs_label ) , UNSPEC_PIC_SYMBOL_GOTPC_GRS ) ; rtx tmp1_unspec = gen_rtx_UNSPEC ( Pmode , gen_rtvec ( <NUM_LIT> , grs_label ) , UNSPEC_PIC_SYMBOL_GOTPC ) ; emit_insn ( gen_prologue_get_pc ( tmp0_unspec ) ) ; emit_move_insn ( reg_temp , tmp1_unspec ) ; emit_insn ( gen_addsi3 ( reg_gb , reg_gb , reg_temp ) ) ;


<s> static bool csky_far_jump_used_p ( void ) { rtx_insn * insn ; if ( cfun -> machine -> far_jump_used ) return true ; for ( insn = get_insns ( ) ; insn ; insn = NEXT_INSN ( insn ) ) if ( GET_CODE ( insn ) == JUMP_INSN && GET_CODE ( PATTERN ( insn ) ) != ADDR_VEC && GET_CODE ( PATTERN ( insn ) ) != ADDR_DIFF_VEC && get_attr_far_jump ( insn ) == FAR_JUMP_YES ) {

cfun -> machine -> far_jump_used = <NUM_LIT> ;


<s> * p1 = CSKY_CC_REGNUM ; * p2 = INVALID_REGNUM ; return true ;


<s> static bool csky_fixed_condition_code_regs ( unsigned int * p1 , unsigned int * p2 ) { * p1 = CSKY_CC_REGNUM ; * p2 = INVALID_REGNUM ;


<s> static rtx csky_function_arg ( cumulative_args_t pcum_v , const function_arg_info & arg ) { CUMULATIVE_ARGS * pcum = get_cumulative_args ( pcum_v ) ; int reg = pcum -> reg ; machine_mode mode = arg . mode ; if ( FUNCTION_VARG_MODE_P ( mode ) && ! pcum -> is_stdarg ) { reg = pcum -> freg ; if ( reg < CSKY_NPARM_FREGS ) return gen_rtx_REG ( mode , CSKY_FIRST_VFP_REGNUM + reg ) ;


<s> int reg = pcum -> reg ; machine_mode mode = arg . mode ; if ( FUNCTION_VARG_MODE_P ( mode ) && ! pcum -> is_stdarg ) { reg = pcum -> freg ; if ( reg < CSKY_NPARM_FREGS ) return gen_rtx_REG ( mode , CSKY_FIRST_VFP_REGNUM + reg ) ; else return NULL_RTX ; }

if ( reg < CSKY_NPARM_REGS ) return gen_rtx_REG ( mode , CSKY_FIRST_PARM_REGNUM + reg ) ;


<s> int * reg = & pcum -> reg ; machine_mode mode = arg . mode ;

int param_size = csky_num_arg_regs ( mode , arg . type , pcum -> is_stdarg ) ;


<s> mode = promote_function_mode ( type , mode , & unsignedp , func , <NUM_LIT> ) ; return gen_rtx_REG ( mode , CSKY_FIRST_RET_REGNUM ) ; } if ( mode == BLKmode && size > UNITS_PER_WORD && size <= UNITS_PER_WORD * <NUM_LIT> ) { rtx ret_regs [ <NUM_LIT> ] ;

ret_regs [ <NUM_LIT> ] = gen_rtx_EXPR_LIST ( SImode , gen_rtx_REG ( SImode , CSKY_FIRST_RET_REGNUM ) , GEN_INT ( <NUM_LIT> * UNITS_PER_WORD ) ) ;


<s> static bool csky_function_value_regno_p ( const unsigned int regno ) { if ( regno == CSKY_FIRST_RET_REGNUM || ( TARGET_HARD_FLOAT_ABI && regno == CSKY_FIRST_VFP_REGNUM ) ) return true ; return false ;


<s> if ( CSKY_VREG_P ( dstreg ) ) return <NUM_LIT> ; return <NUM_LIT> ; } else if ( GET_CODE ( src ) == CONST_INT || GET_CODE ( src ) == CONST_DOUBLE ) { split_double ( src , operands + <NUM_LIT> , operands + <NUM_LIT> ) ; if ( CSKY_CONST_OK_FOR_N ( INTVAL ( operands [ <NUM_LIT> ] ) + <NUM_LIT> ) && CSKY_CONST_OK_FOR_N ( INTVAL ( operands [ <NUM_LIT> ] ) + <NUM_LIT> ) && REGNO ( operands [ <NUM_LIT> ] ) < <NUM_LIT> ) return <NUM_LIT> ; else return <NUM_LIT> ; } } else if ( GET_CODE ( dst ) == MEM && GET_CODE ( src ) == REG ) { rtx memexp = XEXP ( dst , <NUM_LIT> ) ; int srcreg = REGNO ( src ) ; int offset = - <NUM_LIT> ; if ( CSKY_VREG_P ( srcreg ) ) return <NUM_LIT> ; if ( GET_CODE ( memexp ) == REG ) offset = <NUM_LIT> ; else if ( GET_CODE ( memexp ) == PLUS ) { if ( GET_CODE ( XEXP ( memexp , <NUM_LIT> ) ) == REG ) offset = INTVAL ( XEXP ( memexp , <NUM_LIT> ) ) ; else if ( GET_CODE ( XEXP ( memexp , <NUM_LIT> ) ) == REG ) offset = INTVAL ( XEXP ( memexp , <NUM_LIT> ) ) ;


<s> warning ( OPT_Wattributes , <STR_LIT> , name ) ; * no_add_attrs = true ; return NULL_TREE ; } if ( DECL_P ( * node ) ) { if ( TREE_CODE ( * node ) != FUNCTION_DECL ) { warning ( OPT_Wattributes , <STR_LIT> , name ) ; * no_add_attrs = true ; } } else { if ( TREE_CODE ( * node ) == FUNCTION_TYPE || TREE_CODE ( * node ) == METHOD_TYPE ) { if ( csky_isr_value ( args ) == CSKY_FT_UNKNOWN ) { warning ( OPT_Wattributes , <STR_LIT> , name ) ; * no_add_attrs = true ; }


<s> if ( ! TARGET_ISTACK ) { warning ( OPT_Wattributes , <STR_LIT> , name ) ; * no_add_attrs = true ; return NULL_TREE ; } if ( DECL_P ( * node ) ) { if ( TREE_CODE ( * node ) != FUNCTION_DECL ) { warning ( OPT_Wattributes , <STR_LIT> , name ) ; * no_add_attrs = true ; } } else { if ( TREE_CODE ( * node ) == FUNCTION_TYPE || TREE_CODE ( * node ) == METHOD_TYPE ) { if ( csky_isr_value ( args ) == CSKY_FT_UNKNOWN ) { warning ( OPT_Wattributes , <STR_LIT> , name ) ; * no_add_attrs = true ; } } else if ( TREE_CODE ( * node ) == POINTER_TYPE && ( TREE_CODE ( TREE_TYPE ( * node ) ) == FUNCTION_TYPE || TREE_CODE ( TREE_TYPE ( * node ) ) == METHOD_TYPE ) && csky_isr_value ( args ) != CSKY_FT_UNKNOWN ) { * node = build_variant_type_copy ( * node ) ; TREE_TYPE ( * node ) = build_type_attribute_variant ( TREE_TYPE ( * node ) , tree_cons ( name , args , TYPE_ATTRIBUTES ( TREE_TYPE ( * node ) ) ) ) ; * no_add_attrs = true ; } else if ( flags & ( ( int ) ATTR_FLAG_DECL_NEXT | ( int ) ATTR_FLAG_FUNCTION_NEXT | ( int ) ATTR_FLAG_ARRAY_NEXT ) ) { * no_add_attrs = true ; return tree_cons ( name , args , NULL_TREE ) ;


<s> } else if ( regno == CSKY_CC_REGNUM ) return ( mode == CCmode ) ; else if ( regno == CSKY_HI_REGNUM || regno == CSKY_LO_REGNUM ) { if ( ! TARGET_DSP || mode == SFmode || mode == DFmode ) return false ; else if ( nregs == <NUM_LIT> ) return ( regno == CSKY_HI_REGNUM ) ; else return true ; } else if ( CSKY_VREG_P ( regno ) && TARGET_HARD_FLOAT ) return true ;


<s> if ( regno >= CSKY_FIRST_VFP_REGNUM && ! CSKY_TARGET_ARCH ( CK803 ) ) return <NUM_LIT> ;


<s> bitmap_clear ( isa ) ; while ( * isa_bits != CSKY_ISA_FEATURE_GET ( none ) ) bitmap_set_bit ( isa , * ( isa_bits ++ ) ) ;


<s> HOST_WIDE_INT csky_initial_elimination_offset ( int from , int to ) { int offset ; csky_layout_stack_frame ( ) ; switch ( from ) { case FRAME_POINTER_REGNUM : case HARD_FRAME_POINTER_REGNUM : offset = cfun -> machine -> reg_offset ; break ; case ARG_POINTER_REGNUM : offset = cfun -> machine -> arg_offset ; break ; default : gcc_unreachable ( ) ; } if ( to == FRAME_POINTER_REGNUM || to == HARD_FRAME_POINTER_REGNUM ) offset -= cfun -> machine -> reg_offset ; return offset ;


<s> break ; default : gcc_unreachable ( ) ; }

if ( to == FRAME_POINTER_REGNUM || to == HARD_FRAME_POINTER_REGNUM ) offset -= cfun -> machine -> reg_offset ;


<s> static tree csky_floatHF_type_node = make_node ( REAL_TYPE ) ; TYPE_PRECISION ( csky_floatHF_type_node ) = GET_MODE_PRECISION ( HFmode ) ; layout_type ( csky_floatHF_type_node ) ; ( * lang_hooks . types . register_builtin_type ) ( csky_floatHF_type_node , <STR_LIT> ) ;


<s> static tree csky_floatHF_type_node = make_node ( REAL_TYPE ) ; TYPE_PRECISION ( csky_floatHF_type_node ) = GET_MODE_PRECISION ( HFmode ) ; layout_type ( csky_floatHF_type_node ) ;

( * lang_hooks . types . register_builtin_type ) ( csky_floatHF_type_node , <STR_LIT> ) ;


<s> memset ( pcum , <NUM_LIT> , sizeof ( * pcum ) ) ;

if ( stdarg_p ( fntype ) ) pcum -> is_stdarg = true ;


<s> memset ( pcum , <NUM_LIT> , sizeof ( * pcum ) ) ; if ( stdarg_p ( fntype ) ) pcum -> is_stdarg = true ;


<s> set_optab_libfunc ( sdiv_optab , DFmode , CSKY_GCC_SYM ( divdf3 ) ) ; set_optab_libfunc ( neg_optab , SFmode , CSKY_GCC_SYM ( negsf2 ) ) ; set_optab_libfunc ( neg_optab , DFmode , CSKY_GCC_SYM ( negdf2 ) ) ; set_conv_libfunc ( sext_optab , DFmode , SFmode , CSKY_GCC_SYM ( extendsfdf2 ) ) ; set_conv_libfunc ( trunc_optab , SFmode , DFmode , CSKY_GCC_SYM ( truncdfsf2 ) ) ; set_conv_libfunc ( sfix_optab , SImode , SFmode , CSKY_GCC_SYM ( fixsfsi ) ) ; set_conv_libfunc ( sfix_optab , SImode , DFmode , CSKY_GCC_SYM ( fixdfsi ) ) ; set_conv_libfunc ( sfix_optab , DImode , SFmode , CSKY_GCC_SYM ( fixsfdi ) ) ; set_conv_libfunc ( sfix_optab , DImode , DFmode , CSKY_GCC_SYM ( fixdfdi ) ) ; set_conv_libfunc ( ufix_optab , SImode , SFmode , CSKY_GCC_SYM ( fixunssfsi ) ) ; set_conv_libfunc ( ufix_optab , SImode , DFmode , CSKY_GCC_SYM ( fixunsdfsi ) ) ; set_conv_libfunc ( ufix_optab , DImode , SFmode , CSKY_GCC_SYM ( fixunssfdi ) ) ; set_conv_libfunc ( ufix_optab , DImode , DFmode , CSKY_GCC_SYM ( fixunsdfdi ) ) ; set_conv_libfunc ( sfloat_optab , SFmode , SImode , CSKY_GCC_SYM ( floatsisf ) ) ; set_conv_libfunc ( sfloat_optab , DFmode , SImode , CSKY_GCC_SYM ( floatsidf ) ) ; set_conv_libfunc ( sfloat_optab , SFmode , DImode , CSKY_GCC_SYM ( floatdisf ) ) ; set_conv_libfunc ( sfloat_optab , DFmode , DImode , CSKY_GCC_SYM ( floatdidf ) ) ; set_conv_libfunc ( ufloat_optab , SFmode , SImode , CSKY_GCC_SYM ( floatunsisf ) ) ; set_conv_libfunc ( ufloat_optab , DFmode , SImode , CSKY_GCC_SYM ( floatunsidf ) ) ; set_conv_libfunc ( ufloat_optab , SFmode , DImode , CSKY_GCC_SYM ( floatundisf ) ) ; set_conv_libfunc ( ufloat_optab , DFmode , DImode , CSKY_GCC_SYM ( floatundidf ) ) ; set_optab_libfunc ( cmp_optab , SFmode , CSKY_GCC_SYM ( cmpsf2 ) ) ; set_optab_libfunc ( cmp_optab , DFmode , CSKY_GCC_SYM ( cmpdf2 ) ) ; set_optab_libfunc ( unord_optab , SFmode , CSKY_GCC_SYM ( unordsf2 ) ) ; set_optab_libfunc ( unord_optab , DFmode , CSKY_GCC_SYM ( unorddf2 ) ) ; set_optab_libfunc ( eq_optab , SFmode , CSKY_GCC_SYM ( eqsf2 ) ) ; set_optab_libfunc ( eq_optab , DFmode , CSKY_GCC_SYM ( eqdf2 ) ) ; set_optab_libfunc ( ne_optab , SFmode , CSKY_GCC_SYM ( nesf2 ) ) ; set_optab_libfunc ( ne_optab , DFmode , CSKY_GCC_SYM ( nedf2 ) ) ; set_optab_libfunc ( ge_optab , SFmode , CSKY_GCC_SYM ( gesf2 ) ) ; set_optab_libfunc ( ge_optab , DFmode , CSKY_GCC_SYM ( gedf2 ) ) ; set_optab_libfunc ( lt_optab , SFmode , CSKY_GCC_SYM ( ltsf2 ) ) ; set_optab_libfunc ( lt_optab , DFmode , CSKY_GCC_SYM ( ltdf2 ) ) ; set_optab_libfunc ( le_optab , SFmode , CSKY_GCC_SYM ( lesf2 ) ) ; set_optab_libfunc ( le_optab , DFmode , CSKY_GCC_SYM ( ledf2 ) ) ; set_optab_libfunc ( gt_optab , SFmode , CSKY_GCC_SYM ( gtsf2 ) ) ; set_optab_libfunc ( gt_optab , DFmode , CSKY_GCC_SYM ( gtdf2 ) ) ;


<s> static struct machine_function * csky_init_machine_status ( void ) { struct machine_function * machine ; machine = ggc_cleared_alloc < machine_function > ( ) ; machine -> func_type = CSKY_FT_UNKNOWN ; return machine ;


<s> machine = ggc_cleared_alloc < machine_function > ( ) ;

machine -> func_type = CSKY_FT_UNKNOWN ;


<s> return ( ! ( CSKY_TARGET_ARCH ( CK802 ) || CSKY_TARGET_ARCH ( CK801 ) ) && try_csky_constant_tricks ( value , & x , & y ) ) ;


<s> static unsigned long csky_isr_value ( tree argument ) { const isr_attribute_entry * ptr ; const char * arg ; if ( argument == NULL_TREE ) return CSKY_FT_ISR ; if ( TREE_VALUE ( argument ) == NULL_TREE || TREE_CODE ( TREE_VALUE ( argument ) ) != STRING_CST ) return CSKY_FT_UNKNOWN ; arg = TREE_STRING_POINTER ( TREE_VALUE ( argument ) ) ; for ( ptr = isr_attribute_map ; ptr -> arg != NULL ; ptr ++ ) if ( strcmp ( arg , ptr -> arg ) == <NUM_LIT> ) return ptr -> return_value ; return CSKY_FT_UNKNOWN ;


<s> if ( argument == NULL_TREE ) return CSKY_FT_ISR ; if ( TREE_VALUE ( argument ) == NULL_TREE || TREE_CODE ( TREE_VALUE ( argument ) ) != STRING_CST ) return CSKY_FT_UNKNOWN ; arg = TREE_STRING_POINTER ( TREE_VALUE ( argument ) ) ; for ( ptr = isr_attribute_map ; ptr -> arg != NULL ; ptr ++ ) if ( strcmp ( arg , ptr -> arg ) == <NUM_LIT> ) return ptr -> return_value ; return CSKY_FT_UNKNOWN ;


<s> int j ; for ( j = XVECLEN ( x , i ) - <NUM_LIT> ; j >= <NUM_LIT> ; j -- ) if ( csky_label_mentioned_p ( XVECEXP ( x , i , j ) ) ) return true ; }

else if ( fmt [ i ] == 'e' && csky_label_mentioned_p ( XEXP ( x , i ) ) ) return true ;


<s> const char * fmt ; int i ; if ( GET_CODE ( x ) == LABEL_REF ) return true ; fmt = GET_RTX_FORMAT ( GET_CODE ( x ) ) ; for ( i = GET_RTX_LENGTH ( GET_CODE ( x ) ) - <NUM_LIT> ; i >= <NUM_LIT> ; i -- ) { if ( fmt [ i ] == 'E' ) { int j ; for ( j = XVECLEN ( x , i ) - <NUM_LIT> ; j >= <NUM_LIT> ; j -- ) if ( csky_label_mentioned_p ( XVECEXP ( x , i , j ) ) ) return true ; } else if ( fmt [ i ] == 'e' && csky_label_mentioned_p ( XEXP ( x , i ) ) ) return true ; } return false ;


<s> infp -> reg_size = reg_count * UNITS_PER_WORD ; infp -> arg_offset = infp -> reg_offset + infp -> reg_size ; infp -> arg_size = crtl -> args . pretend_args_size ; infp -> frame_size = infp -> arg_offset + infp -> arg_size ; infp -> frame_init_p = reload_completed ;


<s> infp -> reg_mask = get_csky_live_regs ( & reg_count ) ; infp -> reg_size = reg_count * UNITS_PER_WORD ; infp -> arg_offset = infp -> reg_offset + infp -> reg_size ; infp -> arg_size = crtl -> args . pretend_args_size ;

infp -> frame_size = infp -> arg_offset + infp -> arg_size ;


<s> enum rtx_code code = GET_CODE ( addr ) ; if ( reload_completed && ( ( code == LABEL_REF ) || ( code == CONST && GET_CODE ( XEXP ( addr , <NUM_LIT> ) ) == PLUS && GET_CODE ( XEXP ( XEXP ( addr , <NUM_LIT> ) , <NUM_LIT> ) ) == LABEL_REF && CONST_INT_P ( XEXP ( XEXP ( addr , <NUM_LIT> ) , <NUM_LIT> ) ) ) ) ) return <NUM_LIT> ; if ( is_csky_address_register_rtx_p ( addr , strict_p ) ) return <NUM_LIT> ; else if ( GET_CODE ( addr ) == LABEL_REF ) return <NUM_LIT> ; if ( code == PLUS ) { rtx xop0 = XEXP ( addr , <NUM_LIT> ) ; rtx xop1 = XEXP ( addr , <NUM_LIT> ) ; return ( ( is_csky_address_register_rtx_p ( xop0 , strict_p ) && csky_legitimate_index_p ( mode , xop1 , strict_p ) ) || ( is_csky_address_register_rtx_p ( xop1 , strict_p ) && csky_legitimate_index_p ( mode , xop0 , strict_p ) ) ) ;


<s> if ( code == PLUS ) { rtx xop0 = XEXP ( addr , <NUM_LIT> ) ; rtx xop1 = XEXP ( addr , <NUM_LIT> ) ; return ( ( is_csky_address_register_rtx_p ( xop0 , strict_p ) && csky_legitimate_index_p ( mode , xop1 , strict_p ) ) || ( is_csky_address_register_rtx_p ( xop1 , strict_p ) && csky_legitimate_index_p ( mode , xop0 , strict_p ) ) ) ; }


<s> else if ( CSKY_TARGET_ARCH ( CK802 ) ) return ck802_legitimate_index_p ( mode , index , strict_p ) ;

else return ck810_legitimate_index_p ( mode , index , strict_p ) ;


<s> bool csky_legitimate_pic_operand_p ( rtx x ) { if ( tls_unspec_mentioned_p ( x ) ) return true ; if ( csky_symbol_mentioned_p ( x ) || csky_label_mentioned_p ( x ) ) return false ;


<s> if ( tls_unspec_mentioned_p ( x ) ) return true ;

if ( csky_symbol_mentioned_p ( x ) || csky_label_mentioned_p ( x ) ) return false ;


<s> if ( csky_tls_symbol_p ( x ) ) return csky_legitimize_tls_address ( x , NULL_RTX ) ; if ( GET_CODE ( x ) == PLUS ) { rtx xop0 = XEXP ( x , <NUM_LIT> ) ; rtx xop1 = XEXP ( x , <NUM_LIT> ) ; if ( is_csky_address_register_rtx_p ( xop0 , <NUM_LIT> ) && CONST_INT_P ( xop1 ) ) { HOST_WIDE_INT offset = INTVAL ( xop1 ) ; if ( optimize_size && offset > CSKY_LD16_MAX_OFFSET ( mode ) && offset <= ( CSKY_ADDI16_MAX_IMM + CSKY_LD16_MAX_OFFSET ( mode ) ) ) { HOST_WIDE_INT new_ld_offset = offset & CSKY_LD16_OFFSET_MASK ( mode ) ; xop0 = force_operand ( plus_constant ( Pmode , xop0 , offset - new_ld_offset ) , NULL_RTX ) ; x = plus_constant ( Pmode , xop0 , new_ld_offset ) ; } else if ( offset < <NUM_LIT> && offset >= ( - CSKY_SUBI16_MAX_IMM ) ) x = force_operand ( x , NULL_RTX ) ; else if ( offset > CSKY_LD16_MAX_OFFSET ( mode ) || offset < <NUM_LIT> ) { xop1 = force_reg ( SImode , xop1 ) ; x = gen_rtx_PLUS ( SImode , xop0 , xop1 ) ; } } if ( is_csky_address_register_rtx_p ( xop1 , <NUM_LIT> ) && ! is_csky_address_register_rtx_p ( xop0 , <NUM_LIT> ) ) {


<s> if ( reg == <NUM_LIT> ) { gcc_assert ( can_create_pseudo_p ( ) ) ; reg = gen_reg_rtx ( Pmode ) ; subregs = <NUM_LIT> ; } if ( subregs ) address = gen_reg_rtx ( Pmode ) ; else address = reg ; if ( GET_CODE ( orig ) == SYMBOL_REF && ! SYMBOL_REF_LOCAL_P ( orig ) ) { rtx_tmp = gen_rtx_UNSPEC ( Pmode , gen_rtvec ( <NUM_LIT> , orig ) , ( gotrel_p ? UNSPEC_PIC_SYMBOL_GOT : UNSPEC_PIC_SYMBOL_PLT ) ) ; optimize_p = gotrel_p ; if ( flag_pic != <NUM_LIT> ) { emit_move_insn ( address , rtx_tmp ) ; rtx_tmp = gen_rtx_MULT ( Pmode , address , GEN_INT ( <NUM_LIT> ) ) ; } pic_ref = gen_const_mem ( Pmode , gen_rtx_PLUS ( Pmode , pic_reg , rtx_tmp ) ) ; } else { if ( flag_pic == <NUM_LIT> && ! gotrel_p ) { pic_ref = gen_rtx_UNSPEC ( Pmode , gen_rtvec ( <NUM_LIT> , orig ) , UNSPEC_PIC_SYMBOL_BSR ) ; return pic_ref ; } else if ( flag_pic == <NUM_LIT> && ( GET_CODE ( orig ) == SYMBOL_REF ) && SYMBOL_REF_FUNCTION_P ( orig ) ) { pic_ref = gen_rtx_UNSPEC ( Pmode , gen_rtvec ( <NUM_LIT> , orig ) , UNSPEC_PIC_SYMBOL_GRS ) ; return pic_ref ; } else { rtx_tmp = gen_rtx_UNSPEC ( Pmode , gen_rtvec ( <NUM_LIT> , orig ) , UNSPEC_PIC_SYMBOL_GOTOFF ) ; emit_move_insn ( address , rtx_tmp ) ; pic_ref = gen_rtx_PLUS ( Pmode , address , pic_reg ) ; optimize_p = true ; } }

insn = emit_move_insn ( reg , pic_ref ) ;


<s> return dest ; case TLS_MODEL_LOCAL_DYNAMIC : insns = csky_call_tls_get_addr ( x , reg , & ret , TLS_LDM32 ) ; eqv = gen_rtx_UNSPEC ( Pmode , gen_rtvec ( <NUM_LIT> , const1_rtx ) , UNSPEC_TLS ) ; dest = gen_reg_rtx ( Pmode ) ; emit_libcall_block ( insns , dest , ret , eqv ) ; addend = gen_rtx_UNSPEC ( Pmode , gen_rtvec ( <NUM_LIT> , x , GEN_INT ( TLS_LDO32 ) ) , UNSPEC_TLS ) ; addend = force_reg ( SImode , addend ) ; return gen_rtx_PLUS ( Pmode , dest , addend ) ; case TLS_MODEL_INITIAL_EXEC : labelno = GEN_INT ( tls_labelno ++ ) ; label = gen_rtx_UNSPEC ( Pmode , gen_rtvec ( <NUM_LIT> , labelno ) , UNSPEC_TLS_LABEL ) ; unspec = gen_rtx_UNSPEC ( Pmode , gen_rtvec ( <NUM_LIT> , x , GEN_INT ( TLS_IE32 ) , label ) , UNSPEC_TLS ) ; tmp = gen_reg_rtx ( SImode ) ; emit_move_insn ( reg , unspec ) ;


<s> case TLS_MODEL_LOCAL_DYNAMIC : insns = csky_call_tls_get_addr ( x , reg , & ret , TLS_LDM32 ) ; eqv = gen_rtx_UNSPEC ( Pmode , gen_rtvec ( <NUM_LIT> , const1_rtx ) , UNSPEC_TLS ) ; dest = gen_reg_rtx ( Pmode ) ; emit_libcall_block ( insns , dest , ret , eqv ) ; addend = gen_rtx_UNSPEC ( Pmode , gen_rtvec ( <NUM_LIT> , x , GEN_INT ( TLS_LDO32 ) ) , UNSPEC_TLS ) ; addend = force_reg ( SImode , addend ) ; return gen_rtx_PLUS ( Pmode , dest , addend ) ; case TLS_MODEL_INITIAL_EXEC : labelno = GEN_INT ( tls_labelno ++ ) ; label = gen_rtx_UNSPEC ( Pmode , gen_rtvec ( <NUM_LIT> , labelno ) , UNSPEC_TLS_LABEL ) ; unspec = gen_rtx_UNSPEC ( Pmode , gen_rtvec ( <NUM_LIT> , x , GEN_INT ( TLS_IE32 ) , label ) , UNSPEC_TLS ) ; tmp = gen_reg_rtx ( SImode ) ; emit_move_insn ( reg , unspec ) ;


<s> if ( FUNCTION_VARG_MODE_P ( mode ) ) { return gen_rtx_REG ( mode , CSKY_FIRST_VFP_REGNUM ) ; } return gen_rtx_REG ( mode , CSKY_FIRST_RET_REGNUM ) ;


<s> if ( TYPE_NAME ( type ) && TREE_CODE ( TYPE_NAME ( type ) ) == TYPE_DECL && DECL_NAME ( TYPE_NAME ( type ) ) && ! strcmp ( IDENTIFIER_POINTER ( DECL_NAME ( TYPE_NAME ( type ) ) ) , <STR_LIT> ) ) return <STR_LIT> ; return NULL ;


<s> return ( <NUM_LIT> + memory_move_secondary_cost ( mode , rclass , in ) ) ;


<s> rtx op1 , addr ; extract_insn_cached ( insn ) ; op1 = recog_data . operand [ <NUM_LIT> ] ; if ( CONSTANT_P ( op1 ) ) return true ; if ( GET_CODE ( op1 ) == ZERO_EXTEND || GET_CODE ( op1 ) == SIGN_EXTEND ) op1 = XEXP ( op1 , <NUM_LIT> ) ; if ( GET_CODE ( op1 ) != MEM ) return false ; addr = XEXP ( op1 , <NUM_LIT> ) ; if ( GET_CODE ( addr ) == PLUS && CONST_INT_P ( XEXP ( addr , <NUM_LIT> ) ) ) addr = XEXP ( addr , <NUM_LIT> ) ;


if ( GET_CODE ( op1 ) != MEM ) return false ;


<s> else size = GET_MODE_SIZE ( mode ) ; if ( TARGET_HARD_FLOAT_ABI && ! is_stdarg ) { if ( CSKY_VREG_MODE_P ( mode ) && ! TARGET_SINGLE_FPU ) return ( ( CSKY_NUM_WORDS ( size ) + <NUM_LIT> ) / <NUM_LIT> ) ; }


<s> if ( CSKY_TARGET_ARCH ( CK801 ) || CSKY_TARGET_ARCH ( CK802 ) ) error ( <STR_LIT> , <STR_LIT> , csky_active_target . arch_pp_name ) ; else if ( csky_fpu_index == TARGET_FPU_auto ) error ( <STR_LIT> ) ; else { csky_selected_fpu = & all_fpus [ csky_fpu_index ] ; sbitmap fpu_bits = sbitmap_alloc ( CSKY_ISA_FEATURE_GET ( max ) ) ; csky_initialize_isa ( fpu_bits , csky_selected_fpu -> isa_bits ) ; bitmap_ior ( csky_active_target . isa , csky_active_target . isa , fpu_bits ) ; sbitmap_free ( fpu_bits ) ; } } else { if ( TARGET_DOUBLE_FLOAT > <NUM_LIT> ) warning ( <NUM_LIT> , <STR_LIT> ) ; TARGET_DOUBLE_FLOAT = <NUM_LIT> ; if ( TARGET_FDIVDU > <NUM_LIT> ) warning ( <NUM_LIT> , <STR_LIT> ) ; TARGET_FDIVDU = <NUM_LIT> ; } { \ csky_arch_isa_features [ CSKY_ISA_FEATURE_GET ( IDENT ) ] = \ bitmap_bit_p ( csky_active_target . isa , CSKY_ISA_FEATURE_GET ( IDENT ) ) ; \ } if ( TARGET_ELRW == - <NUM_LIT> ) TARGET_ELRW = CSKY_TARGET_ARCH ( CK801 ) ; if ( ! TARGET_DSP ) TARGET_DSP = CSKY_ISA_FEATURE ( dsp ) ; if ( TARGET_DIV == - <NUM_LIT> ) TARGET_DIV = CSKY_ISA_FEATURE ( div ) ; if ( ( CSKY_TARGET_ARCH ( CK801 ) || CSKY_TARGET_ARCH ( CK802 ) ) && ! TARGET_CONSTANT_POOL ) error ( <STR_LIT> , <STR_LIT> , csky_active_target . arch_pp_name ) ; else if ( TARGET_CONSTANT_POOL == - <NUM_LIT> ) TARGET_CONSTANT_POOL = ( CSKY_TARGET_ARCH ( CK801 ) || CSKY_TARGET_ARCH ( CK802 ) ) ; if ( TARGET_MINI_REGISTERS > <NUM_LIT> && TARGET_HIGH_REGISTERS > <NUM_LIT> ) error ( <STR_LIT> ) ;

else if ( CSKY_TARGET_ARCH ( CK801 ) || CSKY_TARGET_ARCH ( CK802 ) || CSKY_TARGET_ARCH ( CK803 ) ) {


<s> char * csky_output_call ( rtx * operands , int index ) { static char buffer [ <NUM_LIT> ] ; rtx addr = operands [ index ] ; if ( REG_P ( addr ) ) sprintf ( buffer , <STR_LIT> , index ) ; else if ( flag_pic && ( GET_CODE ( addr ) == UNSPEC ) ) sprintf ( buffer , <STR_LIT> , index ) ; else sprintf ( buffer , <STR_LIT> , index ) ; return buffer ;


<s> rtx diff_vec = PATTERN ( NEXT_INSN ( as_a < rtx_insn * > ( operands [ <NUM_LIT> ] ) ) ) ; gcc_assert ( GET_CODE ( diff_vec ) == ADDR_DIFF_VEC ) ; switch ( GET_MODE ( diff_vec ) ) { case E_QImode : return ( ADDR_DIFF_VEC_FLAGS ( diff_vec ) . offset_unsigned ? <STR_LIT> : <STR_LIT> ) ; case E_HImode : return ( ADDR_DIFF_VEC_FLAGS ( diff_vec ) . offset_unsigned ? <STR_LIT> : <STR_LIT> ) ; case E_SImode : return <STR_LIT> ; default : gcc_unreachable ( ) ; }


<s> default : gcc_unreachable ( ) ; } } else if ( GET_CODE ( src ) == CONST_INT ) { if ( REGNO ( dst ) > <NUM_LIT> ) return <STR_LIT> ; else if ( CSKY_CONST_OK_FOR_N ( INTVAL ( src ) + <NUM_LIT> ) ) return <STR_LIT> ; else if ( CSKY_CONST_OK_FOR_T ( INTVAL ( src ) ) ) return <STR_LIT> ; else if ( csky_shifted_imm8_constant ( INTVAL ( src ) , NULL , NULL ) ) return <STR_LIT> ; else return <STR_LIT> ; } else if ( GET_CODE ( src ) == CONST_DOUBLE && GET_MODE ( src ) == SFmode ) { const REAL_VALUE_TYPE * d ; long l ; d = CONST_DOUBLE_REAL_VALUE ( src ) ; REAL_VALUE_TO_TARGET_SINGLE ( * d , l ) ; operands [ <NUM_LIT> ] = GEN_INT ( l ) ; src = operands [ <NUM_LIT> ] ; if ( CSKY_CONST_OK_FOR_N ( INTVAL ( src ) + <NUM_LIT> ) ) return <STR_LIT> ;


<s> struct csky_address op0 ; decompose_csky_address ( XEXP ( src , <NUM_LIT> ) , & op0 ) ; if ( GET_CODE ( memexp ) == LABEL_REF || ( GET_CODE ( memexp ) == CONST && GET_CODE ( XEXP ( memexp , <NUM_LIT> ) ) == PLUS && GET_CODE ( XEXP ( XEXP ( memexp , <NUM_LIT> ) , <NUM_LIT> ) ) == LABEL_REF ) ) return <STR_LIT> ; else if ( GET_CODE ( memexp ) == REG ) basereg = REGNO ( memexp ) ; else if ( GET_CODE ( memexp ) == PLUS ) { if ( GET_CODE ( XEXP ( memexp , <NUM_LIT> ) ) == REG ) basereg = REGNO ( XEXP ( memexp , <NUM_LIT> ) ) ; else if ( GET_CODE ( XEXP ( memexp , <NUM_LIT> ) ) == REG ) basereg = REGNO ( XEXP ( memexp , <NUM_LIT> ) ) ; else gcc_unreachable ( ) ; } else gcc_unreachable ( ) ; if ( dstreg == basereg ) return <STR_LIT> ; else return <STR_LIT> ;


<s> rtx src = operands [ <NUM_LIT> ] ; if ( REG_P ( dst ) ) { if ( REG_P ( src ) ) { int dstreg = REGNO ( dst ) ; int srcreg = REGNO ( src ) ; if ( srcreg + <NUM_LIT> == dstreg ) return <STR_LIT> ; else return <STR_LIT> ; } else if ( GET_CODE ( src ) == MEM ) { rtx memexp = XEXP ( src , <NUM_LIT> ) ; int dstreg = REGNO ( dst ) ; int basereg = - <NUM_LIT> ; struct csky_address op0 ; decompose_csky_address ( XEXP ( src , <NUM_LIT> ) , & op0 ) ; if ( GET_CODE ( memexp ) == LABEL_REF || ( GET_CODE ( memexp ) == CONST && GET_CODE ( XEXP ( memexp , <NUM_LIT> ) ) == PLUS && GET_CODE ( XEXP ( XEXP ( memexp , <NUM_LIT> ) , <NUM_LIT> ) ) == LABEL_REF ) ) return <STR_LIT> ; else if ( GET_CODE ( memexp ) == REG ) basereg = REGNO ( memexp ) ; else if ( GET_CODE ( memexp ) == PLUS ) { if ( GET_CODE ( XEXP ( memexp , <NUM_LIT> ) ) == REG ) basereg = REGNO ( XEXP ( memexp , <NUM_LIT> ) ) ;

else if ( GET_CODE ( XEXP ( memexp , <NUM_LIT> ) ) == REG ) basereg = REGNO ( XEXP ( memexp , <NUM_LIT> ) ) ;


<s> x = XEXP ( x , <NUM_LIT> ) ; if ( GET_CODE ( x ) == UNSPEC_VOLATILE && XINT ( x , <NUM_LIT> ) == VUNSPEC_POOL_LABEL ) { ASM_GENERATE_INTERNAL_LABEL ( buf , CSKY_CONSTPOOL_LABEL_PREFIX , INTVAL ( XVECEXP ( x , <NUM_LIT> , <NUM_LIT> ) ) ) ;


<s> static void csky_output_constpool_label ( FILE * stream , rtx x ) { char buf [ <NUM_LIT> ] ;

gcc_assert ( GET_CODE ( x ) == LABEL_REF ) ;


<s> unsigned long func_type = get_csky_current_func_type ( ) ; switch ( ( int ) CSKY_FUNCTION_TYPE ( func_type ) ) { default : case CSKY_FT_NORMAL : break ; case CSKY_FT_INTERRUPT : { asm_fprintf ( f , <STR_LIT> ) ; asm_fprintf ( f , <STR_LIT> ) ; break ; } case CSKY_FT_FIQ : asm_fprintf ( f , <STR_LIT> ) ; break ;


<s> enum csky_inline_const_type trick_type ; rtx out_operands [ <NUM_LIT> ] ; char buf [ <NUM_LIT> ] ; char load_op [ <NUM_LIT> ] ; const char * dst_fmt ; HOST_WIDE_INT value = INTVAL ( operands [ <NUM_LIT> ] ) ; int ivalue = ( int ) value ; unsigned int uvalue = ( unsigned int ) value ; trick_type = try_csky_constant_tricks ( value , & x , & y ) ; gcc_assert ( trick_type != IC_UNINLINABLE ) ; out_operands [ <NUM_LIT> ] = operands [ <NUM_LIT> ] ; out_operands [ <NUM_LIT> ] = GEN_INT ( x ) ; if ( trick_type != IC_SINGLE && trick_type != IC_APPEND_NOT ) out_operands [ <NUM_LIT> ] = GEN_INT ( y ) ; if ( mode == DImode && TARGET_BIG_ENDIAN ) dst_fmt = <STR_LIT> ; else dst_fmt = <STR_LIT> ; if ( CSKY_CONST_OK_FOR_I ( x ) ) sprintf ( load_op , <STR_LIT> , dst_fmt ) ; else if ( CSKY_CONST_OK_FOR_Uc ( x ) ) sprintf ( load_op , <STR_LIT> , dst_fmt ) ; else if ( CSKY_CONST_OK_FOR_MOVIH ( x ) ) sprintf ( load_op , <STR_LIT> , dst_fmt ) ; else { sprintf ( load_op , <STR_LIT> , dst_fmt ) ; gcc_unreachable ( ) ; } switch ( trick_type ) { case IC_SINGLE : strcpy ( buf , load_op ) ; break ; case IC_APPEND_NOT : sprintf ( buf , <STR_LIT> , load_op , dst_fmt , dst_fmt , ivalue , uvalue ) ; break ; case IC_APPEND_ADDI : sprintf ( buf , <STR_LIT> , load_op , dst_fmt , dst_fmt , ivalue , uvalue ) ; break ; case IC_APPEND_SUBI : sprintf ( buf , <STR_LIT> , load_op , dst_fmt , dst_fmt , ivalue , uvalue ) ; break ; case IC_BGENI_ADDI : sprintf ( buf , <STR_LIT> , load_op , dst_fmt , dst_fmt , ivalue , uvalue ) ; break ; case IC_BGENI_SUBI : sprintf ( buf , <STR_LIT> , load_op , dst_fmt , dst_fmt , ivalue , uvalue ) ; break ; case IC_APPEND_BSETI : sprintf ( buf , <STR_LIT> , load_op , dst_fmt , dst_fmt , ivalue , uvalue ) ; break ; case IC_APPEND_MOVI :

sprintf ( buf , <STR_LIT> , load_op , dst_fmt , ivalue , uvalue ) ;


<s> enum csky_inline_const_type trick_type ; rtx out_operands [ <NUM_LIT> ] ; char buf [ <NUM_LIT> ] ; char load_op [ <NUM_LIT> ] ; const char * dst_fmt ; HOST_WIDE_INT value = INTVAL ( operands [ <NUM_LIT> ] ) ; int ivalue = ( int ) value ; unsigned int uvalue = ( unsigned int ) value ; trick_type = try_csky_constant_tricks ( value , & x , & y ) ; gcc_assert ( trick_type != IC_UNINLINABLE ) ; out_operands [ <NUM_LIT> ] = operands [ <NUM_LIT> ] ; out_operands [ <NUM_LIT> ] = GEN_INT ( x ) ; if ( trick_type != IC_SINGLE && trick_type != IC_APPEND_NOT ) out_operands [ <NUM_LIT> ] = GEN_INT ( y ) ; if ( mode == DImode && TARGET_BIG_ENDIAN ) dst_fmt = <STR_LIT> ; else dst_fmt = <STR_LIT> ; if ( CSKY_CONST_OK_FOR_I ( x ) ) sprintf ( load_op , <STR_LIT> , dst_fmt ) ; else if ( CSKY_CONST_OK_FOR_Uc ( x ) ) sprintf ( load_op , <STR_LIT> , dst_fmt ) ; else if ( CSKY_CONST_OK_FOR_MOVIH ( x ) ) sprintf ( load_op , <STR_LIT> , dst_fmt ) ; else { sprintf ( load_op , <STR_LIT> , dst_fmt ) ; gcc_unreachable ( ) ; } switch ( trick_type ) { case IC_SINGLE : strcpy ( buf , load_op ) ; break ; case IC_APPEND_NOT : sprintf ( buf , <STR_LIT> , load_op , dst_fmt , dst_fmt , ivalue , uvalue ) ; break ; case IC_APPEND_ADDI : sprintf ( buf , <STR_LIT> , load_op , dst_fmt , dst_fmt , ivalue , uvalue ) ; break ; case IC_APPEND_SUBI : sprintf ( buf , <STR_LIT> , load_op , dst_fmt , dst_fmt , ivalue , uvalue ) ; break ; case IC_BGENI_ADDI : sprintf ( buf , <STR_LIT> , load_op , dst_fmt , dst_fmt , ivalue , uvalue ) ; break ; case IC_BGENI_SUBI : sprintf ( buf , <STR_LIT> , load_op , dst_fmt , dst_fmt , ivalue , uvalue ) ; break ; case IC_APPEND_BSETI : sprintf ( buf , <STR_LIT> , load_op , dst_fmt , dst_fmt , ivalue , uvalue ) ; break ; case IC_APPEND_MOVI : sprintf ( buf , <STR_LIT> , load_op , dst_fmt , ivalue , uvalue ) ;


<s> if ( delta != <NUM_LIT> ) { if ( delta > maxoff || delta < - maxoff ) { fprintf ( file , <STR_LIT> , reg0 , ( long ) delta ) ; fprintf ( file , <STR_LIT> , thiz , thiz , reg0 ) ; } else fprintf ( file , <STR_LIT> , ( delta > <NUM_LIT> ? <STR_LIT> : <STR_LIT> ) , thiz , thiz , ( long ) ( delta > <NUM_LIT> ? delta : - delta ) ) ; } if ( vcall_offset != <NUM_LIT> ) { fprintf ( file , <STR_LIT> , reg0 , thiz ) ; if ( vcall_offset > maxoff || vcall_offset < - maxoff ) { fprintf ( file , <STR_LIT> , reg1 , ( long ) vcall_offset ) ; fprintf ( file , <STR_LIT> , reg0 , reg0 , reg1 ) ; } else fprintf ( file , <STR_LIT> , ( vcall_offset > <NUM_LIT> ? <STR_LIT> : <STR_LIT> ) , reg0 , reg0 , ( long ) ( vcall_offset > <NUM_LIT> ? vcall_offset : - vcall_offset ) ) ; fprintf ( file , <STR_LIT> , reg0 , reg0 ) ; fprintf ( file , <STR_LIT> , thiz , thiz , reg0 ) ; } if ( CSKY_TARGET_ARCH ( CK801 ) ) { if ( vcall_offset > maxoff || vcall_offset < - maxoff ) { fprintf ( file , <STR_LIT> ) ; fprintf ( file , <STR_LIT> ) ;


<s> else if ( CSKY_ISA_FEATURE ( fpv3_df ) ) return <STR_LIT> ; else gcc_unreachable ( ) ; } else { if ( CSKY_ISA_FEATURE ( fpv2_df ) ) return <STR_LIT> ; else if ( CSKY_ISA_FEATURE ( fpv3_df ) ) return <STR_LIT> ; else gcc_unreachable ( ) ; } } if ( dstreg == basereg ) return <STR_LIT> ; else return <STR_LIT> ; } else if ( GET_CODE ( src ) == CONST_INT || GET_CODE ( src ) == CONST_DOUBLE ) { split_double ( src , operands + <NUM_LIT> , operands + <NUM_LIT> ) ; if ( CSKY_CONST_OK_FOR_I ( INTVAL ( operands [ <NUM_LIT> ] ) ) ) output_asm_insn ( <STR_LIT> , operands ) ; else if ( CSKY_CONST_OK_FOR_Uc ( INTVAL ( operands [ <NUM_LIT> ] ) ) ) output_asm_insn ( <STR_LIT> , operands ) ; else if ( CSKY_CONST_OK_FOR_Ub ( INTVAL ( operands [ <NUM_LIT> ] ) ) ) output_asm_insn ( <STR_LIT> , operands ) ; else output_asm_insn ( <STR_LIT> , operands ) ; if ( CSKY_CONST_OK_FOR_I ( INTVAL ( operands [ <NUM_LIT> ] ) ) ) output_asm_insn ( <STR_LIT> , operands ) ; else if ( CSKY_CONST_OK_FOR_Uc ( INTVAL ( operands [ <NUM_LIT> ] ) ) ) output_asm_insn ( <STR_LIT> , operands ) ; else if ( CSKY_CONST_OK_FOR_Ub ( INTVAL ( operands [ <NUM_LIT> ] ) ) ) output_asm_insn ( <STR_LIT> , operands ) ; else output_asm_insn ( <STR_LIT> , operands ) ; return <STR_LIT> ; } else gcc_unreachable ( ) ; } else if ( GET_CODE ( dst ) == MEM && GET_CODE ( src ) == REG ) { rtx memexp = XEXP ( dst , <NUM_LIT> ) ; int srcreg = REGNO ( src ) ; int basereg = - <NUM_LIT> ; struct csky_address op0 ; decompose_csky_address ( XEXP ( dst , <NUM_LIT> ) , & op0 ) ; if ( GET_CODE ( memexp ) == REG ) basereg = REGNO ( memexp ) ; else if ( GET_CODE ( memexp ) == PLUS ) { if ( GET_CODE ( XEXP ( memexp , <NUM_LIT> ) ) == REG ) basereg = REGNO ( XEXP ( memexp , <NUM_LIT> ) ) ; else if ( GET_CODE ( XEXP ( memexp , <NUM_LIT> ) ) == REG ) basereg = REGNO ( XEXP ( memexp , <NUM_LIT> ) ) ; else gcc_unreachable ( ) ; } else gcc_unreachable ( ) ; if ( CSKY_VREG_P ( srcreg ) ) { if ( op0 . index ) { if ( CSKY_ISA_FEATURE ( fpv2_df ) ) return <STR_LIT> ; else if ( CSKY_ISA_FEATURE ( fpv3_df ) ) return <STR_LIT> ; else gcc_unreachable ( ) ; } else { if ( CSKY_ISA_FEATURE ( fpv2_df ) ) return <STR_LIT> ; else if ( CSKY_ISA_FEATURE ( fpv3_df ) ) return <STR_LIT> ; else gcc_unreachable ( ) ; } } if ( srcreg == basereg ) return <STR_LIT> ; else return <STR_LIT> ; }


<s> return ; } csky_print_operand ( stream , XVECEXP ( x , <NUM_LIT> , <NUM_LIT> ) , code ) ; switch ( XINT ( x , <NUM_LIT> ) ) { case UNSPEC_PIC_SYMBOL_GOTOFF : fputs ( <STR_LIT> , stream ) ; break ; case UNSPEC_PIC_SYMBOL_PLT : fputs ( <STR_LIT> , stream ) ; break ; case UNSPEC_PIC_SYMBOL_GOT : fputs ( <STR_LIT> , stream ) ; break ; case UNSPEC_PIC_SYMBOL_GOTPC : fputs ( <STR_LIT> , stream ) ;


<s> fputs ( <STR_LIT> , stream ) ; break ; case UNSPEC_PIC_SYMBOL_GOT : fputs ( <STR_LIT> , stream ) ; break ; case UNSPEC_PIC_SYMBOL_GOTPC : fputs ( <STR_LIT> , stream ) ; break ; case UNSPEC_PIC_SYMBOL_BSR :


<s> if ( CSKY_FUNCTION_IS_INTERRUPT ( func_type ) ) return <STR_LIT> ;


<s> const char * csky_output_return_instruction ( void ) { unsigned long func_type = get_csky_current_func_type ( ) ; if ( CSKY_FUNCTION_IS_NAKED ( func_type ) ) return <STR_LIT> ; if ( CSKY_FUNCTION_IS_INTERRUPT ( func_type ) ) return <STR_LIT> ; else return <STR_LIT> ;


<s> static reg_class_t csky_preferred_reload_class ( rtx x , reg_class_t rclass ) { if ( TARGET_HARD_FLOAT && CONST_DOUBLE_P ( x ) && ( GET_MODE ( x ) == DFmode || GET_MODE ( x ) == SFmode ) && rclass == NO_REGS ) return GENERAL_REGS ; return rclass ;


<s> fprintf ( stream , <STR_LIT> , ( int ) INTVAL ( addr . disp ) ) ; } else if ( addr . symbol ) { fprintf ( stream , <STR_LIT> ) ; output_addr_const ( stream , addr . symbol ) ; fprintf ( stream , <STR_LIT> ) ; } else if ( addr . disp && GET_CODE ( addr . disp ) == CONST_INT ) fprintf ( stream , <STR_LIT> , reg_names [ REGNO ( addr . base ) ] , ( int ) INTVAL ( addr . disp ) ) ; else if ( addr . disp && GET_CODE ( addr . disp ) == UNSPEC ) { if ( REGNO ( addr . base ) != CSKY_GB_REGNUM ) fprintf ( stream , <STR_LIT> , reg_names [ REGNO ( addr . base ) ] ) ; else fprintf ( stream , <STR_LIT> ) ; csky_output_pic_addr_const ( stream , addr . disp , <NUM_LIT> ) ; fprintf ( stream , <STR_LIT> , ( REGNO ( addr . base ) != CSKY_GB_REGNUM ) ? <STR_LIT> : <STR_LIT> ) ; } else if ( addr . index ) fprintf ( stream , <STR_LIT> , reg_names [ REGNO ( addr . base ) ] , reg_names [ REGNO ( addr . index ) ] , exact_log2 ( ( int ) ( addr . scale ) ) ) ; else fprintf ( stream , <STR_LIT> , reg_names [ REGNO ( addr . base ) ] ) ;


<s> if ( ( V_REG_CLASS_P ( from ) && GR_REG_CLASS_P ( to ) ) || ( GR_REG_CLASS_P ( from ) && V_REG_CLASS_P ( to ) ) ) return <NUM_LIT> ; if ( ( HILO_REG_CLASS_P ( from ) && GR_REG_CLASS_P ( to ) ) || ( GR_REG_CLASS_P ( from ) && HILO_REG_CLASS_P ( to ) ) ) return <NUM_LIT> ; if ( HILO_REG_CLASS_P ( from ) && HILO_REG_CLASS_P ( to ) ) return <NUM_LIT> ; if ( ( HILO_REG_CLASS_P ( from ) && V_REG_CLASS_P ( to ) ) || ( V_REG_CLASS_P ( from ) && HILO_REG_CLASS_P ( to ) ) ) return <NUM_LIT> ;


<s> static void csky_reorg ( void ) { if ( TARGET_CONSTANT_POOL ) csky_emit_constant_pools ( ) ;


<s> return get_hard_reg_initial_val ( Pmode , CSKY_LR_REGNUM ) ;


<s> if ( count != <NUM_LIT> ) return NULL_RTX ;

return get_hard_reg_initial_val ( Pmode , CSKY_LR_REGNUM ) ;


<s> const HOST_WIDE_INT size = int_size_in_bytes ( type ) ; return ( size == - <NUM_LIT> || size > <NUM_LIT> * UNITS_PER_WORD ) ;


<s> else if ( CSKY_TARGET_ARCH ( CK807 ) || CSKY_TARGET_ARCH ( CK810 ) ) return ck807_ck810_rtx_costs ( x , code , outer_code , total , speed ) ; else if ( CSKY_TARGET_ARCH ( CK860 ) ) return ck860_rtx_costs ( x , code , mode , outer_code , total , speed ) ;


<s> else if ( CSKY_TARGET_ARCH ( CK803 ) ) return ck803_rtx_costs ( x , code , outer_code , total , speed ) ;

else if ( CSKY_TARGET_ARCH ( CK807 ) || CSKY_TARGET_ARCH ( CK810 ) ) return ck807_ck810_rtx_costs ( x , code , outer_code , total , speed ) ;


<s> rtx pattern = PATTERN ( insn ) ; gcc_assert ( GET_CODE ( pattern ) == SET ) ; rtx addr = ( insn_type == TYPE_LOAD ? SET_SRC ( pattern ) : SET_DEST ( pattern ) ) ; enum rtx_code code = GET_CODE ( addr ) ; if ( code == ZERO_EXTEND || code == SIGN_EXTEND ) addr = XEXP ( addr , <NUM_LIT> ) ; gcc_assert ( GET_CODE ( addr ) == MEM ) ; rtx base = XEXP ( addr , <NUM_LIT> ) ; rtx reg = NULL_RTX ; if ( REG_P ( base ) ) reg = base ; if ( GET_CODE ( base ) == PLUS && GET_CODE ( XEXP ( base , <NUM_LIT> ) ) == REG ) reg = XEXP ( base , <NUM_LIT> ) ; if ( ( reg != NULL_RTX ) && reg_set_p ( reg , PATTERN ( dep ) ) ) return <NUM_LIT> ; } } else if ( CSKY_TARGET_ARCH ( CK802 ) ) { if ( ( insn_type == TYPE_CALL_JSR || insn_type == TYPE_BRANCH_JMP ) && get_attr_type ( dep ) != TYPE_LOAD ) return <NUM_LIT> ; if ( insn_type == TYPE_LOAD || insn_type == TYPE_STORE ) { rtx pattern = PATTERN ( insn ) ; gcc_assert ( GET_CODE ( pattern ) == SET ) ; rtx addr = ( insn_type == TYPE_LOAD ? SET_SRC ( pattern ) : SET_DEST ( pattern ) ) ; enum rtx_code code = GET_CODE ( addr ) ; if ( code == ZERO_EXTEND || code == SIGN_EXTEND ) addr = XEXP ( addr , <NUM_LIT> ) ; gcc_assert ( GET_CODE ( addr ) == MEM ) ; rtx base = XEXP ( addr , <NUM_LIT> ) ; rtx reg = NULL_RTX ; if ( REG_P ( base ) ) reg = base ; if ( GET_CODE ( base ) == PLUS && GET_CODE ( XEXP ( base , <NUM_LIT> ) ) == REG ) reg = XEXP ( base , <NUM_LIT> ) ; if ( ( reg != NULL_RTX ) && reg_set_p ( reg , PATTERN ( dep ) ) && get_attr_type ( dep ) != TYPE_LOAD ) return <NUM_LIT> ; if ( insn_type == TYPE_STORE && reg_referenced_p ( SET_SRC ( pattern ) , PATTERN ( dep ) ) ) return <NUM_LIT> ; }


<s> static int csky_sched_adjust_cost ( rtx_insn * insn , int dep_type , rtx_insn * dep , int cost , unsigned int dw ATTRIBUTE_UNUSED ) { if ( dep_type == REG_DEP_ANTI || dep_type == REG_DEP_OUTPUT ) return <NUM_LIT> ; else if ( recog_memoized ( insn ) >= <NUM_LIT> && recog_memoized ( dep ) >= <NUM_LIT> ) { enum attr_type insn_type = get_attr_type ( insn ) ; if ( CSKY_TARGET_ARCH ( CK803 ) ) { if ( insn_type == TYPE_LOAD || insn_type == TYPE_STORE ) { rtx pattern = PATTERN ( insn ) ; gcc_assert ( GET_CODE ( pattern ) == SET ) ; rtx addr = ( insn_type == TYPE_LOAD ? SET_SRC ( pattern ) : SET_DEST ( pattern ) ) ; enum rtx_code code = GET_CODE ( addr ) ; if ( code == ZERO_EXTEND || code == SIGN_EXTEND ) addr = XEXP ( addr , <NUM_LIT> ) ; gcc_assert ( GET_CODE ( addr ) == MEM ) ;


<s> else { while ( GET_CODE ( x ) == SUBREG ) { off += subreg_regno_offset ( REGNO ( SUBREG_REG ( x ) ) , GET_MODE ( SUBREG_REG ( x ) ) , SUBREG_BYTE ( x ) , GET_MODE ( x ) ) ; x = SUBREG_REG ( x ) ; } if ( GET_CODE ( x ) == REG ) regno = REGNO ( x ) + off ; } } else if ( GET_CODE ( x ) == REG || GET_CODE ( x ) == SUBREG ) regno = true_regnum ( x ) ; if ( rclass == HILO_REGS && ! CSKY_GENERAL_REGNO_P ( regno ) ) return GENERAL_REGS ;

if ( rclass == V_REGS && ! CSKY_GENERAL_REGNO_P ( regno ) ) {


<s> reg_class_t csky_secondary_reload ( bool in_p ATTRIBUTE_UNUSED , rtx x , reg_class_t rclass , machine_mode mode , secondary_reload_info * sri ATTRIBUTE_UNUSED ) { int regno = - <NUM_LIT> ; if ( GET_CODE ( x ) == SIGN_EXTEND ) { int off = <NUM_LIT> ; x = XEXP ( x , <NUM_LIT> ) ; if ( reg_renumber ) regno = true_regnum ( x ) ;


<s> int regs_to_push ; cfun -> machine -> uses_anonymous_args = <NUM_LIT> ; local_cum = * pcum ; csky_function_arg_advance ( local_cum_v , arg ) ; regs_to_push = CSKY_NPARM_REGS - local_cum . reg ;


<s> } else { basereg = stack_pointer_rtx ; delta = cfun -> machine -> reg_offset ; } for ( i = <NUM_LIT> ; i < CSKY_LR_REGNUM ; i ++ ) if ( reg_mask & ( <NUM_LIT> << i ) ) delta += <NUM_LIT> ; if ( ( CSKY_TARGET_ARCH ( CK801 ) && delta >= CSKY_LD16_MAX_OFFSET ( Pmode ) ) || delta >= CSKY_LD32_MAX_OFFSET ( Pmode ) ) {

emit_insn ( gen_movsi ( scratch , GEN_INT ( delta ) ) ) ;


<s> rtx basereg , addr ; unsigned int reg_mask ; csky_layout_stack_frame ( ) ; reg_mask = cfun -> machine -> reg_mask ; if ( reg_mask & ( <NUM_LIT> << CSKY_LR_REGNUM ) ) { int i = <NUM_LIT> ; if ( frame_pointer_needed ) { basereg = hard_frame_pointer_rtx ; delta = <NUM_LIT> ; } else { basereg = stack_pointer_rtx ; delta = cfun -> machine -> reg_offset ; } for ( i = <NUM_LIT> ; i < CSKY_LR_REGNUM ; i ++ ) if ( reg_mask & ( <NUM_LIT> << i ) ) delta += <NUM_LIT> ;

if ( ( CSKY_TARGET_ARCH ( CK801 ) && delta >= CSKY_LD16_MAX_OFFSET ( Pmode ) ) || delta >= CSKY_LD32_MAX_OFFSET ( Pmode ) ) {


<s> if ( base ) * base = ( unsigned int ) ( val >> i ) ; if ( shift ) * shift = ( unsigned int ) i ; return true ;


<s> struct csky_address addr ; if ( ! decompose_csky_address ( op , & addr ) ) return false ;

if ( addr . disp && GET_CODE ( addr . disp ) == UNSPEC ) return false ;


<s> bool csky_simple_addr_operand_p ( rtx op ) { struct csky_address addr ; if ( ! decompose_csky_address ( op , & addr ) ) return false ;


<s> if ( ! CSKY_ISA_FEATURE ( E2 ) ) { emit_move_insn ( operands [ <NUM_LIT> ] , input ) ; input = operands [ <NUM_LIT> ] ; } for ( i = <NUM_LIT> ; i < <NUM_LIT> ; i ++ ) if ( ( mask & ( <NUM_LIT> << i ) ) == <NUM_LIT> ) { emit_insn ( gen_bclri ( operands [ <NUM_LIT> ] , input , GEN_INT ( i ) ) ) ; input = operands [ <NUM_LIT> ] ; } return true ; } for ( i = ( CSKY_ISA_FEATURE ( E2 ) ? <NUM_LIT> : <NUM_LIT> ) ; i < <NUM_LIT> ; i ++ ) { if ( ( ( ( HOST_WIDE_INT ) <NUM_LIT> ) << i ) - <NUM_LIT> == mask ) { if ( CSKY_ISA_FEATURE ( <NUM_LIT> ) ) emit_insn ( gen_cskyv2_extzv ( operands [ <NUM_LIT> ] , operands [ <NUM_LIT> ] , GEN_INT ( i ) , const0_rtx ) ) ; else { rtx shift = GEN_INT ( <NUM_LIT> - i ) ; rtx reg = ( reload_completed ? operands [ <NUM_LIT> ] : gen_reg_rtx ( SImode ) ) ; emit_insn ( gen_ashlsi3 ( reg , operands [ <NUM_LIT> ] , shift ) ) ; emit_insn ( gen_lshrsi3 ( operands [ <NUM_LIT> ] , reg , shift ) ) ; } return true ; } else if ( ( ( ( HOST_WIDE_INT ) <NUM_LIT> ) << i ) - <NUM_LIT> == ~ mask ) { rtx shift = GEN_INT ( i ) ; rtx reg = ( reload_completed ? operands [ <NUM_LIT> ] : gen_reg_rtx ( SImode ) ) ; emit_insn ( gen_lshrsi3 ( reg , operands [ <NUM_LIT> ] , shift ) ) ; emit_insn ( gen_ashlsi3 ( operands [ <NUM_LIT> ] , reg , shift ) ) ; return true ; } } if ( ! reload_completed && INTVAL ( operands [ <NUM_LIT> ] ) < <NUM_LIT> ) { rtx reg = copy_to_mode_reg ( SImode , not_value ) ; if ( CSKY_ISA_FEATURE ( E2 ) ) emit_insn ( gen_cskyv2_andnsi3 ( operands [ <NUM_LIT> ] , reg , operands [ <NUM_LIT> ] ) ) ; else { emit_move_insn ( operands [ <NUM_LIT> ] , operands [ <NUM_LIT> ] ) ; emit_insn ( gen_ck801_andnsi3 ( operands [ <NUM_LIT> ] , reg , operands [ <NUM_LIT> ] ) ) ; } return true ; } if ( reload_completed ) { emit_move_insn ( operands [ <NUM_LIT> ] , operands [ <NUM_LIT> ] ) ; operands [ <NUM_LIT> ] = operands [ <NUM_LIT> ] ; operands [ <NUM_LIT> ] = operands [ <NUM_LIT> ] ; }

else operands [ <NUM_LIT> ] = copy_to_mode_reg ( SImode , operands [ <NUM_LIT> ] ) ;


<s> rtx not_value = GEN_INT ( ~ mask ) ; int i ; if ( mask == <NUM_LIT> ) { emit_move_insn ( operands [ <NUM_LIT> ] , const0_rtx ) ; return true ; } if ( mask == - <NUM_LIT> ) { emit_move_insn ( operands [ <NUM_LIT> ] , operands [ <NUM_LIT> ] ) ; return true ; } if ( CSKY_ISA_FEATURE ( E2 ) && csky_arith_O_operand ( operands [ <NUM_LIT> ] , SImode ) ) return false ; if ( CSKY_ISA_FEATURE ( E2 ) && csky_arith_O_operand ( not_value , SImode ) ) { emit_insn ( gen_cskyv2_andnsi3 ( operands [ <NUM_LIT> ] , not_value , operands [ <NUM_LIT> ] ) ) ; return true ; } if ( popcount_hwi ( ~ mask & <NUM_LIT> ) <= ( reload_completed && ! CSKY_ISA_FEATURE ( E2 ) ? <NUM_LIT> : <NUM_LIT> ) ) { rtx input = operands [ <NUM_LIT> ] ; if ( ! CSKY_ISA_FEATURE ( E2 ) ) { emit_move_insn ( operands [ <NUM_LIT> ] , input ) ; input = operands [ <NUM_LIT> ] ; } for ( i = <NUM_LIT> ; i < <NUM_LIT> ; i ++ ) if ( ( mask & ( <NUM_LIT> << i ) ) == <NUM_LIT> ) { emit_insn ( gen_bclri ( operands [ <NUM_LIT> ] , input , GEN_INT ( i ) ) ) ; input = operands [ <NUM_LIT> ] ; } return true ; } for ( i = ( CSKY_ISA_FEATURE ( E2 ) ? <NUM_LIT> : <NUM_LIT> ) ; i < <NUM_LIT> ; i ++ ) { if ( ( ( ( HOST_WIDE_INT ) <NUM_LIT> ) << i ) - <NUM_LIT> == mask ) { if ( CSKY_ISA_FEATURE ( <NUM_LIT> ) ) emit_insn ( gen_cskyv2_extzv ( operands [ <NUM_LIT> ] , operands [ <NUM_LIT> ] , GEN_INT ( i ) , const0_rtx ) ) ; else { rtx shift = GEN_INT ( <NUM_LIT> - i ) ; rtx reg = ( reload_completed ? operands [ <NUM_LIT> ] : gen_reg_rtx ( SImode ) ) ; emit_insn ( gen_ashlsi3 ( reg , operands [ <NUM_LIT> ] , shift ) ) ; emit_insn ( gen_lshrsi3 ( operands [ <NUM_LIT> ] , reg , shift ) ) ; } return true ; } else if ( ( ( ( HOST_WIDE_INT ) <NUM_LIT> ) << i ) - <NUM_LIT> == ~ mask ) { rtx shift = GEN_INT ( i ) ; rtx reg = ( reload_completed ? operands [ <NUM_LIT> ] : gen_reg_rtx ( SImode ) ) ; emit_insn ( gen_lshrsi3 ( reg , operands [ <NUM_LIT> ] , shift ) ) ; emit_insn ( gen_ashlsi3 ( operands [ <NUM_LIT> ] , reg , shift ) ) ; return true ; } } if ( ! reload_completed && INTVAL ( operands [ <NUM_LIT> ] ) < <NUM_LIT> ) { rtx reg = copy_to_mode_reg ( SImode , not_value ) ; if ( CSKY_ISA_FEATURE ( E2 ) ) emit_insn ( gen_cskyv2_andnsi3 ( operands [ <NUM_LIT> ] , reg , operands [ <NUM_LIT> ] ) ) ;


<s> rtx input = operands [ <NUM_LIT> ] ; if ( ! CSKY_ISA_FEATURE ( E2 ) ) { emit_move_insn ( operands [ <NUM_LIT> ] , input ) ; input = operands [ <NUM_LIT> ] ; } for ( i = <NUM_LIT> ; i < <NUM_LIT> ; i ++ ) if ( mask & ( <NUM_LIT> << i ) ) { emit_insn ( gen_bseti ( operands [ <NUM_LIT> ] , input , GEN_INT ( i ) ) ) ; input = operands [ <NUM_LIT> ] ; } return true ; } if ( reload_completed ) { emit_move_insn ( operands [ <NUM_LIT> ] , operands [ <NUM_LIT> ] ) ; operands [ <NUM_LIT> ] = operands [ <NUM_LIT> ] ; operands [ <NUM_LIT> ] = operands [ <NUM_LIT> ] ;


<s> } if ( mask == - <NUM_LIT> ) { if ( CSKY_ISA_FEATURE ( E2 ) ) emit_insn ( gen_cskyv2_one_cmplsi2 ( operands [ <NUM_LIT> ] , operands [ <NUM_LIT> ] ) ) ; else { emit_move_insn ( operands [ <NUM_LIT> ] , operands [ <NUM_LIT> ] ) ;

emit_insn ( gen_ck801_one_cmplsi2 ( operands [ <NUM_LIT> ] , operands [ <NUM_LIT> ] ) ) ;


<s> x = XEXP ( x , <NUM_LIT> ) ; return ( ( GET_CODE ( XEXP ( x , <NUM_LIT> ) ) == SYMBOL_REF || GET_CODE ( XEXP ( x , <NUM_LIT> ) ) == LABEL_REF ) && GET_CODE ( XEXP ( x , <NUM_LIT> ) ) == CONST_INT ) ; default : return <NUM_LIT> ;


<s> for ( j = XVECLEN ( x , i ) - <NUM_LIT> ; j >= <NUM_LIT> ; j -- ) if ( csky_symbol_mentioned_p ( XVECEXP ( x , i , j ) ) ) return true ; } else if ( fmt [ i ] == 'e' && csky_symbol_mentioned_p ( XEXP ( x , i ) ) ) return true ;


<s> bool csky_tls_referenced_p ( rtx x ) { if ( ! TARGET_TLS ) return false ; subrtx_iterator :: array_type array ; FOR_EACH_SUBRTX ( iter , array , x , ALL ) { const_rtx x = * iter ; if ( GET_CODE ( x ) == SYMBOL_REF && SYMBOL_REF_TLS_MODEL ( x ) != <NUM_LIT> ) return true ; if ( GET_CODE ( x ) == UNSPEC && XINT ( x , <NUM_LIT> ) == UNSPEC_TLS ) iter . skip_subrtxes ( ) ; }


if ( GET_CODE ( x ) != SYMBOL_REF ) return false ;


<s> if ( GET_CODE ( x ) != SYMBOL_REF ) return false ; return SYMBOL_REF_TLS_MODEL ( x ) != <NUM_LIT> ;


<s> rtx fnaddr = XEXP ( DECL_RTL ( fndecl ) , <NUM_LIT> ) ; rtx mem , a_tramp ; int pool = TRAMPOLINE_SIZE - <NUM_LIT> ; emit_block_move ( m_tramp , assemble_trampoline_template ( ) , GEN_INT ( TRAMPOLINE_SIZE ) , BLOCK_OP_NORMAL ) ;

mem = adjust_address ( m_tramp , SImode , pool ) ;


<s> if ( addr . scale == <NUM_LIT> || addr . scale == <NUM_LIT> || addr . scale == <NUM_LIT> || addr . scale == <NUM_LIT> ) return true ; return false ; } else if ( addr . disp ) { rtx disp = addr . disp ; if ( ! CONST_INT_P ( disp ) ) return false ; if ( ( ( unsigned ) INTVAL ( disp ) % <NUM_LIT> ) == <NUM_LIT> && ( unsigned ) INTVAL ( disp ) <= ( unsigned ) <NUM_LIT> ) return true ; return false ; } return true ;


<s> if ( ! decompose_csky_address ( XEXP ( op , <NUM_LIT> ) , & addr ) ) return false ; if ( ! is_csky_address_register_rtx_p ( addr . base , <NUM_LIT> ) ) return false ; if ( addr . index && ( constraint [ <NUM_LIT> ] == 'Q' || constraint [ <NUM_LIT> ] == 'W' ) ) { if ( ! is_csky_address_register_rtx_p ( addr . index , <NUM_LIT> ) ) return false ;

if ( addr . scale == <NUM_LIT> || addr . scale == <NUM_LIT> || addr . scale == <NUM_LIT> || addr . scale == <NUM_LIT> ) return true ;


<s> if ( ! decompose_csky_address ( XEXP ( op , <NUM_LIT> ) , & addr ) ) return false ; if ( ! is_csky_address_register_rtx_p ( addr . base , <NUM_LIT> ) ) return false ; if ( addr . index && ( constraint [ <NUM_LIT> ] == 'Q' || constraint [ <NUM_LIT> ] == 'W' ) ) { if ( ! is_csky_address_register_rtx_p ( addr . index , <NUM_LIT> ) ) return false ; if ( addr . scale == <NUM_LIT> || addr . scale == <NUM_LIT> || addr . scale == <NUM_LIT> || addr . scale == <NUM_LIT> ) return true ; return false ; } else if ( addr . disp && constraint [ <NUM_LIT> ] == 'Q' ) {


<s> rtx scale_rtx = NULL_RTX ; int i ; out -> base = out -> index = out -> symbol = out -> label = out -> disp = NULL_RTX ; out -> scale = <NUM_LIT> ; if ( REG_P ( addr ) ) { out -> base = addr ; return true ; } if ( GET_CODE ( addr ) == LABEL_REF ) { out -> label = addr ; return true ; } if ( GET_CODE ( addr ) == CONST ) addr = XEXP ( addr , <NUM_LIT> ) ; if ( GET_CODE ( addr ) == PLUS ) { rtx addends [ <NUM_LIT> ] , op ; addends [ <NUM_LIT> ] = XEXP ( addr , <NUM_LIT> ) ; addends [ <NUM_LIT> ] = XEXP ( addr , <NUM_LIT> ) ; if ( GET_CODE ( addends [ <NUM_LIT> ] ) == LABEL_REF && CONST_INT_P ( addends [ <NUM_LIT> ] ) ) { out -> label = addends [ <NUM_LIT> ] ; out -> disp = addends [ <NUM_LIT> ] ; return true ; } if ( ! REG_P ( addends [ <NUM_LIT> ] ) ) std :: swap ( addends [ <NUM_LIT> ] , addends [ <NUM_LIT> ] ) ; for ( i = <NUM_LIT> ; i < <NUM_LIT> ; ++ i ) { op = addends [ i ] ; switch ( GET_CODE ( op ) ) { case REG : if ( ! base ) base = op ; else if ( ! index ) { index = op ; scale = <NUM_LIT> ; } else return false ; break ; case CONST_INT : case UNSPEC : if ( disp ) return false ; disp = op ; break ; case MULT : if ( index ) return false ;


<s> if ( mp -> refcount > <NUM_LIT> ) { if ( dump_file ) { fprintf ( dump_file , <STR_LIT> , ( unsigned ) mp -> offset , ( unsigned long ) mp -> min_address , ( unsigned long ) mp -> max_address ) ; print_csky_value ( dump_file , mp -> value ) ; fputc ( '\n' , dump_file ) ; } switch ( mp -> fix_size ) { case <NUM_LIT> : scan = emit_insn_after ( gen_consttable_4 ( mp -> value ) , scan ) ; pool_length += <NUM_LIT> ;


<s> rtx addr = plus_constant ( Pmode , stack_pointer_rtx , <NUM_LIT> * num_regs ) ; rtx tmp = gen_frame_mem ( SImode , gen_rtx_POST_MODIFY ( Pmode , stack_pointer_rtx , addr ) ) ; XVECEXP ( par , <NUM_LIT> , <NUM_LIT> ) = gen_rtx_SET ( reg , gen_rtx_UNSPEC ( SImode , gen_rtvec ( <NUM_LIT> , tmp ) , UNSPEC_PUSHPOP_MULT ) ) ; break ; }

for ( j = <NUM_LIT> , i ++ ; j < ( num_regs + <NUM_LIT> ) ; i ++ ) if ( mask & ( <NUM_LIT> << i ) ) {


<s> XVECEXP ( dwarf , <NUM_LIT> , dwarf_par_index ++ ) = tmp ; break ; } for ( j = <NUM_LIT> , i ++ ; j < num_regs ; i ++ ) if ( mask & ( <NUM_LIT> << i ) ) { rtx reg = gen_rtx_REG ( SImode , i ) ; rtx addr = plus_constant ( Pmode , stack_pointer_rtx , <NUM_LIT> * j ) ; tmp = gen_rtx_SET ( gen_frame_mem ( SImode , addr ) , reg ) ; RTX_FRAME_RELATED_P ( tmp ) = <NUM_LIT> ; XVECEXP ( par , <NUM_LIT> , j ) = gen_rtx_USE ( VOIDmode , reg ) ; XVECEXP ( dwarf , <NUM_LIT> , dwarf_par_index ++ ) = tmp ; j ++ ; } par = emit_insn ( par ) ; tmp = gen_rtx_SET ( stack_pointer_rtx , plus_constant ( Pmode , stack_pointer_rtx , - <NUM_LIT> * num_regs ) ) ; RTX_FRAME_RELATED_P ( tmp ) = <NUM_LIT> ; XVECEXP ( dwarf , <NUM_LIT> , <NUM_LIT> ) = tmp ;

add_reg_note ( par , REG_FRAME_RELATED_EXPR , dwarf ) ;


<s> static void expand_csky_stack_adjust ( int offset ) { rtx set ; rtx_insn * insn ; int size = ( offset > <NUM_LIT> ? offset : - offset ) ; if ( offset == <NUM_LIT> ) return ; if ( size > CSKY_MAX_SP_ADJUST * <NUM_LIT> ) { rtx tmp , dwarf ; gcc_assert ( cfun -> machine -> reg_size != <NUM_LIT> && ( cfun -> machine -> reg_mask & ( <NUM_LIT> << CSKY_STACKADJUST_REGNUM ) ) ) ; if ( ! flag_sched_prolog ) emit_insn ( gen_blockage ( ) ) ; tmp = gen_rtx_REG ( SImode , CSKY_STACKADJUST_REGNUM ) ; emit_move_insn ( tmp , GEN_INT ( size ) ) ; if ( offset > <NUM_LIT> ) set = gen_addsi3 ( stack_pointer_rtx , stack_pointer_rtx , tmp ) ; else set = gen_subsi3 ( stack_pointer_rtx , stack_pointer_rtx , tmp ) ; insn = emit_insn ( set ) ; RTX_FRAME_RELATED_P ( insn ) = <NUM_LIT> ; dwarf = gen_rtx_SET ( stack_pointer_rtx , plus_constant ( Pmode , stack_pointer_rtx , offset ) ) ; add_reg_note ( insn , REG_FRAME_RELATED_EXPR , dwarf ) ; if ( ! flag_sched_prolog ) emit_insn ( gen_blockage ( ) ) ; }


<s> FOR_EACH_SUBRTX ( iter , array , PATTERN ( insn ) , ALL ) {


<s> FOR_EACH_SUBRTX ( iter , array , PATTERN ( insn ) , ALL ) { const_rtx x = * iter ; if ( GET_CODE ( x ) == UNSPEC && ( XINT ( x , <NUM_LIT> ) == UNSPEC_TLS_LABEL || XINT ( x , <NUM_LIT> ) == UNSPEC_PIC_SYMBOL_GOTPC_GRS ) ) return true ;


<s> if ( ! IN_RANGE ( exponent , - <NUM_LIT> , <NUM_LIT> ) ) return <NUM_LIT> ; if ( mantissa != <NUM_LIT> ) return <NUM_LIT> ; point_pos -= HOST_BITS_PER_WIDE_INT ; mantissa = mant_hi ; mask = ( ( unsigned HOST_WIDE_INT ) <NUM_LIT> << ( point_pos - <NUM_LIT> ) ) - <NUM_LIT> ; if ( ( mantissa & mask ) != <NUM_LIT> ) return <NUM_LIT> ; return <NUM_LIT> ;


<s> real_ldexp ( & m , & r , point_pos - exponent ) ; wide_int w = real_to_integer ( & m , & fail , HOST_BITS_PER_WIDE_INT * <NUM_LIT> ) ; mantissa = w . elt ( <NUM_LIT> ) ; mant_hi = w . elt ( <NUM_LIT> ) ; exponent -= <NUM_LIT> ; if ( ! IN_RANGE ( exponent , - <NUM_LIT> , <NUM_LIT> ) ) return <NUM_LIT> ; if ( mantissa != <NUM_LIT> ) return <NUM_LIT> ; point_pos -= HOST_BITS_PER_WIDE_INT ; mantissa = mant_hi ;

mask = ( ( unsigned HOST_WIDE_INT ) <NUM_LIT> << ( point_pos - <NUM_LIT> ) ) - <NUM_LIT> ;


<s> const char * type = mode == DFmode ? <STR_LIT> : mode == SFmode ? <STR_LIT> : mode == HFmode ? <STR_LIT> : NULL ; gcc_assert ( type != NULL ) ; addr = XEXP ( mem , <NUM_LIT> ) ; struct csky_address caddr ; decompose_csky_address ( addr , & caddr ) ; ops [ <NUM_LIT> ] = reg ; ops [ <NUM_LIT> ] = mem ; sprintf ( buff , templ , isload ? <STR_LIT> : <STR_LIT> , caddr . index ? <STR_LIT> : <STR_LIT> , type ) ;


<s> addr = XEXP ( mem , <NUM_LIT> ) ; struct csky_address caddr ; decompose_csky_address ( addr , & caddr ) ; ops [ <NUM_LIT> ] = reg ; ops [ <NUM_LIT> ] = mem ; sprintf ( buff , templ , isload ? <STR_LIT> : <STR_LIT> , caddr . index ? <STR_LIT> : <STR_LIT> , type ) ; output_asm_insn ( buff , ops ) ;


<s> if ( CSKY_FUNCTION_TYPE ( cfun -> machine -> func_type ) == CSKY_FT_UNKNOWN ) { unsigned long type = CSKY_FT_UNKNOWN ; tree a ; tree attr ; gcc_assert ( TREE_CODE ( current_function_decl ) == FUNCTION_DECL ) ; attr = DECL_ATTRIBUTES ( current_function_decl ) ; a = lookup_attribute ( <STR_LIT> , attr ) ; if ( a != NULL_TREE ) type |= CSKY_FT_NAKED ; a = lookup_attribute ( <STR_LIT> , attr ) ; if ( a == NULL_TREE ) a = lookup_attribute ( <STR_LIT> , attr ) ; if ( a == NULL_TREE ) type |= CSKY_FT_NORMAL ; else type |= get_csky_isr_type ( TREE_VALUE ( a ) ) ;


<s> gcc_assert ( TREE_CODE ( current_function_decl ) == FUNCTION_DECL ) ; attr = DECL_ATTRIBUTES ( current_function_decl ) ; a = lookup_attribute ( <STR_LIT> , attr ) ; if ( a != NULL_TREE ) type |= CSKY_FT_NAKED ; a = lookup_attribute ( <STR_LIT> , attr ) ;

if ( a == NULL_TREE ) a = lookup_attribute ( <STR_LIT> , attr ) ;


<s> const isr_attribute_entry * ptr ; const char * arg ; if ( argument == NULL_TREE ) return CSKY_FT_ISR ; if ( TREE_VALUE ( argument ) == NULL_TREE || TREE_CODE ( TREE_VALUE ( argument ) ) != STRING_CST ) return CSKY_FT_UNKNOWN ; arg = TREE_STRING_POINTER ( TREE_VALUE ( argument ) ) ;

for ( ptr = isr_attribute_map ; ptr -> arg != NULL ; ptr ++ ) if ( strcmp ( arg , ptr -> arg ) == <NUM_LIT> ) return ptr -> return_value ;


<s> HOST_WIDE_INT modesize ; modesize = GET_MODE_SIZE ( GET_MODE ( body ) ) ; size = modesize * XVECLEN ( body , elt ) ; switch ( modesize ) { case <NUM_LIT> : size = ( size + <NUM_LIT> ) & ~ ( HOST_WIDE_INT ) <NUM_LIT> ; break ; case <NUM_LIT> : break ; case <NUM_LIT> :


<s> unsigned int live_regs_mask = <NUM_LIT> ; * count = <NUM_LIT> ; for ( reg = <NUM_LIT> ; reg < CSKY_NGPR_REGS ; reg ++ ) { bool save = false ; if ( CSKY_TARGET_ARCH ( CK801 ) && reg > <NUM_LIT> && reg < <NUM_LIT> ) continue ; if ( ( CSKY_TARGET_ARCH ( CK801 ) || CSKY_TARGET_ARCH ( CK802 ) || CSKY_TARGET_ARCH ( CK803 ) ) && reg > <NUM_LIT> ) break ; if ( df_regs_ever_live_p ( reg ) && ! call_used_regs [ reg ] ) save = true ; else if ( frame_pointer_needed && reg == HARD_FRAME_POINTER_REGNUM ) save = true ; else if ( crtl -> calls_eh_return && reg == HARD_FRAME_POINTER_REGNUM ) save = true ;

else if ( ( CSKY_TARGET_ARCH ( CK801 ) || CSKY_TARGET_ARCH ( CK802 ) ) && reg == CSKY_LR_REGNUM && ( ! crtl -> is_leaf || csky_far_jump_used_p ( ) ) ) save = true ;


<s> if ( ( CSKY_TARGET_ARCH ( CK801 ) || CSKY_TARGET_ARCH ( CK802 ) || CSKY_TARGET_ARCH ( CK803 ) ) && reg > <NUM_LIT> ) break ; if ( df_regs_ever_live_p ( reg ) && ! call_used_regs [ reg ] ) save = true ; else if ( frame_pointer_needed && reg == HARD_FRAME_POINTER_REGNUM ) save = true ;

else if ( crtl -> calls_eh_return && reg == HARD_FRAME_POINTER_REGNUM ) save = true ;


<s> if ( ! tls_get_addr_libfunc ) tls_get_addr_libfunc = init_one_libfunc ( <STR_LIT> ) ;


<s> static rtx get_tls_get_addr ( void ) { if ( ! tls_get_addr_libfunc ) tls_get_addr_libfunc = init_one_libfunc ( <STR_LIT> ) ; return tls_get_addr_libfunc ;


if ( strict_p ) return ( CSKY_GENERAL_REGNO_P ( regno ) || CSKY_GENERAL_REGNO_P ( reg_renumber [ regno ] ) ) ;


<s> else if ( code == MULT ) return ( shift == <NUM_LIT> || shift == <NUM_LIT> || shift == <NUM_LIT> || shift == <NUM_LIT> ) ; else return false ;


<s> rtx op = recog_data . operand [ opno ] ; if ( CONSTANT_P ( op ) ) {

if ( do_pushes ) push_csky_minipool_fix ( insn , address , recog_data . operand_loc [ opno ] , recog_data . operand_mode [ opno ] , op ) ;


<s> static void print_csky_value ( FILE * f , rtx x ) { switch ( GET_CODE ( x ) ) { case CONST_INT : fprintf ( f , HOST_WIDE_INT_PRINT_HEX , INTVAL ( x ) ) ; return ; case CONST_DOUBLE : fprintf ( f , <STR_LIT> , ( long ) XWINT ( x , <NUM_LIT> ) , ( long ) XWINT ( x , <NUM_LIT> ) ) ; return ; case CONST_VECTOR : { int i ; fprintf ( f , <STR_LIT> ) ; for ( i = <NUM_LIT> ; i < CONST_VECTOR_NUNITS ( x ) ; i ++ ) { fprintf ( f , HOST_WIDE_INT_PRINT_HEX , INTVAL ( CONST_VECTOR_ELT ( x , i ) ) ) ; if ( i < ( CONST_VECTOR_NUNITS ( x ) - <NUM_LIT> ) ) fputc ( ',' , f ) ; } fprintf ( f , <STR_LIT> ) ; }


<s> Mfix * fix = ( Mfix * ) obstack_alloc ( & minipool_obstack , sizeof ( * fix ) ) ; fix -> insn = insn ; fix -> address = address ; fix -> next = NULL ;

if ( minipool_fix_head != NULL ) minipool_fix_tail -> next = fix ;


<s> gcc_assert ( fix -> forwards || fix -> backwards ) ; if ( dump_file ) { fprintf ( dump_file , <STR_LIT> , GET_MODE_NAME ( mode ) , INSN_UID ( insn ) , ( unsigned long ) address , - <NUM_LIT> * ( long ) fix -> backwards , ( long ) fix -> forwards ) ; print_csky_value ( dump_file , fix -> value ) ;