Lines Matching refs:vliw
363 frv_vliw_reset (FRV_VLIW *vliw, unsigned long mach, unsigned long elf_flags) in frv_vliw_reset() argument
365 vliw->next_slot = 0; in frv_vliw_reset()
366 vliw->constraint_violation = 0; in frv_vliw_reset()
367 vliw->mach = mach; in frv_vliw_reset()
368 vliw->elf_flags = elf_flags; in frv_vliw_reset()
373 vliw->current_vliw = fr400_allowed_vliw; in frv_vliw_reset()
374 vliw->unit_mapping = fr400_unit_mapping; in frv_vliw_reset()
377 vliw->current_vliw = fr400_allowed_vliw; in frv_vliw_reset()
378 vliw->unit_mapping = fr450_unit_mapping; in frv_vliw_reset()
381 vliw->current_vliw = fr550_allowed_vliw; in frv_vliw_reset()
382 vliw->unit_mapping = fr550_unit_mapping; in frv_vliw_reset()
385 vliw->current_vliw = fr500_allowed_vliw; in frv_vliw_reset()
386 vliw->unit_mapping = fr500_unit_mapping; in frv_vliw_reset()
395 match_unit (FRV_VLIW *vliw, in match_unit() argument
399 unit1 = vliw->unit_mapping[unit1]; in match_unit()
448 add_next_to_vliw (FRV_VLIW *vliw, CGEN_ATTR_VALUE_ENUM_TYPE unit) in add_next_to_vliw() argument
450 int next = vliw->next_slot; in add_next_to_vliw()
451 VLIW_COMBO *current = vliw->current_vliw; in add_next_to_vliw()
466 if (match_unit (vliw, unit, (*potential)[next])) in add_next_to_vliw()
479 find_major_in_vliw (FRV_VLIW *vliw, CGEN_ATTR_VALUE_ENUM_TYPE major) in find_major_in_vliw() argument
483 for (i = 0; i < vliw->next_slot; ++i) in find_major_in_vliw()
484 if (vliw->major[i] == major) in find_major_in_vliw()
494 fr400_check_insn_major_constraints (FRV_VLIW *vliw, CGEN_ATTR_VALUE_ENUM_TYPE major) in fr400_check_insn_major_constraints() argument
503 return ! find_major_in_vliw (vliw, FR400_MAJOR_M_1) in fr400_check_insn_major_constraints()
504 && ! find_major_in_vliw (vliw, FR400_MAJOR_M_2); in fr400_check_insn_major_constraints()
506 return ! find_major_in_vliw (vliw, FR400_MAJOR_M_2); in fr400_check_insn_major_constraints()
514 fr450_check_insn_major_constraints (FRV_VLIW *vliw, CGEN_ATTR_VALUE_ENUM_TYPE major) in fr450_check_insn_major_constraints() argument
519 other_major = CGEN_INSN_ATTR_VALUE (vliw->insn[0], CGEN_INSN_FR450_MAJOR); in fr450_check_insn_major_constraints()
549 find_unit_in_vliw (FRV_VLIW *vliw, CGEN_ATTR_VALUE_ENUM_TYPE unit) in find_unit_in_vliw() argument
553 for (i = 0; i < vliw->next_slot; ++i) in find_unit_in_vliw()
554 if (CGEN_INSN_ATTR_VALUE (vliw->insn[i], CGEN_INSN_UNIT) == unit) in find_unit_in_vliw()
561 find_major_in_slot (FRV_VLIW *vliw, in find_major_in_slot() argument
567 for (i = 0; i < vliw->next_slot; ++i) in find_major_in_slot()
568 if (vliw->major[i] == major && (*vliw->current_vliw)[i] == slot) in find_major_in_slot()
575 fr550_find_media_in_vliw (FRV_VLIW *vliw) in fr550_find_media_in_vliw() argument
579 for (i = 0; i < vliw->next_slot; ++i) in fr550_find_media_in_vliw()
581 if (vliw->major[i] < FR550_MAJOR_M_1 || vliw->major[i] > FR550_MAJOR_M_5) in fr550_find_media_in_vliw()
585 if (CGEN_INSN_NUM (vliw->insn[i]) == FRV_INSN_MNOP in fr550_find_media_in_vliw()
586 || CGEN_INSN_NUM (vliw->insn[i]) == FRV_INSN_MCLRACC_0 in fr550_find_media_in_vliw()
587 || CGEN_INSN_NUM (vliw->insn[i]) == FRV_INSN_MCLRACC_1) in fr550_find_media_in_vliw()
597 fr550_find_float_in_vliw (FRV_VLIW *vliw) in fr550_find_float_in_vliw() argument
601 for (i = 0; i < vliw->next_slot; ++i) in fr550_find_float_in_vliw()
603 if (vliw->major[i] < FR550_MAJOR_F_1 || vliw->major[i] > FR550_MAJOR_F_4) in fr550_find_float_in_vliw()
607 if (CGEN_INSN_NUM (vliw->insn[i]) == FRV_INSN_FNOP) in fr550_find_float_in_vliw()
617 fr550_check_insn_major_constraints (FRV_VLIW *vliw, in fr550_check_insn_major_constraints() argument
622 CGEN_ATTR_VALUE_ENUM_TYPE slot = (*vliw->current_vliw)[vliw->next_slot]; in fr550_check_insn_major_constraints()
629 return find_unit_in_vliw (vliw, UNIT_STORE); in fr550_check_insn_major_constraints()
637 return ! fr550_find_media_in_vliw (vliw); in fr550_check_insn_major_constraints()
642 return ! fr550_find_float_in_vliw (vliw); in fr550_check_insn_major_constraints()
646 return ! find_major_in_slot (vliw, FR550_MAJOR_F_2, in fr550_check_insn_major_constraints()
648 && ! find_major_in_slot (vliw, FR550_MAJOR_F_4, in fr550_check_insn_major_constraints()
653 return ! find_major_in_slot (vliw, FR550_MAJOR_M_2, in fr550_check_insn_major_constraints()
658 return ! find_major_in_slot (vliw, FR550_MAJOR_M_4, in fr550_check_insn_major_constraints()
668 fr500_check_insn_major_constraints (FRV_VLIW *vliw, CGEN_ATTR_VALUE_ENUM_TYPE major) in fr500_check_insn_major_constraints() argument
690 return ! find_major_in_vliw (vliw, FR500_MAJOR_I_3); in fr500_check_insn_major_constraints()
693 return ! find_major_in_vliw (vliw, FR500_MAJOR_I_2); in fr500_check_insn_major_constraints()
697 return ! find_major_in_vliw (vliw, FR500_MAJOR_F_5) in fr500_check_insn_major_constraints()
698 && ! find_major_in_vliw (vliw, FR500_MAJOR_F_6) in fr500_check_insn_major_constraints()
699 && ! find_major_in_vliw (vliw, FR500_MAJOR_M_7); in fr500_check_insn_major_constraints()
702 return ! find_major_in_vliw (vliw, FR500_MAJOR_F_7) in fr500_check_insn_major_constraints()
703 && ! find_major_in_vliw (vliw, FR500_MAJOR_M_7); in fr500_check_insn_major_constraints()
706 return ! find_major_in_vliw (vliw, FR500_MAJOR_F_1) in fr500_check_insn_major_constraints()
707 && ! find_major_in_vliw (vliw, FR500_MAJOR_F_2) in fr500_check_insn_major_constraints()
708 && ! find_major_in_vliw (vliw, FR500_MAJOR_F_6) in fr500_check_insn_major_constraints()
709 && ! find_major_in_vliw (vliw, FR500_MAJOR_F_7) in fr500_check_insn_major_constraints()
710 && ! find_major_in_vliw (vliw, FR500_MAJOR_M_7); in fr500_check_insn_major_constraints()
713 return ! find_major_in_vliw (vliw, FR500_MAJOR_F_1) in fr500_check_insn_major_constraints()
714 && ! find_major_in_vliw (vliw, FR500_MAJOR_F_2) in fr500_check_insn_major_constraints()
715 && ! find_major_in_vliw (vliw, FR500_MAJOR_F_5) in fr500_check_insn_major_constraints()
716 && ! find_major_in_vliw (vliw, FR500_MAJOR_F_6) in fr500_check_insn_major_constraints()
717 && ! find_major_in_vliw (vliw, FR500_MAJOR_M_7); in fr500_check_insn_major_constraints()
720 return ! find_major_in_vliw (vliw, FR500_MAJOR_F_3) in fr500_check_insn_major_constraints()
721 && ! find_major_in_vliw (vliw, FR500_MAJOR_F_5) in fr500_check_insn_major_constraints()
722 && ! find_major_in_vliw (vliw, FR500_MAJOR_F_7) in fr500_check_insn_major_constraints()
723 && ! find_major_in_vliw (vliw, FR500_MAJOR_M_7); in fr500_check_insn_major_constraints()
726 return ! find_major_in_vliw (vliw, FR500_MAJOR_M_7); in fr500_check_insn_major_constraints()
730 return ! find_major_in_vliw (vliw, FR500_MAJOR_M_5) in fr500_check_insn_major_constraints()
731 && ! find_major_in_vliw (vliw, FR500_MAJOR_M_6) in fr500_check_insn_major_constraints()
732 && ! find_major_in_vliw (vliw, FR500_MAJOR_M_7); in fr500_check_insn_major_constraints()
735 return ! find_major_in_vliw (vliw, FR500_MAJOR_M_6); in fr500_check_insn_major_constraints()
738 return ! find_major_in_vliw (vliw, FR500_MAJOR_M_2) in fr500_check_insn_major_constraints()
739 && ! find_major_in_vliw (vliw, FR500_MAJOR_M_3) in fr500_check_insn_major_constraints()
740 && ! find_major_in_vliw (vliw, FR500_MAJOR_M_5) in fr500_check_insn_major_constraints()
741 && ! find_major_in_vliw (vliw, FR500_MAJOR_M_6) in fr500_check_insn_major_constraints()
742 && ! find_major_in_vliw (vliw, FR500_MAJOR_M_7); in fr500_check_insn_major_constraints()
745 return ! find_major_in_vliw (vliw, FR500_MAJOR_M_2) in fr500_check_insn_major_constraints()
746 && ! find_major_in_vliw (vliw, FR500_MAJOR_M_3) in fr500_check_insn_major_constraints()
747 && ! find_major_in_vliw (vliw, FR500_MAJOR_M_4) in fr500_check_insn_major_constraints()
748 && ! find_major_in_vliw (vliw, FR500_MAJOR_M_5) in fr500_check_insn_major_constraints()
749 && ! find_major_in_vliw (vliw, FR500_MAJOR_M_6) in fr500_check_insn_major_constraints()
750 && ! find_major_in_vliw (vliw, FR500_MAJOR_M_7); in fr500_check_insn_major_constraints()
753 return ! find_major_in_vliw (vliw, FR500_MAJOR_M_1) in fr500_check_insn_major_constraints()
754 && ! find_major_in_vliw (vliw, FR500_MAJOR_M_2) in fr500_check_insn_major_constraints()
755 && ! find_major_in_vliw (vliw, FR500_MAJOR_M_3) in fr500_check_insn_major_constraints()
756 && ! find_major_in_vliw (vliw, FR500_MAJOR_M_5) in fr500_check_insn_major_constraints()
757 && ! find_major_in_vliw (vliw, FR500_MAJOR_M_6) in fr500_check_insn_major_constraints()
758 && ! find_major_in_vliw (vliw, FR500_MAJOR_M_7) in fr500_check_insn_major_constraints()
759 && ! find_major_in_vliw (vliw, FR500_MAJOR_F_1) in fr500_check_insn_major_constraints()
760 && ! find_major_in_vliw (vliw, FR500_MAJOR_F_2) in fr500_check_insn_major_constraints()
761 && ! find_major_in_vliw (vliw, FR500_MAJOR_F_3) in fr500_check_insn_major_constraints()
762 && ! find_major_in_vliw (vliw, FR500_MAJOR_F_5) in fr500_check_insn_major_constraints()
763 && ! find_major_in_vliw (vliw, FR500_MAJOR_F_6) in fr500_check_insn_major_constraints()
764 && ! find_major_in_vliw (vliw, FR500_MAJOR_F_7); in fr500_check_insn_major_constraints()
775 check_insn_major_constraints (FRV_VLIW *vliw, in check_insn_major_constraints() argument
779 switch (vliw->mach) in check_insn_major_constraints()
782 return fr400_check_insn_major_constraints (vliw, major); in check_insn_major_constraints()
785 return fr450_check_insn_major_constraints (vliw, major); in check_insn_major_constraints()
788 return fr550_check_insn_major_constraints (vliw, major, insn); in check_insn_major_constraints()
791 return fr500_check_insn_major_constraints (vliw, major); in check_insn_major_constraints()
799 frv_vliw_add_insn (FRV_VLIW *vliw, const CGEN_INSN *insn) in frv_vliw_add_insn() argument
806 if (vliw->constraint_violation || CGEN_INSN_INVALID_P (insn)) in frv_vliw_add_insn()
809 slot_index = vliw->next_slot; in frv_vliw_add_insn()
821 switch (vliw->mach) in frv_vliw_add_insn()
840 while (! match_unit (vliw, unit, (*vliw->current_vliw)[0])) in frv_vliw_add_insn()
841 ++vliw->current_vliw; in frv_vliw_add_insn()
842 vliw->major[0] = major; in frv_vliw_add_insn()
843 vliw->insn[0] = insn; in frv_vliw_add_insn()
844 vliw->next_slot = 1; in frv_vliw_add_insn()
851 if (! (vliw->elf_flags & EF_FRV_NOPACK)) in frv_vliw_add_insn()
853 new_vliw = add_next_to_vliw (vliw, unit); in frv_vliw_add_insn()
854 if (new_vliw && check_insn_major_constraints (vliw, major, insn)) in frv_vliw_add_insn()
856 vliw->current_vliw = new_vliw; in frv_vliw_add_insn()
857 vliw->major[slot_index] = major; in frv_vliw_add_insn()
858 vliw->insn[slot_index] = insn; in frv_vliw_add_insn()
859 vliw->next_slot++; in frv_vliw_add_insn()
866 if (vliw->mach == bfd_mach_frv) in frv_vliw_add_insn()
870 vliw->constraint_violation = 1; in frv_vliw_add_insn()