skip arguemnt protection if the last argument is used
skip argument protection if the last argument is used
copy_args_for_protection (){  tree parms = DECL_ARGUMENTS (current_function_decl);  rtx temp_rtx;  parms = DECL_ARGUMENTS (current_function_decl);  for (; parms; parms = TREE_CHAIN (parms))    if (DECL_NAME (parms) && TREE_TYPE (parms) != error_mark_node)      {	if (PARM_PASSED_IN_MEMORY (parms) && DECL_NAME (parms))	  {	    int string_p;	    /*	      skip arguemnt protection if the last argument is used	      for the variable argument	    */	    /*	      tree fntype;	      if (TREE_CHAIN (parms) == 0)	      {	        fntype = TREE_TYPE (current_function_decl);	        if ((TYPE_ARG_TYPES (fntype) != 0		     && TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype))) 		          != void_type_node)	             || current_function_varargs)	          continue;	      }	    */	    string_p = search_string_def (TREE_TYPE(parms));	    /* check if it is a candidate to move */	    if (string_p || search_pointer_def (TREE_TYPE (parms)))	      {		int arg_size		  = ((TREE_INT_CST_LOW (DECL_SIZE (parms)) + BITS_PER_UNIT - 1)		     / BITS_PER_UNIT);		tree passed_type = DECL_ARG_TYPE (parms);		tree nominal_type = TREE_TYPE (parms);				start_sequence ();		if (GET_CODE (DECL_RTL (parms)) == REG)		  {		    rtx safe = 0;		    		    change_arg_use_of_insns (prologue_insert_point,					     DECL_RTL (parms), &safe, 0);		    if (safe)		      {			/* generate codes for copying the content */			rtx movinsn = emit_move_insn (safe, DECL_RTL (parms));		    			/* avoid register elimination in gcse.c (COPY-PROP)*/			PATTERN (movinsn)->volatil = 1;						/* save debugger info */			DECL_INCOMING_RTL (parms) = safe;		      }		  }		else if (GET_CODE (DECL_RTL (parms)) == MEM			 && GET_CODE (XEXP (DECL_RTL (parms), 0)) == ADDRESSOF)		  {		    rtx movinsn;		    rtx safe = gen_reg_rtx (GET_MODE (DECL_RTL (parms)));		    /* generate codes for copying the content */		    movinsn = emit_move_insn (safe, DECL_INCOMING_RTL (parms));		    /* avoid register elimination in gcse.c (COPY-PROP)*/		    PATTERN (movinsn)->volatil = 1;		    /* change the addressof information to the newly		       allocated pseudo register */		    emit_move_insn (DECL_RTL (parms), safe);		    /* save debugger info */		    DECL_INCOMING_RTL (parms) = safe;		  }					/* See if the frontend wants to pass this by invisible		   reference.  */		else if (passed_type != nominal_type			 && POINTER_TYPE_P (passed_type)			 && TREE_TYPE (passed_type) == nominal_type)		  {		    rtx safe = 0, orig = XEXP (DECL_RTL (parms), 0);		    change_arg_use_of_insns (prologue_insert_point,					     orig, &safe, 0);		    if (safe)		      {			/* generate codes for copying the content */			rtx movinsn = emit_move_insn (safe, orig);		    			/* avoid register elimination in gcse.c (COPY-PROP)*/			PATTERN (movinsn)->volatil = 1;						/* save debugger info */			DECL_INCOMING_RTL (parms) = safe;		      }		  }		else		  {		    /* declare temporary local variable DECL_NAME (parms) */		    temp_rtx		      = assign_stack_local (DECL_MODE (parms), arg_size,					    DECL_MODE (parms) == BLKmode ?					    -1 : 0);		    		    MEM_IN_STRUCT_P (temp_rtx)		      = AGGREGATE_TYPE_P (TREE_TYPE (parms));		    set_mem_alias_set (temp_rtx, get_alias_set (parms));		    /* move_arg_location may change the contents of		       DECL_RTL (parms). to avoid this, copies the contents */		    /* SET_DECL_RTL (parms, copy_rtx (DECL_RTL (parms))); */		    /* generate codes for copying the content */		    store_expr (parms, temp_rtx, 0);		    /* change the reference for each instructions */		    move_arg_location (prologue_insert_point, DECL_RTL (parms),				       temp_rtx, arg_size);		    /* change the location of parms variable */		    SET_DECL_RTL (parms, temp_rtx);		    /* change debugger info */		    DECL_INCOMING_RTL (parms) = temp_rtx;		  }		emit_insn_before (get_insns (), prologue_insert_point);		end_sequence ();#ifdef FRAME_GROWS_DOWNWARD		/* process the string argument */		if (string_p && DECL_MODE (parms) == BLKmode)		  {		    int alignment = BIGGEST_ALIGNMENT / BITS_PER_UNIT;		    arg_size = CEIL_ROUND (arg_size, alignment);					    /* change the reference for each instructions */		    sweep_string_variable (DECL_RTL (parms), arg_size);		  }#endif	      }	  }      }}