<s> case POST_MODIFY : case POST_INC : case POST_DEC : return <NUM_LIT> ; case SYMBOL_REF : return COSTS_N_INSNS ( <NUM_LIT> ) ; case CONST : return COSTS_N_INSNS ( <NUM_LIT> ) ; case REG : return COSTS_N_INSNS ( <NUM_LIT> ) ; case PLUS : plus0 = XEXP ( address , <NUM_LIT> ) ; plus1 = XEXP ( address , <NUM_LIT> ) ; if ( REG_P ( plus0 ) && CONST_INT_P ( plus1 ) ) { if ( satisfies_constraint_Iu05 ( plus1 ) ) return ( COSTS_N_INSNS ( <NUM_LIT> ) - <NUM_LIT> ) ; else return COSTS_N_INSNS ( <NUM_LIT> ) ;


<s> case PLUS : plus0 = XEXP ( address , <NUM_LIT> ) ; plus1 = XEXP ( address , <NUM_LIT> ) ; if ( REG_P ( plus0 ) && CONST_INT_P ( plus1 ) ) { if ( satisfies_constraint_Iu05 ( plus1 ) ) return ( COSTS_N_INSNS ( <NUM_LIT> ) - <NUM_LIT> ) ; else return COSTS_N_INSNS ( <NUM_LIT> ) ; } return COSTS_N_INSNS ( <NUM_LIT> ) ; default : break ; } return COSTS_N_INSNS ( <NUM_LIT> ) ;


