RFA: MN10300 Tidy patch

Nick Clifton nickc@redhat.com
Tue Oct 19 14:08:00 GMT 2010


Hi Richard, Hi Jeff,  Hi Alex,

  Attached is a patch to tidy up the code in the MN10300 backend.  It
  makes no real changes, but instead:

    * Replaces "GET_CODE (foo) == bar" with "BAR_P (foo)" where
      appropriate.

    * Ensures that all exported functions have a "mn10300_" prefix to
      their name.
    
    * Moves the target macro definitions to the end of the mn10300.c
      source file so that the static prototypes are no longer needed.
    
    * Removes redundant "register" keywords.

    * Crops code to the 80 character width limit where reasonable.

    * Moves the preprocessor macros that were being defined in CPP_SPEC
      into TARGET_CPU_CPP_BUILTINS.

    * Tidies macro definitions in mn10300.h

  Tested with no regressions on an mn10300-elf toolchain.

  OK to apply ?

Cheers
  Nick

gcc/ChangeLog
2010-10-19  Nick Clifton  <nickc@redhat.com>

	* config/mn10300/mn10300.c: Fold code to 80-character width.
        Replace GET_CODE (foo) == REG with REG_P (foo).  Likewise for
        MEM, CONST_INT and CONST_DOUBLE.
	(targetm): Move initialization to end of file.
	(print_operand): Rename to mn10300_print_operand.
	(print_operand_address): Rename to mn10300_print_operand_address.
	(can_use_return_insn): Rename to mn10300_can_use_return_insn.
	(expand_prologue): Rename to mn10300_expand_prologue.
	(expand_epilogue): Rename to mn10300_expand_epilogue.
	(initial_offset): Rename to mn10300_initial_offset.
	(function_arg): Rename to mn10300_function_arg.
	(mask_ok_for_mem_btst): Rename to mn10300_mask_ok_for_mem_btst.
	(symbolic_operand): Rename to mn10300_symbolic_operand.
	(legitimize_pic_address): Rename to mn10300_legitimize_pic_address.
	(legitimate_pic_operand_p): Rename to mn10300_legitimate_pic_operand_p.
	* config/mn10300/mn10300-protos.h: Update prototypes.
	* config/mn10300/mn10300.h: Fold code to 80-character width.
        Replace GET_CODE (foo) == REG with REG_P (foo).  Likewise for
        MEM, CONST_INT and CONST_DOUBLE.
        (CPP_SPEC): Move to...
        (TARGET_CPU_CPP_BUILTINS): ... here.
	* config/mn10300/mn10300.md: Fold code to 80-character width.
        Replace GET_CODE (foo) == REG with REG_P (foo).  Likewise for
        MEM, CONST_INT and CONST_DOUBLE.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mn10300.tidy.patch.bz2
Type: application/x-bzip2
Size: 10752 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20101019/29f4af4d/attachment.bz2>


More information about the Gcc-patches mailing list