<s> if ( cfun -> machine -> va_args_size != <NUM_LIT> ) { Rb = gen_rtx_REG ( SImode , cfun -> machine -> va_args_first_regno ) ; Re = gen_rtx_REG ( SImode , cfun -> machine -> va_args_last_regno ) ; nds32_emit_stack_push_multiple ( Rb , Re , GEN_INT ( <NUM_LIT> ) , true ) ; if ( cfun -> machine -> va_args_area_padding_bytes ) { sp_adjust = cfun -> machine -> va_args_area_padding_bytes ; sp_adjust_insn = gen_addsi3 ( stack_pointer_rtx , stack_pointer_rtx , GEN_INT ( - <NUM_LIT> * sp_adjust ) ) ; sp_adjust_insn = emit_insn ( sp_adjust_insn ) ; RTX_FRAME_RELATED_P ( sp_adjust_insn ) = <NUM_LIT> ; } } if ( cfun -> machine -> naked_p ) return ; Rb = gen_rtx_REG ( SImode , cfun -> machine -> callee_saved_first_gpr_regno ) ; Re = gen_rtx_REG ( SImode , cfun -> machine -> callee_saved_last_gpr_regno ) ; en4_const = <NUM_LIT> ; if ( cfun -> machine -> fp_size ) en4_const += <NUM_LIT> ; if ( cfun -> machine -> gp_size ) en4_const += <NUM_LIT> ; if ( cfun -> machine -> lp_size ) en4_const += <NUM_LIT> ; if ( ! ( REGNO ( Rb ) == SP_REGNUM && REGNO ( Re ) == SP_REGNUM && en4_const == <NUM_LIT> ) ) { nds32_emit_stack_push_multiple ( Rb , Re , GEN_INT ( en4_const ) , false ) ; } if ( frame_pointer_needed ) { fp_adjust = cfun -> machine -> fp_size + cfun -> machine -> gp_size + cfun -> machine -> lp_size + cfun -> machine -> callee_saved_gpr_regs_size ; fp_adjust_insn = gen_addsi3 ( hard_frame_pointer_rtx , stack_pointer_rtx , GEN_INT ( fp_adjust ) ) ; fp_adjust_insn = emit_insn ( fp_adjust_insn ) ; RTX_FRAME_RELATED_P ( fp_adjust_insn ) = <NUM_LIT> ; }

sp_adjust = cfun -> machine -> local_size + cfun -> machine -> out_args_size + cfun -> machine -> callee_saved_area_gpr_padding_bytes ;


<s> sp_adjust_insn = gen_addsi3 ( stack_pointer_rtx , stack_pointer_rtx , GEN_INT ( - <NUM_LIT> * sp_adjust ) ) ; sp_adjust_insn = emit_insn ( sp_adjust_insn ) ; RTX_FRAME_RELATED_P ( sp_adjust_insn ) = <NUM_LIT> ; } } if ( cfun -> machine -> naked_p ) return ; Rb = gen_rtx_REG ( SImode , cfun -> machine -> callee_saved_first_gpr_regno ) ; Re = gen_rtx_REG ( SImode , cfun -> machine -> callee_saved_last_gpr_regno ) ; en4_const = <NUM_LIT> ; if ( cfun -> machine -> fp_size ) en4_const += <NUM_LIT> ; if ( cfun -> machine -> gp_size ) en4_const += <NUM_LIT> ; if ( cfun -> machine -> lp_size ) en4_const += <NUM_LIT> ; if ( ! ( REGNO ( Rb ) == SP_REGNUM && REGNO ( Re ) == SP_REGNUM && en4_const == <NUM_LIT> ) ) { nds32_emit_stack_push_multiple ( Rb , Re , GEN_INT ( en4_const ) , false ) ; } if ( frame_pointer_needed ) { fp_adjust = cfun -> machine -> fp_size + cfun -> machine -> gp_size + cfun -> machine -> lp_size + cfun -> machine -> callee_saved_gpr_regs_size ; fp_adjust_insn = gen_addsi3 ( hard_frame_pointer_rtx , stack_pointer_rtx , GEN_INT ( fp_adjust ) ) ; fp_adjust_insn = emit_insn ( fp_adjust_insn ) ; RTX_FRAME_RELATED_P ( fp_adjust_insn ) = <NUM_LIT> ; } sp_adjust = cfun -> machine -> local_size + cfun -> machine -> out_args_size + cfun -> machine -> callee_saved_area_gpr_padding_bytes ; sp_adjust = nds32_force_addi_stack_int ( ( - <NUM_LIT> ) * sp_adjust ) ;


<s> nds32_emit_stack_v3push ( Rb , Re , GEN_INT ( <NUM_LIT> ) , GEN_INT ( <NUM_LIT> ) ) ; if ( frame_pointer_needed ) { fp_adjust = cfun -> machine -> fp_size + cfun -> machine -> gp_size + cfun -> machine -> lp_size + cfun -> machine -> callee_saved_gpr_regs_size ; fp_adjust_insn = gen_addsi3 ( hard_frame_pointer_rtx , stack_pointer_rtx , GEN_INT ( fp_adjust ) ) ; fp_adjust_insn = emit_insn ( fp_adjust_insn ) ; } sp_adjust = nds32_force_addi_stack_int ( ( - <NUM_LIT> ) * sp_adjust ) ; if ( sp_adjust ) {


<s> fp_adjust = cfun -> machine -> fp_size + cfun -> machine -> gp_size + cfun -> machine -> lp_size + cfun -> machine -> callee_saved_gpr_regs_size + sp_adjust ; fp_adjust_insn = gen_addsi3 ( hard_frame_pointer_rtx , stack_pointer_rtx , GEN_INT ( fp_adjust ) ) ; fp_adjust_insn = emit_insn ( fp_adjust_insn ) ; } } else { nds32_emit_stack_v3push ( Rb , Re , GEN_INT ( <NUM_LIT> ) , GEN_INT ( <NUM_LIT> ) ) ; if ( frame_pointer_needed ) { fp_adjust = cfun -> machine -> fp_size + cfun -> machine -> gp_size + cfun -> machine -> lp_size + cfun -> machine -> callee_saved_gpr_regs_size ; fp_adjust_insn = gen_addsi3 ( hard_frame_pointer_rtx , stack_pointer_rtx , GEN_INT ( fp_adjust ) ) ; fp_adjust_insn = emit_insn ( fp_adjust_insn ) ; } sp_adjust = nds32_force_addi_stack_int ( ( - <NUM_LIT> ) * sp_adjust ) ; if ( sp_adjust ) { sp_adjust_insn = gen_addsi3 ( stack_pointer_rtx , stack_pointer_rtx , GEN_INT ( - <NUM_LIT> * sp_adjust ) ) ; sp_adjust_insn = emit_insn ( sp_adjust_insn ) ; RTX_FRAME_RELATED_P ( sp_adjust_insn ) = <NUM_LIT> ; } } emit_insn ( gen_blockage ( ) ) ;


