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 sh


On May  8, 2005, Nathan Sidwell <nathan@codesourcery.com> wrote:

> 2005-05-08  Nathan Sidwell  <nathan@codesourcery.com>

> 	* config/sh/sh.c (print_operand_address): Use gcc_assert and
> 	gcc_unreachable as appropriate.
> 	(print_operand, prepare_move_operands, prepare_scc_operands,
> 	output_movedouble, output_branch, shift_insns_rtx, gen_shifty_op,
> 	gen_shl_and, shl_sext_kind, gen_datalabel_ref, dump_table,
> 	fixup_mova, gen_far_branch, sh_reorg, split_branches,
> 	final_prescan_insn, output_stack_adjust, sh_expand_epilogue,
> 	sh_set_return_address, sh_setup_incoming_varargs,
> 	initial_elimination_offset, sh_pch_valid_p, get_free_reg,
> 	sh_expand_builtin, sh_output_mi_thunk, extract_sfunc_addr,
> 	check_use_sfunc_addr): Likewise.
> 	* config/sh/netbsd-elf.h (FUNCTION_PROFILER): Likewise.
> 	* config/sh/sh.h (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Likewise.
> 	* config/sh/symbian.c (sh_symbian_mark_dllexport,
> 	sh_symbian_mark_dllimport): Likewise.
> 	* config/sh/sh.md: Likewise.
> 	(movdicc, call_pop, call_value_pop, casesi_worker_1,
> 	casesi_worker_2, casesi_shift_media, casesi_load_media,
> 	return_media): Likewise.

Almost ok, see below.

> ! 	 to prevent the compiler from dieing in final.c after the try_split
                                      ^^^^^^

Hmm...  `dieing' looks odd to me.  Isn't `dying' the correct spelling?
Or are both forms acceptable?


> *** 8260,8269 ****
  
>     /* Hard reg 1 is live; since this is a SMALL_REGISTER_CLASSES target,
>        there shouldn't be anything but a jump before the function end.  */
> !   if (! TEST_HARD_REG_BIT (regs_live, 7))
> !     return gen_rtx_REG (Pmode, 7);
> ! 
> !   abort ();
>   }
  
>   /* This function will set the fpscr from memory.
> --- 8257,8264 ----
  
>     /* Hard reg 1 is live; since this is a SMALL_REGISTER_CLASSES target,
>        there shouldn't be anything but a jump before the function end.  */
> !   gcc_assert (TEST_HARD_REG_BIT (regs_live, 7));
> !   return gen_rtx_REG (Pmode, 7);
>   }
  
>   /* This function will set the fpscr from memory.

It looks like the sense of the assertion got accidentally reversed
here.  Before, the code would abort if TEST_HARD_REG_BIT yielded
nonzero; after your change, it aborts if it yields zero.

Other than that, ok.

Thanks!

-- 
Alexandre Oliva             http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}


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