This is the mail archive of the gcc@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] |
I agree that there is something wrong here. I agree that as written the constraints for operands 0, 1, and 2 should have a '+'.
That said, a '+' constraint is most useful for a pattern that expands into multiple instructions. I think this would be better written along the lines of
(set (match_operand:QI 2 "register_operand" "=d,c") (const_int 0)) (set (mem:BLK (match_operand:QI 3 "register_operand" "0") (match_operand:QI 4 "register_operand" "1"))) (set (match_operand:QI 0 "register_operand" "=d,c") (plus:QI (match_dup 3) (match_operand:QI 5 "register_operand" "2")))) (set (match_operand:QI 1 "register_operand" "=x,c") (plus:QI (match_dup 4) (match_dup 5))) (clobber (match_scratch:QI 3 "=w,w"))
Also it looks like it might be possible to add a third alternative such that that alternative does not require the match_scratch.
Ian
(define_insn_and_split "movmem_long" [(set (match_operand:QI 2 "register_operand" "=d") (const_int 0)) (set (mem:BLK (match_operand:QI 3 "register_operand" "0")) (mem:BLK (match_operand:QI 4 "register_operand" "1"))) (set (match_operand:QI 0 "register_operand" "=d") (plus:QI (match_dup 3) (match_operand:QI 5 "register_operand" "2"))) (set (match_operand:QI 1 "register_operand" "=x") (plus:QI (match_dup 4) (match_dup 5))) (clobber (match_scratch:QI 6 "=w"))] "!TARGET_NO_BLOCK_COPY" "#" "&& reload_completed" [(const_int 0)] { if(REGNO(operands[2]) == RAH) { emit_move_insn(operands[6], operands[0]); emit_move_insn(operands[0], operands[2]); emit_move_insn(operands[2], operands[6]); } emit_insn(gen_bc2()); DONE; })
-- PMatos
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |