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]

RFA: MN10300: Replace cc0 with CC_REG


Hi Guys,

  Attached is a patch to remove the use of the cc0 register from the
  MN10300 port and replace it with a CC_REG hard register instead.  The
  main reason for this patch is to allow better scheduling of MN10300
  instructions, although it allows a tidy up of some of the code.  I
  intend to follow up this patch, if accepted, with another that adds
  scheduling information to the MN10300 backend.

  Tested with no regressions on an mn10300-elf toolchain.

  OK to apply ?

Cheers
  Nick

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

	* config/mn10300/mn10300.h (CONSTANT_ALIGNMENT): Define.
	(DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
	(FIRST_PSEUDO_REGISTER): Increase by one.
	(CC_REGNUM): Define.
	(FIXED_REGISTERS, CALL_USED_REGISTERS): Update with CC_REGNUM.
	(HARD_REGNO_MODE_OK): Call mn10300_hard_regno_mode_ok.
	(MODES_TIEABLE): Call mn10300_modes_tieable.
	(REG_CLASS_NAMES): Add CC_REGS.
	(REG_CLASS_CONTENTS): Add CC_REGS.
	(REGNO_REG_CLASS): Add CC_REGS.
	(LEGITIMATE_CONSTANT_P): Call mn10300_legitimate_constant_p.
	(CC_OVERFLOW_UNUSABLE, CC_NO_CARRY, NOTICE_UPDATE_CC)
	(SELECT_CC_MODE, REVERSIBLE_CC_MODE): Delete.
	(REGISTER_NAMES, ADDITIONAL_REGISTER_NAMES): Add CC register.
	(ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): Delete.
	(mn10300_cc_status_mdep): Delete.
	(CC_STATUS_MDEP, CC_STATUS_MDEP_INIT): Delete.
	* config/mn10300/mn10300 (mn10300_option_override): Stop disabling
	the combine-stack-adjust pass.
	(print_operand): Use the mode of the comparison operation to
	select the comparison suffix.
	(notice_update_cc): Delete.
	(mn10300_secondary_reload_class): Remove test for stack pointer
	based arithmetic.
	(output_tst): Rename to mn10300_output_cmp.
	(impossible_plus_operand): Move into predicates.md.
	(mn10300_legitimize_address): Make static.
	(mn10300_legitimate_address_p): Make static.  Only allow SI sized
	constant pic operands.
	(mn10300_legitimate_constant_p): New function.
	(mn10300_case_values_threshold): Make static.
	(mn10300_hard_regno_mode_ok): New function.
	(mn10300_modes_tieable): New function.
	(mn10300_select_cc_mode): New function.
	* config/mn10300/predicates.md (impossible_plus_operand): Define.
	* config/mn10300/constraints.md (R): Test for presence of stack
	pointer regnum rather than the stack pointer rtx.
	(T): Likewise.
	* config/mn10300/mn10300-protos.h: Tidy.
	(mn10300_legitimate_constant_p, mn10300_modes_tieable)
	(mn10300_hard_regno_mode_ok, mn10300_select_cc_mode): Prototype.
	* config/mn10300/mn10300.md: Tidy.
	(cc attribute): Delete.  Replace with clobbers or sets of CC_REG.
	(CC_REG): Define.
	(most_cond): New iterator.
	(mov*): Remove use of CLR instruction.
	(cbranch_si4_<code>): New pattern/split.
	(integer_conditional_branch, reversed_integer_conditional_branch):
	New patterns.
	(cbranch_sf4_<code>): New pattern/split.
	(float_conditional_branch, reversed_float_conditional_branch): New
	patterns.
	(casesi): Use addsi3 pattern instead of movsi pattern to add and
	move a value at the same time.
	(cc0 peepholes): Remove.

Attachment: mn10300.cc0.patch.bz2
Description: BZip2 compressed data


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