<s> return false ; case USE : * total = <NUM_LIT> ; break ; case CONST_INT : if ( outer_code == SET ) { if ( satisfies_constraint_Is05 ( x ) ) * total = COSTS_N_INSNS ( <NUM_LIT> ) - <NUM_LIT> ; else if ( satisfies_constraint_Is20 ( x ) ) * total = COSTS_N_INSNS ( <NUM_LIT> ) ; else * total = COSTS_N_INSNS ( <NUM_LIT> ) ; } else if ( outer_code == PLUS || outer_code == MINUS ) { if ( satisfies_constraint_Iu05 ( x ) ) * total = COSTS_N_INSNS ( <NUM_LIT> ) - <NUM_LIT> ;


<s> case CONST_INT : if ( outer_code == SET ) { if ( satisfies_constraint_Is05 ( x ) ) * total = COSTS_N_INSNS ( <NUM_LIT> ) - <NUM_LIT> ; else if ( satisfies_constraint_Is20 ( x ) ) * total = COSTS_N_INSNS ( <NUM_LIT> ) ; else * total = COSTS_N_INSNS ( <NUM_LIT> ) ; } else if ( outer_code == PLUS || outer_code == MINUS ) { if ( satisfies_constraint_Iu05 ( x ) ) * total = COSTS_N_INSNS ( <NUM_LIT> ) - <NUM_LIT> ; else * total = COSTS_N_INSNS ( <NUM_LIT> ) ; } else if ( outer_code == ASHIFT ) { if ( satisfies_constraint_Iu03 ( x ) ) * total = COSTS_N_INSNS ( <NUM_LIT> ) - <NUM_LIT> ; else * total = COSTS_N_INSNS ( <NUM_LIT> ) ; } else if ( outer_code == ASHIFTRT || outer_code == LSHIFTRT ) { if ( satisfies_constraint_Iu05 ( x ) ) * total = COSTS_N_INSNS ( <NUM_LIT> ) - <NUM_LIT> ; else * total = COSTS_N_INSNS ( <NUM_LIT> ) ; } else { * total = COSTS_N_INSNS ( <NUM_LIT> ) ; } break ; case CONST_DOUBLE :


<s> if ( speed ) goto performance_cost ; else goto size_cost ; performance_cost : switch ( code ) { case SET : return false ; case USE : * total = <NUM_LIT> ; break ; case MULT : * total = COSTS_N_INSNS ( <NUM_LIT> ) ; break ; case DIV : case UDIV : case MOD : case UMOD : * total = COSTS_N_INSNS ( <NUM_LIT> ) ; break ; default : * total = COSTS_N_INSNS ( <NUM_LIT> ) ; break ; } return true ; size_cost : switch ( code ) { case SET : return false ; case USE : * total = <NUM_LIT> ; break ; case CONST_INT :


if ( current_pass -> tv_id == TV_FWPROP ) return nds32_address_cost_speed_fwprop ( address ) ;


<s> int nds32_address_cost_impl ( rtx address , machine_mode mode ATTRIBUTE_UNUSED , addr_space_t as ATTRIBUTE_UNUSED , bool speed_p ) { if ( speed_p ) { if ( current_pass -> tv_id == TV_FWPROP ) return nds32_address_cost_speed_fwprop ( address ) ; else return nds32_address_cost_speed_prefer ( address ) ;


<s> plus1 = XEXP ( address , <NUM_LIT> ) ; if ( REG_P ( plus0 ) && CONST_INT_P ( plus1 ) ) { if ( satisfies_constraint_Iu03 ( plus1 ) ) return ( COSTS_N_INSNS ( <NUM_LIT> ) - <NUM_LIT> ) ; else return COSTS_N_INSNS ( <NUM_LIT> ) - <NUM_LIT> ; } if ( ARITHMETIC_P ( plus0 ) || ARITHMETIC_P ( plus1 ) ) return ( COSTS_N_INSNS ( <NUM_LIT> ) - <NUM_LIT> ) ; return COSTS_N_INSNS ( <NUM_LIT> ) ;


<s> case POST_MODIFY : case POST_INC : case POST_DEC : return <NUM_LIT> ; case SYMBOL_REF : return COSTS_N_INSNS ( <NUM_LIT> ) ; case CONST : return COSTS_N_INSNS ( <NUM_LIT> ) ; case REG : return COSTS_N_INSNS ( <NUM_LIT> ) ; case PLUS : plus0 = XEXP ( address , <NUM_LIT> ) ; plus1 = XEXP ( address , <NUM_LIT> ) ; if ( REG_P ( plus0 ) && CONST_INT_P ( plus1 ) ) { if ( satisfies_constraint_Iu03 ( plus1 ) ) return ( COSTS_N_INSNS ( <NUM_LIT> ) - <NUM_LIT> ) ; else return COSTS_N_INSNS ( <NUM_LIT> ) ; } if ( ARITHMETIC_P ( plus0 ) || ARITHMETIC_P ( plus1 ) ) return COSTS_N_INSNS ( <NUM_LIT> ) - <NUM_LIT> ; else if ( REG_P ( plus0 ) && REG_P ( plus1 ) ) return COSTS_N_INSNS ( <NUM_LIT> ) ; return COSTS_N_INSNS ( <NUM_LIT> ) ; default : break ;


<s> plus0 = XEXP ( address , <NUM_LIT> ) ; plus1 = XEXP ( address , <NUM_LIT> ) ; if ( REG_P ( plus0 ) && CONST_INT_P ( plus1 ) ) { if ( satisfies_constraint_Iu03 ( plus1 ) ) return ( COSTS_N_INSNS ( <NUM_LIT> ) - <NUM_LIT> ) ;

else return COSTS_N_INSNS ( <NUM_LIT> ) ;


<s> plus1 = XEXP ( address , <NUM_LIT> ) ; if ( REG_P ( plus0 ) && CONST_INT_P ( plus1 ) ) return COSTS_N_INSNS ( <NUM_LIT> ) - <NUM_LIT> ; else if ( ARITHMETIC_P ( plus0 ) || ARITHMETIC_P ( plus1 ) ) return COSTS_N_INSNS ( <NUM_LIT> ) - <NUM_LIT> ; else if ( REG_P ( plus0 ) && REG_P ( plus1 ) ) return COSTS_N_INSNS ( <NUM_LIT> ) ; return COSTS_N_INSNS ( <NUM_LIT> ) ; default :


<s> return COSTS_N_INSNS ( <NUM_LIT> ) - <NUM_LIT> ; case SYMBOL_REF : return COSTS_N_INSNS ( <NUM_LIT> ) ; case CONST : return COSTS_N_INSNS ( <NUM_LIT> ) ; case REG : return COSTS_N_INSNS ( <NUM_LIT> ) - <NUM_LIT> ; case PLUS : plus0 = XEXP ( address , <NUM_LIT> ) ; plus1 = XEXP ( address , <NUM_LIT> ) ;


<s> void nds32_init_rtx_costs ( void ) {


<s> bool nds32_rtx_costs_impl ( rtx x , machine_mode mode ATTRIBUTE_UNUSED , int outer_code , int opno , int * total , bool speed ) { int code = GET_CODE ( x ) ;

if ( speed ) return rtx_cost_model . speed_prefer ( x , code , outer_code , opno , total ) ;


<s> int code = GET_CODE ( x ) ; if ( speed ) return rtx_cost_model . speed_prefer ( x , code , outer_code , opno , total ) ; else return rtx_cost_model . size_prefer ( x , code , outer_code , opno , total ) ;


<s> * total = <NUM_LIT> ; break ; case CONST_INT : if ( outer_code == SET ) { if ( satisfies_constraint_Is05 ( x ) ) * total = insn_size_16bit ; else if ( satisfies_constraint_Is20 ( x ) ) * total = insn_size_32bit ; else * total = insn_size_32bit * <NUM_LIT> ; } else if ( outer_code == PLUS || outer_code == MINUS ) { if ( satisfies_constraint_Iu05 ( x ) ) * total = insn_size_16bit ; else * total = insn_size_32bit ; } else if ( outer_code == ASHIFT ) { if ( satisfies_constraint_Iu03 ( x ) ) * total = insn_size_16bit ; else * total = insn_size_32bit ; } else if ( outer_code == ASHIFTRT || outer_code == LSHIFTRT ) { if ( satisfies_constraint_Iu05 ( x ) ) * total = insn_size_16bit ; else * total = insn_size_32bit ; } else { * total = insn_size_32bit ;


<s> else if ( outer_code == ASHIFT ) { if ( satisfies_constraint_Iu03 ( x ) ) * total = insn_size_16bit ; else * total = insn_size_32bit ; } else if ( outer_code == ASHIFTRT || outer_code == LSHIFTRT ) { if ( satisfies_constraint_Iu05 ( x ) ) * total = insn_size_16bit ; else * total = insn_size_32bit ; } else { * total = insn_size_32bit ; } break ; case CONST_DOUBLE : * total = insn_size_32bit * <NUM_LIT> ; break ; case CONST : case SYMBOL_REF : * total = insn_size_32bit * <NUM_LIT> ; break ; default : * total = insn_size_32bit ; break ; }


<s> if ( single_set ( insn ) && nds32_symbol_load_store_p ( insn ) ) { rtx pattern = PATTERN ( insn ) ; rtx mem ; gcc_assert ( GET_CODE ( pattern ) == SET ) ; if ( GET_CODE ( SET_SRC ( pattern ) ) == REG ) mem = SET_DEST ( pattern ) ; else mem = SET_SRC ( pattern ) ;

if ( GET_CODE ( mem ) == MEM ) symbol_count ++ ;


<s> if ( ! dominated_by_p ( CDI_POST_DOMINATORS , bb , exit_bb ) ) return false ;


<s> if ( ! first_exit_blocks_p ) return false ; exit_bb = e -> src ;


<s> exit_bb = e -> src ; first_exit_blocks_p = false ;


<s> return new pass_nds32_fp_as_gp ( ctxt ) ;


<s> bool fp_as_gp_p ; calculate_dominance_info ( CDI_POST_DOMINATORS ) ; fp_as_gp_p = nds32_fp_as_gp_check_available ( ) ; if ( fp_as_gp_p ) {


<s> if ( ! first_exit_blocks_p ) return false ; exit_bb = e -> src ; first_exit_blocks_p = false ; } if ( ! exit_bb ) return false ; FOR_EACH_BB_FN ( bb , cfun ) { if ( ! dominated_by_p ( CDI_POST_DOMINATORS , bb , exit_bb ) ) return false ; } if ( TARGET_FORCE_FP_AS_GP ) { return true ; } else { bool good_gain = false ; int symbol_count ; int threshold ; if ( flag_pic || nds32_have_prologue_p ( ) ) { threshold = <NUM_LIT> ; } else { threshold = <NUM_LIT> + ( TARGET_V3PUSH ? <NUM_LIT> : <NUM_LIT> ) ; }

symbol_count = nds32_get_symbol_count ( ) ;


<s> FOR_EACH_BB_FN ( bb , cfun ) { FOR_BB_INSNS ( bb , insn ) { if ( single_set ( insn ) && nds32_symbol_load_store_p ( insn ) ) { rtx pattern = PATTERN ( insn ) ; rtx mem ; gcc_assert ( GET_CODE ( pattern ) == SET ) ; if ( GET_CODE ( SET_SRC ( pattern ) ) == REG ) mem = SET_DEST ( pattern ) ; else mem = SET_SRC ( pattern ) ; if ( GET_CODE ( mem ) == MEM ) symbol_count ++ ; } } }


<s> static bool nds32_have_prologue_p ( void ) { int i ; for ( i = <NUM_LIT> ; i < <NUM_LIT> ; i ++ ) if ( NDS32_REQUIRED_CALLEE_SAVED_P ( i ) ) return true ; return ( flag_pic || NDS32_REQUIRED_CALLEE_SAVED_P ( FP_REGNUM ) || NDS32_REQUIRED_CALLEE_SAVED_P ( LP_REGNUM ) ) ;


<s> pass_nds32_fp_as_gp ( gcc :: context * ctxt ) : rtl_opt_pass ( pass_data_nds32_fp_as_gp , ctxt ) {


<s> emit_insn ( gen_unspec_volatile_isb ( ) ) ; return target ; case NDS32_BUILTIN_MFSR : return nds32_expand_builtin_reg_ftype_imm ( CODE_FOR_unspec_volatile_mfsr , exp , target ) ; case NDS32_BUILTIN_MFUSR : return nds32_expand_builtin_reg_ftype_imm ( CODE_FOR_unspec_volatile_mfusr , exp , target ) ; case NDS32_BUILTIN_MTSR : return nds32_expand_builtin_null_ftype_reg_imm ( CODE_FOR_unspec_volatile_mtsr , exp , target ) ; case NDS32_BUILTIN_MTUSR : return nds32_expand_builtin_null_ftype_reg_imm ( CODE_FOR_unspec_volatile_mtusr , exp , target ) ; case NDS32_BUILTIN_SETGIE_EN : emit_insn ( gen_unspec_volatile_setgie_en ( ) ) ; return target ; case NDS32_BUILTIN_SETGIE_DIS : emit_insn ( gen_unspec_volatile_setgie_dis ( ) ) ; return target ; default :


<s> return nds32_expand_builtin_null_ftype_reg ( CODE_FOR_unspec_volatile_isync , exp , target ) ; case NDS32_BUILTIN_ISB : emit_insn ( gen_unspec_volatile_isb ( ) ) ; return target ; case NDS32_BUILTIN_MFSR : return nds32_expand_builtin_reg_ftype_imm ( CODE_FOR_unspec_volatile_mfsr , exp , target ) ; case NDS32_BUILTIN_MFUSR : return nds32_expand_builtin_reg_ftype_imm ( CODE_FOR_unspec_volatile_mfusr , exp , target ) ; case NDS32_BUILTIN_MTSR : return nds32_expand_builtin_null_ftype_reg_imm ( CODE_FOR_unspec_volatile_mtsr , exp , target ) ; case NDS32_BUILTIN_MTUSR : return nds32_expand_builtin_null_ftype_reg_imm ( CODE_FOR_unspec_volatile_mtusr , exp , target ) ; case NDS32_BUILTIN_SETGIE_EN : emit_insn ( gen_unspec_volatile_setgie_en ( ) ) ; return target ; case NDS32_BUILTIN_SETGIE_DIS : emit_insn ( gen_unspec_volatile_setgie_dis ( ) ) ; return target ; default :


<s> value0 = expand_normal ( arg0 ) ; create_input_operand ( & ops [ <NUM_LIT> ] , value0 , TYPE_MODE ( TREE_TYPE ( arg0 ) ) ) ; if ( ! maybe_expand_insn ( icode , <NUM_LIT> , ops ) ) error ( <STR_LIT> ) ;


<s> create_input_operand ( & ops [ <NUM_LIT> ] , value0 , TYPE_MODE ( TREE_TYPE ( arg0 ) ) ) ;

if ( ! maybe_expand_insn ( icode , <NUM_LIT> , ops ) ) error ( <STR_LIT> ) ;


<s> rtx value0 ; arg0 = CALL_EXPR_ARG ( exp , <NUM_LIT> ) ; value0 = expand_normal ( arg0 ) ; create_output_operand ( & ops [ <NUM_LIT> ] , target , TYPE_MODE ( TREE_TYPE ( exp ) ) ) ;

create_input_operand ( & ops [ <NUM_LIT> ] , value0 , TYPE_MODE ( TREE_TYPE ( arg0 ) ) ) ;


<s> ADD_NDS32_BUILTIN1 ( <STR_LIT> , unsigned , integer , GET_PENDING_INT ) ; ADD_NDS32_BUILTIN1 ( <STR_LIT> , unsigned , integer , GET_INT_PRIORITY ) ; ADD_NDS32_BUILTIN2 ( <STR_LIT> , void , integer , integer , SET_INT_PRIORITY ) ; ADD_NDS32_BUILTIN1 ( <STR_LIT> , void , integer , CLR_PENDING_HWINT ) ; ADD_NDS32_BUILTIN1 ( <STR_LIT> , void , integer , SET_TRIG_LEVEL ) ; ADD_NDS32_BUILTIN1 ( <STR_LIT> , void , integer , SET_TRIG_EDGE ) ; ADD_NDS32_BUILTIN1 ( <STR_LIT> , unsigned , integer , GET_TRIG_TYPE ) ; ADD_NDS32_BUILTIN1 ( <STR_LIT> , unsigned , ptr_uint , LLW ) ; ADD_NDS32_BUILTIN1 ( <STR_LIT> , unsigned , ptr_uint , LWUP ) ; ADD_NDS32_BUILTIN1 ( <STR_LIT> , char , ptr_uchar , LBUP ) ; ADD_NDS32_BUILTIN2 ( <STR_LIT> , unsigned , ptr_uint , unsigned , SCW ) ; ADD_NDS32_BUILTIN2 ( <STR_LIT> , void , ptr_uint , unsigned , SWUP ) ; ADD_NDS32_BUILTIN2 ( <STR_LIT> , void , ptr_uchar , char , SBUP ) ; ADD_NDS32_BUILTIN0 ( <STR_LIT> , void , CCTL_L1D_INVALALL ) ; ADD_NDS32_BUILTIN0 ( <STR_LIT> , void , CCTL_L1D_WBALL_ALVL ) ; ADD_NDS32_BUILTIN0 ( <STR_LIT> , void , CCTL_L1D_WBALL_ONE_LVL ) ; ADD_NDS32_BUILTIN2 ( <STR_LIT> , void , integer , ptr_uint , CCTL_VA_LCK ) ; ADD_NDS32_BUILTIN2 ( <STR_LIT> , void , integer , unsigned , CCTL_IDX_WBINVAL ) ; ADD_NDS32_BUILTIN2 ( <STR_LIT> , void , integer , ptr_uint , CCTL_VA_WBINVAL_L1 ) ; ADD_NDS32_BUILTIN2 ( <STR_LIT> , void , integer , ptr_uint , CCTL_VA_WBINVAL_LA ) ; ADD_NDS32_BUILTIN2 ( <STR_LIT> , unsigned , integer , unsigned , CCTL_IDX_READ ) ; ADD_NDS32_BUILTIN3 ( <STR_LIT> , void , integer , unsigned , unsigned , CCTL_IDX_WRITE ) ; ADD_NDS32_BUILTIN3 ( <STR_LIT> , void , ptr_uchar , unsigned , integer , DPREF_QW ) ; ADD_NDS32_BUILTIN3 ( <STR_LIT> , void , ptr_ushort , unsigned , integer , DPREF_HW ) ; ADD_NDS32_BUILTIN3 ( <STR_LIT> , void , ptr_uint , unsigned , integer , DPREF_W ) ; ADD_NDS32_BUILTIN3 ( <STR_LIT> , void , ptr_ulong , unsigned , integer , DPREF_DW ) ; ADD_NDS32_BUILTIN1 ( <STR_LIT> , integer , integer , ABS ) ; ADD_NDS32_BUILTIN2 ( <STR_LIT> , integer , integer , integer , AVE ) ; ADD_NDS32_BUILTIN2 ( <STR_LIT> , unsigned , unsigned , unsigned , BCLR ) ; ADD_NDS32_BUILTIN2 ( <STR_LIT> , unsigned , unsigned , unsigned , BSET ) ; ADD_NDS32_BUILTIN2 ( <STR_LIT> , unsigned , unsigned , unsigned , BTGL ) ; ADD_NDS32_BUILTIN2 ( <STR_LIT> , unsigned , unsigned , unsigned , BTST ) ; ADD_NDS32_BUILTIN2 ( <STR_LIT> , unsigned , integer , unsigned , CLIP ) ; ADD_NDS32_BUILTIN2 ( <STR_LIT> , integer , integer , unsigned , CLIPS ) ; ADD_NDS32_BUILTIN1 ( <STR_LIT> , unsigned , unsigned , CLZ ) ; ADD_NDS32_BUILTIN1 ( <STR_LIT> , unsigned , unsigned , CLO ) ;

ADD_NDS32_BUILTIN3 ( <STR_LIT> , void , ptr_uint , unsigned , ptr_uint , BSE ) ;


<s> tree nds32_builtin_decl_impl ( unsigned code , bool initialize_p ATTRIBUTE_UNUSED ) { if ( code >= NDS32_BUILTIN_COUNT ) return error_mark_node ;


<s> return false ; } if ( ! ( * insn_data [ icode ] . operand [ opnum ] . predicate ) ( opval , VOIDmode ) ) { error ( <STR_LIT> , name ) ;


<s> int op0_num = return_p ? <NUM_LIT> : <NUM_LIT> ; int op1_num = return_p ? <NUM_LIT> : <NUM_LIT> ; if ( return_p ) target = nds32_legitimize_target ( icode , target ) ; if ( ! nds32_check_constant_argument ( icode , op1_num , op1 , name ) ) return NULL_RTX ; op0 = nds32_legitimize_argument ( icode , op0_num , op0 ) ; op1 = nds32_legitimize_argument ( icode , op1_num , op1 ) ; if ( return_p ) pat = GEN_FCN ( icode ) ( target , op0 , op1 ) ; else pat = GEN_FCN ( icode ) ( op0 , op1 ) ; if ( ! pat ) return NULL_RTX ;


<s> if ( ! nds32_check_constant_argument ( icode , op1_num , op1 , name ) ) return NULL_RTX ; op0 = nds32_legitimize_argument ( icode , op0_num , op0 ) ; op1 = nds32_legitimize_argument ( icode , op1_num , op1 ) ; if ( return_p ) pat = GEN_FCN ( icode ) ( target , op0 , op1 ) ; else pat = GEN_FCN ( icode ) ( op0 , op1 ) ; if ( ! pat ) return NULL_RTX ; emit_insn ( pat ) ; return target ;


if ( return_p ) pat = GEN_FCN ( icode ) ( target , op0 , op1 ) ;


<s> rtx pat ; rtx op0 = nds32_read_argument ( exp , <NUM_LIT> ) ; rtx op1 = nds32_read_argument ( exp , <NUM_LIT> ) ; int op0_num = return_p ? <NUM_LIT> : <NUM_LIT> ; int op1_num = return_p ? <NUM_LIT> : <NUM_LIT> ; if ( return_p ) target = nds32_legitimize_target ( icode , target ) ; op0 = nds32_legitimize_argument ( icode , op0_num , op0 ) ; op1 = nds32_legitimize_argument ( icode , op1_num , op1 ) ; if ( return_p ) pat = GEN_FCN ( icode ) ( target , op0 , op1 ) ; else pat = GEN_FCN ( icode ) ( op0 , op1 ) ;


<s> rtx op0 = nds32_read_argument ( exp , <NUM_LIT> ) ; rtx addr_helper = gen_reg_rtx ( insn_data [ icode ] . operand [ <NUM_LIT> ] . mode ) ; target = nds32_legitimize_target ( icode , target ) ; op0 = nds32_legitimize_argument ( icode , <NUM_LIT> , op0 ) ; pat = GEN_FCN ( icode ) ( target , op0 , addr_helper ) ; if ( ! pat ) return NULL_RTX ; emit_move_insn ( addr_helper , GEN_INT ( <NUM_LIT> ) ) ; emit_insn ( pat ) ;


<s> op0 = nds32_legitimize_argument ( icode , <NUM_LIT> , op0 ) ; pat = GEN_FCN ( icode ) ( target , op0 , addr_helper ) ;


<s> pat = GEN_FCN ( icode ) ( op0 , addr_helper , op1 ) ; if ( ! pat ) return NULL_RTX ; emit_move_insn ( addr_helper , GEN_INT ( <NUM_LIT> ) ) ;


<s> rtx op0 = nds32_read_argument ( exp , <NUM_LIT> ) ; rtx op1 = nds32_read_argument ( exp , <NUM_LIT> ) ; rtx addr_helper = gen_reg_rtx ( insn_data [ icode ] . operand [ <NUM_LIT> ] . mode ) ; op0 = nds32_legitimize_argument ( icode , <NUM_LIT> , op0 ) ;


<s> int op1_num = return_p ? <NUM_LIT> : <NUM_LIT> ; if ( return_p ) target = nds32_legitimize_target ( icode , target ) ; if ( ! nds32_check_constant_argument ( icode , op0_num , op0 , name ) ) return NULL_RTX ; op0 = nds32_legitimize_argument ( icode , op0_num , op0 ) ; op1 = nds32_legitimize_argument ( icode , op1_num , op1 ) ; if ( icode == CODE_FOR_cctl_idx_write ) { rtx op2 = nds32_read_argument ( exp , <NUM_LIT> ) ;


<s> rtx op0 = nds32_read_argument ( exp , <NUM_LIT> ) ; rtx op1 = nds32_read_argument ( exp , <NUM_LIT> ) ; int op0_num = return_p ? <NUM_LIT> : <NUM_LIT> ; int op1_num = return_p ? <NUM_LIT> : <NUM_LIT> ; if ( return_p ) target = nds32_legitimize_target ( icode , target ) ;

if ( ! nds32_check_constant_argument ( icode , op0_num , op0 , name ) ) return NULL_RTX ;


<s> target = nds32_legitimize_target ( icode , target ) ;


<s> if ( ! nds32_check_constant_argument ( icode , <NUM_LIT> , op1 , name ) ) return NULL_RTX ; op0 = nds32_legitimize_argument ( icode , <NUM_LIT> , op0 ) ; op1 = nds32_legitimize_argument ( icode , <NUM_LIT> , op1 ) ; pat = GEN_FCN ( icode ) ( op0 , op1 ) ; if ( ! pat ) return NULL_RTX ; emit_insn ( pat ) ;


<s> pat = GEN_FCN ( icode ) ( target , op0 , addr_helper , target ) ; if ( ! pat ) return NULL_RTX ; emit_move_insn ( addr_helper , GEN_INT ( <NUM_LIT> ) ) ; emit_move_insn ( target , op1 ) ;


<s> rtx op0 = nds32_read_argument ( exp , <NUM_LIT> ) ; rtx op1 = nds32_read_argument ( exp , <NUM_LIT> ) ; rtx op2 = nds32_read_argument ( exp , <NUM_LIT> ) ; int op0_num = return_p ? <NUM_LIT> : <NUM_LIT> ; int op1_num = return_p ? <NUM_LIT> : <NUM_LIT> ; int op2_num = return_p ? <NUM_LIT> : <NUM_LIT> ; if ( return_p ) target = nds32_legitimize_target ( icode , target ) ; if ( ! nds32_check_constant_argument ( icode , op2_num , op2 , name ) ) return NULL_RTX ;


<s> rtx pat ; rtx op0 = nds32_read_argument ( exp , <NUM_LIT> ) ; rtx op1 = nds32_read_argument ( exp , <NUM_LIT> ) ; rtx op2 = nds32_read_argument ( exp , <NUM_LIT> ) ; int op0_num = return_p ? <NUM_LIT> : <NUM_LIT> ; int op1_num = return_p ? <NUM_LIT> : <NUM_LIT> ; int op2_num = return_p ? <NUM_LIT> : <NUM_LIT> ; if ( return_p ) target = nds32_legitimize_target ( icode , target ) ; if ( ! nds32_check_constant_argument ( icode , op2_num , op2 , name ) ) return NULL_RTX ; op0 = nds32_legitimize_argument ( icode , op0_num , op0 ) ; op1 = nds32_legitimize_argument ( icode , op1_num , op1 ) ; op2 = nds32_legitimize_argument ( icode , op2_num , op2 ) ; if ( return_p ) pat = GEN_FCN ( icode ) ( target , op0 , op1 , op2 ) ; else pat = GEN_FCN ( icode ) ( op0 , op1 , op2 ) ; if ( ! pat ) return NULL_RTX ; emit_insn ( pat ) ; return target ;


<s> if ( return_p ) pat = GEN_FCN ( icode ) ( target , op0 ) ; else pat = GEN_FCN ( icode ) ( op0 ) ; if ( ! pat ) return NULL_RTX ;


<s> if ( return_p ) pat = GEN_FCN ( icode ) ( target , op0 ) ; else pat = GEN_FCN ( icode ) ( op0 ) ;


<s> int mask = ( val_mode == QImode ) ? <NUM_LIT> : <NUM_LIT> ; int tmp_val = val ; if ( TARGET_BIG_ENDIAN ) for ( i = <NUM_LIT> ; i < nunits ; i ++ ) { tmp_val = ( val >> shift ) & mask ; RTVEC_ELT ( v , nunits - i - <NUM_LIT> ) = gen_int_mode ( tmp_val , val_mode ) ; shift += shift_acc ; } else for ( i = <NUM_LIT> ; i < nunits ; i ++ ) { tmp_val = ( val >> shift ) & mask ; RTVEC_ELT ( v , i ) = gen_int_mode ( tmp_val , val_mode ) ; shift += shift_acc ;


<s> enum machine_mode mode = insn_data [ icode ] . operand [ <NUM_LIT> ] . mode ;

if ( ! target || GET_MODE ( target ) != mode || ! ( * insn_data [ icode ] . operand [ <NUM_LIT> ] . predicate ) ( target , mode ) ) return gen_reg_rtx ( mode ) ;


<s> return expand_normal ( CALL_EXPR_ARG ( exp , index ) ) ;


<s> fprintf ( asm_out_file , <STR_LIT> ) ; } for ( i = <NUM_LIT> ; i < NDS32_N_ISR_VECTORS ; i ++ ) { if ( nds32_isr_vectors [ i ] . category == NDS32_ISR_INTERRUPT || nds32_isr_vectors [ i ] . category == NDS32_ISR_EXCEPTION ) { fprintf ( asm_out_file , <STR_LIT> , i ) ; fprintf ( asm_out_file , <STR_LIT> ) ; nds32_emit_isr_jmptbl_section ( i ) ; fprintf ( asm_out_file , <STR_LIT> ) ;


<s> void nds32_asm_file_end_for_isr ( void ) { int i ; for ( i = <NUM_LIT> ; i < NDS32_N_ISR_VECTORS ; i ++ ) if ( nds32_isr_vectors [ i ] . category != NDS32_ISR_NONE ) break ; if ( i == NDS32_N_ISR_VECTORS ) return ; fprintf ( asm_out_file , <STR_LIT> ) ; fprintf ( asm_out_file , <STR_LIT> ) ; fprintf ( asm_out_file , <STR_LIT> ) ; if ( nds32_isr_vectors [ <NUM_LIT> ] . category == NDS32_ISR_RESET ) { nds32_emit_isr_reset_content ( ) ; fprintf ( asm_out_file , <STR_LIT> ) ; } for ( i = <NUM_LIT> ; i < NDS32_N_ISR_VECTORS ; i ++ ) { if ( nds32_isr_vectors [ i ] . category == NDS32_ISR_INTERRUPT || nds32_isr_vectors [ i ] . category == NDS32_ISR_EXCEPTION ) { fprintf ( asm_out_file , <STR_LIT> , i ) ; fprintf ( asm_out_file , <STR_LIT> ) ; nds32_emit_isr_jmptbl_section ( i ) ; fprintf ( asm_out_file , <STR_LIT> ) ; nds32_emit_isr_vector_section ( i ) ; fprintf ( asm_out_file , <STR_LIT> ) ;


<s> nds32_isr_vectors [ i ] . category = NDS32_ISR_NONE ; strcpy ( nds32_isr_vectors [ i ] . func_name , <STR_LIT> ) ; nds32_isr_vectors [ i ] . save_reg = NDS32_PARTIAL_SAVE ; nds32_isr_vectors [ i ] . nested_type = NDS32_NOT_NESTED ;

nds32_isr_vectors [ i ] . total_n_vectors = <NUM_LIT> ;


<s> nds32_isr_vectors [ i ] . nested_type = NDS32_NOT_NESTED ; nds32_isr_vectors [ i ] . total_n_vectors = <NUM_LIT> ;

strcpy ( nds32_isr_vectors [ i ] . nmi_name , <STR_LIT> ) ;


<s> excp = lookup_attribute ( <STR_LIT> , func_attrs ) ; reset = lookup_attribute ( <STR_LIT> , func_attrs ) ; if ( ! intr && ! excp && ! reset ) return ; if ( intr || excp ) { tree id_list ; id_list = ( intr ) ? ( TREE_VALUE ( intr ) ) : ( TREE_VALUE ( excp ) ) ; while ( id_list ) { tree id ; int vector_id ; unsigned int vector_number_offset ; vector_number_offset = ( intr ) ? ( <NUM_LIT> ) : ( <NUM_LIT> ) ; id = TREE_VALUE ( id_list ) ; vector_id = TREE_INT_CST_LOW ( id ) + vector_number_offset ; nds32_isr_vectors [ vector_id ] . category = ( intr ) ? ( NDS32_ISR_INTERRUPT ) : ( NDS32_ISR_EXCEPTION ) ; strcpy ( nds32_isr_vectors [ vector_id ] . func_name , func_name ) ; if ( save_all ) nds32_isr_vectors [ vector_id ] . save_reg = NDS32_SAVE_ALL ; else if ( partial_save ) nds32_isr_vectors [ vector_id ] . save_reg = NDS32_PARTIAL_SAVE ; if ( nested ) nds32_isr_vectors [ vector_id ] . nested_type = NDS32_NESTED ; else if ( not_nested ) nds32_isr_vectors [ vector_id ] . nested_type = NDS32_NOT_NESTED ; else if ( nested_ready ) nds32_isr_vectors [ vector_id ] . nested_type = NDS32_NESTED_READY ; id_list = TREE_CHAIN ( id_list ) ; } } else { tree id_list ; tree id ; tree nmi , warm ; nds32_isr_vectors [ <NUM_LIT> ] . category = NDS32_ISR_RESET ; id_list = TREE_VALUE ( reset ) ; id = TREE_VALUE ( id_list ) ; nds32_isr_vectors [ <NUM_LIT> ] . total_n_vectors = TREE_INT_CST_LOW ( id ) + <NUM_LIT> + <NUM_LIT> ; strcpy ( nds32_isr_vectors [ <NUM_LIT> ] . func_name , func_name ) ; nmi = lookup_attribute ( <STR_LIT> , func_attrs ) ;

warm = lookup_attribute ( <STR_LIT> , func_attrs ) ;


<s> if ( ! intr && ! excp && ! reset ) return ; if ( intr || excp ) { tree id_list ; id_list = ( intr ) ? ( TREE_VALUE ( intr ) ) : ( TREE_VALUE ( excp ) ) ; while ( id_list ) { tree id ; int vector_id ; unsigned int vector_number_offset ; vector_number_offset = ( intr ) ? ( <NUM_LIT> ) : ( <NUM_LIT> ) ; id = TREE_VALUE ( id_list ) ; vector_id = TREE_INT_CST_LOW ( id ) + vector_number_offset ; nds32_isr_vectors [ vector_id ] . category = ( intr ) ? ( NDS32_ISR_INTERRUPT ) : ( NDS32_ISR_EXCEPTION ) ; strcpy ( nds32_isr_vectors [ vector_id ] . func_name , func_name ) ; if ( save_all ) nds32_isr_vectors [ vector_id ] . save_reg = NDS32_SAVE_ALL ; else if ( partial_save ) nds32_isr_vectors [ vector_id ] . save_reg = NDS32_PARTIAL_SAVE ; if ( nested ) nds32_isr_vectors [ vector_id ] . nested_type = NDS32_NESTED ; else if ( not_nested ) nds32_isr_vectors [ vector_id ] . nested_type = NDS32_NOT_NESTED ; else if ( nested_ready ) nds32_isr_vectors [ vector_id ] . nested_type = NDS32_NESTED_READY ; id_list = TREE_CHAIN ( id_list ) ; } } else { tree id_list ; tree id ; tree nmi , warm ; nds32_isr_vectors [ <NUM_LIT> ] . category = NDS32_ISR_RESET ; id_list = TREE_VALUE ( reset ) ; id = TREE_VALUE ( id_list ) ; nds32_isr_vectors [ <NUM_LIT> ] . total_n_vectors = TREE_INT_CST_LOW ( id ) + <NUM_LIT> + <NUM_LIT> ; strcpy ( nds32_isr_vectors [ <NUM_LIT> ] . func_name , func_name ) ; 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 ) ; strcpy ( nds32_isr_vectors [ <NUM_LIT> ] . nmi_name , IDENTIFIER_POINTER ( nmi_func ) ) ; } if ( warm != NULL_TREE ) {


<s> char section_name [ <NUM_LIT> ] ; char symbol_name [ <NUM_LIT> ] ; snprintf ( section_name , sizeof ( section_name ) , <STR_LIT> , vector_id ) ; snprintf ( symbol_name , sizeof ( symbol_name ) , <STR_LIT> , vector_id ) ; nds32_emit_section_head_template ( section_name , symbol_name , <NUM_LIT> , true ) ; fprintf ( asm_out_file , <STR_LIT> , nds32_isr_vectors [ vector_id ] . func_name ) ; nds32_emit_section_tail_template ( symbol_name ) ;


<s> snprintf ( section_name , sizeof ( section_name ) , <STR_LIT> ) ; snprintf ( symbol_name , sizeof ( symbol_name ) , <STR_LIT> ) ; fprintf ( asm_out_file , <STR_LIT> ) ; nds32_emit_section_head_template ( section_name , symbol_name , <NUM_LIT> , true ) ; fprintf ( asm_out_file , <STR_LIT> , ( strlen ( nds32_isr_vectors [ <NUM_LIT> ] . nmi_name ) == <NUM_LIT> ) ? <STR_LIT> : nds32_isr_vectors [ <NUM_LIT> ] . nmi_name ) ; nds32_emit_section_tail_template ( symbol_name ) ; snprintf ( section_name , sizeof ( section_name ) , <STR_LIT> ) ; snprintf ( symbol_name , sizeof ( symbol_name ) , <STR_LIT> ) ; fprintf ( asm_out_file , <STR_LIT> ) ; nds32_emit_section_head_template ( section_name , symbol_name , <NUM_LIT> , true ) ; fprintf ( asm_out_file , <STR_LIT> , ( strlen ( nds32_isr_vectors [ <NUM_LIT> ] . warm_name ) == <NUM_LIT> ) ? <STR_LIT> : nds32_isr_vectors [ <NUM_LIT> ] . warm_name ) ;


<s> fprintf ( asm_out_file , <STR_LIT> ) ; nds32_emit_section_head_template ( section_name , symbol_name , floor_log2 ( nds32_isr_vector_size ) , false ) ; fprintf ( asm_out_file , <STR_LIT> , reset_handler_name ) ; nds32_emit_section_tail_template ( symbol_name ) ; snprintf ( section_name , sizeof ( section_name ) , <STR_LIT> ) ; snprintf ( symbol_name , sizeof ( symbol_name ) , <STR_LIT> ) ; fprintf ( asm_out_file , <STR_LIT> ) ; nds32_emit_section_head_template ( section_name , symbol_name , <NUM_LIT> , true ) ; fprintf ( asm_out_file , <STR_LIT> , ( strlen ( nds32_isr_vectors [ <NUM_LIT> ] . nmi_name ) == <NUM_LIT> ) ? <STR_LIT> : nds32_isr_vectors [ <NUM_LIT> ] . nmi_name ) ; nds32_emit_section_tail_template ( symbol_name ) ; snprintf ( section_name , sizeof ( section_name ) , <STR_LIT> ) ;


<s> c_str = <STR_LIT> ; break ; case NDS32_ISR_EXCEPTION : vector_number_offset = <NUM_LIT> ; c_str = <STR_LIT> ; break ; case NDS32_ISR_NONE : case NDS32_ISR_RESET : gcc_unreachable ( ) ; break ; } switch ( nds32_isr_vectors [ vector_id ] . save_reg ) { case NDS32_SAVE_ALL : sr_str = <STR_LIT> ; break ; case NDS32_PARTIAL_SAVE : sr_str = <STR_LIT> ; break ; } switch ( nds32_isr_vectors [ vector_id ] . nested_type ) { case NDS32_NESTED : nt_str = <STR_LIT> ; break ; case NDS32_NOT_NESTED : nt_str = <STR_LIT> ; break ; case NDS32_NESTED_READY : nt_str = <STR_LIT> ; break ; } vs_str = ( nds32_isr_vector_size == <NUM_LIT> ) ? <STR_LIT> : <STR_LIT> ; snprintf ( first_level_handler_name , sizeof ( first_level_handler_name ) , <STR_LIT> , c_str , sr_str , nt_str , vs_str ) ; snprintf ( section_name , sizeof ( section_name ) , <STR_LIT> , vector_id ) ; snprintf ( symbol_name , sizeof ( symbol_name ) , <STR_LIT> , vector_id , vs_str ) ; nds32_emit_section_head_template ( section_name , symbol_name , floor_log2 ( nds32_isr_vector_size ) , false ) ; if ( nds32_isr_vector_size == <NUM_LIT> ) { fprintf ( asm_out_file , <STR_LIT> , first_level_handler_name ) ; } else { if ( TARGET_REDUCED_REGS ) { if ( nds32_isr_vectors [ vector_id ] . save_reg == NDS32_SAVE_ALL ) { fprintf ( asm_out_file , <STR_LIT> ) ; fprintf ( asm_out_file , <STR_LIT> ) ; fprintf ( asm_out_file , <STR_LIT> ) ; }


<s> sr_str = <STR_LIT> ; break ; case NDS32_PARTIAL_SAVE : sr_str = <STR_LIT> ; break ; } switch ( nds32_isr_vectors [ vector_id ] . nested_type ) { case NDS32_NESTED : nt_str = <STR_LIT> ; break ; case NDS32_NOT_NESTED : nt_str = <STR_LIT> ; break ; case NDS32_NESTED_READY : nt_str = <STR_LIT> ; break ; } vs_str = ( nds32_isr_vector_size == <NUM_LIT> ) ? <STR_LIT> : <STR_LIT> ; snprintf ( first_level_handler_name , sizeof ( first_level_handler_name ) , <STR_LIT> , c_str , sr_str , nt_str , vs_str ) ; snprintf ( section_name , sizeof ( section_name ) , <STR_LIT> , vector_id ) ; snprintf ( symbol_name , sizeof ( symbol_name ) , <STR_LIT> , vector_id , vs_str ) ; nds32_emit_section_head_template ( section_name , symbol_name , floor_log2 ( nds32_isr_vector_size ) , false ) ; if ( nds32_isr_vector_size == <NUM_LIT> ) { fprintf ( asm_out_file , <STR_LIT> , first_level_handler_name ) ; } else { if ( TARGET_REDUCED_REGS ) { if ( nds32_isr_vectors [ vector_id ] . save_reg == NDS32_SAVE_ALL ) { fprintf ( asm_out_file , <STR_LIT> ) ; fprintf ( asm_out_file , <STR_LIT> ) ;


<s> int i ; for ( i = <NUM_LIT> ; i < NDS32_N_ISR_VECTORS ; i ++ ) if ( nds32_isr_vectors [ i ] . category != NDS32_ISR_NONE ) break ; if ( i == NDS32_N_ISR_VECTORS ) return ; fprintf ( asm_out_file , <STR_LIT> ) ; fprintf ( asm_out_file , <STR_LIT> ) ; fprintf ( asm_out_file , <STR_LIT> ) ; if ( nds32_isr_vectors [ <NUM_LIT> ] . category == NDS32_ISR_RESET ) { nds32_emit_isr_reset_content ( ) ; fprintf ( asm_out_file , <STR_LIT> ) ; } for ( i = <NUM_LIT> ; i < NDS32_N_ISR_VECTORS ; i ++ ) { if ( nds32_isr_vectors [ i ] . category == NDS32_ISR_INTERRUPT || nds32_isr_vectors [ i ] . category == NDS32_ISR_EXCEPTION ) { fprintf ( asm_out_file , <STR_LIT> , i ) ; fprintf ( asm_out_file , <STR_LIT> , nds32_isr_vectors [ i ] . security_level ) ; fprintf ( asm_out_file , <STR_LIT> ) ; nds32_emit_isr_jmptbl_section ( i ) ; fprintf ( asm_out_file , <STR_LIT> ) ; nds32_emit_isr_vector_section ( i ) ; fprintf ( asm_out_file , <STR_LIT> ) ; }


<s> nds32_isr_vectors [ i ] . security_level = <NUM_LIT> ; nds32_isr_vectors [ i ] . total_n_vectors = <NUM_LIT> ; strcpy ( nds32_isr_vectors [ i ] . nmi_name , <STR_LIT> ) ; strcpy ( nds32_isr_vectors [ i ] . warm_name , <STR_LIT> ) ;


<s> } else { s_level = nds32_isr_secure_level ; } if ( intr != NULL_TREE && TREE_CODE ( TREE_VALUE ( TREE_VALUE ( intr ) ) ) == STRING_CST ) { tree string_arg = TREE_VALUE ( TREE_VALUE ( intr ) ) ; nds32_interrupt_attribute_parse_string ( TREE_STRING_POINTER ( string_arg ) , func_name , s_level ) ; return ; } if ( excp != NULL_TREE && TREE_CODE ( TREE_VALUE ( TREE_VALUE ( excp ) ) ) == STRING_CST ) { tree string_arg = TREE_VALUE ( TREE_VALUE ( excp ) ) ; nds32_exception_attribute_parse_string ( TREE_STRING_POINTER ( string_arg ) , func_name , s_level ) ; return ; } if ( reset != NULL_TREE && TREE_CODE ( TREE_VALUE ( TREE_VALUE ( reset ) ) ) == STRING_CST ) { tree string_arg = TREE_VALUE ( TREE_VALUE ( reset ) ) ; nds32_reset_attribute_parse_string ( TREE_STRING_POINTER ( string_arg ) , func_name ) ; return ; } if ( intr || excp ) { tree id_list ; id_list = ( intr ) ? ( TREE_VALUE ( intr ) ) : ( TREE_VALUE ( excp ) ) ; while ( id_list ) { tree id ; int vector_id ; unsigned int vector_number_offset ; vector_number_offset = ( intr ) ? ( <NUM_LIT> ) : ( <NUM_LIT> ) ; id = TREE_VALUE ( id_list ) ; vector_id = TREE_INT_CST_LOW ( id ) + vector_number_offset ; nds32_isr_vectors [ vector_id ] . security_level = s_level ; nds32_isr_vectors [ vector_id ] . category = ( intr ) ? ( NDS32_ISR_INTERRUPT ) : ( NDS32_ISR_EXCEPTION ) ; strcpy ( nds32_isr_vectors [ vector_id ] . func_name , func_name ) ; if ( save_all ) nds32_isr_vectors [ vector_id ] . save_reg = NDS32_SAVE_ALL ; else if ( partial_save ) nds32_isr_vectors [ vector_id ] . save_reg = NDS32_PARTIAL_SAVE ; if ( nested ) nds32_isr_vectors [ vector_id ] . nested_type = NDS32_NESTED ; else if ( not_nested ) nds32_isr_vectors [ vector_id ] . nested_type = NDS32_NOT_NESTED ; else if ( nested_ready ) nds32_isr_vectors [ vector_id ] . nested_type = NDS32_NESTED_READY ; else if ( critical ) nds32_isr_vectors [ vector_id ] . nested_type = NDS32_CRITICAL ; id_list = TREE_CHAIN ( id_list ) ; } } else { tree id_list ; tree id ; tree nmi , warm ; nds32_isr_vectors [ <NUM_LIT> ] . category = NDS32_ISR_RESET ; id_list = TREE_VALUE ( reset ) ; id = TREE_VALUE ( id_list ) ;


<s> static void nds32_emit_isr_jmptbl_section ( int vector_id ) { char section_name [ <NUM_LIT> ] ; char symbol_name [ <NUM_LIT> ] ;

if ( nds32_isr_vectors [ vector_id ] . nested_type == NDS32_CRITICAL ) {


<s> char symbol_name [ <NUM_LIT> ] ; total_n_vectors = nds32_isr_vectors [ <NUM_LIT> ] . total_n_vectors ; fprintf ( asm_out_file , <STR_LIT> ) ; fprintf ( asm_out_file , <STR_LIT> ) ; fprintf ( asm_out_file , <STR_LIT> ) ; fprintf ( asm_out_file , <STR_LIT> ) ; for ( i = <NUM_LIT> ; i < total_n_vectors ; i ++ ) fprintf ( asm_out_file , <STR_LIT> , i ) ; fprintf ( asm_out_file , <STR_LIT> ) ; for ( i = <NUM_LIT> ; i < total_n_vectors ; i ++ ) fprintf ( asm_out_file , <STR_LIT> , i ) ; snprintf ( section_name , sizeof ( section_name ) , <STR_LIT> ) ; snprintf ( symbol_name , sizeof ( symbol_name ) , <STR_LIT> ) ;


<s> snprintf ( section_name , sizeof ( section_name ) , <STR_LIT> , vector_id ) ; snprintf ( symbol_name , sizeof ( symbol_name ) , <STR_LIT> , vector_id ) ; nds32_emit_section_head_template ( section_name , symbol_name , floor_log2 ( nds32_isr_vector_size ) , false ) ; if ( nds32_isr_vectors [ vector_id ] . nested_type == NDS32_CRITICAL ) { fprintf ( asm_out_file , <STR_LIT> , nds32_isr_vectors [ vector_id ] . func_name ) ; } else if ( nds32_isr_vector_size == <NUM_LIT> ) { fprintf ( asm_out_file , <STR_LIT> , first_level_handler_name ) ; } else { if ( TARGET_REDUCED_REGS ) { if ( nds32_isr_vectors [ vector_id ] . save_reg == NDS32_SAVE_ALL ) { fprintf ( asm_out_file , <STR_LIT> ) ; fprintf ( asm_out_file , <STR_LIT> ) ; fprintf ( asm_out_file , <STR_LIT> ) ; } else { fprintf ( asm_out_file , <STR_LIT> ) ; fprintf ( asm_out_file , <STR_LIT> ) ; fprintf ( asm_out_file , <STR_LIT> ) ; } }


<s> static void nds32_emit_section_head_template ( char section_name [ ] , char symbol_name [ ] , int align_value , bool object_p ) { const char * flags_str ; const char * type_str ; flags_str = ( object_p ) ? <STR_LIT> : <STR_LIT> ; type_str = ( object_p ) ? <STR_LIT> : <STR_LIT> ; fprintf ( asm_out_file , <STR_LIT> , section_name , flags_str ) ; fprintf ( asm_out_file , <STR_LIT> , align_value ) ; fprintf ( asm_out_file , <STR_LIT> , symbol_name ) ; fprintf ( asm_out_file , <STR_LIT> , symbol_name , type_str ) ; fprintf ( asm_out_file , <STR_LIT> , symbol_name ) ;


<s> fprintf ( asm_out_file , <STR_LIT> , symbol_name , symbol_name ) ;


<s> if ( id_str == NULL ) error ( <STR_LIT> ) ; id_str = strtok ( id_str , <STR_LIT> ) ; value_str = strtok ( NULL , <STR_LIT> ) ; value_str = strtok ( value_str , <STR_LIT> ) ; while ( value_str != NULL ) { int i ; i = atoi ( value_str ) ; if ( i < <NUM_LIT> || i > <NUM_LIT> ) error ( <STR_LIT> ) ; nds32_isr_vectors [ i ] . category = NDS32_ISR_EXCEPTION ; strcpy ( nds32_isr_vectors [ i ] . func_name , func_name ) ; nds32_isr_vectors [ i ] . save_reg = save_reg ; nds32_isr_vectors [ i ] . nested_type = nested_type ; nds32_isr_vectors [ i ] . security_level = s_level ; value_str = strtok ( NULL , <STR_LIT> ) ; }


<s> else if ( ready_nested_str ) nested_type = NDS32_NESTED_READY ; else if ( nested_str ) nested_type = NDS32_NESTED ; else if ( critical_str ) nested_type = NDS32_CRITICAL ; else nested_type = NDS32_NOT_NESTED ; id_str = strstr ( target_str , <STR_LIT> ) ; if ( id_str == NULL ) error ( <STR_LIT> ) ; id_str = strtok ( id_str , <STR_LIT> ) ; value_str = strtok ( NULL , <STR_LIT> ) ; value_str = strtok ( value_str , <STR_LIT> ) ; while ( value_str != NULL ) { int i ; i = atoi ( value_str ) ; if ( i < <NUM_LIT> || i > <NUM_LIT> ) error ( <STR_LIT> ) ;

nds32_isr_vectors [ i ] . category = NDS32_ISR_EXCEPTION ;


<s> tree t_critical ; tree attrs ; if ( TREE_CODE ( func ) != FUNCTION_DECL ) abort ( ) ; attrs = DECL_ATTRIBUTES ( func ) ; t_intr = lookup_attribute ( <STR_LIT> , attrs ) ; t_excp = lookup_attribute ( <STR_LIT> , attrs ) ; t_critical = lookup_attribute ( <STR_LIT> , attrs ) ; if ( ( t_intr == NULL_TREE ) && ( t_excp == NULL_TREE ) ) return false ; if ( t_critical != NULL_TREE ) return true ; if ( t_intr != NULL_TREE || t_excp != NULL_TREE ) { char target_str [ <NUM_LIT> ] ; char * critical_str ; tree t_check ; tree string_arg ; t_check = t_intr ? t_intr : t_excp ; if ( TREE_CODE ( TREE_VALUE ( TREE_VALUE ( t_check ) ) ) == STRING_CST ) { string_arg = TREE_VALUE ( TREE_VALUE ( t_check ) ) ; strcpy ( target_str , TREE_STRING_POINTER ( string_arg ) ) ; critical_str = strstr ( target_str , <STR_LIT> ) ; if ( critical_str ) return true ; }


<s> tree t_excp ; tree t_reset ; tree attrs ; if ( TREE_CODE ( func ) != FUNCTION_DECL ) abort ( ) ; attrs = DECL_ATTRIBUTES ( func ) ;

t_intr = lookup_attribute ( <STR_LIT> , attrs ) ;


<s> strcpy ( target_str , original_str ) ; vectors_str = strstr ( target_str , <STR_LIT> ) ; if ( vectors_str != NULL ) { vectors_str = strtok ( vectors_str , <STR_LIT> ) ; value_str = strtok ( NULL , <STR_LIT> ) ; nds32_isr_vectors [ <NUM_LIT> ] . total_n_vectors = atoi ( value_str ) + <NUM_LIT> + <NUM_LIT> ; } else nds32_isr_vectors [ <NUM_LIT> ] . total_n_vectors = <NUM_LIT> + <NUM_LIT> + <NUM_LIT> ; strcpy ( nds32_isr_vectors [ <NUM_LIT> ] . func_name , func_name ) ; strcpy ( target_str , original_str ) ; nmi_str = strstr ( target_str , <STR_LIT> ) ; if ( nmi_str != NULL ) { nmi_str = strtok ( nmi_str , <STR_LIT> ) ; value_str = strtok ( NULL , <STR_LIT> ) ;

strcpy ( nds32_isr_vectors [ <NUM_LIT> ] . nmi_name , value_str ) ;


<s> if ( ( GET_CODE ( op ) == POST_INC ) && ( mode_test == SImode ) ) { regno = REGNO ( XEXP ( op , <NUM_LIT> ) ) ; if ( regno < <NUM_LIT> ) return ADDRESS_POST_INC_LO_REG_IMM3U ; } if ( ( GET_CODE ( op ) == POST_MODIFY ) && ( mode_test == SImode ) && ( REG_P ( XEXP ( XEXP ( op , <NUM_LIT> ) , <NUM_LIT> ) ) ) && ( CONST_INT_P ( XEXP ( XEXP ( op , <NUM_LIT> ) , <NUM_LIT> ) ) ) ) { regno = REGNO ( XEXP ( XEXP ( op , <NUM_LIT> ) , <NUM_LIT> ) ) ; val = INTVAL ( XEXP ( XEXP ( op , <NUM_LIT> ) , <NUM_LIT> ) ) ; if ( regno < <NUM_LIT> && val < <NUM_LIT> ) return ADDRESS_POST_INC_LO_REG_IMM3U ; } if ( ( GET_CODE ( op ) == PLUS ) && ( GET_CODE ( XEXP ( op , <NUM_LIT> ) ) == REG ) && ( GET_CODE ( XEXP ( op , <NUM_LIT> ) ) == CONST_INT ) ) { val = INTVAL ( XEXP ( op , <NUM_LIT> ) ) ; regno = REGNO ( XEXP ( op , <NUM_LIT> ) ) ; if ( regno > <NUM_LIT> && regno != SP_REGNUM && regno != FP_REGNUM ) return ADDRESS_NOT_16BIT_FORMAT ; switch ( mode_test ) { case QImode : if ( val >= <NUM_LIT> && val < <NUM_LIT> && regno < <NUM_LIT> ) return ADDRESS_LO_REG_IMM3U ; break ; case HImode : if ( val >= <NUM_LIT> && val < <NUM_LIT> && ( val % <NUM_LIT> == <NUM_LIT> ) && regno < <NUM_LIT> ) return ADDRESS_LO_REG_IMM3U ; break ; case SImode : case SFmode : case DFmode : if ( ( regno == FP_REGNUM ) && ( val >= <NUM_LIT> && val < <NUM_LIT> && ( val % <NUM_LIT> == <NUM_LIT> ) ) ) return ADDRESS_FP_IMM7U ; else if ( ( regno == SP_REGNUM ) && ( val >= <NUM_LIT> && val < <NUM_LIT> && ( val % <NUM_LIT> == <NUM_LIT> ) ) ) return ADDRESS_SP_IMM7U ; else if ( val >= <NUM_LIT> && val < <NUM_LIT> && ( val % <NUM_LIT> == <NUM_LIT> ) && regno < <NUM_LIT> ) return ADDRESS_LO_REG_IMM3U ; break ;


<s> unsigned char size ; rtx code = XEXP ( operands [ <NUM_LIT> ] , <NUM_LIT> ) ; size = nds32_byte_to_size ( byte ) ; switch ( nds32_mem_format ( operands [ <NUM_LIT> ] ) ) { case ADDRESS_REG : operands [ <NUM_LIT> ] = code ; output_asm_insn ( <STR_LIT> , operands ) ; break ; case ADDRESS_LO_REG_IMM3U : snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> , size ) ; output_asm_insn ( pattern , operands ) ; break ;


<s> rtx code = XEXP ( operands [ <NUM_LIT> ] , <NUM_LIT> ) ; size = nds32_byte_to_size ( byte ) ; switch ( nds32_mem_format ( operands [ <NUM_LIT> ] ) ) { case ADDRESS_REG : operands [ <NUM_LIT> ] = code ; output_asm_insn ( <STR_LIT> , operands ) ; break ; case ADDRESS_LO_REG_IMM3U : snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> , size ) ;

output_asm_insn ( pattern , operands ) ;


<s> char pattern [ <NUM_LIT> ] ; char size ; rtx code = XEXP ( operands [ <NUM_LIT> ] , <NUM_LIT> ) ; size = nds32_byte_to_size ( byte ) ; switch ( nds32_mem_format ( operands [ <NUM_LIT> ] ) ) { case ADDRESS_REG : operands [ <NUM_LIT> ] = code ; output_asm_insn ( <STR_LIT> , operands ) ; break ; case ADDRESS_LO_REG_IMM3U : snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> , size ) ; output_asm_insn ( pattern , operands ) ; break ; case ADDRESS_POST_INC_LO_REG_IMM3U : snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> , size ) ; output_asm_insn ( pattern , operands ) ; break ; case ADDRESS_FP_IMM7U :


<s> output_asm_insn ( <STR_LIT> , operands ) ; if ( TARGET_16_BIT ) return <STR_LIT> ;


<s> output_asm_insn ( <STR_LIT> , operands ) ; output_asm_insn ( <STR_LIT> , operands ) ; if ( TARGET_16_BIT ) return <STR_LIT> ; else return <STR_LIT> ;


<s> output_asm_insn ( <STR_LIT> , operands ) ; break ; case HImode : output_asm_insn ( <STR_LIT> , operands ) ; break ; case SImode : output_asm_insn ( <STR_LIT> , operands ) ; break ; default : gcc_unreachable ( ) ;


<s> operands [ <NUM_LIT> ] = gen_rtx_REG ( SImode , re_callee_saved ) ; if ( ! cfun -> machine -> fp_size && ! cfun -> machine -> gp_size && ! cfun -> machine -> lp_size && REGNO ( operands [ <NUM_LIT> ] ) == SP_REGNUM && REGNO ( operands [ <NUM_LIT> ] ) == SP_REGNUM ) { return <STR_LIT> ; } else { if ( REGNO ( operands [ <NUM_LIT> ] ) == SP_REGNUM && REGNO ( operands [ <NUM_LIT> ] ) == SP_REGNUM ) pop_en4_only_p = <NUM_LIT> ; snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> , pop_en4_only_p ? <STR_LIT> : <STR_LIT> , cfun -> machine -> fp_size ? <STR_LIT> : <STR_LIT> , cfun -> machine -> gp_size ? <STR_LIT> : <STR_LIT> , cfun -> machine -> lp_size ? <STR_LIT> : <STR_LIT> ) ; } }


<s> emit_insn ( gen_zero_extendqisi2 ( reg [ <NUM_LIT> ] , sub_reg ) ) ; while ( width > <NUM_LIT> ) { offset = offset + offset_adj ; shift ++ ; width -- ; mem [ <NUM_LIT> ] = gen_rtx_MEM ( QImode , plus_constant ( Pmode , operands [ <NUM_LIT> ] , offset ) ) ; emit_move_insn ( temp_sub_reg , mem [ <NUM_LIT> ] ) ; emit_insn ( gen_ashlsi3 ( temp_reg , temp_reg , GEN_INT ( shift * <NUM_LIT> ) ) ) ; emit_insn ( gen_iorsi3 ( reg [ <NUM_LIT> ] , reg [ <NUM_LIT> ] , temp_reg ) ) ; } if ( mode == DImode ) { reg [ <NUM_LIT> ] = reg [ <NUM_LIT> ] ;


<s> } else { reg [ <NUM_LIT> ] = operands [ <NUM_LIT> ] ; } for ( num_reg = ( mode == DImode ) ? <NUM_LIT> : <NUM_LIT> ; num_reg > <NUM_LIT> ; num_reg -- ) { sub_reg = gen_lowpart ( QImode , reg [ <NUM_LIT> ] ) ; mem [ <NUM_LIT> ] = gen_rtx_MEM ( QImode , plus_constant ( Pmode , operands [ <NUM_LIT> ] , offset ) ) ; emit_move_insn ( mem [ <NUM_LIT> ] , sub_reg ) ; while ( width > <NUM_LIT> ) { offset = offset + offset_adj ; shift ++ ; width -- ; mem [ <NUM_LIT> ] = gen_rtx_MEM ( QImode , plus_constant ( Pmode , operands [ <NUM_LIT> ] , offset ) ) ; emit_insn ( gen_lshrsi3 ( temp_reg , reg [ <NUM_LIT> ] , GEN_INT ( shift * <NUM_LIT> ) ) ) ; emit_move_insn ( mem [ <NUM_LIT> ] , temp_sub_reg ) ; } if ( mode == DImode ) { reg [ <NUM_LIT> ] = reg [ <NUM_LIT> ] ; shift = <NUM_LIT> ; width = GET_MODE_SIZE ( SImode ) - <NUM_LIT> ;


<s> rtx reg [ <NUM_LIT> ] ; rtx sub_reg ; rtx temp_reg , temp_sub_reg ; int num_reg ; temp_reg = gen_reg_rtx ( SImode ) ; temp_sub_reg = gen_lowpart ( QImode , temp_reg ) ; if ( mode == DImode ) { reg [ <NUM_LIT> ] = simplify_gen_subreg ( SImode , operands [ <NUM_LIT> ] , GET_MODE ( operands [ <NUM_LIT> ] ) , <NUM_LIT> ) ; reg [ <NUM_LIT> ] = simplify_gen_subreg ( SImode , operands [ <NUM_LIT> ] , GET_MODE ( operands [ <NUM_LIT> ] ) , <NUM_LIT> ) ; width = GET_MODE_SIZE ( SImode ) - <NUM_LIT> ; } else { reg [ <NUM_LIT> ] = operands [ <NUM_LIT> ] ; } for ( num_reg = ( mode == DImode ) ? <NUM_LIT> : <NUM_LIT> ; num_reg > <NUM_LIT> ; num_reg -- ) { sub_reg = gen_lowpart ( QImode , reg [ <NUM_LIT> ] ) ; mem [ <NUM_LIT> ] = gen_rtx_MEM ( QImode , plus_constant ( Pmode , operands [ <NUM_LIT> ] , offset ) ) ; emit_move_insn ( mem [ <NUM_LIT> ] , sub_reg ) ; while ( width > <NUM_LIT> ) { offset = offset + offset_adj ; shift ++ ; width -- ; mem [ <NUM_LIT> ] = gen_rtx_MEM ( QImode , plus_constant ( Pmode , operands [ <NUM_LIT> ] , offset ) ) ; emit_insn ( gen_lshrsi3 ( temp_reg , reg [ <NUM_LIT> ] , GEN_INT ( shift * <NUM_LIT> ) ) ) ; emit_move_insn ( mem [ <NUM_LIT> ] , temp_sub_reg ) ; } if ( mode == DImode ) { reg [ <NUM_LIT> ] = reg [ <NUM_LIT> ] ; shift = <NUM_LIT> ; width = GET_MODE_SIZE ( SImode ) - <NUM_LIT> ; offset = offset + offset_adj ;


<s> diff_vec = PATTERN ( NEXT_INSN ( as_a < rtx_insn * > ( operands [ <NUM_LIT> ] ) ) ) ; gcc_assert ( GET_CODE ( diff_vec ) == ADDR_DIFF_VEC ) ; output_asm_insn ( <STR_LIT> , operands ) ;


<s> const char * nds32_output_stack_pop ( rtx par_rtx ATTRIBUTE_UNUSED ) { char pattern [ <NUM_LIT> ] ; rtx operands [ <NUM_LIT> ] ; int rb_eh_data = cfun -> machine -> eh_return_data_first_regno ; int re_eh_data = cfun -> machine -> eh_return_data_last_regno ; int first_eh_data_regno = EH_RETURN_DATA_REGNO ( <NUM_LIT> ) ; int rb_callee_saved = cfun -> machine -> callee_saved_first_gpr_regno ; int re_callee_saved = cfun -> machine -> callee_saved_last_gpr_regno ; if ( reg_mentioned_p ( gen_rtx_REG ( SImode , first_eh_data_regno ) , par_rtx ) ) { operands [ <NUM_LIT> ] = gen_rtx_REG ( SImode , rb_eh_data ) ; operands [ <NUM_LIT> ] = gen_rtx_REG ( SImode , re_eh_data ) ; snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> , <STR_LIT> ) ; output_asm_insn ( pattern , operands ) ; return <STR_LIT> ; } if ( TARGET_V3PUSH && ! nds32_isr_function_p ( current_function_decl ) && ( cfun -> machine -> va_args_size == <NUM_LIT> ) ) { int sp_adjust ; operands [ <NUM_LIT> ] = gen_rtx_REG ( SImode , re_callee_saved ) ; 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 ) operands [ <NUM_LIT> ] = GEN_INT ( sp_adjust ) ; else { if ( cfun -> machine -> callee_saved_first_fpr_regno != SP_REGNUM ) { sp_adjust = cfun -> machine -> callee_saved_area_gpr_padding_bytes + cfun -> machine -> callee_saved_fpr_regs_size ; operands [ <NUM_LIT> ] = GEN_INT ( sp_adjust ) ; } else { operands [ <NUM_LIT> ] = GEN_INT ( <NUM_LIT> ) ; } } snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> ) ; } else { int pop_en4_only_p = <NUM_LIT> ; operands [ <NUM_LIT> ] = gen_rtx_REG ( SImode , rb_callee_saved ) ; operands [ <NUM_LIT> ] = gen_rtx_REG ( SImode , re_callee_saved ) ; if ( ! cfun -> machine -> fp_size && ! cfun -> machine -> gp_size && ! cfun -> machine -> lp_size && REGNO ( operands [ <NUM_LIT> ] ) == SP_REGNUM && REGNO ( operands [ <NUM_LIT> ] ) == SP_REGNUM ) { return <STR_LIT> ; }


<s> if ( cfun -> machine -> callee_saved_first_fpr_regno != SP_REGNUM ) { sp_adjust = cfun -> machine -> callee_saved_area_gpr_padding_bytes + cfun -> machine -> callee_saved_fpr_regs_size ; operands [ <NUM_LIT> ] = GEN_INT ( sp_adjust ) ; } else { operands [ <NUM_LIT> ] = GEN_INT ( <NUM_LIT> ) ; } } snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> ) ; } else { int pop_en4_only_p = <NUM_LIT> ; operands [ <NUM_LIT> ] = gen_rtx_REG ( SImode , rb_callee_saved ) ; operands [ <NUM_LIT> ] = gen_rtx_REG ( SImode , re_callee_saved ) ; if ( ! cfun -> machine -> fp_size && ! cfun -> machine -> gp_size && ! cfun -> machine -> lp_size && REGNO ( operands [ <NUM_LIT> ] ) == SP_REGNUM && REGNO ( operands [ <NUM_LIT> ] ) == SP_REGNUM ) { return <STR_LIT> ; } else { if ( REGNO ( operands [ <NUM_LIT> ] ) == SP_REGNUM && REGNO ( operands [ <NUM_LIT> ] ) == SP_REGNUM ) pop_en4_only_p = <NUM_LIT> ; snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> , pop_en4_only_p ? <STR_LIT> : <STR_LIT> , cfun -> machine -> fp_size ? <STR_LIT> : <STR_LIT> , cfun -> machine -> gp_size ? <STR_LIT> : <STR_LIT> , cfun -> machine -> lp_size ? <STR_LIT> : <STR_LIT> ) ; }


<s> int last_argument_regno = NDS32_FIRST_GPR_REGNUM + NDS32_MAX_GPR_REGS_FOR_ARGS - <NUM_LIT> ; int rb_eh_data = cfun -> machine -> eh_return_data_first_regno ; int re_eh_data = cfun -> machine -> eh_return_data_last_regno ; int first_eh_data_regno = EH_RETURN_DATA_REGNO ( <NUM_LIT> ) ; int rb_callee_saved = cfun -> machine -> callee_saved_first_gpr_regno ; int re_callee_saved = cfun -> machine -> callee_saved_last_gpr_regno ; if ( reg_mentioned_p ( gen_rtx_REG ( SImode , last_argument_regno ) , par_rtx ) ) { operands [ <NUM_LIT> ] = gen_rtx_REG ( SImode , rb_va_args ) ; operands [ <NUM_LIT> ] = gen_rtx_REG ( SImode , re_va_args ) ; snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> , <STR_LIT> ) ; output_asm_insn ( pattern , operands ) ; return <STR_LIT> ; } if ( reg_mentioned_p ( gen_rtx_REG ( SImode , first_eh_data_regno ) , par_rtx ) ) { operands [ <NUM_LIT> ] = gen_rtx_REG ( SImode , rb_eh_data ) ; operands [ <NUM_LIT> ] = gen_rtx_REG ( SImode , re_eh_data ) ; snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> , <STR_LIT> ) ; output_asm_insn ( pattern , operands ) ; return <STR_LIT> ; } if ( TARGET_V3PUSH && ! nds32_isr_function_p ( current_function_decl ) && ( cfun -> machine -> va_args_size == <NUM_LIT> ) ) {


<s> else if ( GET_CODE ( sub_mem ) == POST_MODIFY ) { rtx post_mem = XEXP ( sub_mem , <NUM_LIT> ) ; rtx plus_op = XEXP ( sub_mem , <NUM_LIT> ) ; rtx post_val = XEXP ( plus_op , <NUM_LIT> ) ; low_part [ mem ] = gen_frame_mem ( SImode , gen_rtx_POST_MODIFY ( Pmode , post_mem , gen_rtx_PLUS ( Pmode , post_mem , post_val ) ) ) ; high_part [ mem ] = gen_frame_mem ( SImode , plus_constant ( Pmode , post_mem , <NUM_LIT> ) ) ; } else { low_part [ mem ] = adjust_address ( mem_rtx , SImode , <NUM_LIT> ) ; high_part [ mem ] = adjust_address ( mem_rtx , SImode , <NUM_LIT> ) ; }

if ( ( load_p && reg_overlap_mentioned_p ( low_part [ <NUM_LIT> ] , high_part [ <NUM_LIT> ] ) ) || GET_CODE ( sub_mem ) == POST_MODIFY ) {


<s> case <NUM_LIT> : return 'w' ; case <NUM_LIT> :


<s> return 'w' ; case <NUM_LIT> : return 'h' ; case <NUM_LIT> :


<s> case GE : return <STR_LIT> ; case LT : return <STR_LIT> ; default : gcc_unreachable ( ) ;


<s> static const char * nds32_cond_code_str ( int code ) { switch ( code ) { case NE :


<s> unsigned high_part_offset = subreg_highpart_offset ( SImode , DImode ) ;

return simplify_gen_subreg ( SImode , reg , DImode , high_part_offset ) ;


<s> return simplify_gen_subreg ( SImode , reg , DImode , low_part_offset ) ;


<s> int padding = <NUM_LIT> ; while ( regno <= last_fpr ) { if ( ( regno + <NUM_LIT> ) >= last_fpr ) padding = gpr_padding_size ; reg = gen_rtx_REG ( DFmode , ( regno ) ) ; addr = gen_rtx_POST_MODIFY ( Pmode , stack_pointer_rtx , gen_rtx_PLUS ( Pmode , stack_pointer_rtx , GEN_INT ( <NUM_LIT> + padding ) ) ) ; mem = gen_frame_mem ( DFmode , addr ) ;


<s> addr = gen_rtx_POST_MODIFY ( Pmode , stack_pointer_rtx , gen_rtx_PLUS ( Pmode , stack_pointer_rtx , GEN_INT ( <NUM_LIT> + padding ) ) ) ; mem = gen_frame_mem ( DFmode , addr ) ; regno += <NUM_LIT> ; fpu_insn = emit_move_insn ( reg , mem ) ; adjust_sp_rtx = gen_rtx_SET ( stack_pointer_rtx , plus_constant ( Pmode , stack_pointer_rtx , <NUM_LIT> + padding ) ) ;

dwarf = alloc_reg_note ( REG_CFA_RESTORE , reg , NULL_RTX ) ;


<s> rtx fpu_insn ; rtx reg , mem ; unsigned int regno = cfun -> machine -> callee_saved_first_fpr_regno ; unsigned int last_fpr = cfun -> machine -> callee_saved_last_fpr_regno ; while ( regno <= last_fpr ) { reg = gen_rtx_REG ( DFmode , regno ) ; mem = gen_frame_mem ( DFmode , plus_constant ( Pmode , stack_pointer_rtx , base_offset ) ) ; base_offset += <NUM_LIT> ; regno += <NUM_LIT> ; fpu_insn = emit_move_insn ( mem , reg ) ;


<s> regno += <NUM_LIT> ; fpu_insn = emit_move_insn ( reg , mem ) ; dwarf = alloc_reg_note ( REG_CFA_RESTORE , reg , NULL_RTX ) ; RTX_FRAME_RELATED_P ( fpu_insn ) = <NUM_LIT> ;


<s> int fpu_base_addr = base ; int regno ; rtx fpu_insn ; rtx reg , mem ; rtx dwarf ; regno = cfun -> machine -> callee_saved_first_fpr_regno ; while ( regno <= cfun -> machine -> callee_saved_last_fpr_regno ) { reg = gen_rtx_REG ( DFmode , regno ) ; mem = gen_frame_mem ( DFmode , plus_constant ( Pmode , stack_pointer_rtx , fpu_base_addr ) ) ;


<s> } else if ( clear_zero_bit_copies > <NUM_LIT> && clear_sign_bit_copies < <NUM_LIT> && ( remainder | zero_shift_mask ) == <NUM_LIT> ) { rtx shift = GEN_INT ( clear_zero_bit_copies ) ; emit_insn ( gen_lshrsi3 ( temp , source , shift ) ) ; emit_insn ( gen_ashlsi3 ( target , temp , shift ) ) ; } else {

emit_move_insn ( temp , GEN_INT ( val ) ) ;


<s> if ( code == GE ) { emit_insn ( gen_slts_compare ( operands [ <NUM_LIT> ] , operands [ <NUM_LIT> ] , operands [ <NUM_LIT> ] ) ) ; } else { emit_insn ( gen_slt_compare ( operands [ <NUM_LIT> ] , operands [ <NUM_LIT> ] , operands [ <NUM_LIT> ] ) ) ; } emit_insn ( gen_xorsi3 ( operands [ <NUM_LIT> ] , operands [ <NUM_LIT> ] , const1_rtx ) ) ; return EXPAND_DONE ; } case LT : case LTU : if ( code == LT ) { emit_insn ( gen_slts_compare ( operands [ <NUM_LIT> ] , operands [ <NUM_LIT> ] , operands [ <NUM_LIT> ] ) ) ; } else { emit_insn ( gen_slt_compare ( operands [ <NUM_LIT> ] , operands [ <NUM_LIT> ] , operands [ <NUM_LIT> ] ) ) ; } return EXPAND_DONE ; case LE : case LEU : if ( GET_CODE ( operands [ <NUM_LIT> ] ) == CONST_INT ) { tmp_reg = gen_reg_rtx ( SImode ) ; emit_insn ( gen_movsi ( tmp_reg , gen_int_mode ( INTVAL ( operands [ <NUM_LIT> ] ) + <NUM_LIT> , SImode ) ) ) ; if ( code == LE ) { emit_insn ( gen_slts_compare ( operands [ <NUM_LIT> ] , operands [ <NUM_LIT> ] , tmp_reg ) ) ; } else { emit_insn ( gen_slt_compare ( operands [ <NUM_LIT> ] , operands [ <NUM_LIT> ] , tmp_reg ) ) ; } return EXPAND_DONE ;


<s> rtx newmem = adjust_address ( src , GET_MODE ( dst ) , bitpos / BITS_PER_UNIT ) ; rtx base_addr = force_reg ( Pmode , XEXP ( newmem , <NUM_LIT> ) ) ; emit_insn ( gen_unaligned_loadsi ( dst , base_addr ) ) ; return EXPAND_DONE ;


<s> tmp = cmp_op0 ; cmp_op0 = cmp_op1 ; cmp_op1 = tmp ; new_code = swap_condition ( new_code ) ; break ; case UNORDERED : case LT : case LE : case EQ : break ; case ORDERED : case NE : new_code = reverse_condition ( new_code ) ; reverse = <NUM_LIT> ; break ; case UNGT : case UNGE : new_code = reverse_condition_maybe_unordered ( new_code ) ; reverse = <NUM_LIT> ; break ; case UNLT : case UNLE : new_code = reverse_condition_maybe_unordered ( new_code ) ; tmp = cmp_op0 ; cmp_op0 = cmp_op1 ; cmp_op1 = tmp ; new_code = swap_condition ( new_code ) ; reverse = <NUM_LIT> ; break ; default : return ; } tmp_reg = gen_reg_rtx ( SImode ) ; emit_insn ( gen_rtx_SET ( tmp_reg , gen_rtx_fmt_ee ( new_code , SImode , cmp_op0 , cmp_op1 ) ) ) ; PUT_CODE ( operands [ <NUM_LIT> ] , reverse ? EQ : NE ) ; emit_insn ( gen_cbranchsi4 ( operands [ <NUM_LIT> ] , tmp_reg , const0_rtx , operands [ <NUM_LIT> ] ) ) ;


<s> rtx cmp_op0 = operands [ <NUM_LIT> ] ; rtx cmp_op1 = operands [ <NUM_LIT> ] ; rtx tmp_reg ; rtx tmp ; int reverse = <NUM_LIT> ; switch ( code ) { case GT : case GE : tmp = cmp_op0 ; cmp_op0 = cmp_op1 ; cmp_op1 = tmp ; new_code = swap_condition ( new_code ) ; break ; case UNORDERED : case LT : case LE : case EQ : break ; case ORDERED :


<s> enum rtx_code new_code = code ; machine_mode mode = GET_MODE ( operands [ <NUM_LIT> ] ) ; rtx cmp_op0 = operands [ <NUM_LIT> ] ; rtx cmp_op1 = operands [ <NUM_LIT> ] ; rtx tmp ; switch ( code ) { case GT : case GE : tmp = cmp_op0 ; cmp_op0 = cmp_op1 ; cmp_op1 = tmp ; new_code = swap_condition ( new_code ) ; break ; case UNORDERED : case LT : case LE : case EQ : break ; case ORDERED : if ( mode == SFmode ) emit_insn ( gen_cmpsf_un ( operands [ <NUM_LIT> ] , cmp_op0 , cmp_op1 ) ) ; else emit_insn ( gen_cmpdf_un ( operands [ <NUM_LIT> ] , cmp_op0 , cmp_op1 ) ) ; emit_insn ( gen_xorsi3 ( operands [ <NUM_LIT> ] , operands [ <NUM_LIT> ] , const1_rtx ) ) ; return ; case NE : if ( mode == SFmode ) emit_insn ( gen_cmpsf_eq ( operands [ <NUM_LIT> ] , cmp_op0 , cmp_op1 ) ) ; else emit_insn ( gen_cmpdf_eq ( operands [ <NUM_LIT> ] , cmp_op0 , cmp_op1 ) ) ; emit_insn ( gen_xorsi3 ( operands [ <NUM_LIT> ] , operands [ <NUM_LIT> ] , const1_rtx ) ) ; return ; default : return ; } emit_insn ( gen_rtx_SET ( operands [ <NUM_LIT> ] , gen_rtx_fmt_ee ( new_code , SImode , cmp_op0 , cmp_op1 ) ) ) ;


<s> cmp_op1 = tmp ; new_code = swap_condition ( new_code ) ; break ; case UNORDERED : case LT : case LE : case EQ : break ; case ORDERED : if ( mode == SFmode ) emit_insn ( gen_cmpsf_un ( operands [ <NUM_LIT> ] , cmp_op0 , cmp_op1 ) ) ; else emit_insn ( gen_cmpdf_un ( operands [ <NUM_LIT> ] , cmp_op0 , cmp_op1 ) ) ;

emit_insn ( gen_xorsi3 ( operands [ <NUM_LIT> ] , operands [ <NUM_LIT> ] , const1_rtx ) ) ;


<s> return ; } else { enum rtx_code code = GET_CODE ( operands [ <NUM_LIT> ] ) ; enum rtx_code new_code = code ; machine_mode cmp0_mode = GET_MODE ( XEXP ( operands [ <NUM_LIT> ] , <NUM_LIT> ) ) ; machine_mode cmp1_mode = GET_MODE ( XEXP ( operands [ <NUM_LIT> ] , <NUM_LIT> ) ) ; rtx cmp_op0 = XEXP ( operands [ <NUM_LIT> ] , <NUM_LIT> ) ; rtx cmp_op1 = XEXP ( operands [ <NUM_LIT> ] , <NUM_LIT> ) ; rtx tmp ; int reverse = <NUM_LIT> ; switch ( code ) { case GT : case GE : tmp = cmp_op0 ; cmp_op0 = cmp_op1 ; cmp_op1 = tmp ; new_code = swap_condition ( new_code ) ;


<s> rtx src = operands [ <NUM_LIT> ] ; src = nds32_legitimize_ict_address ( src ) ; emit_move_insn ( operands [ <NUM_LIT> ] , src ) ;


<s> HOST_WIDE_INT bitpos = INTVAL ( operands [ <NUM_LIT> ] ) ; rtx dst = operands [ <NUM_LIT> ] ; rtx src = operands [ <NUM_LIT> ] ; if ( MEM_P ( dst ) && width == <NUM_LIT> && ( bitpos % BITS_PER_UNIT ) == <NUM_LIT> && GET_MODE_BITSIZE ( GET_MODE ( src ) ) == width ) { rtx newmem = adjust_address ( dst , GET_MODE ( src ) , bitpos / BITS_PER_UNIT ) ; rtx base_addr = force_reg ( Pmode , XEXP ( newmem , <NUM_LIT> ) ) ; emit_insn ( gen_unaligned_storesi ( base_addr , src ) ) ; return EXPAND_DONE ;


<s> HOST_WIDE_INT bitpos = INTVAL ( operands [ <NUM_LIT> ] ) ; rtx dst = operands [ <NUM_LIT> ] ; rtx src = operands [ <NUM_LIT> ] ; if ( MEM_P ( dst ) && width == <NUM_LIT> && ( bitpos % BITS_PER_UNIT ) == <NUM_LIT> && GET_MODE_BITSIZE ( GET_MODE ( src ) ) == width ) { rtx newmem = adjust_address ( dst , GET_MODE ( src ) , bitpos / BITS_PER_UNIT ) ; rtx base_addr = force_reg ( Pmode , XEXP ( newmem , <NUM_LIT> ) ) ; emit_insn ( gen_unaligned_storesi ( base_addr , src ) ) ;


<s> enum rtx_code new_code = code ; machine_mode cmp0_mode = GET_MODE ( XEXP ( operands [ <NUM_LIT> ] , <NUM_LIT> ) ) ; rtx cmp_op0 = XEXP ( operands [ <NUM_LIT> ] , <NUM_LIT> ) ; rtx cmp_op1 = XEXP ( operands [ <NUM_LIT> ] , <NUM_LIT> ) ; rtx tmp ; if ( ( GET_CODE ( operands [ <NUM_LIT> ] ) == EQ || GET_CODE ( operands [ <NUM_LIT> ] ) == NE ) && XEXP ( operands [ <NUM_LIT> ] , <NUM_LIT> ) == const0_rtx ) { return EXPAND_CREATE_TEMPLATE ; }

else if ( ( TARGET_FPU_SINGLE && cmp0_mode == SFmode ) || ( TARGET_FPU_DOUBLE && cmp0_mode == DFmode ) ) {


<s> if ( new_code == EQ || new_code == NE ) { emit_insn ( gen_xorsi3 ( tmp , cmp_op0 , cmp_op1 ) ) ; operands [ <NUM_LIT> ] = gen_rtx_fmt_ee ( new_code , VOIDmode , tmp , const0_rtx ) ; } else { if ( new_code == LT ) emit_insn ( gen_slts_compare ( tmp , cmp_op0 , cmp_op1 ) ) ; else if ( new_code == LTU ) emit_insn ( gen_slt_compare ( tmp , cmp_op0 , cmp_op1 ) ) ; else gcc_unreachable ( ) ; operands [ <NUM_LIT> ] = gen_rtx_fmt_ee ( reverse ? EQ : NE , VOIDmode , tmp , const0_rtx ) ; } } return EXPAND_CREATE_TEMPLATE ;


<s> emit_move_insn ( operands [ <NUM_LIT> ] , src ) ;


src = nds32_legitimize_pic_address ( operands [ <NUM_LIT> ] ) ;


<s> if ( SYMBOL_REF_TLS_MODEL ( base ) == TLS_MODEL_LOCAL_EXEC ) src = nds32_legitimize_tls_address ( src ) ; else { src = nds32_legitimize_tls_address ( base ) ; if ( addend != const0_rtx ) { src = gen_rtx_PLUS ( SImode , src , addend ) ; src = force_operand ( src , operands [ <NUM_LIT> ] ) ; } } emit_move_insn ( operands [ <NUM_LIT> ] , src ) ;


<s> else reg [ <NUM_LIT> ] = operands [ <NUM_LIT> ] ; } for ( num_reg = ( mode == DImode ) ? <NUM_LIT> : <NUM_LIT> ; num_reg > <NUM_LIT> ; num_reg -- ) { sub_reg = gen_lowpart ( QImode , reg [ <NUM_LIT> ] ) ; mem [ <NUM_LIT> ] = gen_rtx_MEM ( QImode , plus_constant ( Pmode , operands [ <NUM_LIT> ] , offset ) ) ; emit_move_insn ( sub_reg , mem [ <NUM_LIT> ] ) ; emit_insn ( gen_zero_extendqisi2 ( reg [ <NUM_LIT> ] , sub_reg ) ) ; while ( width > <NUM_LIT> ) { offset = offset + offset_adj ; shift ++ ; width -- ; mem [ <NUM_LIT> ] = gen_rtx_MEM ( QImode , plus_constant ( Pmode , operands [ <NUM_LIT> ] , offset ) ) ; emit_move_insn ( temp_sub_reg , mem [ <NUM_LIT> ] ) ; emit_insn ( gen_ashlsi3 ( temp_reg , temp_reg , GEN_INT ( shift * <NUM_LIT> ) ) ) ; emit_insn ( gen_iorsi3 ( reg [ <NUM_LIT> ] , reg [ <NUM_LIT> ] , temp_reg ) ) ; } if ( mode == DImode ) { reg [ <NUM_LIT> ] = reg [ <NUM_LIT> ] ; shift = <NUM_LIT> ;

width = GET_MODE_SIZE ( SImode ) - <NUM_LIT> ;


<s> int num_reg ; temp_reg = gen_reg_rtx ( SImode ) ; temp_sub_reg = gen_lowpart ( QImode , temp_reg ) ; if ( mode == DImode ) { reg [ <NUM_LIT> ] = nds32_di_low_part_subreg ( operands [ <NUM_LIT> ] ) ; reg [ <NUM_LIT> ] = nds32_di_high_part_subreg ( operands [ <NUM_LIT> ] ) ; width = GET_MODE_SIZE ( SImode ) - <NUM_LIT> ; } else { if ( VECTOR_MODE_P ( mode ) ) { reg [ <NUM_LIT> ] = gen_reg_rtx ( SImode ) ; convert_move ( reg [ <NUM_LIT> ] , operands [ <NUM_LIT> ] , false ) ; } else reg [ <NUM_LIT> ] = operands [ <NUM_LIT> ] ; } for ( num_reg = ( mode == DImode ) ? <NUM_LIT> : <NUM_LIT> ; num_reg > <NUM_LIT> ; num_reg -- ) { sub_reg = gen_lowpart ( QImode , reg [ <NUM_LIT> ] ) ; mem [ <NUM_LIT> ] = gen_rtx_MEM ( QImode , plus_constant ( Pmode , operands [ <NUM_LIT> ] , offset ) ) ; emit_move_insn ( mem [ <NUM_LIT> ] , sub_reg ) ; while ( width > <NUM_LIT> ) { offset = offset + offset_adj ; shift ++ ; width -- ; mem [ <NUM_LIT> ] = gen_rtx_MEM ( QImode , plus_constant ( Pmode , operands [ <NUM_LIT> ] , offset ) ) ; emit_insn ( gen_lshrsi3 ( temp_reg , reg [ <NUM_LIT> ] , GEN_INT ( shift * <NUM_LIT> ) ) ) ; emit_move_insn ( mem [ <NUM_LIT> ] , temp_sub_reg ) ; } if ( mode == DImode ) { reg [ <NUM_LIT> ] = reg [ <NUM_LIT> ] ; shift = <NUM_LIT> ; width = GET_MODE_SIZE ( SImode ) - <NUM_LIT> ; offset = offset + offset_adj ; } }


<s> tree decl = SYMBOL_REF_DECL ( x ) ; return decl && ( lookup_attribute ( <STR_LIT> , DECL_ATTRIBUTES ( decl ) ) != NULL ) ; }


<s> return EQ ; case EQ : return NE ; case GT : return LE ; case LE :


<s> return EQ ; case EQ : return NE ; case GT : return LE ; case LE : return GT ; case GE : return LT ; case LT : return GE ; default : gcc_unreachable ( ) ; }


<s> gcc_assert ( GET_CODE ( x ) == SYMBOL_REF && nds32_indirect_call_referenced_p ( x ) ) ; addr = gen_rtx_UNSPEC ( SImode , gen_rtvec ( <NUM_LIT> , symbol ) , UNSPEC_ICT ) ; addr = gen_rtx_CONST ( SImode , addr ) ; emit_insn ( gen_sethi ( reg , addr ) ) ;

x = gen_const_mem ( SImode , gen_rtx_LO_SUM ( Pmode , reg , addr ) ) ;


<s> gcc_assert ( GET_CODE ( addr ) == PLUS ) ; rtx op0 = XEXP ( addr , <NUM_LIT> ) ; rtx op1 = XEXP ( addr , <NUM_LIT> ) ; if ( ( GET_CODE ( op0 ) == LABEL_REF || ( GET_CODE ( op0 ) == SYMBOL_REF && ( CONSTANT_POOL_ADDRESS_P ( op0 ) || SYMBOL_REF_LOCAL_P ( op0 ) ) ) ) && GET_CODE ( op1 ) == CONST_INT ) { pat = gen_rtx_UNSPEC ( Pmode , gen_rtvec ( <NUM_LIT> , op0 ) , UNSPEC_GOTOFF ) ; pat = gen_rtx_PLUS ( Pmode , pat , op1 ) ; pat = gen_rtx_CONST ( Pmode , pat ) ; emit_insn ( gen_sym_got ( reg , pat , GEN_INT ( relax_group_id ) ) ) ; x = gen_rtx_PLUS ( Pmode , reg , pic_offset_table_rtx ) ; } else if ( GET_CODE ( op0 ) == SYMBOL_REF && GET_CODE ( op1 ) == CONST_INT ) { addr = gen_rtx_UNSPEC ( SImode , gen_rtvec ( <NUM_LIT> , op0 ) , UNSPEC_GOT ) ; addr = gen_rtx_CONST ( SImode , addr ) ; emit_insn ( gen_sym_got ( reg , addr , GEN_INT ( relax_group_id ) ) ) ; addr = gen_const_mem ( SImode , gen_rtx_PLUS ( Pmode , pic_offset_table_rtx , reg ) ) ; emit_move_insn ( reg , addr ) ; if ( satisfies_constraint_Is15 ( op1 ) ) x = gen_rtx_PLUS ( Pmode , reg , op1 ) ; else { rtx tmp_reg = gen_reg_rtx ( SImode ) ; emit_insn ( gen_movsi ( tmp_reg , op1 ) ) ; x = gen_rtx_PLUS ( Pmode , reg , tmp_reg ) ;


<s> if ( GET_CODE ( x ) == SYMBOL_REF ) switch ( SYMBOL_REF_TLS_MODEL ( x ) ) { case TLS_MODEL_GLOBAL_DYNAMIC : case TLS_MODEL_LOCAL_DYNAMIC : if ( SYMBOL_REF_TLS_MODEL ( x ) == TLS_MODEL_GLOBAL_DYNAMIC ) pat = gen_rtx_UNSPEC ( SImode , gen_rtvec ( <NUM_LIT> , x ) , UNSPEC_TLSGD ) ; else pat = gen_rtx_UNSPEC ( SImode , gen_rtvec ( <NUM_LIT> , x ) , UNSPEC_TLSLD ) ; pat = gen_rtx_CONST ( SImode , pat ) ; reg0 = gen_rtx_REG ( Pmode , <NUM_LIT> ) ; insns = emit_call_insn ( gen_tls_desc ( pat , GEN_INT ( relax_group_id ) ) ) ; use_reg ( & CALL_INSN_FUNCTION_USAGE ( insns ) , pic_offset_table_rtx ) ; RTL_CONST_CALL_P ( insns ) = <NUM_LIT> ; tmp_reg = gen_reg_rtx ( SImode ) ; emit_move_insn ( tmp_reg , reg0 ) ; x = tmp_reg ; break ; case TLS_MODEL_INITIAL_EXEC :

pat = gen_rtx_UNSPEC ( SImode , gen_rtvec ( <NUM_LIT> , x ) , UNSPEC_TLSIE ) ;


<s> rtx tmp_reg ; rtx tp_reg = gen_rtx_REG ( Pmode , TP_REGNUM ) ; rtx pat , insns , reg0 ; int relax_group_id = nds32_alloc_relax_group_id ( ) ; if ( GET_CODE ( x ) == SYMBOL_REF ) switch ( SYMBOL_REF_TLS_MODEL ( x ) ) { case TLS_MODEL_GLOBAL_DYNAMIC : case TLS_MODEL_LOCAL_DYNAMIC : if ( SYMBOL_REF_TLS_MODEL ( x ) == TLS_MODEL_GLOBAL_DYNAMIC ) pat = gen_rtx_UNSPEC ( SImode , gen_rtvec ( <NUM_LIT> , x ) , UNSPEC_TLSGD ) ; else pat = gen_rtx_UNSPEC ( SImode , gen_rtvec ( <NUM_LIT> , x ) , UNSPEC_TLSLD ) ; pat = gen_rtx_CONST ( SImode , pat ) ; reg0 = gen_rtx_REG ( Pmode , <NUM_LIT> ) ; insns = emit_call_insn ( gen_tls_desc ( pat , GEN_INT ( relax_group_id ) ) ) ; use_reg ( & CALL_INSN_FUNCTION_USAGE ( insns ) , pic_offset_table_rtx ) ; RTL_CONST_CALL_P ( insns ) = <NUM_LIT> ; tmp_reg = gen_reg_rtx ( SImode ) ; emit_move_insn ( tmp_reg , reg0 ) ; x = tmp_reg ; break ; case TLS_MODEL_INITIAL_EXEC : pat = gen_rtx_UNSPEC ( SImode , gen_rtvec ( <NUM_LIT> , x ) , UNSPEC_TLSIE ) ; tmp_reg = gen_reg_rtx ( SImode ) ; pat = gen_rtx_CONST ( SImode , pat ) ; emit_insn ( gen_tls_ie ( tmp_reg , pat , GEN_INT ( relax_group_id ) ) ) ; if ( flag_pic ) emit_use ( pic_offset_table_rtx ) ; x = gen_rtx_PLUS ( Pmode , tmp_reg , tp_reg ) ; break ; case TLS_MODEL_LOCAL_EXEC : tmp_reg = gen_reg_rtx ( SImode ) ; pat = gen_rtx_UNSPEC ( SImode , gen_rtvec ( <NUM_LIT> , x ) , UNSPEC_TLSLE ) ; pat = gen_rtx_CONST ( SImode , pat ) ; emit_insn ( gen_tls_le ( tmp_reg , pat , GEN_INT ( relax_group_id ) ) ) ; x = gen_rtx_PLUS ( Pmode , tmp_reg , tp_reg ) ; break ; default : gcc_unreachable ( ) ; } else if ( GET_CODE ( x ) == CONST ) { rtx base , addend ; split_const ( x , & base , & addend ) ; if ( SYMBOL_REF_TLS_MODEL ( base ) == TLS_MODEL_LOCAL_EXEC ) {


<s> bool nds32_long_call_p ( rtx symbol ) { if ( nds32_indirect_call_referenced_p ( symbol ) ) return TARGET_ICT_MODEL_LARGE ; else return TARGET_CMODEL_LARGE ;


<s> val = INTVAL ( XEXP ( op , <NUM_LIT> ) ) ; regno = REGNO ( XEXP ( op , <NUM_LIT> ) ) ; if ( regno > <NUM_LIT> && regno != SP_REGNUM && regno != FP_REGNUM ) return ADDRESS_NOT_16BIT_FORMAT ; switch ( mode_test ) { case E_QImode : if ( val >= <NUM_LIT> && val < <NUM_LIT> && regno < <NUM_LIT> ) return ADDRESS_LO_REG_IMM3U ; break ; case E_HImode : if ( val >= <NUM_LIT> && val < <NUM_LIT> && ( val % <NUM_LIT> == <NUM_LIT> ) && regno < <NUM_LIT> ) return ADDRESS_LO_REG_IMM3U ; break ; case E_SImode : case E_SFmode : case E_DFmode : if ( ( regno == <NUM_LIT> ) && ( val >= - <NUM_LIT> && val <= - <NUM_LIT> && ( val % <NUM_LIT> == <NUM_LIT> ) ) ) return ADDRESS_R8_IMM7U ; if ( ( regno == FP_REGNUM ) && ( val >= <NUM_LIT> && val < <NUM_LIT> && ( val % <NUM_LIT> == <NUM_LIT> ) ) ) return ADDRESS_FP_IMM7U ; else if ( ( regno == SP_REGNUM ) && ( val >= <NUM_LIT> && val < <NUM_LIT> && ( val % <NUM_LIT> == <NUM_LIT> ) ) ) return ADDRESS_SP_IMM7U ; else if ( val >= <NUM_LIT> && val < <NUM_LIT> && ( val % <NUM_LIT> == <NUM_LIT> ) && regno < <NUM_LIT> ) return ADDRESS_LO_REG_IMM3U ; break ; default : break ; } } return ADDRESS_NOT_16BIT_FORMAT ;


<s> regno = REGNO ( XEXP ( op , <NUM_LIT> ) ) ; if ( regno > <NUM_LIT> && regno != SP_REGNUM && regno != FP_REGNUM ) return ADDRESS_NOT_16BIT_FORMAT ; switch ( mode_test ) { case E_QImode : if ( val >= <NUM_LIT> && val < <NUM_LIT> && regno < <NUM_LIT> ) return ADDRESS_LO_REG_IMM3U ; break ; case E_HImode : if ( val >= <NUM_LIT> && val < <NUM_LIT> && ( val % <NUM_LIT> == <NUM_LIT> ) && regno < <NUM_LIT> ) return ADDRESS_LO_REG_IMM3U ; break ; case E_SImode : case E_SFmode : case E_DFmode : if ( ( regno == <NUM_LIT> ) && ( val >= - <NUM_LIT> && val <= - <NUM_LIT> && ( val % <NUM_LIT> == <NUM_LIT> ) ) ) return ADDRESS_R8_IMM7U ; if ( ( regno == FP_REGNUM ) && ( val >= <NUM_LIT> && val < <NUM_LIT> && ( val % <NUM_LIT> == <NUM_LIT> ) ) ) return ADDRESS_FP_IMM7U ; else if ( ( regno == SP_REGNUM ) && ( val >= <NUM_LIT> && val < <NUM_LIT> && ( val % <NUM_LIT> == <NUM_LIT> ) ) ) return ADDRESS_SP_IMM7U ;

else if ( val >= <NUM_LIT> && val < <NUM_LIT> && ( val % <NUM_LIT> == <NUM_LIT> ) && regno < <NUM_LIT> ) return ADDRESS_LO_REG_IMM3U ;


<s> if ( INTVAL ( in0_idx0 ) == INTVAL ( in1_idx0 ) && INTVAL ( in0_idx1 ) == INTVAL ( in1_idx1 ) && INTVAL ( in0_idx0 ) != INTVAL ( in0_idx1 ) ) return false ; if ( INTVAL ( in0_idx0 ) != INTVAL ( in0_idx1 ) && INTVAL ( in1_idx0 ) != INTVAL ( in1_idx1 ) ) return false ;


<s> break ; case ADDRESS_POST_INC_LO_REG_IMM3U : snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> ) ; output_asm_insn ( pattern , operands ) ; break ; case ADDRESS_POST_MODIFY_LO_REG_IMM3U : snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> ) ; output_asm_insn ( pattern , operands ) ; break ; case ADDRESS_FP_IMM7U : output_asm_insn ( <STR_LIT> , operands ) ; break ;


<s> case ADDRESS_LO_REG_IMM3U : snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> , size ) ; output_asm_insn ( pattern , operands ) ; break ; case ADDRESS_POST_INC_LO_REG_IMM3U : snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> ) ; output_asm_insn ( pattern , operands ) ; break ; case ADDRESS_POST_MODIFY_LO_REG_IMM3U : snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> ) ; output_asm_insn ( pattern , operands ) ; break ; case ADDRESS_FP_IMM7U :


<s> char pattern [ <NUM_LIT> ] ; unsigned char size ; rtx code ; code = XEXP ( operands [ <NUM_LIT> ] , <NUM_LIT> ) ; size = nds32_byte_to_size ( byte ) ; switch ( GET_CODE ( code ) ) { case REG : snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> , size ) ; break ; case SYMBOL_REF : case CONST : operands [ <NUM_LIT> ] = XEXP ( operands [ <NUM_LIT> ] , <NUM_LIT> ) ; snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> , size ) ; break ; case POST_INC : snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> , size , byte ) ; break ; case POST_DEC : snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> , size , byte ) ; break ; case POST_MODIFY : switch ( GET_CODE ( XEXP ( XEXP ( code , <NUM_LIT> ) , <NUM_LIT> ) ) ) { case REG : case SUBREG : snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> , size ) ;


<s> snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> , size ) ; break ; case CONST_INT : snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> , size ) ; break ; default : abort ( ) ; } break ; case LO_SUM : operands [ <NUM_LIT> ] = XEXP ( code , <NUM_LIT> ) ; operands [ <NUM_LIT> ] = XEXP ( code , <NUM_LIT> ) ; snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> , size ) ; break ; default : abort ( ) ; } output_asm_insn ( pattern , operands ) ; return <STR_LIT> ;


<s> case POST_MODIFY : switch ( GET_CODE ( XEXP ( XEXP ( code , <NUM_LIT> ) , <NUM_LIT> ) ) ) { case REG : case SUBREG : snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> , size ) ; break ; case CONST_INT : snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> , size ) ; break ; default : abort ( ) ; } break ; case PLUS : switch ( GET_CODE ( XEXP ( code , <NUM_LIT> ) ) ) { case REG : case SUBREG : snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> , size ) ; break ;


<s> if ( align_p ) strcat ( pattern , <STR_LIT> ) ; noreturn_p = find_reg_note ( insn , REG_NORETURN , NULL_RTX ) != NULL_RTX ; if ( noreturn_p ) { if ( TARGET_16_BIT ) strcat ( pattern , <STR_LIT> ) ;


<s> bool noreturn_p ; if ( nds32_long_call_p ( symbol ) ) strcpy ( pattern , long_call ) ; else strcpy ( pattern , call ) ; if ( flag_pic && CONSTANT_P ( symbol ) && ! nds32_symbol_binds_local_p ( symbol ) ) strcat ( pattern , <STR_LIT> ) ; if ( align_p ) strcat ( pattern , <STR_LIT> ) ;


<s> output_asm_insn ( <STR_LIT> , operands ) ; } else output_asm_insn ( <STR_LIT> , operands ) ; output_asm_insn ( <STR_LIT> , operands ) ;


<s> gcc_assert ( GET_CODE ( diff_vec ) == ADDR_DIFF_VEC ) ; if ( flag_pic ) { output_asm_insn ( <STR_LIT> , operands ) ; output_asm_insn ( <STR_LIT> , operands ) ; output_asm_insn ( <STR_LIT> , operands ) ; } else output_asm_insn ( <STR_LIT> , operands ) ; mode = GET_MODE ( diff_vec ) ; switch ( mode ) { case E_QImode : output_asm_insn ( <STR_LIT> , operands ) ; break ; case E_HImode : output_asm_insn ( <STR_LIT> , operands ) ; break ; case E_SImode : output_asm_insn ( <STR_LIT> , operands ) ; break ; default : gcc_unreachable ( ) ;


<s> const char * nds32_output_casesi_pc_relative ( rtx * operands ) { machine_mode mode ; rtx diff_vec ; diff_vec = PATTERN ( NEXT_INSN ( as_a < rtx_insn * > ( operands [ <NUM_LIT> ] ) ) ) ; gcc_assert ( GET_CODE ( diff_vec ) == ADDR_DIFF_VEC ) ; if ( flag_pic ) { output_asm_insn ( <STR_LIT> , operands ) ; output_asm_insn ( <STR_LIT> , operands ) ; output_asm_insn ( <STR_LIT> , operands ) ; } else output_asm_insn ( <STR_LIT> , operands ) ; mode = GET_MODE ( diff_vec ) ; switch ( mode ) { case E_QImode : output_asm_insn ( <STR_LIT> , operands ) ; break ; case E_HImode : output_asm_insn ( <STR_LIT> , operands ) ; break ; case E_SImode : output_asm_insn ( <STR_LIT> , operands ) ; break ; default : gcc_unreachable ( ) ; } output_asm_insn ( <STR_LIT> , operands ) ; if ( TARGET_16_BIT ) return <STR_LIT> ; else return <STR_LIT> ;


<s> insn_length = get_attr_length ( insn ) ; long_jump_p = ( insn_length == <NUM_LIT> || insn_length == <NUM_LIT> ) ? true : false ; r5_p = ( insn_length == <NUM_LIT> || insn_length == <NUM_LIT> ) ? true : false ; code = GET_CODE ( operands [ <NUM_LIT> ] ) ;


<s> insn_length = get_attr_length ( insn ) ; long_jump_p = ( insn_length == <NUM_LIT> || insn_length == <NUM_LIT> ) ? true : false ; r5_p = ( insn_length == <NUM_LIT> || insn_length == <NUM_LIT> ) ? true : false ; code = GET_CODE ( operands [ <NUM_LIT> ] ) ; switch ( code ) {


<s> gcc_assert ( insn_length == <NUM_LIT> || insn_length == <NUM_LIT> ) ; long_jump_p = ( insn_length == <NUM_LIT> ) ? true : false ; code = GET_CODE ( operands [ <NUM_LIT> ] ) ; switch ( code ) { case GT : case GE :


<s> gcc_assert ( insn_length == <NUM_LIT> || insn_length == <NUM_LIT> ) ; long_jump_p = ( insn_length == <NUM_LIT> ) ? true : false ; code = GET_CODE ( operands [ <NUM_LIT> ] ) ; switch ( code ) { case GT : case GE : case LT : case LE : output_cond_branch_compare_zero ( code , <STR_LIT> , long_jump_p , operands , false ) ; break ; default : gcc_unreachable ( ) ; }


<s> int reg = load_p ? <NUM_LIT> : <NUM_LIT> ; int mem = load_p ? <NUM_LIT> : <NUM_LIT> ; rtx otherops [ <NUM_LIT> ] ; rtx addr = XEXP ( operands [ mem ] , <NUM_LIT> ) ; otherops [ <NUM_LIT> ] = gen_rtx_REG ( SImode , REGNO ( operands [ reg ] ) ) ; otherops [ <NUM_LIT> ] = gen_rtx_REG ( SImode , REGNO ( operands [ reg ] ) + <NUM_LIT> ) ; if ( GET_CODE ( addr ) == POST_INC ) { otherops [ <NUM_LIT> ] = XEXP ( addr , <NUM_LIT> ) ; snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> , load_p ? 'l' : 's' ) ; } else { otherops [ <NUM_LIT> ] = addr ; snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> , load_p ? 'l' : 's' ) ; }

output_asm_insn ( pattern , otherops ) ;


<s> else if ( REG_P ( addr_op0 ) && CONST_INT_P ( addr_op1 ) ) pattern = <STR_LIT> ; else if ( GET_CODE ( addr_op0 ) == MULT && REG_P ( addr_op1 ) && REG_P ( XEXP ( addr_op0 , <NUM_LIT> ) ) && CONST_INT_P ( XEXP ( addr_op0 , <NUM_LIT> ) ) ) pattern = <STR_LIT> ; else gcc_unreachable ( ) ; break ; case POST_MODIFY : addr_op0 = XEXP ( addr , <NUM_LIT> ) ; addr_op1 = XEXP ( addr , <NUM_LIT> ) ; if ( REG_P ( addr_op0 ) && GET_CODE ( addr_op1 ) == PLUS && REG_P ( XEXP ( addr_op1 , <NUM_LIT> ) ) ) pattern = <STR_LIT> ; else if ( REG_P ( addr_op0 ) && GET_CODE ( addr_op1 ) == PLUS && CONST_INT_P ( XEXP ( addr_op1 , <NUM_LIT> ) ) ) pattern = <STR_LIT> ; else gcc_unreachable ( ) ; break ; case POST_INC : if ( REG_P ( XEXP ( addr , <NUM_LIT> ) ) ) { if ( dp ) pattern = <STR_LIT> ; else pattern = <STR_LIT> ; } else gcc_unreachable ( ) ; break ; case POST_DEC :


<s> else if ( REG_P ( addr_op0 ) && CONST_INT_P ( addr_op1 ) ) pattern = <STR_LIT> ; else if ( GET_CODE ( addr_op0 ) == MULT && REG_P ( addr_op1 ) && REG_P ( XEXP ( addr_op0 , <NUM_LIT> ) ) && CONST_INT_P ( XEXP ( addr_op0 , <NUM_LIT> ) ) ) pattern = <STR_LIT> ; else gcc_unreachable ( ) ; break ; case POST_MODIFY : addr_op0 = XEXP ( addr , <NUM_LIT> ) ; addr_op1 = XEXP ( addr , <NUM_LIT> ) ; if ( REG_P ( addr_op0 ) && GET_CODE ( addr_op1 ) == PLUS && REG_P ( XEXP ( addr_op1 , <NUM_LIT> ) ) ) pattern = <STR_LIT> ; else if ( REG_P ( addr_op0 ) && GET_CODE ( addr_op1 ) == PLUS && CONST_INT_P ( XEXP ( addr_op1 , <NUM_LIT> ) ) ) pattern = <STR_LIT> ; else gcc_unreachable ( ) ; break ; case POST_INC : if ( REG_P ( XEXP ( addr , <NUM_LIT> ) ) ) { if ( dp ) pattern = <STR_LIT> ; else pattern = <STR_LIT> ; } else gcc_unreachable ( ) ; break ; case POST_DEC : if ( REG_P ( XEXP ( addr , <NUM_LIT> ) ) ) { if ( dp ) pattern = <STR_LIT> ; else pattern = <STR_LIT> ; } else gcc_unreachable ( ) ;


<s> update_base_p = true ; base_reg = XEXP ( XEXP ( base_addr , <NUM_LIT> ) , <NUM_LIT> ) ; } const char * update_base = update_base_p ? <STR_LIT> : <STR_LIT> ; regno = REGNO ( operands [ <NUM_LIT> ] ) ; otherops [ <NUM_LIT> ] = operands [ <NUM_LIT> ] ; otherops [ <NUM_LIT> ] = base_reg ; if ( regno >= <NUM_LIT> ) { enable4 = nds32_regno_to_enable4 ( regno ) ; sprintf ( buff , <STR_LIT> , update_base , enable4 ) ; } else { sprintf ( buff , <STR_LIT> , update_base ) ; } output_asm_insn ( buff , otherops ) ;


<s> update_base_p = false ; base_reg = XEXP ( base_addr , <NUM_LIT> ) ; } else { update_base_p = true ; base_reg = XEXP ( XEXP ( base_addr , <NUM_LIT> ) , <NUM_LIT> ) ; } const char * update_base = update_base_p ? <STR_LIT> : <STR_LIT> ; regno = REGNO ( operands [ <NUM_LIT> ] ) ; otherops [ <NUM_LIT> ] = operands [ <NUM_LIT> ] ; otherops [ <NUM_LIT> ] = base_reg ; if ( regno >= <NUM_LIT> ) { enable4 = nds32_regno_to_enable4 ( regno ) ; sprintf ( buff , <STR_LIT> , update_base , enable4 ) ; } else { sprintf ( buff , <STR_LIT> , update_base ) ; } output_asm_insn ( buff , otherops ) ; return <STR_LIT> ;


<s> if ( satisfies_constraint_Iu08 ( GEN_INT ( sp_adjust ) ) && NDS32_DOUBLE_WORD_ALIGN_P ( sp_adjust ) && ! cfun -> calls_alloca ) operands [ <NUM_LIT> ] = GEN_INT ( sp_adjust ) ; else operands [ <NUM_LIT> ] = GEN_INT ( <NUM_LIT> ) ; snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> ) ; output_asm_insn ( pattern , operands ) ;


<s> operands [ <NUM_LIT> ] = gen_rtx_REG ( SImode , re_callee_saved ) ; 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 ) operands [ <NUM_LIT> ] = GEN_INT ( sp_adjust ) ; else operands [ <NUM_LIT> ] = GEN_INT ( <NUM_LIT> ) ; snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> ) ; output_asm_insn ( pattern , operands ) ; return <STR_LIT> ;


<s> else return <STR_LIT> ; } else { if ( TARGET_BIG_ENDIAN ) return <STR_LIT> ; else return <STR_LIT> ; } } if ( INTVAL ( in0_idx0 ) != INTVAL ( in0_idx1 ) && INTVAL ( in1_idx0 ) != INTVAL ( in1_idx1 ) ) { if ( INTVAL ( in0_idx0 ) == <NUM_LIT> ) { if ( TARGET_BIG_ENDIAN ) return <STR_LIT> ; else return <STR_LIT> ; } else { if ( TARGET_BIG_ENDIAN ) return <STR_LIT> ; else return <STR_LIT> ; } } gcc_unreachable ( ) ;


<s> if ( TARGET_BIG_ENDIAN ) return <STR_LIT> ; else return <STR_LIT> ; } } if ( INTVAL ( in0_idx0 ) != INTVAL ( in0_idx1 ) && INTVAL ( in1_idx0 ) != INTVAL ( in1_idx1 ) ) { if ( INTVAL ( in0_idx0 ) == <NUM_LIT> ) { if ( TARGET_BIG_ENDIAN ) return <STR_LIT> ; else return <STR_LIT> ; }


<s> if ( REG_P ( XEXP ( base_addr , <NUM_LIT> ) ) ) { update_base_p = false ; base_reg = XEXP ( base_addr , <NUM_LIT> ) ; } else { update_base_p = true ; base_reg = XEXP ( XEXP ( base_addr , <NUM_LIT> ) , <NUM_LIT> ) ; } const char * update_base = update_base_p ? <STR_LIT> : <STR_LIT> ; regno = REGNO ( operands [ <NUM_LIT> ] ) ; otherops [ <NUM_LIT> ] = base_reg ; otherops [ <NUM_LIT> ] = operands [ <NUM_LIT> ] ; otherops [ <NUM_LIT> ] = gen_rtx_REG ( SImode , REGNO ( operands [ <NUM_LIT> ] ) + <NUM_LIT> ) ; ; if ( regno >= <NUM_LIT> ) { enable4 = nds32_regno_to_enable4 ( regno ) | nds32_regno_to_enable4 ( regno + <NUM_LIT> ) ; sprintf ( buff , <STR_LIT> , update_base , enable4 ) ; } else if ( regno == <NUM_LIT> ) {

enable4 = nds32_regno_to_enable4 ( regno + <NUM_LIT> ) ;


<s> otherops [ <NUM_LIT> ] = base_reg ; otherops [ <NUM_LIT> ] = operands [ <NUM_LIT> ] ; otherops [ <NUM_LIT> ] = gen_rtx_REG ( SImode , REGNO ( operands [ <NUM_LIT> ] ) + <NUM_LIT> ) ; ; if ( regno >= <NUM_LIT> ) { enable4 = nds32_regno_to_enable4 ( regno ) | nds32_regno_to_enable4 ( regno + <NUM_LIT> ) ; sprintf ( buff , <STR_LIT> , update_base , enable4 ) ; } else if ( regno == <NUM_LIT> ) { enable4 = nds32_regno_to_enable4 ( regno + <NUM_LIT> ) ; sprintf ( buff , <STR_LIT> , update_base , enable4 ) ; } else {

sprintf ( buff , <STR_LIT> , update_base ) ;


<s> const char * nds32_output_smw_single_word ( rtx * operands ) { char buff [ <NUM_LIT> ] ; unsigned regno ; int enable4 ; bool update_base_p ; rtx base_addr = operands [ <NUM_LIT> ] ; rtx base_reg ; rtx otherops [ <NUM_LIT> ] ; if ( REG_P ( XEXP ( base_addr , <NUM_LIT> ) ) ) { update_base_p = false ; base_reg = XEXP ( base_addr , <NUM_LIT> ) ; } else { update_base_p = true ; base_reg = XEXP ( XEXP ( base_addr , <NUM_LIT> ) , <NUM_LIT> ) ; } const char * update_base = update_base_p ? <STR_LIT> : <STR_LIT> ; regno = REGNO ( operands [ <NUM_LIT> ] ) ; otherops [ <NUM_LIT> ] = base_reg ; otherops [ <NUM_LIT> ] = operands [ <NUM_LIT> ] ; if ( regno >= <NUM_LIT> ) { enable4 = nds32_regno_to_enable4 ( regno ) ;

sprintf ( buff , <STR_LIT> , update_base , enable4 ) ;


<s> else { update_base_p = true ; base_reg = XEXP ( XEXP ( base_addr , <NUM_LIT> ) , <NUM_LIT> ) ; } const char * update_base = update_base_p ? <STR_LIT> : <STR_LIT> ; regno = REGNO ( operands [ <NUM_LIT> ] ) ; otherops [ <NUM_LIT> ] = base_reg ; otherops [ <NUM_LIT> ] = operands [ <NUM_LIT> ] ; if ( regno >= <NUM_LIT> ) { enable4 = nds32_regno_to_enable4 ( regno ) ;


<s> else { if ( cfun -> machine -> callee_saved_first_fpr_regno != SP_REGNUM ) { sp_adjust = cfun -> machine -> callee_saved_area_gpr_padding_bytes + cfun -> machine -> callee_saved_fpr_regs_size ; operands [ <NUM_LIT> ] = GEN_INT ( sp_adjust ) ; } else { operands [ <NUM_LIT> ] = GEN_INT ( <NUM_LIT> ) ; } } snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> ) ; } else { int pop_en4_only_p = <NUM_LIT> ; operands [ <NUM_LIT> ] = gen_rtx_REG ( SImode , rb_callee_saved ) ; operands [ <NUM_LIT> ] = gen_rtx_REG ( SImode , re_callee_saved ) ; if ( ! cfun -> machine -> fp_size && ! cfun -> machine -> gp_size && ! cfun -> machine -> lp_size && REGNO ( operands [ <NUM_LIT> ] ) == SP_REGNUM && REGNO ( operands [ <NUM_LIT> ] ) == SP_REGNUM ) { return <STR_LIT> ; } else { if ( REGNO ( operands [ <NUM_LIT> ] ) == SP_REGNUM && REGNO ( operands [ <NUM_LIT> ] ) == SP_REGNUM ) pop_en4_only_p = <NUM_LIT> ; snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> , pop_en4_only_p ? <STR_LIT> : <STR_LIT> , cfun -> machine -> fp_size ? <STR_LIT> : <STR_LIT> , cfun -> machine -> gp_size ? <STR_LIT> : <STR_LIT> , cfun -> machine -> lp_size ? <STR_LIT> : <STR_LIT> ) ; } }

output_asm_insn ( pattern , operands ) ;


<s> if ( cfun -> machine -> callee_saved_first_fpr_regno != SP_REGNUM ) { sp_adjust = cfun -> machine -> callee_saved_area_gpr_padding_bytes + cfun -> machine -> callee_saved_fpr_regs_size ; operands [ <NUM_LIT> ] = GEN_INT ( sp_adjust ) ; } else { operands [ <NUM_LIT> ] = GEN_INT ( <NUM_LIT> ) ; } } snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> ) ; } else { int pop_en4_only_p = <NUM_LIT> ; operands [ <NUM_LIT> ] = gen_rtx_REG ( SImode , rb_callee_saved ) ; operands [ <NUM_LIT> ] = gen_rtx_REG ( SImode , re_callee_saved ) ; if ( ! cfun -> machine -> fp_size && ! cfun -> machine -> gp_size && ! cfun -> machine -> lp_size && REGNO ( operands [ <NUM_LIT> ] ) == SP_REGNUM && REGNO ( operands [ <NUM_LIT> ] ) == SP_REGNUM ) { return <STR_LIT> ; } else { if ( REGNO ( operands [ <NUM_LIT> ] ) == SP_REGNUM && REGNO ( operands [ <NUM_LIT> ] ) == SP_REGNUM ) pop_en4_only_p = <NUM_LIT> ; snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> , pop_en4_only_p ? <STR_LIT> : <STR_LIT> , cfun -> machine -> fp_size ? <STR_LIT> : <STR_LIT> , cfun -> machine -> gp_size ? <STR_LIT> : <STR_LIT> , cfun -> machine -> lp_size ? <STR_LIT> : <STR_LIT> ) ;


<s> char pattern [ <NUM_LIT> ] ; rtx operands [ <NUM_LIT> ] ; int rb_va_args = cfun -> machine -> va_args_first_regno ; int re_va_args = cfun -> machine -> va_args_last_regno ; int last_argument_regno = NDS32_FIRST_GPR_REGNUM + NDS32_MAX_GPR_REGS_FOR_ARGS - <NUM_LIT> ; int rb_eh_data = cfun -> machine -> eh_return_data_first_regno ; int re_eh_data = cfun -> machine -> eh_return_data_last_regno ; int first_eh_data_regno = EH_RETURN_DATA_REGNO ( <NUM_LIT> ) ; int rb_callee_saved = cfun -> machine -> callee_saved_first_gpr_regno ; int re_callee_saved = cfun -> machine -> callee_saved_last_gpr_regno ; if ( reg_mentioned_p ( gen_rtx_REG ( SImode , last_argument_regno ) , par_rtx ) ) { operands [ <NUM_LIT> ] = gen_rtx_REG ( SImode , rb_va_args ) ; operands [ <NUM_LIT> ] = gen_rtx_REG ( SImode , re_va_args ) ; snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> , <STR_LIT> ) ; output_asm_insn ( pattern , operands ) ; return <STR_LIT> ; } if ( reg_mentioned_p ( gen_rtx_REG ( SImode , first_eh_data_regno ) , par_rtx ) ) { operands [ <NUM_LIT> ] = gen_rtx_REG ( SImode , rb_eh_data ) ; operands [ <NUM_LIT> ] = gen_rtx_REG ( SImode , re_eh_data ) ; snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> , <STR_LIT> ) ; output_asm_insn ( pattern , operands ) ; return <STR_LIT> ; } if ( NDS32_V3PUSH_AVAILABLE_P ) { int sp_adjust ; operands [ <NUM_LIT> ] = gen_rtx_REG ( SImode , re_callee_saved ) ; 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 ) ) operands [ <NUM_LIT> ] = GEN_INT ( sp_adjust ) ; else { if ( cfun -> machine -> callee_saved_first_fpr_regno != SP_REGNUM ) { sp_adjust = cfun -> machine -> callee_saved_area_gpr_padding_bytes + cfun -> machine -> callee_saved_fpr_regs_size ; operands [ <NUM_LIT> ] = GEN_INT ( sp_adjust ) ; } else { operands [ <NUM_LIT> ] = GEN_INT ( <NUM_LIT> ) ; } } snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> ) ; } else { int push_en4_only_p = <NUM_LIT> ; operands [ <NUM_LIT> ] = gen_rtx_REG ( SImode , rb_callee_saved ) ; operands [ <NUM_LIT> ] = gen_rtx_REG ( SImode , re_callee_saved ) ; if ( ! cfun -> machine -> fp_size && ! cfun -> machine -> gp_size && ! cfun -> machine -> lp_size && REGNO ( operands [ <NUM_LIT> ] ) == SP_REGNUM && REGNO ( operands [ <NUM_LIT> ] ) == SP_REGNUM ) {


<s> else snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> <STR_LIT> ) ; output_asm_insn ( pattern , operands ) ; return <STR_LIT> ;


<s> else snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> <STR_LIT> ) ; output_asm_insn ( pattern , operands ) ;


<s> char pattern [ <NUM_LIT> ] ; if ( TARGET_RELAX_HINT ) snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> <STR_LIT> <STR_LIT> <STR_LIT> <STR_LIT> ) ; else snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> <STR_LIT> <STR_LIT> <STR_LIT> <STR_LIT> ) ;


<s> else snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> <STR_LIT> <STR_LIT> ) ; } else { if ( TARGET_RELAX_HINT ) snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> <STR_LIT> ) ; else snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> <STR_LIT> ) ; }


<s> case <NUM_LIT> : return <NUM_LIT> ; default : gcc_unreachable ( ) ; }


<s> int mem = load_p ? <NUM_LIT> : <NUM_LIT> ; rtx reg_rtx = load_p ? operands [ <NUM_LIT> ] : operands [ <NUM_LIT> ] ; rtx mem_rtx = load_p ? operands [ <NUM_LIT> ] : operands [ <NUM_LIT> ] ; rtx low_part [ <NUM_LIT> ] , high_part [ <NUM_LIT> ] ; rtx sub_mem = XEXP ( mem_rtx , <NUM_LIT> ) ; low_part [ reg ] = simplify_gen_subreg ( SImode , reg_rtx , GET_MODE ( reg_rtx ) , <NUM_LIT> ) ; high_part [ reg ] = simplify_gen_subreg ( SImode , reg_rtx , GET_MODE ( reg_rtx ) , <NUM_LIT> ) ; if ( GET_CODE ( sub_mem ) == POST_DEC ) { sub_mem = XEXP ( sub_mem , <NUM_LIT> ) ; low_part [ mem ] = gen_rtx_MEM ( SImode , gen_rtx_POST_MODIFY ( Pmode , sub_mem , gen_rtx_PLUS ( Pmode , sub_mem , GEN_INT ( <NUM_LIT> ) ) ) ) ; high_part [ mem ] = gen_rtx_MEM ( SImode , gen_rtx_POST_MODIFY ( Pmode , sub_mem , gen_rtx_PLUS ( Pmode , sub_mem , GEN_INT ( - <NUM_LIT> ) ) ) ) ; } else if ( GET_CODE ( sub_mem ) == POST_INC ) { sub_mem = XEXP ( sub_mem , <NUM_LIT> ) ; low_part [ mem ] = gen_rtx_MEM ( SImode , gen_rtx_POST_INC ( Pmode , sub_mem ) ) ; high_part [ mem ] = gen_rtx_MEM ( SImode , gen_rtx_POST_INC ( Pmode , sub_mem ) ) ; } else if ( GET_CODE ( sub_mem ) == POST_MODIFY ) { rtx post_mem = XEXP ( sub_mem , <NUM_LIT> ) ; rtx plus_op = XEXP ( sub_mem , <NUM_LIT> ) ; rtx post_val = XEXP ( plus_op , <NUM_LIT> ) ; low_part [ mem ] = gen_rtx_MEM ( SImode , gen_rtx_POST_MODIFY ( Pmode , post_mem , gen_rtx_PLUS ( Pmode , post_mem , post_val ) ) ) ; high_part [ mem ] = gen_rtx_MEM ( SImode , plus_constant ( Pmode , post_mem , <NUM_LIT> ) ) ; } else { low_part [ mem ] = adjust_address ( mem_rtx , SImode , <NUM_LIT> ) ; high_part [ mem ] = adjust_address ( mem_rtx , SImode , <NUM_LIT> ) ; } if ( ( load_p && reg_overlap_mentioned_p ( low_part [ <NUM_LIT> ] , high_part [ <NUM_LIT> ] ) ) || GET_CODE ( sub_mem ) == POST_MODIFY ) { operands [ <NUM_LIT> ] = high_part [ <NUM_LIT> ] ; operands [ <NUM_LIT> ] = high_part [ <NUM_LIT> ] ; operands [ <NUM_LIT> ] = low_part [ <NUM_LIT> ] ; operands [ <NUM_LIT> ] = low_part [ <NUM_LIT> ] ;


<s> sub_mem = XEXP ( sub_mem , <NUM_LIT> ) ; low_part [ mem ] = gen_rtx_MEM ( SImode , gen_rtx_POST_INC ( Pmode , sub_mem ) ) ; high_part [ mem ] = gen_rtx_MEM ( SImode , gen_rtx_POST_INC ( Pmode , sub_mem ) ) ; } else if ( GET_CODE ( sub_mem ) == POST_MODIFY ) { rtx post_mem = XEXP ( sub_mem , <NUM_LIT> ) ; rtx plus_op = XEXP ( sub_mem , <NUM_LIT> ) ; rtx post_val = XEXP ( plus_op , <NUM_LIT> ) ; low_part [ mem ] = gen_rtx_MEM ( SImode , gen_rtx_POST_MODIFY ( Pmode , post_mem , gen_rtx_PLUS ( Pmode , post_mem , post_val ) ) ) ; high_part [ mem ] = gen_rtx_MEM ( SImode , plus_constant ( Pmode , post_mem , <NUM_LIT> ) ) ; } else { low_part [ mem ] = adjust_address ( mem_rtx , SImode , <NUM_LIT> ) ; high_part [ mem ] = adjust_address ( mem_rtx , SImode , <NUM_LIT> ) ; } if ( ( load_p && reg_overlap_mentioned_p ( low_part [ <NUM_LIT> ] , high_part [ <NUM_LIT> ] ) ) || GET_CODE ( sub_mem ) == POST_MODIFY ) { operands [ <NUM_LIT> ] = high_part [ <NUM_LIT> ] ; operands [ <NUM_LIT> ] = high_part [ <NUM_LIT> ] ; operands [ <NUM_LIT> ] = low_part [ <NUM_LIT> ] ; operands [ <NUM_LIT> ] = low_part [ <NUM_LIT> ] ; } else { operands [ <NUM_LIT> ] = low_part [ <NUM_LIT> ] ; operands [ <NUM_LIT> ] = low_part [ <NUM_LIT> ] ; operands [ <NUM_LIT> ] = high_part [ <NUM_LIT> ] ; operands [ <NUM_LIT> ] = high_part [ <NUM_LIT> ] ;


<s> rtx src_high_part , src_low_part ; rtx dst_high_part , dst_low_part ; dst_high_part = nds32_di_high_part_subreg ( dst ) ; dst_low_part = nds32_di_low_part_subreg ( dst ) ; src_high_part = nds32_di_high_part_subreg ( src ) ; src_low_part = nds32_di_low_part_subreg ( src ) ; if ( CONST_INT_P ( shiftamount ) ) { if ( INTVAL ( shiftamount ) < <NUM_LIT> ) { rtx ext_start ; ext_start = gen_int_mode ( <NUM_LIT> - INTVAL ( shiftamount ) , SImode ) ; emit_insn ( gen_wext ( dst_high_part , src , ext_start ) ) ; emit_insn ( gen_ashlsi3 ( dst_low_part , src_low_part , shiftamount ) ) ; } else { rtx new_shift_amout = gen_int_mode ( INTVAL ( shiftamount ) - <NUM_LIT> , SImode ) ; emit_insn ( gen_ashlsi3 ( dst_high_part , src_low_part , new_shift_amout ) ) ; emit_move_insn ( dst_low_part , GEN_INT ( <NUM_LIT> ) ) ; } } else { rtx dst_low_part_l32 , dst_high_part_l32 ; rtx dst_low_part_g32 , dst_high_part_g32 ; rtx new_shift_amout , select_reg ; dst_low_part_l32 = gen_reg_rtx ( SImode ) ; dst_high_part_l32 = gen_reg_rtx ( SImode ) ; dst_low_part_g32 = gen_reg_rtx ( SImode ) ; dst_high_part_g32 = gen_reg_rtx ( SImode ) ; new_shift_amout = gen_reg_rtx ( SImode ) ; select_reg = gen_reg_rtx ( SImode ) ; rtx ext_start ; ext_start = gen_reg_rtx ( SImode ) ; emit_insn ( gen_subsi3 ( ext_start , gen_int_mode ( <NUM_LIT> , SImode ) , shiftamount ) ) ; emit_insn ( gen_wext ( dst_high_part_l32 , src , ext_start ) ) ;


<s> nds32_split_shiftrtdi3 ( dst , src , shiftamount , true ) ;


<s> void nds32_split_sms ( rtx out , rtx in0 , rtx in1 , rtx in0_idx0 , rtx in1_idx0 , rtx in0_idx1 , rtx in1_idx1 ) { rtx result0 = gen_reg_rtx ( SImode ) ;


<s> static bool nds32_symbol_binds_local_p ( const_rtx x ) {

return ( SYMBOL_REF_DECL ( x ) ? targetm . binds_local_p ( SYMBOL_REF_DECL ( x ) ) : SYMBOL_REF_LOCAL_P ( x ) ) ;


<s> return ( SYMBOL_REF_DECL ( x ) ? targetm . binds_local_p ( SYMBOL_REF_DECL ( x ) ) : SYMBOL_REF_LOCAL_P ( x ) ) ;


<s> if ( ! targetm . have_tls ) return false ; if ( GET_CODE ( x ) == CONST && GET_CODE ( XEXP ( x , <NUM_LIT> ) ) == PLUS ) x = XEXP ( XEXP ( x , <NUM_LIT> ) , <NUM_LIT> ) ;

if ( GET_CODE ( x ) == SYMBOL_REF && SYMBOL_REF_TLS_MODEL ( x ) ) return true ;


<s> else { if ( GET_CODE ( base_addr ) == POST_INC && REG_P ( XEXP ( base_addr , <NUM_LIT> ) ) ) return true ; }


<s> const char * cond_code ; bool align_p = NDS32_ALIGN_P ( ) ; const char * align = align_p ? <STR_LIT> : <STR_LIT> ; if ( long_jump_p ) { int inverse_code = nds32_inverse_cond_code ( code ) ; cond_code = nds32_cond_code_str ( inverse_code ) ; if ( ta_implied_p && TARGET_16_BIT ) { snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> , cond_code , suffix , align ) ; } else { snprintf ( pattern , sizeof ( pattern ) , <STR_LIT> , cond_code , suffix , align ) ; } } else {

cond_code = nds32_cond_code_str ( code ) ;


<s> fmt = GET_RTX_FORMAT ( GET_CODE ( op ) ) ; for ( i = GET_RTX_LENGTH ( GET_CODE ( op ) ) - <NUM_LIT> ; i >= <NUM_LIT> ; i -- ) { if ( fmt [ i ] == 'E' ) { int j ; for ( j = XVECLEN ( op , i ) - <NUM_LIT> ; j >= <NUM_LIT> ; j -- ) if ( symbolic_reference_mentioned_p ( XVECEXP ( op , i , j ) ) ) return true ; } else if ( fmt [ i ] == 'e' && symbolic_reference_mentioned_p ( XEXP ( op , i ) ) ) return true ; }


<s> mem = adjust_automodify_address_nv ( basemem , SImode , new_addr , offset ) ; reg = gen_rtx_REG ( SImode , base_regno + par_index ) ;

XVECEXP ( result , <NUM_LIT> , par_index ) = gen_rtx_SET ( VOIDmode , reg , mem ) ;


<s> int maximum_bytes ; if ( TARGET_REDUCED_REGS ) maximum_bytes = <NUM_LIT> ; else maximum_bytes = <NUM_LIT> ; if ( GET_CODE ( total_bytes ) != CONST_INT || GET_CODE ( alignment ) != CONST_INT || INTVAL ( total_bytes ) > maximum_bytes || INTVAL ( total_bytes ) & <NUM_LIT> || INTVAL ( alignment ) & <NUM_LIT> ) return <NUM_LIT> ; dst_base_reg = copy_to_mode_reg ( SImode , XEXP ( dstmem , <NUM_LIT> ) ) ; src_base_reg = copy_to_mode_reg ( SImode , XEXP ( srcmem , <NUM_LIT> ) ) ;


<s> dst_base_reg = copy_to_mode_reg ( SImode , XEXP ( dstmem , <NUM_LIT> ) ) ; src_base_reg = copy_to_mode_reg ( SImode , XEXP ( srcmem , <NUM_LIT> ) ) ; out_words = in_words = INTVAL ( total_bytes ) / UNITS_PER_WORD ; emit_insn ( nds32_expand_load_multiple ( <NUM_LIT> , in_words , src_base_reg , srcmem ) ) ; emit_insn ( nds32_expand_store_multiple ( <NUM_LIT> , out_words , dst_base_reg , dstmem ) ) ; return <NUM_LIT> ;


XVECEXP ( result , <NUM_LIT> , par_index ) = gen_rtx_SET ( VOIDmode , mem , reg ) ;


<s> offset = par_index * <NUM_LIT> ; new_addr = plus_constant ( Pmode , base_addr , offset ) ; mem = adjust_automodify_address_nv ( basemem , SImode , new_addr , offset ) ; reg = gen_rtx_REG ( SImode , base_regno + par_index ) ;


<s> rtx nds32_expand_load_multiple ( int base_regno , int count , rtx base_addr , rtx basemem ) { int par_index ; int offset ; rtx result ; rtx new_addr , mem , reg ; result = gen_rtx_PARALLEL ( VOIDmode , rtvec_alloc ( count ) ) ; for ( par_index = <NUM_LIT> ; par_index < count ; par_index ++ ) { offset = par_index * <NUM_LIT> ; new_addr = plus_constant ( Pmode , base_addr , offset ) ; mem = adjust_automodify_address_nv ( basemem , SImode , new_addr , offset ) ; reg = gen_rtx_REG ( SImode , base_regno + par_index ) ; XVECEXP ( result , <NUM_LIT> , par_index ) = gen_rtx_SET ( reg , mem ) ; }


XVECEXP ( result , <NUM_LIT> , par_index ) = gen_rtx_SET ( mem , reg ) ;


<s> rtx nds32_expand_store_multiple ( int base_regno , int count , rtx base_addr , rtx basemem ) { int par_index ; int offset ; rtx result ; rtx new_addr , mem , reg ; result = gen_rtx_PARALLEL ( VOIDmode , rtvec_alloc ( count ) ) ; for ( par_index = <NUM_LIT> ; par_index < count ; par_index ++ ) { offset = par_index * <NUM_LIT> ; new_addr = plus_constant ( Pmode , base_addr , offset ) ; mem = adjust_automodify_address_nv ( basemem , SImode , new_addr , offset ) ; reg = gen_rtx_REG ( SImode , base_regno + par_index ) ; XVECEXP ( result , <NUM_LIT> , par_index ) = gen_rtx_SET ( mem , reg ) ; }