<s> if ( ! named ) { if ( TARGET_HARD_FLOAT ) return NULL_RTX ; if ( NDS32_ARG_PARTIAL_IN_GPR_REG_P ( cum -> gpr_offset , mode , type ) ) { regno = NDS32_AVAILABLE_REGNUM_FOR_GPR_ARG ( cum -> gpr_offset , mode , type ) ; return gen_rtx_REG ( mode , regno ) ; } return NULL_RTX ;


<s> unsignedp = TYPE_UNSIGNED ( ret_type ) ; mode = promote_mode ( ret_type , mode , & unsignedp ) ; return gen_rtx_REG ( mode , NDS32_GPR_RET_FIRST_REGNUM ) ;


<s> unsignedp = TYPE_UNSIGNED ( ret_type ) ; mode = promote_mode ( ret_type , mode , & unsignedp ) ;

return gen_rtx_REG ( mode , NDS32_GPR_RET_FIRST_REGNUM ) ;


<s> static bool nds32_function_value_regno_p ( const unsigned int regno ) { return ( regno == NDS32_GPR_RET_FIRST_REGNUM ) ;


<s> static bool nds32_function_value_regno_p ( const unsigned int regno ) {

return ( regno == NDS32_GPR_RET_FIRST_REGNUM ) ;


<s> int nds32_hard_regno_nregs ( int regno ATTRIBUTE_UNUSED , machine_mode mode ) {

return ( ( GET_MODE_SIZE ( mode ) + UNITS_PER_WORD - <NUM_LIT> ) / UNITS_PER_WORD ) ;


<s> else if ( from_reg == FRAME_POINTER_REGNUM && to_reg == HARD_FRAME_POINTER_REGNUM ) { offset = ( - <NUM_LIT> ) * ( cfun -> machine -> fp_size + cfun -> machine -> gp_size + cfun -> machine -> lp_size + cfun -> machine -> callee_saved_gpr_regs_size + cfun -> machine -> callee_saved_area_gpr_padding_bytes ) ; } else { gcc_unreachable ( ) ; } return offset ;


<s> void nds32_init_cumulative_args ( CUMULATIVE_ARGS * cum , tree fntype ATTRIBUTE_UNUSED , rtx libname ATTRIBUTE_UNUSED , tree fndecl ATTRIBUTE_UNUSED , int n_named_args ATTRIBUTE_UNUSED ) {


<s> struct machine_function * machine ; machine = ggc_cleared_alloc < machine_function > ( ) ; machine -> naked_p = <NUM_LIT> ; machine -> fp_as_gp_p = <NUM_LIT> ;


<s> struct machine_function * machine ; machine = ggc_cleared_alloc < machine_function > ( ) ; machine -> naked_p = <NUM_LIT> ; machine -> fp_as_gp_p = <NUM_LIT> ; return machine ;


<s> if ( nds32_address_register_rtx_p ( XEXP ( x , <NUM_LIT> ) , strict ) && nds32_legitimate_index_p ( mode , XEXP ( x , <NUM_LIT> ) , strict ) && CONST_INT_P ( XEXP ( x , <NUM_LIT> ) ) ) return true ; else if ( nds32_address_register_rtx_p ( XEXP ( x , <NUM_LIT> ) , strict ) && nds32_legitimate_index_p ( mode , XEXP ( x , <NUM_LIT> ) , strict ) && CONST_INT_P ( XEXP ( x , <NUM_LIT> ) ) ) return true ; } if ( GET_CODE ( x ) != REG && GET_CODE ( x ) != SYMBOL_REF && GET_CODE ( x ) != CONST ) return false ; } switch ( GET_CODE ( x ) ) { case REG : return nds32_address_register_rtx_p ( x , strict ) ; case SYMBOL_REF : if ( TARGET_CMODEL_LARGE && ( reload_completed || reload_in_progress || lra_in_progress ) ) return false ; if ( TARGET_CMODEL_MEDIUM && NDS32_SYMBOL_REF_RODATA_P ( x ) && ( reload_completed || reload_in_progress || lra_in_progress ) ) return false ; return true ; case CONST : if ( GET_CODE ( XEXP ( x , <NUM_LIT> ) ) == PLUS ) { rtx plus_op = XEXP ( x , <NUM_LIT> ) ; rtx op0 = XEXP ( plus_op , <NUM_LIT> ) ; rtx op1 = XEXP ( plus_op , <NUM_LIT> ) ; if ( GET_CODE ( op0 ) == SYMBOL_REF && CONST_INT_P ( op1 ) ) { if ( TARGET_CMODEL_LARGE && ( reload_completed || reload_in_progress || lra_in_progress ) ) return false ; if ( TARGET_CMODEL_MEDIUM && NDS32_SYMBOL_REF_RODATA_P ( op0 ) && ( reload_completed || reload_in_progress || lra_in_progress ) ) return false ; return true ; }


<s> return true ; } if ( GET_MODE_SIZE ( outer_mode ) == <NUM_LIT> && NDS32_SINGLE_WORD_ALIGN_P ( INTVAL ( index ) ) ) { if ( ! satisfies_constraint_Is17 ( gen_int_mode ( INTVAL ( index ) + <NUM_LIT> , SImode ) ) ) return false ; return true ; } return false ; case MULT : op0 = XEXP ( index , <NUM_LIT> ) ; op1 = XEXP ( index , <NUM_LIT> ) ; if ( REG_P ( op0 ) && CONST_INT_P ( op1 ) ) { int multiplier ; multiplier = INTVAL ( op1 ) ; if ( multiplier != <NUM_LIT> && multiplier != <NUM_LIT> && multiplier != <NUM_LIT> ) return false ; regno = REGNO ( op0 ) ; if ( strict ) return REGNO_OK_FOR_INDEX_P ( regno ) ; else return true ; } return false ; case ASHIFT : op0 = XEXP ( index , <NUM_LIT> ) ; op1 = XEXP ( index , <NUM_LIT> ) ; if ( REG_P ( op0 ) && CONST_INT_P ( op1 ) ) { int sv ; sv = INTVAL ( op1 ) ; if ( sv != <NUM_LIT> && sv != <NUM_LIT> && sv != <NUM_LIT> ) return false ; regno = REGNO ( op0 ) ; if ( strict ) return REGNO_OK_FOR_INDEX_P ( regno ) ; else return true ; } return false ;


<s> if ( ! satisfies_constraint_Is15 ( index ) ) return false ; return true ; } if ( GET_MODE_SIZE ( outer_mode ) == <NUM_LIT> && NDS32_HALF_WORD_ALIGN_P ( INTVAL ( index ) ) ) { if ( ! satisfies_constraint_Is16 ( index ) ) return false ; return true ; } if ( GET_MODE_SIZE ( outer_mode ) == <NUM_LIT> && NDS32_SINGLE_WORD_ALIGN_P ( INTVAL ( index ) ) ) { if ( ! satisfies_constraint_Is17 ( index ) ) return false ; return true ; } if ( GET_MODE_SIZE ( outer_mode ) == <NUM_LIT> && NDS32_SINGLE_WORD_ALIGN_P ( INTVAL ( index ) ) ) { if ( ! satisfies_constraint_Is17 ( gen_int_mode ( INTVAL ( index ) + <NUM_LIT> , SImode ) ) ) return false ; return true ; } return false ; case MULT : op0 = XEXP ( index , <NUM_LIT> ) ; op1 = XEXP ( index , <NUM_LIT> ) ; if ( REG_P ( op0 ) && CONST_INT_P ( op1 ) ) { int multiplier ; multiplier = INTVAL ( op1 ) ;

if ( multiplier != <NUM_LIT> && multiplier != <NUM_LIT> && multiplier != <NUM_LIT> ) return false ;


<s> return gen_rtx_REG ( mode , NDS32_GPR_RET_FIRST_REGNUM ) ;


<s> if ( GET_MODE_SIZE ( mode ) == <NUM_LIT> ) return satisfies_constraint_Iu05 ( imm ) ; if ( GET_MODE_SIZE ( mode ) == <NUM_LIT> ) return satisfies_constraint_Iu04 ( imm ) ;

if ( GET_MODE_SIZE ( mode ) == <NUM_LIT> ) return satisfies_constraint_Iu03 ( imm ) ;


<s> bool nds32_ls_333_p ( rtx rt , rtx ra , rtx imm , machine_mode mode ) { if ( REGNO_REG_CLASS ( REGNO ( rt ) ) == LOW_REGS && REGNO_REG_CLASS ( REGNO ( ra ) ) == LOW_REGS ) { if ( GET_MODE_SIZE ( mode ) == <NUM_LIT> ) return satisfies_constraint_Iu05 ( imm ) ;

if ( GET_MODE_SIZE ( mode ) == <NUM_LIT> ) return satisfies_constraint_Iu04 ( imm ) ;


<s> if ( TARGET_HARD_FLOAT ) return must_pass_in_stack_var_size_or_pad ( mode , type ) ; else return must_pass_in_stack_var_size ( mode , type ) ;


<s> static bool nds32_must_pass_in_stack ( machine_mode mode , const_tree type ) { if ( TARGET_HARD_FLOAT ) return must_pass_in_stack_var_size_or_pad ( mode , type ) ; else return must_pass_in_stack_var_size ( mode , type ) ;


<s> tree t ; if ( TREE_CODE ( func ) != FUNCTION_DECL ) abort ( ) ; t = lookup_attribute ( <STR_LIT> , DECL_ATTRIBUTES ( func ) ) ;


<s> static bool nds32_naked_function_p ( tree func ) { tree t ;

if ( TREE_CODE ( func ) != FUNCTION_DECL ) abort ( ) ;


<s> } if ( TARGET_ISA_V3 ) { } if ( TARGET_ISA_V3M ) { target_flags |= MASK_REDUCED_REGS ; target_flags &= ~ MASK_PERF_EXT ; } if ( TARGET_REDUCED_REGS ) { int r ;

for ( r = <NUM_LIT> ; r <= <NUM_LIT> ; r ++ ) fixed_regs [ r ] = call_used_regs [ r ] = <NUM_LIT> ;


<s> else if ( op_value < <NUM_LIT> || op_value >= ( ( int ) ARRAY_SIZE ( nds32_intrinsic_register_names ) + <NUM_LIT> ) ) { error ( <STR_LIT> ) ; } else { fprintf ( stream , <STR_LIT> , nds32_intrinsic_register_names [ op_value - <NUM_LIT> ] ) ; } return ; default : output_operand_lossage ( <STR_LIT> ) ; break ; } switch ( GET_CODE ( x ) ) { case LABEL_REF : case SYMBOL_REF :


<s> rtx op0 , op1 ; switch ( GET_CODE ( x ) ) { case SYMBOL_REF : case CONST : fputs ( <STR_LIT> , stream ) ; output_addr_const ( stream , x ) ; fputs ( <STR_LIT> , stream ) ; break ; case REG : if ( TARGET_REDUCED_REGS && REGNO ( x ) == STATIC_CHAIN_REGNUM ) sorry ( <STR_LIT> ) ; fprintf ( stream , <STR_LIT> , reg_names [ REGNO ( x ) ] ) ; break ; case PLUS : op0 = XEXP ( x , <NUM_LIT> ) ; op1 = XEXP ( x , <NUM_LIT> ) ; if ( TARGET_REDUCED_REGS && REG_P ( op0 ) && REGNO ( op0 ) == STATIC_CHAIN_REGNUM ) sorry ( <STR_LIT> ) ; if ( TARGET_REDUCED_REGS && REG_P ( op1 ) && REGNO ( op1 ) == STATIC_CHAIN_REGNUM ) sorry ( <STR_LIT> ) ; if ( REG_P ( op0 ) && CONST_INT_P ( op1 ) ) { fprintf ( stream , <STR_LIT> , reg_names [ REGNO ( op0 ) ] , ( int ) INTVAL ( op1 ) ) ; } else if ( REG_P ( op0 ) && REG_P ( op1 ) ) { fprintf ( stream , <STR_LIT> , reg_names [ REGNO ( op0 ) ] , reg_names [ REGNO ( op1 ) ] ) ; } else if ( GET_CODE ( op0 ) == MULT && REG_P ( op1 ) ) { int sv ; if ( INTVAL ( XEXP ( op0 , <NUM_LIT> ) ) == <NUM_LIT> ) sv = <NUM_LIT> ; else if ( INTVAL ( XEXP ( op0 , <NUM_LIT> ) ) == <NUM_LIT> ) sv = <NUM_LIT> ;


<s> static int nds32_register_move_cost ( machine_mode mode ATTRIBUTE_UNUSED , reg_class_t from , reg_class_t to ) { if ( from == HIGH_REGS || to == HIGH_REGS ) return <NUM_LIT> ;


<s> if ( optimize_size && hard_regno < <NUM_LIT> ) return <NUM_LIT> ; return <NUM_LIT> ;


<s> if ( regno >= <NUM_LIT> && regno <= <NUM_LIT> ) return LOW_REGS ; else if ( regno >= <NUM_LIT> && regno <= <NUM_LIT> ) return MIDDLE_REGS ; else if ( regno >= <NUM_LIT> && regno <= <NUM_LIT> ) return HIGH_REGS ; else if ( regno == <NUM_LIT> ) return R15_TA_REG ;


<s> rtx nds32_return_addr_rtx ( int count , rtx frameaddr ATTRIBUTE_UNUSED ) { if ( count != <NUM_LIT> ) return NULL_RTX ; return get_hard_reg_initial_val ( Pmode , LP_REGNUM ) ;


<s> rtx nds32_return_addr_rtx ( int count , rtx frameaddr ATTRIBUTE_UNUSED ) {

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


<s> static bool nds32_rtx_costs ( rtx x , int code , int outer_code , int opno , int * total , bool speed ) {

return nds32_rtx_costs_impl ( x , code , outer_code , opno , total , speed ) ;


<s> if ( TARGET_HARD_FLOAT ) return ; cum = get_cumulative_args ( ca ) ; total_args_regs = NDS32_MAX_GPR_REGS_FOR_ARGS + NDS32_GPR_ARG_FIRST_REGNUM ; num_of_used_regs = NDS32_AVAILABLE_REGNUM_FOR_GPR_ARG ( cum -> gpr_offset , mode , type ) + NDS32_NEED_N_REGS_FOR_ARG ( mode , type ) ; remaining_reg_count = total_args_regs - num_of_used_regs ; * pretend_args_size = remaining_reg_count * UNITS_PER_WORD ; return ;


<s> total_args_regs = NDS32_MAX_GPR_REGS_FOR_ARGS + NDS32_GPR_ARG_FIRST_REGNUM ; num_of_used_regs = NDS32_AVAILABLE_REGNUM_FOR_GPR_ARG ( cum -> gpr_offset , mode , type ) + NDS32_NEED_N_REGS_FOR_ARG ( mode , type ) ; remaining_reg_count = total_args_regs - num_of_used_regs ; * pretend_args_size = remaining_reg_count * UNITS_PER_WORD ;


<s> if ( optimize_size ) return <NUM_LIT> ; insn = next_active_insn ( label ) ; if ( insn == <NUM_LIT> ) return <NUM_LIT> ; else if ( ( get_attr_length ( insn ) % <NUM_LIT> ) == <NUM_LIT> ) return <NUM_LIT> ; else return <NUM_LIT> ;


<s> rtx_insn * insn ; if ( optimize_size ) return <NUM_LIT> ; insn = next_active_insn ( label ) ; if ( insn == <NUM_LIT> ) return <NUM_LIT> ; else if ( ( get_attr_length ( insn ) % <NUM_LIT> ) == <NUM_LIT> ) return <NUM_LIT> ;


<s> int extra_count ; int num_use_regs ; int par_index ; int offset ; int save_fp , save_gp , save_lp ; rtx reg ; rtx mem ; rtx pop_rtx ; rtx adjust_sp_rtx ; rtx parallel_insn ; rtx dwarf = NULL_RTX ; save_fp = INTVAL ( En4 ) & <NUM_LIT> ; save_gp = INTVAL ( En4 ) & <NUM_LIT> ; save_lp = INTVAL ( En4 ) & <NUM_LIT> ; extra_count = <NUM_LIT> ; if ( save_fp ) extra_count ++ ; if ( save_gp ) extra_count ++ ; if ( save_lp ) extra_count ++ ; if ( REGNO ( Rb ) == SP_REGNUM && REGNO ( Re ) == SP_REGNUM ) num_use_regs = extra_count ; else num_use_regs = REGNO ( Re ) - REGNO ( Rb ) + <NUM_LIT> + extra_count ; parallel_insn = gen_rtx_PARALLEL ( VOIDmode , rtvec_alloc ( num_use_regs + <NUM_LIT> ) ) ; par_index = <NUM_LIT> ; offset = <NUM_LIT> ; for ( regno = REGNO ( Rb ) ; regno <= ( int ) REGNO ( Re ) ; regno ++ ) { if ( regno == SP_REGNUM ) break ; reg = gen_rtx_REG ( SImode , regno ) ; mem = gen_frame_mem ( SImode , plus_constant ( Pmode , stack_pointer_rtx , offset ) ) ; pop_rtx = gen_rtx_SET ( reg , mem ) ; XVECEXP ( parallel_insn , <NUM_LIT> , par_index ) = pop_rtx ; RTX_FRAME_RELATED_P ( pop_rtx ) = <NUM_LIT> ; offset = offset + <NUM_LIT> ; par_index ++ ; dwarf = alloc_reg_note ( REG_CFA_RESTORE , reg , dwarf ) ; } if ( save_fp ) { reg = gen_rtx_REG ( SImode , FP_REGNUM ) ; mem = gen_frame_mem ( SImode , plus_constant ( Pmode , stack_pointer_rtx , offset ) ) ; pop_rtx = gen_rtx_SET ( reg , mem ) ; XVECEXP ( parallel_insn , <NUM_LIT> , par_index ) = pop_rtx ; RTX_FRAME_RELATED_P ( pop_rtx ) = <NUM_LIT> ; offset = offset + <NUM_LIT> ; par_index ++ ;


<s> rtx adjust_sp_rtx ; rtx parallel_insn ; rtx dwarf ; save_fp = INTVAL ( En4 ) & <NUM_LIT> ; save_gp = INTVAL ( En4 ) & <NUM_LIT> ; save_lp = INTVAL ( En4 ) & <NUM_LIT> ; extra_count = <NUM_LIT> ; if ( save_fp ) extra_count ++ ; if ( save_gp ) extra_count ++ ; if ( save_lp ) extra_count ++ ; if ( REGNO ( Rb ) == SP_REGNUM && REGNO ( Re ) == SP_REGNUM ) num_use_regs = extra_count ; else num_use_regs = REGNO ( Re ) - REGNO ( Rb ) + <NUM_LIT> + extra_count ; parallel_insn = gen_rtx_PARALLEL ( VOIDmode , rtvec_alloc ( num_use_regs + <NUM_LIT> ) ) ; par_index = <NUM_LIT> ; offset = - ( num_use_regs * <NUM_LIT> ) ; for ( regno = REGNO ( Rb ) ; regno <= ( int ) REGNO ( Re ) ; regno ++ ) { if ( regno == SP_REGNUM ) break ; reg = gen_rtx_REG ( SImode , regno ) ; mem = gen_frame_mem ( SImode , plus_constant ( Pmode , stack_pointer_rtx , offset ) ) ; push_rtx = gen_rtx_SET ( mem , reg ) ; XVECEXP ( parallel_insn , <NUM_LIT> , par_index ) = push_rtx ; RTX_FRAME_RELATED_P ( push_rtx ) = <NUM_LIT> ; offset = offset + <NUM_LIT> ; par_index ++ ; } if ( save_fp ) { reg = gen_rtx_REG ( SImode , FP_REGNUM ) ; mem = gen_frame_mem ( SImode , plus_constant ( Pmode , stack_pointer_rtx , offset ) ) ; push_rtx = gen_rtx_SET ( mem , reg ) ; XVECEXP ( parallel_insn , <NUM_LIT> , par_index ) = push_rtx ; RTX_FRAME_RELATED_P ( push_rtx ) = <NUM_LIT> ; offset = offset + <NUM_LIT> ; par_index ++ ; } if ( save_gp ) { reg = gen_rtx_REG ( SImode , GP_REGNUM ) ; mem = gen_frame_mem ( SImode , plus_constant ( Pmode , stack_pointer_rtx , offset ) ) ; push_rtx = gen_rtx_SET ( mem , reg ) ; XVECEXP ( parallel_insn , <NUM_LIT> , par_index ) = push_rtx ; RTX_FRAME_RELATED_P ( push_rtx ) = <NUM_LIT> ; offset = offset + <NUM_LIT> ; par_index ++ ; }


<s> reg = gen_rtx_REG ( SImode , FP_REGNUM ) ; mem = gen_frame_mem ( SImode , plus_constant ( Pmode , stack_pointer_rtx , offset ) ) ; push_rtx = gen_rtx_SET ( mem , reg ) ; XVECEXP ( parallel_insn , <NUM_LIT> , par_index ) = push_rtx ; RTX_FRAME_RELATED_P ( push_rtx ) = <NUM_LIT> ; offset = offset + <NUM_LIT> ; par_index ++ ; reg = gen_rtx_REG ( SImode , GP_REGNUM ) ; mem = gen_frame_mem ( SImode , plus_constant ( Pmode , stack_pointer_rtx , offset ) ) ; push_rtx = gen_rtx_SET ( mem , reg ) ; XVECEXP ( parallel_insn , <NUM_LIT> , par_index ) = push_rtx ; RTX_FRAME_RELATED_P ( push_rtx ) = <NUM_LIT> ; offset = offset + <NUM_LIT> ; par_index ++ ; reg = gen_rtx_REG ( SImode , LP_REGNUM ) ; mem = gen_frame_mem ( SImode , plus_constant ( Pmode , stack_pointer_rtx , offset ) ) ; push_rtx = gen_rtx_SET ( mem , reg ) ; XVECEXP ( parallel_insn , <NUM_LIT> , par_index ) = push_rtx ; RTX_FRAME_RELATED_P ( push_rtx ) = <NUM_LIT> ; offset = offset + <NUM_LIT> ; par_index ++ ;

offset = - ( num_use_regs * <NUM_LIT> ) ;


<s> case SYMBOL_REF : output_addr_const ( stream , x ) ; break ; case REG : if ( TARGET_REDUCED_REGS && REGNO ( x ) == STATIC_CHAIN_REGNUM ) sorry ( <STR_LIT> ) ; fputs ( reg_names [ REGNO ( x ) ] , stream ) ; break ; case MEM : output_address ( GET_MODE ( x ) , XEXP ( x , <NUM_LIT> ) ) ; break ; case CODE_LABEL : case CONST_INT :


<s> target_flags &= ~ MASK_V3PUSH ; } if ( TARGET_ISA_V3 ) { } if ( TARGET_ISA_V3M ) { target_flags |= MASK_REDUCED_REGS ; target_flags &= ~ MASK_PERF_EXT ; } if ( TARGET_REDUCED_REGS ) { int r ; for ( r = <NUM_LIT> ; r <= <NUM_LIT> ; r ++ ) fixed_regs [ r ] = call_used_regs [ r ] = <NUM_LIT> ; for ( r = <NUM_LIT> ; r <= <NUM_LIT> ; r ++ ) fixed_regs [ r ] = call_used_regs [ r ] = <NUM_LIT> ; } if ( ! TARGET_16_BIT ) {


<s> if ( optimize_size ) return <NUM_LIT> ; insn = next_active_insn ( label ) ; if ( insn == <NUM_LIT> ) return <NUM_LIT> ; else if ( ( get_attr_length ( insn ) % <NUM_LIT> ) == <NUM_LIT> ) return <NUM_LIT> ;


<s> insn = next_active_insn ( label ) ; if ( insn == <NUM_LIT> ) return <NUM_LIT> ; else if ( ( get_attr_length ( insn ) % <NUM_LIT> ) == <NUM_LIT> ) return <NUM_LIT> ;


<s> } else { fprintf ( file , <STR_LIT> HOST_WIDE_INT_PRINT_DEC <STR_LIT> , delta ) ; fprintf ( file , <STR_LIT> HOST_WIDE_INT_PRINT_DEC <STR_LIT> , delta ) ; fprintf ( file , <STR_LIT> , this_regno , this_regno ) ; } } fprintf ( file , <STR_LIT> ) ; assemble_name ( file , XSTR ( XEXP ( DECL_RTL ( function ) , <NUM_LIT> ) , <NUM_LIT> ) ) ; fprintf ( file , <STR_LIT> ) ;


<s> int nds32_can_use_return_insn ( void ) { int sp_adjust ; if ( ! reload_completed ) return <NUM_LIT> ; sp_adjust = cfun -> machine -> local_size + cfun -> machine -> out_args_size + cfun -> machine -> callee_saved_area_gpr_padding_bytes + cfun -> machine -> callee_saved_fpr_regs_size ; if ( ! cfun -> machine -> fp_as_gp_p && satisfies_constraint_Iu08 ( GEN_INT ( sp_adjust ) ) && NDS32_DOUBLE_WORD_ALIGN_P ( sp_adjust ) && ! cfun -> calls_alloca && NDS32_V3PUSH_AVAILABLE_P && ! ( TARGET_HARD_FLOAT && ( cfun -> machine -> callee_saved_first_fpr_regno != SP_REGNUM ) ) ) return <NUM_LIT> ;

return ( cfun -> machine -> naked_p && ( cfun -> machine -> va_args_size == <NUM_LIT> ) ) ;


<s> else call_used_regs [ regno ] = <NUM_LIT> ; } } else if ( TARGET_FPU_SINGLE || TARGET_FPU_DOUBLE ) { for ( regno = NDS32_FIRST_FPR_REGNUM ; regno <= NDS32_LAST_FPR_REGNUM ; regno ++ ) fixed_regs [ regno ] = <NUM_LIT> ;


<s> dwarf_high = gen_rtx_REG ( word_mode , regno ) ; dwarf_low = gen_rtx_REG ( word_mode , regno + <NUM_LIT> ) ; return gen_rtx_PARALLEL ( VOIDmode , gen_rtvec ( <NUM_LIT> , dwarf_low , dwarf_high ) ) ; } else if ( mode == DCmode ) { rtx dwarf_high_re = gen_rtx_REG ( word_mode , regno ) ; rtx dwarf_low_re = gen_rtx_REG ( word_mode , regno + <NUM_LIT> ) ; rtx dwarf_high_im = gen_rtx_REG ( word_mode , regno ) ; rtx dwarf_low_im = gen_rtx_REG ( word_mode , regno + <NUM_LIT> ) ; return gen_rtx_PARALLEL ( VOIDmode , gen_rtvec ( <NUM_LIT> , dwarf_low_re , dwarf_high_re , dwarf_high_im , dwarf_low_im ) ) ; } else if ( mode == SFmode || mode == SImode ) { dwarf_single = gen_rtx_REG ( word_mode , regno ) ; return gen_rtx_PARALLEL ( VOIDmode , gen_rtvec ( <NUM_LIT> , dwarf_single ) ) ;


<s> static rtx nds32_dwarf_register_span ( rtx reg ) { rtx dwarf_high , dwarf_low ; rtx dwarf_single ; machine_mode mode ; int regno ; mode = GET_MODE ( reg ) ; regno = REGNO ( reg ) ; if ( regno >= NDS32_FIRST_FPR_REGNUM && regno <= NDS32_LAST_FPR_REGNUM ) { if ( mode == DFmode || mode == SCmode ) { dwarf_high = gen_rtx_REG ( word_mode , regno ) ; dwarf_low = gen_rtx_REG ( word_mode , regno + <NUM_LIT> ) ; return gen_rtx_PARALLEL ( VOIDmode , gen_rtvec ( <NUM_LIT> , dwarf_low , dwarf_high ) ) ; } else if ( mode == DCmode ) { rtx dwarf_high_re = gen_rtx_REG ( word_mode , regno ) ; rtx dwarf_low_re = gen_rtx_REG ( word_mode , regno + <NUM_LIT> ) ; rtx dwarf_high_im = gen_rtx_REG ( word_mode , regno ) ; rtx dwarf_low_im = gen_rtx_REG ( word_mode , regno + <NUM_LIT> ) ; return gen_rtx_PARALLEL ( VOIDmode , gen_rtvec ( <NUM_LIT> , dwarf_low_re , dwarf_high_re , dwarf_high_im , dwarf_low_im ) ) ; } else if ( mode == SFmode || mode == SImode ) { dwarf_single = gen_rtx_REG ( word_mode , regno ) ; return gen_rtx_PARALLEL ( VOIDmode , gen_rtvec ( <NUM_LIT> , dwarf_single ) ) ; }


<s> int gpr_padding = cfun -> machine -> callee_saved_area_gpr_padding_bytes ; sp_adjust = cfun -> machine -> fp_size + cfun -> machine -> gp_size + cfun -> machine -> lp_size + cfun -> machine -> callee_saved_gpr_regs_size + cfun -> machine -> eh_return_data_regs_size + cfun -> machine -> callee_saved_area_gpr_padding_bytes + cfun -> machine -> callee_saved_fpr_regs_size ; nds32_emit_adjust_frame ( stack_pointer_rtx , hard_frame_pointer_rtx , - <NUM_LIT> * sp_adjust ) ; nds32_emit_pop_fpr_callee_saved ( gpr_padding ) ; } else { sp_adjust = cfun -> machine -> fp_size + cfun -> machine -> gp_size + cfun -> machine -> lp_size + cfun -> machine -> callee_saved_gpr_regs_size + cfun -> machine -> eh_return_data_regs_size ; nds32_emit_adjust_frame ( stack_pointer_rtx , hard_frame_pointer_rtx , - <NUM_LIT> * sp_adjust ) ; } } else { if ( cfun -> machine -> callee_saved_first_fpr_regno != SP_REGNUM ) { int gpr_padding = cfun -> machine -> callee_saved_area_gpr_padding_bytes ; sp_adjust = cfun -> machine -> local_size + cfun -> machine -> out_args_size ; nds32_emit_adjust_frame ( stack_pointer_rtx , stack_pointer_rtx , sp_adjust ) ;


<s> if ( cfun -> machine -> va_args_size != <NUM_LIT> ) { sp_adjust = cfun -> machine -> va_args_size + cfun -> machine -> va_args_area_padding_bytes ; nds32_emit_adjust_frame ( stack_pointer_rtx , stack_pointer_rtx , sp_adjust ) ; } if ( ! sibcall_p ) emit_jump_insn ( gen_return_internal ( ) ) ; return ; } if ( frame_pointer_needed ) { if ( cfun -> machine -> callee_saved_first_fpr_regno != SP_REGNUM ) { int gpr_padding = cfun -> machine -> callee_saved_area_gpr_padding_bytes ; sp_adjust = cfun -> machine -> fp_size + cfun -> machine -> gp_size + cfun -> machine -> lp_size + cfun -> machine -> callee_saved_gpr_regs_size + cfun -> machine -> eh_return_data_regs_size + cfun -> machine -> callee_saved_area_gpr_padding_bytes + cfun -> machine -> callee_saved_fpr_regs_size ; nds32_emit_adjust_frame ( stack_pointer_rtx , hard_frame_pointer_rtx , - <NUM_LIT> * sp_adjust ) ; nds32_emit_pop_fpr_callee_saved ( gpr_padding ) ; } else { sp_adjust = cfun -> machine -> fp_size + cfun -> machine -> gp_size + cfun -> machine -> lp_size + cfun -> machine -> callee_saved_gpr_regs_size + cfun -> machine -> eh_return_data_regs_size ; nds32_emit_adjust_frame ( stack_pointer_rtx , hard_frame_pointer_rtx , - <NUM_LIT> * sp_adjust ) ; } } else {


<s> sp_adjust = cfun -> machine -> fp_size + cfun -> machine -> gp_size + cfun -> machine -> lp_size + cfun -> machine -> callee_saved_gpr_regs_size ; if ( cfun -> machine -> callee_saved_first_fpr_regno != SP_REGNUM ) { sp_adjust = sp_adjust + cfun -> machine -> callee_saved_area_gpr_padding_bytes + cfun -> machine -> callee_saved_fpr_regs_size ; nds32_emit_adjust_frame ( stack_pointer_rtx , hard_frame_pointer_rtx , - <NUM_LIT> * sp_adjust ) ; nds32_emit_v3pop_fpr_callee_saved ( <NUM_LIT> ) ; } else { nds32_emit_adjust_frame ( stack_pointer_rtx , hard_frame_pointer_rtx , - <NUM_LIT> * sp_adjust ) ; } } else { sp_adjust = cfun -> machine -> local_size + cfun -> machine -> out_args_size + cfun -> machine -> callee_saved_area_gpr_padding_bytes + cfun -> machine -> callee_saved_fpr_regs_size ; if ( cfun -> machine -> callee_saved_first_fpr_regno != SP_REGNUM ) { sp_adjust = sp_adjust - cfun -> machine -> callee_saved_area_gpr_padding_bytes - cfun -> machine -> callee_saved_fpr_regs_size ; nds32_emit_adjust_frame ( stack_pointer_rtx , stack_pointer_rtx , sp_adjust ) ; nds32_emit_v3pop_fpr_callee_saved ( <NUM_LIT> ) ; } else { nds32_emit_adjust_frame ( stack_pointer_rtx , stack_pointer_rtx , sp_adjust ) ; } } if ( cfun -> machine -> callee_saved_first_fpr_regno != SP_REGNUM ) {

int fpr_space = cfun -> machine -> callee_saved_area_gpr_padding_bytes + cfun -> machine -> callee_saved_fpr_regs_size ;


<s> nds32_emit_adjust_frame ( stack_pointer_rtx , hard_frame_pointer_rtx , - <NUM_LIT> * sp_adjust ) ; nds32_emit_v3pop_fpr_callee_saved ( <NUM_LIT> ) ; } else { nds32_emit_adjust_frame ( stack_pointer_rtx , hard_frame_pointer_rtx , - <NUM_LIT> * sp_adjust ) ; } } else { sp_adjust = cfun -> machine -> local_size + cfun -> machine -> out_args_size + cfun -> machine -> callee_saved_area_gpr_padding_bytes + cfun -> machine -> callee_saved_fpr_regs_size ; if ( cfun -> machine -> callee_saved_first_fpr_regno != SP_REGNUM ) { sp_adjust = sp_adjust - cfun -> machine -> callee_saved_area_gpr_padding_bytes - cfun -> machine -> callee_saved_fpr_regs_size ; nds32_emit_adjust_frame ( stack_pointer_rtx , stack_pointer_rtx , sp_adjust ) ; nds32_emit_v3pop_fpr_callee_saved ( <NUM_LIT> ) ; } else { nds32_emit_adjust_frame ( stack_pointer_rtx , stack_pointer_rtx , sp_adjust ) ; } } if ( cfun -> machine -> callee_saved_first_fpr_regno != SP_REGNUM ) { int fpr_space = cfun -> machine -> callee_saved_area_gpr_padding_bytes + cfun -> machine -> callee_saved_fpr_regs_size ; nds32_emit_stack_v3pop ( Rb , Re , fpr_space ) ; } else {

nds32_emit_stack_v3pop ( Rb , Re , <NUM_LIT> ) ;


<s> } if ( frame_pointer_needed ) { fp_adjust = cfun -> machine -> fp_size + cfun -> machine -> gp_size + cfun -> machine -> lp_size + cfun -> machine -> callee_saved_gpr_regs_size + cfun -> machine -> eh_return_data_regs_size ; nds32_emit_adjust_frame ( hard_frame_pointer_rtx , stack_pointer_rtx , fp_adjust ) ; } if ( cfun -> machine -> callee_saved_first_fpr_regno != SP_REGNUM ) { int fpr_offset = cfun -> machine -> local_size + cfun -> machine -> out_args_size + cfun -> machine -> callee_saved_fpr_regs_size ; if ( ! satisfies_constraint_Is14 ( GEN_INT ( fpr_offset ) ) ) { int fpr_space = cfun -> machine -> callee_saved_area_gpr_padding_bytes + cfun -> machine -> callee_saved_fpr_regs_size ; nds32_emit_adjust_frame ( stack_pointer_rtx , stack_pointer_rtx , - <NUM_LIT> * fpr_space ) ; nds32_emit_push_fpr_callee_saved ( <NUM_LIT> ) ; sp_adjust = cfun -> machine -> local_size + cfun -> machine -> out_args_size ; nds32_emit_adjust_frame ( stack_pointer_rtx , stack_pointer_rtx , - <NUM_LIT> * sp_adjust ) ; } else { sp_adjust = cfun -> machine -> local_size + cfun -> machine -> out_args_size + cfun -> machine -> callee_saved_area_gpr_padding_bytes + cfun -> machine -> callee_saved_fpr_regs_size ; nds32_emit_adjust_frame ( stack_pointer_rtx , stack_pointer_rtx , - <NUM_LIT> * sp_adjust ) ; int fpr_position = cfun -> machine -> out_args_size + cfun -> machine -> local_size ; nds32_emit_push_fpr_callee_saved ( fpr_position ) ; } }


<s> unsigned int regno ; CUMULATIVE_ARGS * cum = get_cumulative_args ( ca ) ; if ( mode == VOIDmode ) return NULL_RTX ; if ( ! named ) { if ( TARGET_HARD_FLOAT ) return NULL_RTX ; if ( NDS32_ARG_PARTIAL_IN_GPR_REG_P ( cum -> gpr_offset , mode , type ) ) { regno = NDS32_AVAILABLE_REGNUM_FOR_GPR_ARG ( cum -> gpr_offset , mode , type ) ; return gen_rtx_REG ( mode , regno ) ; } return NULL_RTX ; } if ( TARGET_HARD_FLOAT ) { if ( GET_MODE_CLASS ( mode ) == MODE_FLOAT && NDS32_ARG_ENTIRE_IN_FPR_REG_P ( cum -> fpr_offset , mode , type ) ) { regno = NDS32_AVAILABLE_REGNUM_FOR_FPR_ARG ( cum -> fpr_offset , mode , type ) ; return gen_rtx_REG ( mode , regno ) ; } else if ( GET_MODE_CLASS ( mode ) != MODE_FLOAT && NDS32_ARG_ENTIRE_IN_GPR_REG_P ( cum -> gpr_offset , mode , type ) ) {


<s> } else if ( GET_MODE_CLASS ( mode ) != MODE_FLOAT && NDS32_ARG_ENTIRE_IN_GPR_REG_P ( cum -> gpr_offset , mode , type ) ) { regno = NDS32_AVAILABLE_REGNUM_FOR_GPR_ARG ( cum -> gpr_offset , mode , type ) ; return gen_rtx_REG ( mode , regno ) ; } } else { if ( NDS32_ARG_PARTIAL_IN_GPR_REG_P ( cum -> gpr_offset , mode , type ) ) { regno = NDS32_AVAILABLE_REGNUM_FOR_GPR_ARG ( cum -> gpr_offset , mode , type ) ; return gen_rtx_REG ( mode , regno ) ; }


<s> cum -> fpr_offset = NDS32_AVAILABLE_REGNUM_FOR_FPR_ARG ( cum -> fpr_offset , mode , type ) - NDS32_FPR_ARG_FIRST_REGNUM + NDS32_NEED_N_REGS_FOR_ARG ( mode , type ) ; } else { cum -> gpr_offset = NDS32_AVAILABLE_REGNUM_FOR_GPR_ARG ( cum -> gpr_offset , mode , type ) - NDS32_GPR_ARG_FIRST_REGNUM + NDS32_NEED_N_REGS_FOR_ARG ( mode , type ) ; } }


<s> if ( TARGET_HARD_FLOAT && GET_MODE_CLASS ( mode ) == MODE_FLOAT ) { cum -> fpr_offset = NDS32_AVAILABLE_REGNUM_FOR_FPR_ARG ( cum -> fpr_offset , mode , type ) - NDS32_FPR_ARG_FIRST_REGNUM + NDS32_NEED_N_REGS_FOR_ARG ( mode , type ) ; } else { cum -> gpr_offset = NDS32_AVAILABLE_REGNUM_FOR_GPR_ARG ( cum -> gpr_offset , mode , type ) - NDS32_GPR_ARG_FIRST_REGNUM + NDS32_NEED_N_REGS_FOR_ARG ( mode , type ) ; } } else { if ( ! TARGET_HARD_FLOAT ) {


<s> static bool nds32_hard_regno_mode_ok ( unsigned int regno , machine_mode mode ) { if ( regno > FIRST_PSEUDO_REGISTER ) return true ; if ( ( TARGET_FPU_SINGLE || TARGET_FPU_DOUBLE ) && NDS32_IS_FPR_REGNUM ( regno ) ) { if ( NDS32_IS_EXT_FPR_REGNUM ( regno ) ) return ( NDS32_FPR_REGNO_OK_FOR_DOUBLE ( regno ) && ( mode == DFmode ) ) ; else if ( mode == SFmode || mode == SImode ) return NDS32_FPR_REGNO_OK_FOR_SINGLE ( regno ) ; else if ( mode == DFmode ) return NDS32_FPR_REGNO_OK_FOR_DOUBLE ( regno ) ; return false ; }

if ( regno <= NDS32_LAST_GPR_REGNUM ) return ( targetm . hard_regno_nregs ( regno , mode ) == <NUM_LIT> || ! ( ( regno ) & <NUM_LIT> ) ) ;


<s> if ( regno > FIRST_PSEUDO_REGISTER ) return true ; if ( ( TARGET_FPU_SINGLE || TARGET_FPU_DOUBLE ) && NDS32_IS_FPR_REGNUM ( regno ) ) { if ( NDS32_IS_EXT_FPR_REGNUM ( regno ) ) return ( NDS32_FPR_REGNO_OK_FOR_DOUBLE ( regno ) && ( mode == DFmode ) ) ; else if ( mode == SFmode || mode == SImode ) return NDS32_FPR_REGNO_OK_FOR_SINGLE ( regno ) ; else if ( mode == DFmode ) return NDS32_FPR_REGNO_OK_FOR_DOUBLE ( regno ) ; return false ; }


<s> machine -> use_eh_return_p = <NUM_LIT> ; machine -> naked_p = <NUM_LIT> ; machine -> fp_as_gp_p = <NUM_LIT> ; machine -> strict_aligned_p = <NUM_LIT> ; return machine ;


<s> } } else if ( reset ) { tree id_list ; tree id ; tree nmi , warm ; unsigned int lower_bound ; unsigned int upper_bound ; id_list = TREE_VALUE ( reset ) ; id = TREE_VALUE ( id_list ) ; lower_bound = <NUM_LIT> ; upper_bound = <NUM_LIT> ; if ( TREE_CODE ( id ) != INTEGER_CST || wi :: ltu_p ( wi :: to_wide ( id ) , lower_bound ) || wi :: gtu_p ( wi :: to_wide ( id ) , upper_bound ) ) error ( <STR_LIT> ) ; nmi = lookup_attribute ( <STR_LIT> , func_attrs ) ; warm = lookup_attribute ( <STR_LIT> , func_attrs ) ; if ( nmi != NULL_TREE ) { tree nmi_func_list ; tree nmi_func ;


<s> lower_bound = <NUM_LIT> ; upper_bound = <NUM_LIT> ; if ( TREE_CODE ( id ) != INTEGER_CST || wi :: ltu_p ( wi :: to_wide ( id ) , lower_bound ) || wi :: gtu_p ( wi :: to_wide ( id ) , upper_bound ) ) error ( <STR_LIT> ) ; nmi = lookup_attribute ( <STR_LIT> , func_attrs ) ; warm = lookup_attribute ( <STR_LIT> , func_attrs ) ; if ( nmi != NULL_TREE ) { tree nmi_func_list ; tree nmi_func ; nmi_func_list = TREE_VALUE ( nmi ) ; nmi_func = TREE_VALUE ( nmi_func_list ) ; if ( TREE_CODE ( nmi_func ) != IDENTIFIER_NODE ) error ( <STR_LIT> ) ; } if ( warm != NULL_TREE ) { tree warm_func_list ; tree warm_func ; warm_func_list = TREE_VALUE ( warm ) ; warm_func = TREE_VALUE ( warm_func_list ) ; if ( TREE_CODE ( warm_func ) != IDENTIFIER_NODE ) error ( <STR_LIT> ) ; } } else { return ;


<s> clobbers . safe_push ( gen_rtx_REG ( SImode , TA_REGNUM ) ) ; SET_HARD_REG_BIT ( clobbered_regs , TA_REGNUM ) ; return NULL ;


<s> case 'e' : gcc_assert ( MEM_P ( x ) && GET_CODE ( XEXP ( x , <NUM_LIT> ) ) == PLUS && GET_CODE ( XEXP ( XEXP ( x , <NUM_LIT> ) , <NUM_LIT> ) ) == CONST_INT ) ; fprintf ( stream , HOST_WIDE_INT_PRINT_DEC , INTVAL ( XEXP ( XEXP ( x , <NUM_LIT> ) , <NUM_LIT> ) ) ) ; return ; case 'B' : gcc_assert ( CONST_INT_P ( x ) ) ; one_position = exact_log2 ( UINTVAL ( x ) & GET_MODE_MASK ( SImode ) ) ; gcc_assert ( one_position != - <NUM_LIT> ) ; fprintf ( stream , HOST_WIDE_INT_PRINT_DEC , one_position ) ; return ; case 'L' : gcc_assert ( REG_P ( x ) ) ; pick_lsb_p = true ; break ; case 'H' : gcc_assert ( REG_P ( x ) ) ; pick_msb_p = true ; break ; case 'V' : gcc_assert ( CONST_INT_P ( x ) ) ; op_value = INTVAL ( x ) ; if ( op_value < <NUM_LIT> && op_value >= <NUM_LIT> ) { fprintf ( stream , HOST_WIDE_INT_PRINT_DEC , op_value ) ; } else if ( op_value < <NUM_LIT> || op_value >= ( ( int ) ARRAY_SIZE ( nds32_intrinsic_register_names ) + <NUM_LIT> ) ) { error ( <STR_LIT> ) ; } else { fprintf ( stream , <STR_LIT> , nds32_intrinsic_register_names [ op_value - <NUM_LIT> ] ) ; } return ; case 'R' : if ( op_value < <NUM_LIT> || op_value > <NUM_LIT> ) error ( <STR_LIT> ) ; fprintf ( stream , <STR_LIT> , nds32_cctl_names [ op_value ] ) ; return ; case 'T' : if ( op_value < <NUM_LIT> || op_value > <NUM_LIT> ) error ( <STR_LIT> ) ; fprintf ( stream , <STR_LIT> , nds32_cctl_names [ op_value + <NUM_LIT> ] ) ;


<s> output_addr_const ( stream , x ) ; fputs ( <STR_LIT> , stream ) ; break ; case REG : if ( TARGET_REDUCED_REGS && REGNO ( x ) == STATIC_CHAIN_REGNUM ) sorry ( <STR_LIT> ) ; fprintf ( stream , <STR_LIT> , reg_names [ REGNO ( x ) ] ) ; break ; case PLUS : op0 = XEXP ( x , <NUM_LIT> ) ; op1 = XEXP ( x , <NUM_LIT> ) ; if ( TARGET_REDUCED_REGS && REG_P ( op0 ) && REGNO ( op0 ) == STATIC_CHAIN_REGNUM ) sorry ( <STR_LIT> ) ; if ( TARGET_REDUCED_REGS && REG_P ( op1 ) && REGNO ( op1 ) == STATIC_CHAIN_REGNUM ) sorry ( <STR_LIT> ) ; if ( REG_P ( op0 ) && CONST_INT_P ( op1 ) ) { fprintf ( stream , <STR_LIT> HOST_WIDE_INT_PRINT_DEC <STR_LIT> , reg_names [ REGNO ( op0 ) ] , INTVAL ( op1 ) ) ; } else if ( REG_P ( op0 ) && REG_P ( op1 ) ) { fprintf ( stream , <STR_LIT> , reg_names [ REGNO ( op0 ) ] , reg_names [ REGNO ( op1 ) ] ) ; } else if ( GET_CODE ( op0 ) == MULT && REG_P ( op1 ) ) { int sv ; if ( INTVAL ( XEXP ( op0 , <NUM_LIT> ) ) == <NUM_LIT> ) sv = <NUM_LIT> ; else if ( INTVAL ( XEXP ( op0 , <NUM_LIT> ) ) == <NUM_LIT> ) sv = <NUM_LIT> ; else if ( INTVAL ( XEXP ( op0 , <NUM_LIT> ) ) == <NUM_LIT> ) sv = <NUM_LIT> ; else if ( INTVAL ( XEXP ( op0 , <NUM_LIT> ) ) == <NUM_LIT> ) sv = <NUM_LIT> ; else gcc_unreachable ( ) ; fprintf ( stream , <STR_LIT> , reg_names [ REGNO ( op1 ) ] , reg_names [ REGNO ( XEXP ( op0 , <NUM_LIT> ) ) ] , sv ) ; } else { debug_rtx ( x ) ; gcc_unreachable ( ) ; } break ; case POST_MODIFY : op0 = XEXP ( XEXP ( x , <NUM_LIT> ) , <NUM_LIT> ) ; op1 = XEXP ( XEXP ( x , <NUM_LIT> ) , <NUM_LIT> ) ; if ( TARGET_REDUCED_REGS && REG_P ( op0 ) && REGNO ( op0 ) == STATIC_CHAIN_REGNUM ) sorry ( <STR_LIT> ) ;


<s> if ( ( from == FP_REGS && to != FP_REGS ) || ( from != FP_REGS && to == FP_REGS ) ) return <NUM_LIT> ; else if ( from == HIGH_REGS || to == HIGH_REGS ) return optimize_size ? <NUM_LIT> : <NUM_LIT> ;


<s> static void nds32_register_passes ( void ) { nds32_register_pass ( make_pass_nds32_relax_opt , PASS_POS_INSERT_AFTER , <STR_LIT> ) ;


<s> if ( optimize == <NUM_LIT> || ! flag_schedule_insns_after_reload ) return ! satisfies_constraint_Da ( mem ) || MEM_VOLATILE_P ( mem ) ; if ( current_pass == NULL ) return false ; const char * pass_name = current_pass -> name ;

if ( pass_name && ( ( strcmp ( pass_name , <STR_LIT> ) == <NUM_LIT> ) || ( strcmp ( pass_name , <STR_LIT> ) == <NUM_LIT> ) ) ) return ! satisfies_constraint_Da ( mem ) || MEM_VOLATILE_P ( mem ) ;


<s> const char * pass_name = current_pass -> name ; if ( pass_name && ( ( strcmp ( pass_name , <STR_LIT> ) == <NUM_LIT> ) || ( strcmp ( pass_name , <STR_LIT> ) == <NUM_LIT> ) ) ) return ! satisfies_constraint_Da ( mem ) || MEM_VOLATILE_P ( mem ) ;


<s> } else if ( satisfies_constraint_Is20 ( GEN_INT ( delta ) ) ) { fprintf ( file , <STR_LIT> HOST_WIDE_INT_PRINT_DEC <STR_LIT> , delta ) ; fprintf ( file , <STR_LIT> , this_regno , this_regno ) ; } else { fprintf ( file , <STR_LIT> HOST_WIDE_INT_PRINT_DEC <STR_LIT> , delta ) ; fprintf ( file , <STR_LIT> HOST_WIDE_INT_PRINT_DEC <STR_LIT> , delta ) ; fprintf ( file , <STR_LIT> , this_regno , this_regno ) ; } } if ( flag_pic ) { fprintf ( file , <STR_LIT> ) ; assemble_name ( file , XSTR ( XEXP ( DECL_RTL ( function ) , <NUM_LIT> ) , <NUM_LIT> ) ) ; fprintf ( file , <STR_LIT> ) ; fprintf ( file , <STR_LIT> ) ; fprintf ( file , <STR_LIT> , reg_names [ PIC_OFFSET_TABLE_REGNUM ] , reg_names [ STACK_POINTER_REGNUM ] ) ; fprintf ( file , <STR_LIT> ) ; } else { fprintf ( file , <STR_LIT> ) ; assemble_name ( file , XSTR ( XEXP ( DECL_RTL ( function ) , <NUM_LIT> ) , <NUM_LIT> ) ) ; fprintf ( file , <STR_LIT> ) ;


<s> if ( flag_pic ) { fprintf ( file , <STR_LIT> ) ; fprintf ( file , <STR_LIT> , reg_names [ PIC_OFFSET_TABLE_REGNUM ] ) ; fprintf ( file , <STR_LIT> , reg_names [ PIC_OFFSET_TABLE_REGNUM ] , reg_names [ PIC_OFFSET_TABLE_REGNUM ] ) ; if ( TARGET_ISA_V3 ) fprintf ( file , <STR_LIT> ) ; else { fprintf ( file , <STR_LIT> ) ; fprintf ( file , <STR_LIT> , reg_names [ PIC_OFFSET_TABLE_REGNUM ] , reg_names [ PIC_OFFSET_TABLE_REGNUM ] ) ; } } if ( delta != <NUM_LIT> ) { if ( satisfies_constraint_Is15 ( GEN_INT ( delta ) ) ) { fprintf ( file , <STR_LIT> HOST_WIDE_INT_PRINT_DEC <STR_LIT> , this_regno , this_regno , delta ) ; } else if ( satisfies_constraint_Is20 ( GEN_INT ( delta ) ) ) { fprintf ( file , <STR_LIT> HOST_WIDE_INT_PRINT_DEC <STR_LIT> , delta ) ; fprintf ( file , <STR_LIT> , this_regno , this_regno ) ; } else { fprintf ( file , <STR_LIT> HOST_WIDE_INT_PRINT_DEC <STR_LIT> , delta ) ; fprintf ( file , <STR_LIT> HOST_WIDE_INT_PRINT_DEC <STR_LIT> , delta ) ; fprintf ( file , <STR_LIT> , this_regno , this_regno ) ; } } if ( flag_pic ) { fprintf ( file , <STR_LIT> ) ; assemble_name ( file , XSTR ( XEXP ( DECL_RTL ( function ) , <NUM_LIT> ) , <NUM_LIT> ) ) ; fprintf ( file , <STR_LIT> ) ; fprintf ( file , <STR_LIT> ) ; fprintf ( file , <STR_LIT> , reg_names [ PIC_OFFSET_TABLE_REGNUM ] , reg_names [ STACK_POINTER_REGNUM ] ) ; fprintf ( file , <STR_LIT> ) ; } else {


<s> static int nds32_address_cost ( rtx address , machine_mode mode , addr_space_t as , bool speed ) {

return nds32_address_cost_impl ( address , mode , as , speed ) ;


<s> int regno ; if ( GET_CODE ( x ) != REG ) return false ;


<s> case CODE_FOR_call_internal : case CODE_FOR_call_value_internal : { if ( NDS32_ALIGN_P ( ) ) { rtx_insn * next_insn = next_active_insn ( insn ) ; if ( next_insn && get_attr_length ( next_insn ) != <NUM_LIT> ) adjust_value += <NUM_LIT> ; } if ( find_reg_note ( insn , REG_NORETURN , NULL_RTX ) ) { if ( TARGET_16_BIT ) adjust_value += <NUM_LIT> ; else adjust_value += <NUM_LIT> ; } } return length + adjust_value ;


<s> if ( ! optimize_size ) { memcpy ( reg_alloc_order , nds32_reg_alloc_order_for_speed , sizeof ( nds32_reg_alloc_order_for_speed ) ) ;


memcpy ( reg_alloc_order , nds32_reg_alloc_order_for_speed , sizeof ( nds32_reg_alloc_order_for_speed ) ) ;


<s> if ( NDS32_AVAILABLE_REGNUM_FOR_GPR_ARG ( cum -> gpr_offset , arg . mode , arg . type ) >= NDS32_GPR_ARG_FIRST_REGNUM + NDS32_MAX_GPR_REGS_FOR_ARGS ) return <NUM_LIT> ; needed_reg_count = NDS32_NEED_N_REGS_FOR_ARG ( arg . mode , arg . type ) ;

remaining_reg_count = NDS32_MAX_GPR_REGS_FOR_ARGS - ( NDS32_AVAILABLE_REGNUM_FOR_GPR_ARG ( cum -> gpr_offset , arg . mode , arg . type ) - NDS32_GPR_ARG_FIRST_REGNUM ) ;


<s> unsigned int needed_reg_count ; unsigned int remaining_reg_count ; CUMULATIVE_ARGS * cum ; cum = get_cumulative_args ( ca ) ; if ( TARGET_HARD_FLOAT ) return <NUM_LIT> ; if ( NDS32_AVAILABLE_REGNUM_FOR_GPR_ARG ( cum -> gpr_offset , arg . mode , arg . type ) >= NDS32_GPR_ARG_FIRST_REGNUM + NDS32_MAX_GPR_REGS_FOR_ARGS ) return <NUM_LIT> ;

needed_reg_count = NDS32_NEED_N_REGS_FOR_ARG ( arg . mode , arg . type ) ;


<s> if ( TARGET_LINUX_ABI ) file_end_indicate_exec_stack ( ) ;


<s> break ; case CPU_N10 : fprintf ( asm_out_file , <STR_LIT> , <STR_LIT> ) ; break ; case CPU_GRAYWOLF : fprintf ( asm_out_file , <STR_LIT> , <STR_LIT> ) ; break ; case CPU_N12 : case CPU_N13 : fprintf ( asm_out_file , <STR_LIT> , <STR_LIT> ) ; break ; case CPU_SIMPLE : fprintf ( asm_out_file , <STR_LIT> , <STR_LIT> ) ; break ; default : gcc_unreachable ( ) ; } if ( TARGET_CMODEL_SMALL ) fprintf ( asm_out_file , <STR_LIT> , <STR_LIT> ) ; if ( TARGET_CMODEL_MEDIUM ) fprintf ( asm_out_file , <STR_LIT> , <STR_LIT> ) ; if ( TARGET_CMODEL_LARGE ) fprintf ( asm_out_file , <STR_LIT> , <STR_LIT> ) ; fprintf ( asm_out_file , <STR_LIT> , ( ( TARGET_BIG_ENDIAN ) ? <STR_LIT> : <STR_LIT> ) ) ; fprintf ( asm_out_file , <STR_LIT> , ( ( TARGET_FPU_SINGLE ) ? <STR_LIT> : <STR_LIT> ) ) ; fprintf ( asm_out_file , <STR_LIT> , ( ( TARGET_FPU_DOUBLE ) ? <STR_LIT> : <STR_LIT> ) ) ; fprintf ( asm_out_file , <STR_LIT> , ( ( TARGET_HARD_FLOAT ) ? <STR_LIT> : <STR_LIT> ) ) ; fprintf ( asm_out_file , <STR_LIT> ) ; fprintf ( asm_out_file , <STR_LIT> , ( ( TARGET_CMOV ) ? <STR_LIT> : <STR_LIT> ) ) ; fprintf ( asm_out_file , <STR_LIT> , ( ( TARGET_EXT_PERF ) ? <STR_LIT> : <STR_LIT> ) ) ; fprintf ( asm_out_file , <STR_LIT> , ( ( TARGET_EXT_PERF2 ) ? <STR_LIT> : <STR_LIT> ) ) ; fprintf ( asm_out_file , <STR_LIT> , ( ( TARGET_EXT_STRING ) ? <STR_LIT> : <STR_LIT> ) ) ; fprintf ( asm_out_file , <STR_LIT> ) ; fprintf ( asm_out_file , <STR_LIT> , ( ( TARGET_V3PUSH ) ? <STR_LIT> : <STR_LIT> ) ) ; fprintf ( asm_out_file , <STR_LIT> , ( ( TARGET_16_BIT ) ? <STR_LIT> : <STR_LIT> ) ) ; fprintf ( asm_out_file , <STR_LIT> , ( ( TARGET_REDUCED_REGS ) ? <STR_LIT> : <STR_LIT> ) ) ; fprintf ( asm_out_file , <STR_LIT> , ( flag_unaligned_access ? <STR_LIT> : <STR_LIT> ) ) ; fprintf ( asm_out_file , <STR_LIT> ) ;

if ( optimize_size ) fprintf ( asm_out_file , <STR_LIT> ) ;


<s> static void nds32_asm_function_end_prologue ( FILE * file ) { fprintf ( file , <STR_LIT> ) ;


<s> fprintf ( file , <STR_LIT> , cfun -> machine -> local_size ) ; fprintf ( file , <STR_LIT> , cfun -> machine -> out_args_size ) ; fprintf ( file , <STR_LIT> ) ; for ( r = <NUM_LIT> ; r < <NUM_LIT> ; r ++ ) { if ( df_regs_ever_live_p ( r ) ) fprintf ( file , <STR_LIT> , reg_names [ r ] ) ; }


<s> fputs ( <STR_LIT> , stream ) ; assemble_name ( stream , name ) ;


<s> case UNSPEC_TLSIE : output_addr_const ( file , XVECEXP ( x , <NUM_LIT> , <NUM_LIT> ) ) ; fputs ( <STR_LIT> , file ) ; break ; case UNSPEC_TLSLE : output_addr_const ( file , XVECEXP ( x , <NUM_LIT> , <NUM_LIT> ) ) ; fputs ( <STR_LIT> , file ) ; break ; case UNSPEC_ICT : output_addr_const ( file , XVECEXP ( x , <NUM_LIT> , <NUM_LIT> ) ) ; fputs ( <STR_LIT> , file ) ; break ; default : return false ; }


<s> else if ( satisfies_constraint_Is20 ( GEN_INT ( delta ) ) ) { fprintf ( file , <STR_LIT> HOST_WIDE_INT_PRINT_DEC <STR_LIT> , delta ) ; fprintf ( file , <STR_LIT> , this_regno , this_regno ) ; } else { fprintf ( file , <STR_LIT> HOST_WIDE_INT_PRINT_DEC <STR_LIT> , delta ) ; fprintf ( file , <STR_LIT> HOST_WIDE_INT_PRINT_DEC <STR_LIT> , delta ) ; fprintf ( file , <STR_LIT> , this_regno , this_regno ) ; } } if ( flag_pic ) { fprintf ( file , <STR_LIT> ) ; assemble_name ( file , XSTR ( XEXP ( DECL_RTL ( function ) , <NUM_LIT> ) , <NUM_LIT> ) ) ; fprintf ( file , <STR_LIT> ) ; fprintf ( file , <STR_LIT> ) ; fprintf ( file , <STR_LIT> , reg_names [ PIC_OFFSET_TABLE_REGNUM ] , reg_names [ STACK_POINTER_REGNUM ] ) ; fprintf ( file , <STR_LIT> ) ; } else { fprintf ( file , <STR_LIT> ) ; assemble_name ( file , XSTR ( XEXP ( DECL_RTL ( function ) , <NUM_LIT> ) , <NUM_LIT> ) ) ; fprintf ( file , <STR_LIT> ) ;


<s> fprintf ( file , <STR_LIT> , reg_names [ PIC_OFFSET_TABLE_REGNUM ] , reg_names [ PIC_OFFSET_TABLE_REGNUM ] ) ; } } if ( delta != <NUM_LIT> ) { if ( satisfies_constraint_Is15 ( GEN_INT ( delta ) ) ) { fprintf ( file , <STR_LIT> HOST_WIDE_INT_PRINT_DEC <STR_LIT> , this_regno , this_regno , delta ) ; } else if ( satisfies_constraint_Is20 ( GEN_INT ( delta ) ) ) { fprintf ( file , <STR_LIT> HOST_WIDE_INT_PRINT_DEC <STR_LIT> , delta ) ; fprintf ( file , <STR_LIT> , this_regno , this_regno ) ; } else { fprintf ( file , <STR_LIT> HOST_WIDE_INT_PRINT_DEC <STR_LIT> , delta ) ; fprintf ( file , <STR_LIT> HOST_WIDE_INT_PRINT_DEC <STR_LIT> , delta ) ; fprintf ( file , <STR_LIT> , this_regno , this_regno ) ; } } if ( flag_pic ) { fprintf ( file , <STR_LIT> ) ; assemble_name ( file , XSTR ( XEXP ( DECL_RTL ( function ) , <NUM_LIT> ) , <NUM_LIT> ) ) ;


<s> asm_fprintf ( f , <STR_LIT> ) ; asm_fprintf ( f , <STR_LIT> <STR_LIT> ) ; asm_fprintf ( f , <STR_LIT> <STR_LIT> ) ; asm_fprintf ( f , <STR_LIT> ) ; } asm_fprintf ( f , <STR_LIT> ) ; assemble_aligned_integer ( UNITS_PER_WORD , const0_rtx ) ; asm_fprintf ( f , <STR_LIT> ) ; assemble_aligned_integer ( UNITS_PER_WORD , const0_rtx ) ;


<s> static tree nds32_builtin_decl ( unsigned code , bool initialize_p ) { return nds32_builtin_decl_impl ( code , initialize_p ) ;


<s> break ; case CONST_INT : case CONST_DOUBLE : if ( flag_pic && ( lra_in_progress || reload_completed ) ) return true ; break ; default : return false ; }


<s> if ( * code == LEU && CONST_INT_P ( * op1 ) ) {

* op1 = gen_int_mode ( INTVAL ( * op1 ) + <NUM_LIT> , SImode ) ;


<s> if ( ( TARGET_FPU_SINGLE || TARGET_FPU_DOUBLE ) && GET_MODE_SIZE ( from ) != GET_MODE_SIZE ( to ) ) { return ! reg_classes_intersect_p ( rclass , FP_REGS ) ; } return true ;


<s> if ( from_reg == FRAME_POINTER_REGNUM && to_reg == STACK_POINTER_REGNUM ) return true ;

if ( from_reg == FRAME_POINTER_REGNUM && to_reg == HARD_FRAME_POINTER_REGNUM ) return true ;


<s> static bool nds32_can_eliminate ( const int from_reg , const int to_reg ) { if ( from_reg == ARG_POINTER_REGNUM && to_reg == STACK_POINTER_REGNUM ) return true ;

if ( from_reg == ARG_POINTER_REGNUM && to_reg == HARD_FRAME_POINTER_REGNUM ) return true ;


<s> int sp_adjust ; if ( ! reload_completed ) return <NUM_LIT> ; if ( cfun -> machine -> attr_naked_p && ! flag_ret_in_naked_func ) return <NUM_LIT> ; sp_adjust = cfun -> machine -> local_size + cfun -> machine -> out_args_size + cfun -> machine -> callee_saved_area_gpr_padding_bytes + cfun -> machine -> callee_saved_fpr_regs_size ;

if ( ! cfun -> machine -> fp_as_gp_p && satisfies_constraint_Iu08 ( GEN_INT ( sp_adjust ) ) && NDS32_DOUBLE_WORD_ALIGN_P ( sp_adjust ) && ! cfun -> calls_alloca && NDS32_V3PUSH_AVAILABLE_P && ! ( TARGET_HARD_FLOAT && ( cfun -> machine -> callee_saved_first_fpr_regno != SP_REGNUM ) ) ) return <NUM_LIT> ;


<s> if ( cfun -> machine -> attr_naked_p && ! flag_ret_in_naked_func ) return <NUM_LIT> ; sp_adjust = cfun -> machine -> local_size + cfun -> machine -> out_args_size + cfun -> machine -> callee_saved_area_gpr_padding_bytes + cfun -> machine -> callee_saved_fpr_regs_size ; if ( ! cfun -> machine -> fp_as_gp_p && satisfies_constraint_Iu08 ( GEN_INT ( sp_adjust ) ) && NDS32_DOUBLE_WORD_ALIGN_P ( sp_adjust ) && ! cfun -> calls_alloca && NDS32_V3PUSH_AVAILABLE_P && ! ( TARGET_HARD_FLOAT && ( cfun -> machine -> callee_saved_first_fpr_regno != SP_REGNUM ) ) ) return <NUM_LIT> ; return ( cfun -> machine -> naked_p && ( cfun -> machine -> va_args_size == <NUM_LIT> ) ) ;


<s> if ( min_offset < <NUM_LIT> || max_offset >= <NUM_LIT> ) return SImode ; else {

if ( max_offset >= <NUM_LIT> ) return HImode ;


<s> static unsigned char nds32_class_max_nregs ( reg_class_t rclass ATTRIBUTE_UNUSED , machine_mode mode ) { return ( ( GET_MODE_SIZE ( mode ) + UNITS_PER_WORD - <NUM_LIT> ) / UNITS_PER_WORD ) ;


<s> cfun -> machine -> eh_return_data_regs_size = <NUM_LIT> ; cfun -> machine -> use_eh_return_p = <NUM_LIT> ; } cfun -> machine -> va_args_size = crtl -> args . pretend_args_size ; if ( cfun -> machine -> va_args_size != <NUM_LIT> ) { cfun -> machine -> va_args_first_regno = NDS32_GPR_ARG_FIRST_REGNUM + NDS32_MAX_GPR_REGS_FOR_ARGS - ( crtl -> args . pretend_args_size / UNITS_PER_WORD ) ; cfun -> machine -> va_args_last_regno = NDS32_GPR_ARG_FIRST_REGNUM + NDS32_MAX_GPR_REGS_FOR_ARGS - <NUM_LIT> ; } else { cfun -> machine -> va_args_first_regno = SP_REGNUM ; cfun -> machine -> va_args_last_regno = SP_REGNUM ; } block_size = cfun -> machine -> va_args_size ; if ( ! NDS32_DOUBLE_WORD_ALIGN_P ( block_size ) ) { cfun -> machine -> va_args_area_padding_bytes = NDS32_ROUND_UP_DOUBLE_WORD ( block_size ) - block_size ; } cfun -> machine -> local_size = NDS32_ROUND_UP_DOUBLE_WORD ( get_frame_size ( ) ) ; cfun -> machine -> out_args_size = crtl -> outgoing_args_size ; cfun -> machine -> fp_size = ( df_regs_ever_live_p ( FP_REGNUM ) ) ? <NUM_LIT> : <NUM_LIT> ; cfun -> machine -> gp_size = ( flag_pic && df_regs_ever_live_p ( PIC_OFFSET_TABLE_REGNUM ) ) ? <NUM_LIT> : <NUM_LIT> ; cfun -> machine -> lp_size = ( flag_always_save_lp || df_regs_ever_live_p ( LP_REGNUM ) ) ? <NUM_LIT> : <NUM_LIT> ; cfun -> machine -> callee_saved_area_gpr_padding_bytes = <NUM_LIT> ; cfun -> machine -> callee_saved_gpr_regs_size = <NUM_LIT> ; cfun -> machine -> callee_saved_first_gpr_regno = SP_REGNUM ; cfun -> machine -> callee_saved_last_gpr_regno = SP_REGNUM ; cfun -> machine -> callee_saved_fpr_regs_size = <NUM_LIT> ; cfun -> machine -> callee_saved_first_fpr_regno = SP_REGNUM ; cfun -> machine -> callee_saved_last_fpr_regno = SP_REGNUM ; for ( r = <NUM_LIT> ; r < <NUM_LIT> ; r ++ ) { if ( NDS32_REQUIRED_CALLEE_SAVED_P ( r ) ) { if ( cfun -> machine -> callee_saved_first_gpr_regno == SP_REGNUM ) cfun -> machine -> callee_saved_first_gpr_regno = r ; cfun -> machine -> callee_saved_last_gpr_regno = r ; } } if ( TARGET_HARD_FLOAT ) { for ( r = NDS32_FIRST_FPR_REGNUM ; r < NDS32_LAST_FPR_REGNUM ; r ++ ) { if ( NDS32_REQUIRED_CALLEE_SAVED_P ( r ) ) { if ( cfun -> machine -> callee_saved_first_fpr_regno == SP_REGNUM ) { if ( ! NDS32_FPR_REGNO_OK_FOR_DOUBLE ( r ) ) cfun -> machine -> callee_saved_first_fpr_regno = r - <NUM_LIT> ; else cfun -> machine -> callee_saved_first_fpr_regno = r ; } cfun -> machine -> callee_saved_last_fpr_regno = r ; } } int last_fpr = cfun -> machine -> callee_saved_last_fpr_regno ; if ( NDS32_FPR_REGNO_OK_FOR_DOUBLE ( last_fpr ) ) cfun -> machine -> callee_saved_last_fpr_regno ++ ; }

if ( lookup_attribute ( <STR_LIT> , DECL_ATTRIBUTES ( current_function_decl ) ) || lookup_attribute ( <STR_LIT> , DECL_ATTRIBUTES ( current_function_decl ) ) || lookup_attribute ( <STR_LIT> , DECL_ATTRIBUTES ( current_function_decl ) ) || ( cfun -> machine -> callee_saved_first_gpr_regno == SP_REGNUM && cfun -> machine -> callee_saved_last_gpr_regno == SP_REGNUM && cfun -> machine -> callee_saved_first_fpr_regno == SP_REGNUM && cfun -> machine -> callee_saved_last_fpr_regno == SP_REGNUM && ! df_regs_ever_live_p ( FP_REGNUM ) && ! df_regs_ever_live_p ( LP_REGNUM ) && cfun -> machine -> local_size == <NUM_LIT> && ! flag_pic ) ) {


<s> int regno ; if ( TARGET_LINUX_ABI ) fixed_regs [ TP_REGNUM ] = <NUM_LIT> ; if ( TARGET_HARD_FLOAT ) { for ( regno = NDS32_FIRST_FPR_REGNUM ; regno <= NDS32_LAST_FPR_REGNUM ; regno ++ ) { fixed_regs [ regno ] = <NUM_LIT> ; if ( regno < NDS32_FIRST_FPR_REGNUM + NDS32_MAX_FPR_REGS_FOR_ARGS ) call_used_regs [ regno ] = <NUM_LIT> ; else if ( regno >= NDS32_FIRST_FPR_REGNUM + <NUM_LIT> && regno < NDS32_FIRST_FPR_REGNUM + <NUM_LIT> ) call_used_regs [ regno ] = <NUM_LIT> ; else call_used_regs [ regno ] = <NUM_LIT> ; } } else if ( TARGET_FPU_SINGLE || TARGET_FPU_DOUBLE ) { for ( regno = NDS32_FIRST_FPR_REGNUM ;


if ( ( ( TREE_CODE ( constant ) == STRING_CST || TREE_CODE ( constant ) == CONSTRUCTOR || TREE_CODE ( constant ) == UNION_TYPE || TREE_CODE ( constant ) == RECORD_TYPE || TREE_CODE ( constant ) == ARRAY_TYPE ) && basic_align < BITS_PER_WORD ) ) return BITS_PER_WORD ;


<s> if ( TARGET_ISR_VECTOR_SIZE_4_BYTE ) builtin_define ( <STR_LIT> ) ; else builtin_define ( <STR_LIT> ) ; } if ( TARGET_HARD_FLOAT ) builtin_define ( <STR_LIT> ) ; else builtin_define ( <STR_LIT> ) ; if ( TARGET_ISA_V2 ) builtin_define ( <STR_LIT> ) ; if ( TARGET_ISA_V3 ) builtin_define ( <STR_LIT> ) ; if ( TARGET_ISA_V3M ) builtin_define ( <STR_LIT> ) ; if ( TARGET_FPU_SINGLE ) builtin_define ( <STR_LIT> ) ; if ( TARGET_FPU_DOUBLE ) builtin_define ( <STR_LIT> ) ; if ( TARGET_EXT_FPU_FMA ) builtin_define ( <STR_LIT> ) ; if ( NDS32_EXT_FPU_DOT_E ) builtin_define ( <STR_LIT> ) ; if ( TARGET_FPU_SINGLE || TARGET_FPU_DOUBLE ) { switch ( nds32_fp_regnum ) { case <NUM_LIT> : case <NUM_LIT> : builtin_define ( <STR_LIT> ) ; break ; case <NUM_LIT> : case <NUM_LIT> : builtin_define ( <STR_LIT> ) ; break ; case <NUM_LIT> : case <NUM_LIT> : builtin_define ( <STR_LIT> ) ; break ; case <NUM_LIT> : case <NUM_LIT> : builtin_define ( <STR_LIT> ) ; break ; default : abort ( ) ; } } if ( TARGET_BIG_ENDIAN ) builtin_define ( <STR_LIT> ) ; else builtin_define ( <STR_LIT> ) ; if ( TARGET_REDUCED_REGS ) builtin_define ( <STR_LIT> ) ; if ( TARGET_CMOV ) builtin_define ( <STR_LIT> ) ;

if ( TARGET_EXT_PERF ) builtin_define ( <STR_LIT> ) ;


<s> unsigned int nds32_data_alignment ( tree data , unsigned int basic_align ) { if ( ( basic_align < BITS_PER_WORD ) && ( TREE_CODE ( data ) == ARRAY_TYPE || TREE_CODE ( data ) == UNION_TYPE || TREE_CODE ( data ) == RECORD_TYPE ) ) return BITS_PER_WORD ; else return basic_align ;


<s> if ( NDS32_IS_FPR_REGNUM ( regno ) ) return regno + <NUM_LIT> ; return regno ;


<s> case UNSPEC_GOT : case UNSPEC_GOTOFF : case UNSPEC_PLT : case UNSPEC_TLSGD : case UNSPEC_TLSLD : case UNSPEC_TLSIE : case UNSPEC_TLSLE : case UNSPEC_ICT : x = XVECEXP ( inner , <NUM_LIT> , <NUM_LIT> ) ; break ; default : break ; } } } return x ;


<s> rtx dwarf_single ; machine_mode mode ; int regno ; mode = GET_MODE ( reg ) ; regno = REGNO ( reg ) ; if ( regno >= NDS32_FIRST_FPR_REGNUM && regno <= NDS32_LAST_FPR_REGNUM ) { if ( mode == DFmode || mode == SCmode ) { dwarf_high = gen_rtx_REG ( word_mode , regno ) ; dwarf_low = gen_rtx_REG ( word_mode , regno + <NUM_LIT> ) ; return gen_rtx_PARALLEL ( VOIDmode , gen_rtvec ( <NUM_LIT> , dwarf_low , dwarf_high ) ) ; } else if ( mode == DCmode ) { rtx dwarf_high_re = gen_rtx_REG ( word_mode , regno ) ; rtx dwarf_low_re = gen_rtx_REG ( word_mode , regno + <NUM_LIT> ) ; rtx dwarf_high_im = gen_rtx_REG ( word_mode , regno ) ; rtx dwarf_low_im = gen_rtx_REG ( word_mode , regno + <NUM_LIT> ) ; return gen_rtx_PARALLEL ( VOIDmode , gen_rtvec ( <NUM_LIT> , dwarf_low_re , dwarf_high_re , dwarf_high_im , dwarf_low_im ) ) ; } else if ( GET_MODE_SIZE ( mode ) <= UNITS_PER_WORD ) { return NULL_RTX ; }


<s> int regno ; mode = GET_MODE ( reg ) ; regno = REGNO ( reg ) ; if ( regno >= NDS32_FIRST_FPR_REGNUM && regno <= NDS32_LAST_FPR_REGNUM ) { if ( mode == DFmode || mode == SCmode ) { dwarf_high = gen_rtx_REG ( word_mode , regno ) ; dwarf_low = gen_rtx_REG ( word_mode , regno + <NUM_LIT> ) ;

return gen_rtx_PARALLEL ( VOIDmode , gen_rtvec ( <NUM_LIT> , dwarf_low , dwarf_high ) ) ;


<s> } else { return plus_constant ( Pmode , frameaddr , - <NUM_LIT> ) ;


<s> pat = gen_rtx_CONST ( SImode , gen_rtx_PLUS ( Pmode , pat , GEN_INT ( - <NUM_LIT> ) ) ) ; emit_insn ( gen_lo_sum ( pic_offset_table_rtx , pic_offset_table_rtx , pat ) ) ; emit_insn ( gen_add_pc ( pic_offset_table_rtx , pic_offset_table_rtx ) ) ;


<s> } if ( save_fp_p ) { reg = gen_rtx_REG ( SImode , FP_REGNUM ) ; mem = gen_frame_mem ( SImode , plus_constant ( Pmode , stack_pointer_rtx , offset ) ) ; pop_rtx = gen_rtx_SET ( reg , mem ) ; XVECEXP ( parallel_insn , <NUM_LIT> , par_index ) = pop_rtx ; RTX_FRAME_RELATED_P ( pop_rtx ) = <NUM_LIT> ; offset = offset + <NUM_LIT> ; par_index ++ ; dwarf = alloc_reg_note ( REG_CFA_RESTORE , reg , dwarf ) ; } if ( save_gp_p ) { reg = gen_rtx_REG ( SImode , GP_REGNUM ) ; mem = gen_frame_mem ( SImode , plus_constant ( Pmode , stack_pointer_rtx , offset ) ) ; pop_rtx = gen_rtx_SET ( reg , mem ) ; XVECEXP ( parallel_insn , <NUM_LIT> , par_index ) = pop_rtx ; RTX_FRAME_RELATED_P ( pop_rtx ) = <NUM_LIT> ; offset = offset + <NUM_LIT> ; par_index ++ ; dwarf = alloc_reg_note ( REG_CFA_RESTORE , reg , dwarf ) ; } if ( save_lp_p ) { reg = gen_rtx_REG ( SImode , LP_REGNUM ) ; mem = gen_frame_mem ( SImode , plus_constant ( Pmode , stack_pointer_rtx , offset ) ) ; pop_rtx = gen_rtx_SET ( reg , mem ) ;


<s> mem = gen_frame_mem ( SImode , plus_constant ( Pmode , stack_pointer_rtx , offset ) ) ; push_rtx = gen_rtx_SET ( mem , reg ) ; XVECEXP ( parallel_insn , <NUM_LIT> , par_index ) = push_rtx ; RTX_FRAME_RELATED_P ( push_rtx ) = <NUM_LIT> ; offset = offset + <NUM_LIT> ; par_index ++ ; } if ( save_gp_p ) { reg = gen_rtx_REG ( SImode , GP_REGNUM ) ; mem = gen_frame_mem ( SImode , plus_constant ( Pmode , stack_pointer_rtx , offset ) ) ; push_rtx = gen_rtx_SET ( mem , reg ) ; XVECEXP ( parallel_insn , <NUM_LIT> , par_index ) = push_rtx ; RTX_FRAME_RELATED_P ( push_rtx ) = <NUM_LIT> ; offset = offset + <NUM_LIT> ; par_index ++ ; } if ( save_lp_p ) { reg = gen_rtx_REG ( SImode , LP_REGNUM ) ; mem = gen_frame_mem ( SImode , plus_constant ( Pmode , stack_pointer_rtx , offset ) ) ; push_rtx = gen_rtx_SET ( mem , reg ) ; XVECEXP ( parallel_insn , <NUM_LIT> , par_index ) = push_rtx ; RTX_FRAME_RELATED_P ( push_rtx ) = <NUM_LIT> ; offset = offset + <NUM_LIT> ; par_index ++ ; } offset = - ( num_use_regs * <NUM_LIT> ) ; adjust_sp_rtx = gen_rtx_SET ( stack_pointer_rtx , plus_constant ( Pmode , stack_pointer_rtx , offset ) ) ; XVECEXP ( parallel_insn , <NUM_LIT> , par_index ) = adjust_sp_rtx ; RTX_FRAME_RELATED_P ( adjust_sp_rtx ) = <NUM_LIT> ; parallel_insn = emit_insn ( parallel_insn ) ; RTX_FRAME_RELATED_P ( parallel_insn ) = <NUM_LIT> ; if ( vaarg_p ) { dwarf = alloc_reg_note ( REG_CFA_ADJUST_CFA , copy_rtx ( adjust_sp_rtx ) , NULL_RTX ) ; REG_NOTES ( parallel_insn ) = dwarf ;


<s> XVECEXP ( parallel_insn , <NUM_LIT> , par_index ) = pop_rtx ; RTX_FRAME_RELATED_P ( pop_rtx ) = <NUM_LIT> ; offset = offset + <NUM_LIT> ; par_index ++ ; dwarf = alloc_reg_note ( REG_CFA_RESTORE , reg , dwarf ) ; } reg = gen_rtx_REG ( SImode , FP_REGNUM ) ; mem = gen_frame_mem ( SImode , plus_constant ( Pmode , stack_pointer_rtx , offset ) ) ; pop_rtx = gen_rtx_SET ( reg , mem ) ; XVECEXP ( parallel_insn , <NUM_LIT> , par_index ) = pop_rtx ; RTX_FRAME_RELATED_P ( pop_rtx ) = <NUM_LIT> ; offset = offset + <NUM_LIT> ; par_index ++ ; dwarf = alloc_reg_note ( REG_CFA_RESTORE , reg , dwarf ) ; reg = gen_rtx_REG ( SImode , GP_REGNUM ) ; mem = gen_frame_mem ( SImode , plus_constant ( Pmode , stack_pointer_rtx , offset ) ) ; pop_rtx = gen_rtx_SET ( reg , mem ) ; XVECEXP ( parallel_insn , <NUM_LIT> , par_index ) = pop_rtx ; RTX_FRAME_RELATED_P ( pop_rtx ) = <NUM_LIT> ; offset = offset + <NUM_LIT> ; par_index ++ ; dwarf = alloc_reg_note ( REG_CFA_RESTORE , reg , dwarf ) ; reg = gen_rtx_REG ( SImode , LP_REGNUM ) ; mem = gen_frame_mem ( SImode , plus_constant ( Pmode , stack_pointer_rtx , offset ) ) ; pop_rtx = gen_rtx_SET ( reg , mem ) ; XVECEXP ( parallel_insn , <NUM_LIT> , par_index ) = pop_rtx ; RTX_FRAME_RELATED_P ( pop_rtx ) = <NUM_LIT> ; offset = offset + <NUM_LIT> ; par_index ++ ; dwarf = alloc_reg_note ( REG_CFA_RESTORE , reg , dwarf ) ; adjust_sp_rtx = gen_rtx_SET ( stack_pointer_rtx , plus_constant ( Pmode , stack_pointer_rtx , offset + imm8u ) ) ; XVECEXP ( parallel_insn , <NUM_LIT> , par_index ) = adjust_sp_rtx ; if ( frame_pointer_needed ) { rtx cfa_adjust_rtx = gen_rtx_PLUS ( Pmode , stack_pointer_rtx , const0_rtx ) ; dwarf = alloc_reg_note ( REG_CFA_DEF_CFA , cfa_adjust_rtx , dwarf ) ;


<s> rtx reg ; rtx mem ; rtx push_rtx ; rtx adjust_sp_rtx ; rtx parallel_insn ; num_use_regs = Re - Rb + <NUM_LIT> + <NUM_LIT> ; parallel_insn = gen_rtx_PARALLEL ( VOIDmode , rtvec_alloc ( num_use_regs + <NUM_LIT> ) ) ; par_index = <NUM_LIT> ; offset = - ( num_use_regs * <NUM_LIT> ) ; for ( regno = Rb ; regno <= Re ; regno ++ ) { reg = gen_rtx_REG ( SImode , regno ) ; mem = gen_frame_mem ( SImode , plus_constant ( Pmode , stack_pointer_rtx , offset ) ) ; push_rtx = gen_rtx_SET ( mem , reg ) ; XVECEXP ( parallel_insn , <NUM_LIT> , par_index ) = push_rtx ; RTX_FRAME_RELATED_P ( push_rtx ) = <NUM_LIT> ; offset = offset + <NUM_LIT> ; par_index ++ ; } reg = gen_rtx_REG ( SImode , FP_REGNUM ) ; mem = gen_frame_mem ( SImode , plus_constant ( Pmode , stack_pointer_rtx , offset ) ) ; push_rtx = gen_rtx_SET ( mem , reg ) ;


<s> else if ( GET_CODE ( addr ) == CONST && GET_CODE ( XEXP ( addr , <NUM_LIT> ) ) == PLUS ) { rtx plus_op = XEXP ( addr , <NUM_LIT> ) ; rtx op0 = XEXP ( plus_op , <NUM_LIT> ) ;

rtx op1 = XEXP ( plus_op , <NUM_LIT> ) ;


<s> static rtx nds32_expand_builtin ( tree exp , rtx target , rtx subtarget , machine_mode mode , int ignore ) {

return nds32_expand_builtin_impl ( exp , target , subtarget , mode , ignore ) ;


<s> static rtx nds32_expand_builtin ( tree exp , rtx target , rtx subtarget , machine_mode mode , int ignore ) { return nds32_expand_builtin_impl ( exp , target , subtarget , mode , ignore ) ;


<s> sp_adjust = cfun -> machine -> local_size + cfun -> machine -> out_args_size ; nds32_emit_adjust_frame ( stack_pointer_rtx , stack_pointer_rtx , sp_adjust ) ; nds32_emit_pop_fpr_callee_saved ( gpr_padding ) ; } else { sp_adjust = cfun -> machine -> local_size + cfun -> machine -> out_args_size + cfun -> machine -> callee_saved_area_gpr_padding_bytes ; nds32_emit_adjust_frame ( stack_pointer_rtx , stack_pointer_rtx , sp_adjust ) ; } } if ( cfun -> machine -> use_eh_return_p ) { Rb = cfun -> machine -> eh_return_data_first_regno ; Re = cfun -> machine -> eh_return_data_last_regno ; nds32_emit_stack_pop_multiple ( Rb , Re , false , false , false ) ; } Rb = cfun -> machine -> callee_saved_first_gpr_regno ; Re = cfun -> machine -> callee_saved_last_gpr_regno ; if ( ! ( Rb == SP_REGNUM && Re == SP_REGNUM && cfun -> machine -> fp_size == <NUM_LIT> && cfun -> machine -> gp_size == <NUM_LIT> && cfun -> machine -> lp_size == <NUM_LIT> ) ) { nds32_emit_stack_pop_multiple ( Rb , Re , cfun -> machine -> fp_size , cfun -> machine -> gp_size , cfun -> machine -> lp_size ) ;


<s> } return ; } if ( frame_pointer_needed ) { if ( cfun -> machine -> callee_saved_first_fpr_regno != SP_REGNUM ) { int gpr_padding = cfun -> machine -> callee_saved_area_gpr_padding_bytes ; sp_adjust = cfun -> machine -> fp_size + cfun -> machine -> gp_size + cfun -> machine -> lp_size + cfun -> machine -> callee_saved_gpr_regs_size + cfun -> machine -> eh_return_data_regs_size + cfun -> machine -> callee_saved_area_gpr_padding_bytes + cfun -> machine -> callee_saved_fpr_regs_size ; nds32_emit_adjust_frame ( stack_pointer_rtx , hard_frame_pointer_rtx , - <NUM_LIT> * sp_adjust ) ; nds32_emit_pop_fpr_callee_saved ( gpr_padding ) ; } else { sp_adjust = cfun -> machine -> fp_size + cfun -> machine -> gp_size + cfun -> machine -> lp_size + cfun -> machine -> callee_saved_gpr_regs_size + cfun -> machine -> eh_return_data_regs_size ; nds32_emit_adjust_frame ( stack_pointer_rtx , hard_frame_pointer_rtx , - <NUM_LIT> * sp_adjust ) ; } } else { if ( cfun -> machine -> callee_saved_first_fpr_regno != SP_REGNUM ) { int gpr_padding = cfun -> machine -> callee_saved_area_gpr_padding_bytes ; sp_adjust = cfun -> machine -> local_size + cfun -> machine -> out_args_size ; nds32_emit_adjust_frame ( stack_pointer_rtx , stack_pointer_rtx , sp_adjust ) ; nds32_emit_pop_fpr_callee_saved ( gpr_padding ) ; } else { sp_adjust = cfun -> machine -> local_size + cfun -> machine -> out_args_size + cfun -> machine -> callee_saved_area_gpr_padding_bytes ; nds32_emit_adjust_frame ( stack_pointer_rtx , stack_pointer_rtx , sp_adjust ) ; } } if ( cfun -> machine -> use_eh_return_p ) { Rb = cfun -> machine -> eh_return_data_first_regno ;

Re = cfun -> machine -> eh_return_data_last_regno ;


<s> Re = cfun -> machine -> callee_saved_last_gpr_regno ; sp_adjust = cfun -> machine -> local_size + cfun -> machine -> out_args_size + cfun -> machine -> callee_saved_area_gpr_padding_bytes + cfun -> machine -> callee_saved_fpr_regs_size ; if ( satisfies_constraint_Iu08 ( GEN_INT ( sp_adjust ) ) && NDS32_DOUBLE_WORD_ALIGN_P ( sp_adjust ) && ! cfun -> calls_alloca ) { if ( cfun -> machine -> callee_saved_first_fpr_regno != SP_REGNUM ) { int fpr_position = cfun -> machine -> local_size + cfun -> machine -> out_args_size ; nds32_emit_v3pop_fpr_callee_saved ( fpr_position ) ; } nds32_emit_stack_v3pop ( Rb , Re , sp_adjust ) ; } else { if ( frame_pointer_needed ) { sp_adjust = cfun -> machine -> fp_size + cfun -> machine -> gp_size + cfun -> machine -> lp_size + cfun -> machine -> callee_saved_gpr_regs_size ; if ( cfun -> machine -> callee_saved_first_fpr_regno != SP_REGNUM ) { sp_adjust = sp_adjust + cfun -> machine -> callee_saved_area_gpr_padding_bytes + cfun -> machine -> callee_saved_fpr_regs_size ; nds32_emit_adjust_frame ( stack_pointer_rtx , hard_frame_pointer_rtx , - <NUM_LIT> * sp_adjust ) ; nds32_emit_v3pop_fpr_callee_saved ( <NUM_LIT> ) ; } else { nds32_emit_adjust_frame ( stack_pointer_rtx , hard_frame_pointer_rtx , - <NUM_LIT> * sp_adjust ) ; } } else { sp_adjust = cfun -> machine -> local_size + cfun -> machine -> out_args_size + cfun -> machine -> callee_saved_area_gpr_padding_bytes + cfun -> machine -> callee_saved_fpr_regs_size ; if ( cfun -> machine -> callee_saved_first_fpr_regno != SP_REGNUM ) { sp_adjust = sp_adjust - cfun -> machine -> callee_saved_area_gpr_padding_bytes - cfun -> machine -> callee_saved_fpr_regs_size ; nds32_emit_adjust_frame ( stack_pointer_rtx , stack_pointer_rtx , sp_adjust ) ;


<s> if ( cfun -> machine -> use_eh_return_p ) { Rb = cfun -> machine -> eh_return_data_first_regno ; Re = cfun -> machine -> eh_return_data_last_regno ; nds32_emit_stack_push_multiple ( Rb , Re , false , false , false , false ) ; } if ( frame_pointer_needed ) { fp_adjust = cfun -> machine -> fp_size + cfun -> machine -> gp_size + cfun -> machine -> lp_size + cfun -> machine -> callee_saved_gpr_regs_size + cfun -> machine -> eh_return_data_regs_size ; nds32_emit_adjust_frame ( hard_frame_pointer_rtx , stack_pointer_rtx , fp_adjust ) ; } if ( cfun -> machine -> callee_saved_first_fpr_regno != SP_REGNUM ) { int fpr_offset = cfun -> machine -> local_size + cfun -> machine -> out_args_size + cfun -> machine -> callee_saved_fpr_regs_size ; if ( ! satisfies_constraint_Is14 ( GEN_INT ( fpr_offset ) ) ) { int fpr_space = cfun -> machine -> callee_saved_area_gpr_padding_bytes + cfun -> machine -> callee_saved_fpr_regs_size ;


<s> nds32_compute_stack_frame ( ) ; if ( frame_pointer_needed ) cfun -> machine -> fp_as_gp_p = false ; if ( cfun -> machine -> va_args_size != <NUM_LIT> ) { Rb = cfun -> machine -> va_args_first_regno ; Re = cfun -> machine -> va_args_last_regno ; nds32_emit_stack_push_multiple ( Rb , Re , false , false , false , true ) ; if ( cfun -> machine -> va_args_area_padding_bytes ) { sp_adjust = cfun -> machine -> va_args_area_padding_bytes ; nds32_emit_adjust_frame ( stack_pointer_rtx , stack_pointer_rtx , - <NUM_LIT> * sp_adjust ) ; } } if ( cfun -> machine -> naked_p && ! flag_pic ) return ; Rb = cfun -> machine -> callee_saved_first_gpr_regno ; Re = cfun -> machine -> callee_saved_last_gpr_regno ; if ( ! ( Rb == SP_REGNUM && Re == SP_REGNUM && cfun -> machine -> fp_size == <NUM_LIT> && cfun -> machine -> gp_size == <NUM_LIT> && cfun -> machine -> lp_size == <NUM_LIT> ) ) { nds32_emit_stack_push_multiple ( Rb , Re , cfun -> machine -> fp_size , cfun -> machine -> gp_size , cfun -> machine -> lp_size , false ) ; } if ( cfun -> machine -> use_eh_return_p ) { Rb = cfun -> machine -> eh_return_data_first_regno ; Re = cfun -> machine -> eh_return_data_last_regno ; nds32_emit_stack_push_multiple ( Rb , Re , false , false , false , false ) ; } if ( frame_pointer_needed ) { fp_adjust = cfun -> machine -> fp_size + cfun -> machine -> gp_size + cfun -> machine -> lp_size + cfun -> machine -> callee_saved_gpr_regs_size + cfun -> machine -> eh_return_data_regs_size ; nds32_emit_adjust_frame ( hard_frame_pointer_rtx , stack_pointer_rtx , fp_adjust ) ; } if ( cfun -> machine -> callee_saved_first_fpr_regno != SP_REGNUM ) { int fpr_offset = cfun -> machine -> local_size + cfun -> machine -> out_args_size + cfun -> machine -> callee_saved_fpr_regs_size ; if ( ! satisfies_constraint_Is14 ( GEN_INT ( fpr_offset ) ) ) { int fpr_space = cfun -> machine -> callee_saved_area_gpr_padding_bytes + cfun -> machine -> callee_saved_fpr_regs_size ; nds32_emit_adjust_frame ( stack_pointer_rtx , stack_pointer_rtx , - <NUM_LIT> * fpr_space ) ;


<s> if ( satisfies_constraint_Iu08 ( GEN_INT ( sp_adjust ) ) && NDS32_DOUBLE_WORD_ALIGN_P ( sp_adjust ) ) { nds32_emit_stack_v3push ( Rb , Re , sp_adjust ) ; if ( cfun -> machine -> callee_saved_first_fpr_regno != SP_REGNUM ) { int fpr_position = cfun -> machine -> local_size + cfun -> machine -> out_args_size ; nds32_emit_push_fpr_callee_saved ( fpr_position ) ; } if ( frame_pointer_needed ) { fp_adjust = cfun -> machine -> fp_size + cfun -> machine -> gp_size + cfun -> machine -> lp_size + cfun -> machine -> callee_saved_gpr_regs_size + sp_adjust ; nds32_emit_adjust_frame ( hard_frame_pointer_rtx , stack_pointer_rtx , fp_adjust ) ; } } else { if ( cfun -> machine -> callee_saved_first_fpr_regno != SP_REGNUM ) { fpr_space = cfun -> machine -> callee_saved_area_gpr_padding_bytes + cfun -> machine -> callee_saved_fpr_regs_size ; nds32_emit_stack_v3push ( Rb , Re , fpr_space ) ; nds32_emit_push_fpr_callee_saved ( <NUM_LIT> ) ; }


<s> nds32_compute_stack_frame ( ) ; if ( cfun -> machine -> callee_saved_gpr_regs_size > <NUM_LIT> ) df_set_regs_ever_live ( FP_REGNUM , <NUM_LIT> ) ; if ( frame_pointer_needed ) cfun -> machine -> fp_as_gp_p = false ; if ( cfun -> machine -> naked_p && ! flag_pic ) return ; Rb = cfun -> machine -> callee_saved_first_gpr_regno ; Re = cfun -> machine -> callee_saved_last_gpr_regno ; sp_adjust = cfun -> machine -> local_size + cfun -> machine -> out_args_size + cfun -> machine -> callee_saved_area_gpr_padding_bytes + cfun -> machine -> callee_saved_fpr_regs_size ; if ( satisfies_constraint_Iu08 ( GEN_INT ( sp_adjust ) ) && NDS32_DOUBLE_WORD_ALIGN_P ( sp_adjust ) ) { nds32_emit_stack_v3push ( Rb , Re , sp_adjust ) ; if ( cfun -> machine -> callee_saved_first_fpr_regno != SP_REGNUM ) { int fpr_position = cfun -> machine -> local_size + cfun -> machine -> out_args_size ; nds32_emit_push_fpr_callee_saved ( fpr_position ) ; } if ( frame_pointer_needed ) { fp_adjust = cfun -> machine -> fp_size + cfun -> machine -> gp_size + cfun -> machine -> lp_size + cfun -> machine -> callee_saved_gpr_regs_size + sp_adjust ;


<s> if ( arg . end_marker_p ( ) ) return NULL_RTX ; if ( ! arg . named ) { if ( TARGET_HARD_FLOAT ) return NULL_RTX ; if ( NDS32_ARG_PARTIAL_IN_GPR_REG_P ( cum -> gpr_offset , mode , type ) ) { regno = NDS32_AVAILABLE_REGNUM_FOR_GPR_ARG ( cum -> gpr_offset , mode , type ) ; return gen_rtx_REG ( mode , regno ) ; } return NULL_RTX ; } if ( TARGET_HARD_FLOAT ) { if ( GET_MODE_CLASS ( mode ) == MODE_FLOAT && NDS32_ARG_ENTIRE_IN_FPR_REG_P ( cum -> fpr_offset , mode , type ) ) { regno = NDS32_AVAILABLE_REGNUM_FOR_FPR_ARG ( cum -> fpr_offset , mode , type ) ; return gen_rtx_REG ( mode , regno ) ; } else if ( GET_MODE_CLASS ( mode ) != MODE_FLOAT && NDS32_ARG_ENTIRE_IN_GPR_REG_P ( cum -> gpr_offset , mode , type ) ) { regno = NDS32_AVAILABLE_REGNUM_FOR_GPR_ARG ( cum -> gpr_offset , mode , type ) ; return gen_rtx_REG ( mode , regno ) ; } }


<s> static void nds32_function_arg_advance ( cumulative_args_t ca , const function_arg_info & arg ) { CUMULATIVE_ARGS * cum = get_cumulative_args ( ca ) ; tree type = arg . type ; machine_mode mode = arg . mode ; if ( arg . named ) { if ( TARGET_HARD_FLOAT && GET_MODE_CLASS ( mode ) == MODE_FLOAT ) { cum -> fpr_offset = NDS32_AVAILABLE_REGNUM_FOR_FPR_ARG ( cum -> fpr_offset , mode , type ) - NDS32_FPR_ARG_FIRST_REGNUM + NDS32_NEED_N_REGS_FOR_ARG ( mode , type ) ; } else { cum -> gpr_offset = NDS32_AVAILABLE_REGNUM_FOR_GPR_ARG ( cum -> gpr_offset , mode , type ) - NDS32_GPR_ARG_FIRST_REGNUM + NDS32_NEED_N_REGS_FOR_ARG ( mode , type ) ; } } else { if ( ! TARGET_HARD_FLOAT ) { cum -> gpr_offset = NDS32_AVAILABLE_REGNUM_FOR_GPR_ARG ( cum -> gpr_offset , mode , type ) - NDS32_GPR_ARG_FIRST_REGNUM + NDS32_NEED_N_REGS_FOR_ARG ( mode , type ) ;


<s> static unsigned int nds32_function_arg_boundary ( machine_mode mode , const_tree type ) {

return ( nds32_needs_double_word_align ( mode , type ) ? NDS32_DOUBLE_WORD_ALIGNMENT : PARM_BOUNDARY ) ;


<s> static bool nds32_function_ok_for_sibcall ( tree decl , tree exp ATTRIBUTE_UNUSED ) {

return ( ! TARGET_V3PUSH && ! nds32_isr_function_p ( current_function_decl ) && ( cfun -> machine -> va_args_size == <NUM_LIT> ) && decl && ! flag_pic ) ;


<s> unsignedp = TYPE_UNSIGNED ( ret_type ) ; if ( INTEGRAL_TYPE_P ( ret_type ) ) mode = promote_mode ( ret_type , mode , & unsignedp ) ; if ( TARGET_HARD_FLOAT && ( mode == SFmode || mode == DFmode ) ) return gen_rtx_REG ( mode , NDS32_FPR_RET_FIRST_REGNUM ) ; else return gen_rtx_REG ( mode , NDS32_GPR_RET_FIRST_REGNUM ) ;


<s> if ( regno == NDS32_GPR_RET_FIRST_REGNUM || ( TARGET_HARD_FLOAT && regno == NDS32_FPR_RET_FIRST_REGNUM ) ) return true ;


<s> if ( regno >= FIRST_PSEUDO_REGISTER ) return true ; if ( ( TARGET_FPU_SINGLE || TARGET_FPU_DOUBLE ) && NDS32_IS_FPR_REGNUM ( regno ) ) { if ( NDS32_IS_EXT_FPR_REGNUM ( regno ) ) return ( NDS32_FPR_REGNO_OK_FOR_DOUBLE ( regno ) && ( mode == DFmode ) ) ; else if ( mode == SFmode || mode == SImode ) return NDS32_FPR_REGNO_OK_FOR_SINGLE ( regno ) ; else if ( mode == DFmode ) return NDS32_FPR_REGNO_OK_FOR_DOUBLE ( regno ) ; return false ; } if ( regno <= NDS32_LAST_GPR_REGNUM ) return ( targetm . hard_regno_nregs ( regno , mode ) == <NUM_LIT> || ! ( ( regno ) & <NUM_LIT> ) ) ; return false ;


<s> return ( ( GET_MODE_SIZE ( mode ) + UNITS_PER_WORD - <NUM_LIT> ) / UNITS_PER_WORD ) ;


<s> offset = ( cfun -> machine -> fp_size + cfun -> machine -> gp_size + cfun -> machine -> lp_size + cfun -> machine -> callee_saved_gpr_regs_size + cfun -> machine -> callee_saved_area_gpr_padding_bytes + cfun -> machine -> callee_saved_fpr_regs_size + cfun -> machine -> eh_return_data_regs_size + cfun -> machine -> local_size + cfun -> machine -> out_args_size ) ; } else if ( from_reg == ARG_POINTER_REGNUM && to_reg == HARD_FRAME_POINTER_REGNUM ) { offset = <NUM_LIT> ; } else if ( from_reg == FRAME_POINTER_REGNUM && to_reg == STACK_POINTER_REGNUM ) { offset = ( cfun -> machine -> local_size + cfun -> machine -> out_args_size ) ; } else if ( from_reg == FRAME_POINTER_REGNUM && to_reg == HARD_FRAME_POINTER_REGNUM ) { offset = ( - <NUM_LIT> ) * ( cfun -> machine -> fp_size + cfun -> machine -> gp_size + cfun -> machine -> lp_size + cfun -> machine -> callee_saved_gpr_regs_size + cfun -> machine -> callee_saved_area_gpr_padding_bytes + cfun -> machine -> callee_saved_fpr_regs_size + cfun -> machine -> eh_return_data_regs_size ) ; } else { gcc_unreachable ( ) ; } return offset ;


<s> } else if ( from_reg == ARG_POINTER_REGNUM && to_reg == HARD_FRAME_POINTER_REGNUM ) { offset = <NUM_LIT> ; } else if ( from_reg == FRAME_POINTER_REGNUM && to_reg == STACK_POINTER_REGNUM ) { offset = ( cfun -> machine -> local_size + cfun -> machine -> out_args_size ) ; } else if ( from_reg == FRAME_POINTER_REGNUM && to_reg == HARD_FRAME_POINTER_REGNUM ) {

offset = ( - <NUM_LIT> ) * ( cfun -> machine -> fp_size + cfun -> machine -> gp_size + cfun -> machine -> lp_size + cfun -> machine -> callee_saved_gpr_regs_size + cfun -> machine -> callee_saved_area_gpr_padding_bytes + cfun -> machine -> callee_saved_fpr_regs_size + cfun -> machine -> eh_return_data_regs_size ) ;


<s> void nds32_init_cumulative_args ( CUMULATIVE_ARGS * cum , tree fntype ATTRIBUTE_UNUSED , rtx libname ATTRIBUTE_UNUSED , tree fndecl ATTRIBUTE_UNUSED , int n_named_args ATTRIBUTE_UNUSED ) {


<s> machine -> use_eh_return_p = <NUM_LIT> ; machine -> naked_p = <NUM_LIT> ; machine -> fp_as_gp_p = <NUM_LIT> ;

machine -> strict_aligned_p = <NUM_LIT> ;


<s> static struct machine_function * nds32_init_machine_status ( void ) { struct machine_function * machine ; machine = ggc_cleared_alloc < machine_function > ( ) ; machine -> use_eh_return_p = <NUM_LIT> ; machine -> naked_p = <NUM_LIT> ; machine -> fp_as_gp_p = <NUM_LIT> ; machine -> strict_aligned_p = <NUM_LIT> ; machine -> attr_naked_p = <NUM_LIT> ; machine -> attr_no_prologue_p = <NUM_LIT> ;


<s> tree id_list ; tree id ; tree nmi , warm ; unsigned int lower_bound ; unsigned int upper_bound ; id_list = TREE_VALUE ( reset ) ; id = TREE_VALUE ( id_list ) ; lower_bound = <NUM_LIT> ; upper_bound = <NUM_LIT> ; if ( TREE_CODE ( id ) != INTEGER_CST || wi :: ltu_p ( wi :: to_wide ( id ) , lower_bound ) || wi :: gtu_p ( wi :: to_wide ( id ) , upper_bound ) ) error ( <STR_LIT> ) ; nmi = lookup_attribute ( <STR_LIT> , func_attrs ) ; warm = lookup_attribute ( <STR_LIT> , func_attrs ) ; if ( nmi != NULL_TREE ) { tree nmi_func_list ; tree nmi_func ; nmi_func_list = TREE_VALUE ( nmi ) ; nmi_func = TREE_VALUE ( nmi_func_list ) ; if ( TREE_CODE ( nmi_func ) != IDENTIFIER_NODE ) error ( <STR_LIT> ) ; } if ( warm != NULL_TREE ) { tree warm_func_list ; tree warm_func ; warm_func_list = TREE_VALUE ( warm ) ; warm_func = TREE_VALUE ( warm_func_list ) ; if ( TREE_CODE ( warm_func ) != IDENTIFIER_NODE ) error ( <STR_LIT> ) ; } } else {


<s> if ( TARGET_ICT_MODEL_LARGE && nds32_indirect_call_referenced_p ( x ) ) return false ; if ( TARGET_CMODEL_LARGE && ( reload_completed || reload_in_progress || lra_in_progress ) ) return false ; if ( TARGET_CMODEL_MEDIUM && ( NDS32_SYMBOL_REF_RODATA_P ( x ) || CONSTANT_POOL_ADDRESS_P ( x ) ) && ( reload_completed || reload_in_progress || lra_in_progress ) ) return false ; return true ; case CONST : if ( GET_CODE ( XEXP ( x , <NUM_LIT> ) ) == PLUS ) { rtx plus_op = XEXP ( x , <NUM_LIT> ) ; rtx op0 = XEXP ( plus_op , <NUM_LIT> ) ; rtx op1 = XEXP ( plus_op , <NUM_LIT> ) ; if ( GET_CODE ( op0 ) == SYMBOL_REF && CONST_INT_P ( op1 ) ) { if ( flag_pic || SYMBOL_REF_TLS_MODEL ( op0 ) ) return false ; if ( TARGET_CMODEL_LARGE && ( reload_completed || reload_in_progress || lra_in_progress ) ) return false ; if ( TARGET_CMODEL_MEDIUM && NDS32_SYMBOL_REF_RODATA_P ( op0 ) && ( reload_completed || reload_in_progress || lra_in_progress ) ) return false ; return true ; } } return false ; case POST_MODIFY : if ( GET_CODE ( XEXP ( x , <NUM_LIT> ) ) == REG && GET_CODE ( XEXP ( x , <NUM_LIT> ) ) == PLUS ) { rtx plus_op = XEXP ( x , <NUM_LIT> ) ; rtx op0 = XEXP ( plus_op , <NUM_LIT> ) ; rtx op1 = XEXP ( plus_op , <NUM_LIT> ) ; if ( nds32_address_register_rtx_p ( op0 , strict ) && nds32_legitimate_index_p ( mode , op1 , strict ) ) return true ; else return false ; } return false ; case POST_INC : case POST_DEC : if ( nds32_address_register_rtx_p ( XEXP ( x , <NUM_LIT> ) , strict ) ) return true ; else return false ; case PLUS : if ( nds32_address_register_rtx_p ( XEXP ( x , <NUM_LIT> ) , strict ) && nds32_legitimate_index_p ( mode , XEXP ( x , <NUM_LIT> ) , strict ) ) return true ; else if ( nds32_address_register_rtx_p ( XEXP ( x , <NUM_LIT> ) , strict ) && nds32_legitimate_index_p ( mode , XEXP ( x , <NUM_LIT> ) , strict ) ) return true ; else return false ; case LO_SUM : { rtx sym = NULL_RTX ;


<s> case UNSPEC_GOT : case UNSPEC_GOTOFF : case UNSPEC_PLT : case UNSPEC_TLSGD : case UNSPEC_TLSLD : case UNSPEC_TLSIE : case UNSPEC_TLSLE : case UNSPEC_ICT : return false ; default : return true ; } } break ; case SYMBOL_REF : if ( SYMBOL_REF_TLS_MODEL ( x ) ) return false ; break ;


<s> if ( ! CONST_INT_P ( XEXP ( x , <NUM_LIT> ) ) ) return false ; x = XEXP ( x , <NUM_LIT> ) ; } if ( GET_CODE ( x ) == UNSPEC ) { switch ( XINT ( x , <NUM_LIT> ) ) { case UNSPEC_GOT : case UNSPEC_GOTOFF : case UNSPEC_PLT : case UNSPEC_TLSGD : case UNSPEC_TLSLD : case UNSPEC_TLSIE : case UNSPEC_TLSLE : case UNSPEC_ICT : return false ; default : return true ; } } break ; case SYMBOL_REF : if ( SYMBOL_REF_TLS_MODEL ( x ) ) return false ; break ;


<s> if ( satisfies_constraint_Is17 ( gen_int_mode ( INTVAL ( index ) + <NUM_LIT> , SImode ) ) ) { if ( ( TARGET_FPU_SINGLE || TARGET_FPU_DOUBLE ) ) { if ( ! satisfies_constraint_Is14 ( index ) ) return false ; } if ( ! cfun -> machine -> strict_aligned_p ) return true ; else if ( NDS32_SINGLE_WORD_ALIGN_P ( INTVAL ( index ) ) ) return true ; } break ; default : return false ; } return false ; case MULT : op0 = XEXP ( index , <NUM_LIT> ) ; op1 = XEXP ( index , <NUM_LIT> ) ; if ( REG_P ( op0 ) && CONST_INT_P ( op1 ) ) { int multiplier ; multiplier = INTVAL ( op1 ) ; if ( multiplier != <NUM_LIT> && multiplier != <NUM_LIT> && multiplier != <NUM_LIT> && multiplier != <NUM_LIT> ) return false ; regno = REGNO ( op0 ) ; if ( strict ) return REGNO_OK_FOR_INDEX_P ( regno ) ; else return true ; } return false ; case ASHIFT : op0 = XEXP ( index , <NUM_LIT> ) ; op1 = XEXP ( index , <NUM_LIT> ) ; if ( REG_P ( op0 ) && CONST_INT_P ( op1 ) ) { int sv ; sv = INTVAL ( op1 ) ; if ( sv != <NUM_LIT> && sv != <NUM_LIT> && sv != <NUM_LIT> && sv != <NUM_LIT> ) return false ; regno = REGNO ( op0 ) ; if ( strict ) return REGNO_OK_FOR_INDEX_P ( regno ) ; else return true ; } return false ;


<s> if ( ! satisfies_constraint_Is14 ( index ) ) return false ; } if ( ! cfun -> machine -> strict_aligned_p ) return true ; else if ( NDS32_SINGLE_WORD_ALIGN_P ( INTVAL ( index ) ) ) return true ; } break ; case <NUM_LIT> : if ( satisfies_constraint_Is17 ( gen_int_mode ( INTVAL ( index ) + <NUM_LIT> , SImode ) ) ) { if ( ( TARGET_FPU_SINGLE || TARGET_FPU_DOUBLE ) ) { if ( ! satisfies_constraint_Is14 ( index ) ) return false ; } if ( ! cfun -> machine -> strict_aligned_p ) return true ; else if ( NDS32_SINGLE_WORD_ALIGN_P ( INTVAL ( index ) ) ) return true ; } break ; default : return false ; } return false ; case MULT : op0 = XEXP ( index , <NUM_LIT> ) ; op1 = XEXP ( index , <NUM_LIT> ) ; if ( REG_P ( op0 ) && CONST_INT_P ( op1 ) ) { int multiplier ; multiplier = INTVAL ( op1 ) ; if ( multiplier != <NUM_LIT> && multiplier != <NUM_LIT> && multiplier != <NUM_LIT> && multiplier != <NUM_LIT> ) return false ; regno = REGNO ( op0 ) ; if ( strict ) return REGNO_OK_FOR_INDEX_P ( regno ) ;


<s> static rtx nds32_legitimize_address ( rtx x , rtx oldx ATTRIBUTE_UNUSED , machine_mode mode ATTRIBUTE_UNUSED ) { if ( nds32_tls_referenced_p ( x ) ) x = nds32_legitimize_tls_address ( x ) ; else if ( flag_pic && SYMBOLIC_CONST_P ( x ) ) x = nds32_legitimize_pic_address ( x ) ;

else if ( TARGET_ICT_MODEL_LARGE && nds32_indirect_call_referenced_p ( x ) ) x = nds32_legitimize_ict_address ( x ) ;


<s> static rtx nds32_libcall_value ( machine_mode mode , const_rtx fun ATTRIBUTE_UNUSED ) { if ( TARGET_HARD_FLOAT && ( mode == SFmode || mode == DFmode ) ) return gen_rtx_REG ( mode , NDS32_FPR_RET_FIRST_REGNUM ) ;

return gen_rtx_REG ( mode , NDS32_GPR_RET_FIRST_REGNUM ) ;


<s> static rtx nds32_libcall_value ( machine_mode mode , const_rtx fun ATTRIBUTE_UNUSED ) {

if ( TARGET_HARD_FLOAT && ( mode == SFmode || mode == DFmode ) ) return gen_rtx_REG ( mode , NDS32_FPR_RET_FIRST_REGNUM ) ;


<s> static rtx_insn * nds32_md_asm_adjust ( vec < rtx > & outputs ATTRIBUTE_UNUSED , vec < rtx > & inputs ATTRIBUTE_UNUSED , vec < machine_mode > & input_modes ATTRIBUTE_UNUSED , vec < const char * > & constraints ATTRIBUTE_UNUSED , vec < rtx > & clobbers , HARD_REG_SET & clobbered_regs , location_t ) { if ( ! flag_inline_asm_r15 ) { clobbers . safe_push ( gen_rtx_REG ( SImode , TA_REGNUM ) ) ; SET_HARD_REG_BIT ( clobbered_regs , TA_REGNUM ) ; }


<s> static int nds32_memory_move_cost ( machine_mode mode ATTRIBUTE_UNUSED , reg_class_t rclass ATTRIBUTE_UNUSED , bool in ATTRIBUTE_UNUSED ) {


<s> static tree nds32_merge_decl_attributes ( tree olddecl , tree newdecl ) { tree combined_attrs ;

combined_attrs = merge_attributes ( DECL_ATTRIBUTES ( olddecl ) , DECL_ATTRIBUTES ( newdecl ) ) ;


<s> static bool nds32_modes_tieable_p ( machine_mode mode1 , machine_mode mode2 ) { if ( ( GET_MODE_CLASS ( mode1 ) == MODE_INT && GET_MODE_CLASS ( mode2 ) == MODE_INT ) && GET_MODE_SIZE ( mode1 ) <= UNITS_PER_WORD && GET_MODE_SIZE ( mode2 ) <= UNITS_PER_WORD ) return true ; if ( GET_MODE_SIZE ( mode1 ) == GET_MODE_SIZE ( mode2 ) ) { if ( ( TARGET_FPU_SINGLE && ! TARGET_FPU_DOUBLE ) && ( mode1 == DFmode || mode2 == DFmode ) ) return false ; else return true ;


<s> if ( TARGET_HARD_FLOAT ) return must_pass_in_stack_var_size_or_pad ( arg ) ; else return must_pass_in_stack_var_size ( arg ) ;


<s> t_naked = lookup_attribute ( <STR_LIT> , DECL_ATTRIBUTES ( func ) ) ; t_no_prologue = lookup_attribute ( <STR_LIT> , DECL_ATTRIBUTES ( func ) ) ;

return ( ( t_naked != NULL_TREE ) || ( t_no_prologue != NULL_TREE ) ) ;


<s> static bool nds32_needs_double_word_align ( machine_mode mode , const_tree type ) { unsigned int align ;

align = NDS32_MODE_TYPE_ALIGN ( mode , type ) ;


<s> static void nds32_option_override ( void ) { if ( TARGET_ISA_V2 ) { target_flags &= ~ MASK_V3PUSH ; } if ( TARGET_ISA_V3 ) { if ( nds32_arch_option == ARCH_V3J ) target_flags |= MASK_REDUCED_REGS ; } if ( TARGET_ISA_V3M ) { target_flags |= MASK_REDUCED_REGS ; target_flags &= ~ MASK_EXT_PERF ; target_flags &= ~ MASK_EXT_PERF2 ; target_flags &= ~ MASK_EXT_STRING ; if ( flag_pic ) error ( <STR_LIT> ) ; } if ( TARGET_REDUCED_REGS ) { int r ; for ( r = <NUM_LIT> ; r <= <NUM_LIT> ; r ++ ) fixed_regs [ r ] = call_used_regs [ r ] = <NUM_LIT> ; for ( r = <NUM_LIT> ; r <= <NUM_LIT> ; r ++ ) fixed_regs [ r ] = call_used_regs [ r ] = <NUM_LIT> ; } if ( TARGET_FORCE_FP_AS_GP ) fixed_regs [ FP_REGNUM ] = call_used_regs [ FP_REGNUM ] = <NUM_LIT> ; if ( ! TARGET_16_BIT ) { target_flags &= ~ MASK_V3PUSH ; } if ( TARGET_HARD_FLOAT && ! ( TARGET_FPU_SINGLE || TARGET_FPU_DOUBLE ) ) { if ( nds32_arch_option == ARCH_V3S || nds32_arch_option == ARCH_V3F ) error ( <STR_LIT> <STR_LIT> ) ; else error ( <STR_LIT> <STR_LIT> ) ; }


<s> static bool nds32_option_pragma_parse ( tree args ATTRIBUTE_UNUSED , tree pop_target ATTRIBUTE_UNUSED ) { return false ;


<s> gcc_assert ( zero_position != - <NUM_LIT> ) ; fprintf ( stream , HOST_WIDE_INT_PRINT_DEC , zero_position ) ; return ; case 'e' : gcc_assert ( MEM_P ( x ) && GET_CODE ( XEXP ( x , <NUM_LIT> ) ) == PLUS && GET_CODE ( XEXP ( XEXP ( x , <NUM_LIT> ) , <NUM_LIT> ) ) == CONST_INT ) ; fprintf ( stream , HOST_WIDE_INT_PRINT_DEC , INTVAL ( XEXP ( XEXP ( x , <NUM_LIT> ) , <NUM_LIT> ) ) ) ; return ; case 'v' : gcc_assert ( CONST_INT_P ( x ) && ( INTVAL ( x ) == <NUM_LIT> || INTVAL ( x ) == <NUM_LIT> || INTVAL ( x ) == <NUM_LIT> || INTVAL ( x ) == <NUM_LIT> ) ) ; fprintf ( stream , HOST_WIDE_INT_PRINT_DEC , INTVAL ( x ) / <NUM_LIT> ) ; return ; case 'B' : gcc_assert ( CONST_INT_P ( x ) ) ; one_position = exact_log2 ( UINTVAL ( x ) & GET_MODE_MASK ( SImode ) ) ; gcc_assert ( one_position != - <NUM_LIT> ) ; fprintf ( stream , HOST_WIDE_INT_PRINT_DEC , one_position ) ; return ; case 'L' : gcc_assert ( REG_P ( x ) ) ; pick_lsb_p = true ; break ; case 'H' : gcc_assert ( REG_P ( x ) ) ; pick_msb_p = true ; break ; case 'V' : gcc_assert ( CONST_INT_P ( x ) ) ; if ( op_value < <NUM_LIT> && op_value >= <NUM_LIT> ) { fprintf ( stream , HOST_WIDE_INT_PRINT_DEC , op_value ) ; } else if ( op_value < <NUM_LIT> || op_value >= ( ( int ) ARRAY_SIZE ( nds32_intrinsic_register_names ) + <NUM_LIT> ) ) { error ( <STR_LIT> ) ; } else { fprintf ( stream , <STR_LIT> , nds32_intrinsic_register_names [ op_value - <NUM_LIT> ] ) ; } return ; case 'R' : if ( op_value < <NUM_LIT> || op_value > <NUM_LIT> ) error ( <STR_LIT> ) ; fprintf ( stream , <STR_LIT> , nds32_cctl_names [ op_value ] ) ; return ; case 'T' : if ( op_value < <NUM_LIT> || op_value > <NUM_LIT> ) error ( <STR_LIT> ) ; fprintf ( stream , <STR_LIT> , nds32_cctl_names [ op_value + <NUM_LIT> ] ) ; return ; case 'U' : if ( op_value < <NUM_LIT> || op_value > <NUM_LIT> ) error ( <STR_LIT> ) ; fprintf ( stream , <STR_LIT> , nds32_cctl_names [ op_value + <NUM_LIT> ] ) ; return ; case 'X' :


<s> if ( op_value < <NUM_LIT> || op_value > <NUM_LIT> ) error ( <STR_LIT> ) ; fprintf ( stream , <STR_LIT> , nds32_cctl_names [ op_value + <NUM_LIT> ] ) ; return ; case 'U' : if ( op_value < <NUM_LIT> || op_value > <NUM_LIT> ) error ( <STR_LIT> ) ; fprintf ( stream , <STR_LIT> , nds32_cctl_names [ op_value + <NUM_LIT> ] ) ; return ; case 'X' : if ( op_value < <NUM_LIT> || op_value > <NUM_LIT> ) error ( <STR_LIT> ) ; fprintf ( stream , <STR_LIT> , nds32_cctl_names [ op_value + <NUM_LIT> ] ) ; return ; case 'W' : if ( op_value < <NUM_LIT> || op_value > <NUM_LIT> ) error ( <STR_LIT> ) ; fprintf ( stream , <STR_LIT> , nds32_cctl_names [ op_value + <NUM_LIT> ] ) ; return ; case 'Z' : fprintf ( stream , <STR_LIT> , nds32_dpref_names [ op_value ] ) ; return ; default : output_operand_lossage ( <STR_LIT> ) ; break ; } switch ( GET_CODE ( x ) ) { case LABEL_REF : output_addr_const ( stream , x ) ; break ; case SYMBOL_REF : output_addr_const ( stream , x ) ; if ( ! TARGET_LINUX_ABI && nds32_indirect_call_referenced_p ( x ) ) fprintf ( stream , <STR_LIT> ) ; break ; case REG : if ( ( GET_MODE ( x ) == DImode || GET_MODE ( x ) == DFmode ) && NDS32_IS_FPR_REGNUM ( REGNO ( x ) ) ) { regno = REGNO ( x ) ; if ( ! NDS32_FPR_REGNO_OK_FOR_DOUBLE ( regno ) ) { output_operand_lossage ( <STR_LIT> , code ) ; break ; } fprintf ( stream , <STR_LIT> , ( regno - NDS32_FIRST_FPR_REGNUM ) >> <NUM_LIT> ) ; break ; } if ( ( GET_MODE ( x ) == DImode || GET_MODE ( x ) == DFmode ) && NDS32_IS_GPR_REGNUM ( REGNO ( x ) ) ) { if ( ( pick_lsb_p && WORDS_BIG_ENDIAN ) || ( pick_msb_p && ! WORDS_BIG_ENDIAN ) ) { regno = REGNO ( x ) ; regno ++ ; fputs ( reg_names [ regno ] , stream ) ; break ; } } if ( TARGET_REDUCED_REGS && REGNO ( x ) == STATIC_CHAIN_REGNUM ) sorry ( <STR_LIT> ) ; fputs ( reg_names [ REGNO ( x ) ] , stream ) ; break ; case MEM : output_address ( GET_MODE ( x ) , XEXP ( x , <NUM_LIT> ) ) ; break ; case HIGH : if ( GET_CODE ( XEXP ( x , <NUM_LIT> ) ) == CONST_DOUBLE ) { const REAL_VALUE_TYPE * rv ;


<s> if ( from != FP_REGS && to == FP_REGS ) return <NUM_LIT> ; } else {

if ( ( from == FP_REGS && to != FP_REGS ) || ( from != FP_REGS && to == FP_REGS ) ) return <NUM_LIT> ;


<s> else if ( hard_regno < <NUM_LIT> ) return <NUM_LIT> ; else if ( hard_regno < <NUM_LIT> ) return <NUM_LIT> ; else return <NUM_LIT> ;


<s> else if ( hard_regno < <NUM_LIT> ) return <NUM_LIT> ; else if ( hard_regno < <NUM_LIT> ) return <NUM_LIT> ; else return <NUM_LIT> ; } else { if ( hard_regno > <NUM_LIT> ) return <NUM_LIT> ; else return <NUM_LIT> ;


<s> else if ( regno >= <NUM_LIT> && regno <= <NUM_LIT> ) return MIDDLE_REGS ; else if ( regno >= <NUM_LIT> && regno <= <NUM_LIT> ) return HIGH_REGS ; else if ( regno == <NUM_LIT> ) return R15_TA_REG ; else if ( regno >= <NUM_LIT> && regno <= <NUM_LIT> ) return MIDDLE_REGS ; else if ( regno >= <NUM_LIT> && regno <= <NUM_LIT> ) return HIGH_REGS ; else if ( regno == <NUM_LIT> || regno == <NUM_LIT> ) { return GENERAL_REGS ; } else if ( regno >= <NUM_LIT> && regno <= <NUM_LIT> ) return FP_REGS ;


<s> rtx addr ; if ( count != <NUM_LIT> ) { offset = - <NUM_LIT> ; addr = plus_constant ( Pmode , frameaddr , offset ) ; addr = memory_address ( Pmode , addr ) ; return gen_rtx_MEM ( Pmode , addr ) ; }

return get_hard_reg_initial_val ( Pmode , LP_REGNUM ) ;


<s> rtx nds32_return_addr_rtx ( int count , rtx frameaddr ) { int offset ; rtx addr ; if ( count != <NUM_LIT> ) { offset = - <NUM_LIT> ; addr = plus_constant ( Pmode , frameaddr , offset ) ; addr = memory_address ( Pmode , addr ) ; return gen_rtx_MEM ( Pmode , addr ) ; } return get_hard_reg_initial_val ( Pmode , LP_REGNUM ) ;


<s> static bool nds32_return_in_memory ( const_tree type , const_tree fntype ATTRIBUTE_UNUSED ) { HOST_WIDE_INT size = int_size_in_bytes ( type ) ;

if ( TREE_CODE ( type ) == COMPLEX_TYPE ) if ( size < <NUM_LIT> || size > <NUM_LIT> * UNITS_PER_WORD ) return true ;


<s> HOST_WIDE_INT size = int_size_in_bytes ( type ) ;


<s> static bool nds32_rtx_costs ( rtx x , machine_mode mode , int outer_code , int opno , int * total , bool speed ) { return nds32_rtx_costs_impl ( x , mode , outer_code , opno , total , speed ) ;


<s> return nds32_rtx_costs_impl ( x , mode , outer_code , opno , total , speed ) ;


<s> num_of_used_regs = NDS32_AVAILABLE_REGNUM_FOR_GPR_ARG ( cum -> gpr_offset , arg . mode , arg . type ) + NDS32_NEED_N_REGS_FOR_ARG ( arg . mode , arg . type ) ; remaining_reg_count = total_args_regs - num_of_used_regs ; * pretend_args_size = remaining_reg_count * UNITS_PER_WORD ;


<s> num_of_used_regs = NDS32_AVAILABLE_REGNUM_FOR_GPR_ARG ( cum -> gpr_offset , arg . mode , arg . type ) + NDS32_NEED_N_REGS_FOR_ARG ( arg . mode , arg . type ) ; remaining_reg_count = total_args_regs - num_of_used_regs ; * pretend_args_size = remaining_reg_count * UNITS_PER_WORD ; return ;


<s> if ( pass_name && ( ( strcmp ( pass_name , <STR_LIT> ) == <NUM_LIT> ) || ( strcmp ( pass_name , <STR_LIT> ) == <NUM_LIT> ) ) ) return ! satisfies_constraint_Da ( mem ) || MEM_VOLATILE_P ( mem ) ; return false ;


<s> rtx mem = load_p ? operands [ <NUM_LIT> ] : operands [ <NUM_LIT> ] ;

if ( optimize == <NUM_LIT> || ! flag_schedule_insns_after_reload ) return ! satisfies_constraint_Da ( mem ) || MEM_VOLATILE_P ( mem ) ;


<s> static bool nds32_strict_argument_naming ( cumulative_args_t ca ATTRIBUTE_UNUSED ) { return true ;


<s> rtx_insn * insn ; if ( ! NDS32_ALIGN_P ( ) ) return <NUM_LIT> ; insn = next_active_insn ( label ) ; if ( insn == <NUM_LIT> || ( get_attr_length ( insn ) == <NUM_LIT> && ! JUMP_P ( insn ) && ! CALL_P ( insn ) ) ) return <NUM_LIT> ; else return <NUM_LIT> ;


<s> for ( i = <NUM_LIT> ; i < ( TRAMPOLINE_SIZE + nds32_cache_block_size - <NUM_LIT> ) / nds32_cache_block_size ; i ++ ) { emit_move_insn ( tmp_reg , plus_constant ( Pmode , sync_cache_addr , nds32_cache_block_size * i ) ) ; emit_insn ( isync_insn ) ; } } else if ( TRAMPOLINE_SIZE > nds32_cache_block_size ) { for ( i = <NUM_LIT> ; i < ( TRAMPOLINE_SIZE + nds32_cache_block_size - <NUM_LIT> ) / nds32_cache_block_size ; i ++ ) { emit_move_insn ( tmp_reg , plus_constant ( Pmode , sync_cache_addr , nds32_cache_block_size * i ) ) ; emit_insn ( isync_insn ) ; } emit_move_insn ( tmp_reg , plus_constant ( Pmode , sync_cache_addr , TRAMPOLINE_SIZE - <NUM_LIT> ) ) ; emit_insn ( isync_insn ) ; } else { emit_move_insn ( tmp_reg , sync_cache_addr ) ; emit_insn ( isync_insn ) ; emit_move_insn ( tmp_reg , plus_constant ( Pmode , sync_cache_addr , TRAMPOLINE_SIZE - <NUM_LIT> ) ) ; emit_insn ( isync_insn ) ;


<s> static bool nds32_use_blocks_for_constant_p ( machine_mode mode , const_rtx x ATTRIBUTE_UNUSED ) {

if ( ( TARGET_FPU_SINGLE || TARGET_FPU_DOUBLE ) && ( mode == DFmode || mode == SFmode ) ) return true ;


<s> static bool nds32_use_blocks_for_constant_p ( machine_mode mode , const_rtx x ATTRIBUTE_UNUSED ) { if ( ( TARGET_FPU_SINGLE || TARGET_FPU_DOUBLE ) && ( mode == DFmode || mode == SFmode ) ) return true ; else return false ;


<s> bool nds32_use_load_post_increment ( machine_mode mode ) {

return ( GET_MODE_SIZE ( mode ) <= GET_MODE_SIZE ( E_DImode ) ) ;


<s> if ( ! NDS32_EXT_DSP_P ( ) ) return word_mode ; switch ( mode ) { case E_QImode : return V4QImode ;


<s> if ( ! NDS32_EXT_DSP_P ( ) ) return word_mode ;


<s> bool nds32_vector_mode_supported_p ( machine_mode mode ) { if ( mode == V4QImode || mode == V2HImode ) return NDS32_EXT_DSP_P ( ) ;