> Date: Mon, 24 Oct 2011 00:03:45 +0400 > From: Anatoly Sokolov <ae...@post.ru>
For future reference, please add the diff "-p" option for readability. With subversion, you need to add the equivalence of "diff-cmd = /home/hp/.scripts/svn-diff" under [helpers] in your ~/.subversion/config and have a svn-diff equivalent to: --- #!/bin/bash diff=/usr/bin/diff args="-up -F ^(define" # Additional -F for .md files exec ${diff} ${args} "$@" --- > Regression tested on cris-axis-elf. > > OK to install? Meh, lots of churn, but I suppose inevitable. > * config/cris/cris.c (reg_ok_for_base_p, reg_ok_for_index_p, > cris_constant_index_p, cris_base_p, cris_index_p, > cris_base_or_autoincr_p, cris_bdap_index_p, cris_biap_index_p, > cris_legitimate_address_p): New functions. > (TARGET_LEGITIMATE_ADDRESS_P): Define. > (cris_pic_symbol_type, cris_valid_pic_const): Change arguments type > from rtx to const_rtx. > (cris_print_operand_address, cris_address_cost, > cris_side_effect_mode_ok): Use > cris_constant_index_p, cris_base_p, cris_base_or_autoincr_p, > cris_biap_index_p and cris_bdap_index_p. > * config/cris/cris.h (CONSTANT_INDEX_P, BASE_P, BASE_OR_AUTOINCR_P, > BDAP_INDEX_P, BIAP_INDEX_P, GO_IF_LEGITIMATE_ADDRESS, > REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P): Remove. > (EXTRA_CONSTRAINT_Q, EXTRA_CONSTRAINT_R, EXTRA_CONSTRAINT_T): Use > cris_constant_index_p, cris_base_p, cris_base_or_autoincr_p, > cris_biap_index_p and cris_bdap_index_p. > * config/cris/cris.md (moversideqi movemsideqi peephole2): Use > cris_base_p. > * config/cris/cris-protos.h (cris_constant_index_p, cris_base_p, > cris_base_or_autoincr_p, cris_bdap_index_p, cris_biap_index_p): New > prototype. > (cris_pic_symbol_type, cris_valid_pic_const): Update prototype. > > Index: gcc/config/cris/cris.c > @@ -2030,12 +2165,12 @@ (With "-p", I'd see cris_side_effect_mode_ok here...) Hm, non-strict checking... Please change the strictness "false" to "reload_in_progress || reload_completed" in that function. It might not actually make a difference now, but since that function is called in both strictness contexts, it's just better. > Index: gcc/config/cris/cris.h > =================================================================== > --- gcc/config/cris/cris.h (revision 180345) > +++ gcc/config/cris/cris.h (working copy) > @@ -676,17 +676,18 @@ > /* Just an indirect register (happens to also be \ > "all" slottable memory addressing modes not \ > covered by other constraints, i.e. '>'). */ \ > - MEM_P (X) && BASE_P (XEXP (X, 0)) \ > + MEM_P (X) \ > + && cris_base_p (XEXP (X, 0), reload_in_progress | reload_completed) \ Everywhere, use "reload_in_progress || reload_completed", not "reload_in_progress | reload_completed". > Index: gcc/config/cris/cris.md > =================================================================== > --- gcc/config/cris/cris.md (revision 180345) > +++ gcc/config/cris/cris.md (working copy) > @@ -4680,7 +4680,7 @@ > (match_operator 4 "cris_mem_op" [(match_dup 0)]))] > "GET_MODE_SIZE (GET_MODE (operands[4])) <= UNITS_PER_WORD > && REGNO (operands[3]) != REGNO (operands[0]) > - && (BASE_P (operands[1]) || BASE_P (operands[2])) > + && (cris_base_p (operands[1], false) || cris_base_p (operands[2], false)) > && !CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'J') > && !CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'N') > && (INTVAL (operands[2]) >= -128 && INTVAL (operands[2]) < 128) > @@ -4716,7 +4716,7 @@ > (match_operand 4 "register_operand" ""))] > "GET_MODE_SIZE (GET_MODE (operands[4])) <= UNITS_PER_WORD > && REGNO (operands[4]) != REGNO (operands[0]) > - && (BASE_P (operands[1]) || BASE_P (operands[2])) > + && (cris_base_p (operands[1], false) || cris_base_p (operands[2], false)) > && !CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'J') > && !CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'N') > && (INTVAL (operands[2]) >= -128 && INTVAL (operands[2]) < 128) Why false? Peephole2 is always post-reload, so the strict argument should be true. With the above requests fixed and re-tested, ok. brgds, H-P