This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: assertify alpha
- From: Richard Henderson <rth at redhat dot com>
- To: Nathan Sidwell <nathan at codesourcery dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Falk Hueffner <falk at debian dot org>
- Date: Sat, 7 May 2005 17:34:58 -0700
- Subject: Re: assertify alpha
- References: <427CAFE2.1070201@codesourcery.com>
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~