aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/h8300/combiner.md
AgeCommit message (Collapse)AuthorFilesLines
2021-06-05Fix split conditions in H8/300 portJeff Law1-34/+34
gcc/ * config/h8300/addsub.md: Fix split condition in define_insn_and_split patterns. * config/h8300/bitfield.md: Likewise. * config/h8300/combiner.md: Likewise. * config/h8300/divmod.md: Likewise. * config/h8300/extensions.md: Likewise. * config/h8300/jumpcall.md: Likewise. * config/h8300/movepush.md: Likewise. * config/h8300/multiply.md: Likewise. * config/h8300/other.md: Likewise. * config/h8300/shiftrotate.md: Likewise. * config/h8300/logical.md: Likewise. Fix split pattern to use code iterator that somehow slipped through.
2020-11-30Remove dead cc0 code from H8 portJeff Law1-16/+8
gcc/ * config/h8300/bitfield.md: Remove "cc" attribute on any insns where it remained. * config/h8300/combiner.md: Likewise. * config/h8300/jumpcall.md: Likewise. * config/h8300/logical.md: Likewise. * config/h8300/testcompare.md: Likewise. * config/h8300/h8300.md (old_cc attr): Renamed from cc attr. * config/h8300/h8300.c (notice_update_cc): Remove. (compute_plussi_cc): Change references to CC_* to OLD_CC_. (compute_logical_op_cc): Likewise. (shift_one, shift_two): Likewise. (compute_a_shift_cc): Likewise. (get_shift_alg): Likewise. (struct shift_insn): Change type of cc_valid field. (struct shift_info): Likewise. * config/h8300/save.md: Remove accidentially created file.
2020-11-22H8 cc0 conversionAustin Law1-186/+691
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.
2020-05-17Use pc_or_label_operand to collapse a couple more patterns in preparation ↵Jeff Law1-12/+10
for the cc0->CC_REG transition. * config/h8300/predicates.md (pc_or_label_operand): New predicate. * config/h8300/jumpcall.md (branch_true, branch_false): Consolidate into a single pattern using pc_or_label_operand. * config/h8300/combiner.md (bit branch patterns): Likewise. * config/h8300/peepholes.md (HImode and SImode branches): Likewise.
2020-05-07Move all patterns and expanders out of h8300.md and into other files that ↵Jeff Law1-0/+775
are included into h8300.md * config/h8300/h8300.md: Move expanders and patterns into files based on functionality. * config/h8300/addsub.md: New file. * config/h8300/bitfield.md: New file * config/h8300/combiner.md: New file * config/h8300/divmod.md: New file * config/h8300/extensions.md: New file * config/h8300/jumpcall.md: New file * config/h8300/logical.md: New file * config/h8300/movepush.md: New file * config/h8300/multiply.md: New file * config/h8300/other.md: New file * config/h8300/proepi.md: New file * config/h8300/shiftrotate.md: New file * config/h8300/testcompare.md: New file commit da1de1d91088ac506c1bed0fba9b0f04c5b8c876