This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: assertify alpha


On Sat, May 07, 2005 at 01:09:06PM +0100, Nathan Sidwell wrote:
> +     case CONST_INT:
> +       gcc_assert (operands[1] == CONST0_RTX (TFmode));
> +       operands[2] = operands[3] = const0_rtx;
> +       break;

CONST0_RTX of TFmode is not CONST_INT.  It's CONST_DOUBLE.


> !   if (from == FRAME_POINTER_REGNUM && to == HARD_FRAME_POINTER_REGNUM)
> !     return -fixed_size;
> !   else if (from == ARG_POINTER_REGNUM && to == HARD_FRAME_POINTER_REGNUM)
> !     return 0;
> !   else if (from == FRAME_POINTER_REGNUM && to == STACK_POINTER_REGNUM)
> !     return (ALPHA_ROUND (current_function_outgoing_args_size)
> ! 	    + ALPHA_ROUND (get_frame_size()));
> !   else if (from == ARG_POINTER_REGNUM && to == STACK_POINTER_REGNUM)
> !     return (ALPHA_ROUND (fixed_size)
> ! 	    + ALPHA_ROUND (get_frame_size()
> ! 			   + current_function_outgoing_args_size));
> !   else
> !     abort ();
>   }
>   
>   /* Output the module name for .ident and .end directives. We have to strip
> --- 9545,9580 ----
>     if (fixed_size != 0)
>       fixed_size += 48;
>   
> !   switch (from)
> !     {
> !     case FRAME_POINTER_REGNUM:
> !       switch (to)
> ! 	{
> ! 	case HARD_FRAME_POINTER_REGNUM:
> ! 	  return -fixed_size;
> ! 	case STACK_POINTER_REGNUM:
> ! 	  return (ALPHA_ROUND (current_function_outgoing_args_size)
> ! 		  + ALPHA_ROUND (get_frame_size()));
> ! 	default:
> ! 	  gcc_unreachable ();
> ! 	}

I think this kind of transformation is much less readable.
I deeply dislike nested switch statements.

Otherwise it's ok, I guess.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]