H8 cc0 conversion
gcc/ * config/h8300/addsub.md: Turn existing patterns into define_insn_and_split style patterns where the splitter adds a clobber of the condition code register. Drop "cc" attribute. Add _clobber_flags patterns to match output of the splitters. (add<mod>3_incdec): Remove pattern (adds/subs splitter): Only run before reload. * config/h8300/bitfield.md: Turn existing patterns into define_insn_and_split style patterns where the splitter adds a clobber of the condition code register. Drop "cc" attribute. Add _clobber_flags patterns to match output of the splitters. (cstoreqi4, cstorehi4, cstoresi4): Comment out (*bstzhireg, *cmpstz, *bstz, *bistz, *cmpcondset): Likewise (*condbset, *cmpcondbclr, *condbclr): Likewise. (*cmpcondbsetreg, *condbsetreg, *cmpcondbclrreg): Likewise. (*condbclrreg): Likewise. * config/h8300/combiner.md: Turn existing patterns into define_insn_and_split style patterns where the splitter adds a clobber of the condition code register. Drop "cc" attribute. Add _clobber_flags patterns to match output of the splitters. Add appropriate CC register clobbers to existing splitters. (*addsi3_and_r_1): Disable for now. (*addsi3_and_not_r_1, bit-test branches): Likewise. * config/h8300/divmod.md: Turn existing patterns into define_insn_and_split style patterns where the splitter adds a clobber of the condition code register. Drop "cc" attribute. Add _clobber_flags patterns to match output of the splitters. * config/h8300/extensions.md: Turn existing patterns into define_insn_and_split style patterns where the splitter adds a clobber of the condition code register. Drop "cc" attribute. Add _clobber_flags patterns to match output of the splitters. * config/h8300/genmova.sh: Drop "cc" attribute from patterns. * config/h8300/mova.md: Drop "cc" attribute from patterns. * config/h8300/h8300-modes.def: Add CCZN and CCZNV modes. * config/h8300/h8300-protos.h (output_plussi): Update prototype. (compute_plussi_length): Likewise. (h8300_select_cc_mode): Add prototype. (compute_a_shift_cc): Remove prototype (cmpute_logical_op_cc): Likewise. * config/h8300/h8300.c (names_big): Add "cc" register. (names_extended, names_upper_extended): Likewise. (h8300_emit_stack_adjustment): Be more selective about setting RTX_FRAME_RELATED_P. (h8300_print_operand): Handle CCZN mode (h8300_select_cc_mode): New function. (notice_update_cc): if-0 out. Only kept for reference purposes. (h8300_expand_store): Likewise. (h8300_binary_length): Handle new insn forms. (output_plussi): Add argument for NEED_FLAGS and handle that case. (compute_plussi_length): Likewise. (compute_logical_op_cc): Return integer. (TARGET_FLAGS_REGNUM): Define. * config/h8300/h8300.h (FIRST_PSEUDO_REGISTER): Bump for cc register. (FIXED_REGISTERS, CALL_USED_REGISTERS): Handle cc register. (REG_ALLOC_ORDER, REGISTER_NAMES): Likewise. (SELECT_CC_MODE): Define. * config/h8300/h8300.md: Add CC_REG. Do not include peepholes.md for now. * config/h8300/jumpcall.md (cbranchqi4): Consolidate into cbranch<mode>4. (cbranchhi4, cbranchsi4): Likewise. (cbranch<mode>4): New expander. (branch): New define_insn_and_split for use before reload. (branch_1, branch_1_false): New patterns to match splitter output. Remove code to manage cc_status.flags. * config/h8300/logical.md: Turn existing patterns into define_insn_and_split style patterns where the splitter adds a clobber of the condition code register. Drop "cc" attribute. Add _clobber_flags patterns to match output of the splitters. Move various peepholes into this file. * config/h8300/movepush.md: Turn existing patterns into define_insn_and_split style patterns where the splitter adds a clobber of the condition code register. Drop "cc" attribute. Add _clobber_flags patterns to match output of the splitters. * config/h8300/multiply.md: Turn existing patterns into define_insn_and_split style patterns where the splitter adds a clobber of the condition code register. Drop "cc" attribute. Add _clobber_flags patterns to match output of the splitters. * config/h8300/other.md: Turn existing patterns into define_insn_and_split style patterns where the splitter adds a clobber of the condition code register. Drop "cc" attribute. Add _clobber_flags patterns to match output of the splitters. * config/h8300/peepholes.md: Remove peepholes that were moved elsewhere. * config/h8300/predicates.md (simple_memory_operand): New. * config/h8300/proepi.md: Drop "cc" attribute setting. * config/h8300/shiftrotate.md: Turn existing patterns into define_insn_and_split style patterns where the splitter adds a clobber of the condition code register. Drop "cc" attribute. Add _clobber_flags patterns to match output of the splitters. * config/h8300/testcompare.md: Turn existing patterns into define_insn_and_split style patterns where the splitter adds a clobber of the condition code register. Drop "cc" attribute. Add _clobber_flags patterns to match output of the splitters. Disable various patterns for now. Move some peepholes that were previously in peepholes.md here.
Showing
- gcc/config/h8300/addsub.md 105 additions, 47 deletionsgcc/config/h8300/addsub.md
- gcc/config/h8300/bitfield.md 333 additions, 229 deletionsgcc/config/h8300/bitfield.md
- gcc/config/h8300/combiner.md 691 additions, 186 deletionsgcc/config/h8300/combiner.md
- gcc/config/h8300/divmod.md 121 additions, 6 deletionsgcc/config/h8300/divmod.md
- gcc/config/h8300/extensions.md 96 additions, 40 deletionsgcc/config/h8300/extensions.md
- gcc/config/h8300/genmova.sh 6 additions, 12 deletionsgcc/config/h8300/genmova.sh
- gcc/config/h8300/h8300-modes.def 21 additions, 0 deletionsgcc/config/h8300/h8300-modes.def
- gcc/config/h8300/h8300-protos.h 6 additions, 4 deletionsgcc/config/h8300/h8300-protos.h
- gcc/config/h8300/h8300.c 108 additions, 26 deletionsgcc/config/h8300/h8300.c
- gcc/config/h8300/h8300.h 8 additions, 6 deletionsgcc/config/h8300/h8300.h
- gcc/config/h8300/h8300.md 3 additions, 2 deletionsgcc/config/h8300/h8300.md
- gcc/config/h8300/jumpcall.md 34 additions, 61 deletionsgcc/config/h8300/jumpcall.md
- gcc/config/h8300/logical.md 207 additions, 30 deletionsgcc/config/h8300/logical.md
- gcc/config/h8300/mova.md 83 additions, 166 deletionsgcc/config/h8300/mova.md
- gcc/config/h8300/movepush.md 143 additions, 37 deletionsgcc/config/h8300/movepush.md
- gcc/config/h8300/multiply.md 99 additions, 32 deletionsgcc/config/h8300/multiply.md
- gcc/config/h8300/other.md 12 additions, 3 deletionsgcc/config/h8300/other.md
- gcc/config/h8300/peepholes.md 0 additions, 104 deletionsgcc/config/h8300/peepholes.md
- gcc/config/h8300/predicates.md 9 additions, 0 deletionsgcc/config/h8300/predicates.md
- gcc/config/h8300/proepi.md 4 additions, 8 deletionsgcc/config/h8300/proepi.md
Loading
Please register or sign in to comment