Lines Matching refs:tag

78 def is_cond_jump(tag):  argument
79 if tag == "J2_rte":
81 if "A_HWLOOP0_END" in attribdict[tag] or "A_HWLOOP1_END" in attribdict[tag]:
83 return re.compile(r"(if.*fBRANCH)|(if.*fJUMPR)").search(semdict[tag]) != None
86 def is_cond_call(tag): argument
87 return re.compile(r"(if.*fCALL)").search(semdict[tag]) != None
112 for tag in tags:
113 for macname in allmacros_re.findall(semdict[tag]):
117 attribdict[tag] |= set(macro.attribs)
120 for tag in tags:
121 if is_cond_jump(tag) or is_cond_call(tag):
122 attribdict[tag].add("A_CONDEXEC")
125 def SEMANTICS(tag, beh, sem): argument
127 behdict[tag] = beh
128 semdict[tag] = sem
129 attribdict[tag] = set()
130 tags.append(tag) # dicts have no order, this is for order
133 def ATTRIBUTES(tag, attribstring): argument
139 attribdict[tag].add(attrib.strip())
161 def compute_tag_regs(tag, full): argument
162 tagregs = regre.findall(behdict[tag])
167 def compute_tag_immediates(tag): argument
168 return uniquify(immre.findall(behdict[tag]))
193 compute_func = lambda tag: compute_tag_regs(tag, full) argument
200 def need_p0(tag): argument
201 return "A_IMPLICIT_READS_P0" in attribdict[tag]
204 def need_sp(tag): argument
205 return "A_IMPLICIT_READS_SP" in attribdict[tag]
208 def is_hvx_insn(tag): argument
209 return "A_CVI" in attribdict[tag]
212 def need_env(tag): argument
213 return ("A_STORE" in attribdict[tag] or
214 "A_LOAD" in attribdict[tag] or
215 "A_CVI_GATHER" in attribdict[tag] or
216 "A_CVI_SCATTER" in attribdict[tag] or
217 "A_IMPLICIT_WRITES_USR" in attribdict[tag])
220 def need_slot(tag): argument
222 "A_CVI_SCATTER" not in attribdict[tag]
223 and "A_CVI_GATHER" not in attribdict[tag]
224 and ("A_STORE" in attribdict[tag]
225 or "A_LOAD" in attribdict[tag])
232 def need_part1(tag): argument
233 return re.compile(r"fPART1").search(semdict[tag])
236 def need_ea(tag): argument
237 return re.compile(r"\bEA\b").search(semdict[tag])
240 def need_PC(tag): argument
241 return "A_IMPLICIT_READS_PC" in attribdict[tag]
244 def need_next_PC(tag): argument
245 return "A_CALL" in attribdict[tag]
248 def need_pkt_has_multi_cof(tag): argument
249 return "A_COF" in attribdict[tag]
252 def need_pkt_need_commit(tag): argument
253 return 'A_IMPLICIT_WRITES_USR' in attribdict[tag]
256 def skip_qemu_helper(tag): argument
257 return tag in overrides.keys()
260 def is_idef_parser_enabled(tag): argument
261 return tag in idef_parser_enabled
264 def is_hvx_insn(tag): argument
265 return "A_CVI" in attribdict[tag]
268 def has_hvx_helper(tag): argument
269 return (is_hvx_insn(tag) and
270 not skip_qemu_helper(tag) and
271 not is_idef_parser_enabled(tag))
295 tag = overridere.findall(line)[0]
296 overrides[tag] = True
306 def is_predicated(tag): argument
307 return "A_CONDEXEC" in attribdict[tag]
314 def hvx_newv(tag): argument
315 if "A_CVI_NEW" in attribdict[tag]:
317 elif "A_CVI_TMP" in attribdict[tag] or "A_CVI_TMP_DST" in attribdict[tag]:
322 def vreg_offset_func(tag): argument
323 if "A_CVI_TMP" in attribdict[tag] or "A_CVI_TMP_DST" in attribdict[tag]:
447 def decl_tcg(self, f, tag, regno): argument
452 def log_write(self, f, tag): argument
456 def analyze_write(self, f, tag, regno): argument
457 predicated = "true" if is_predicated(tag) else "false"
463 def decl_tcg(self, f, tag, regno): argument
474 def decl_tcg(self, f, tag, regno): argument
484 def decl_tcg(self, f, tag, regno): argument
492 if not is_predicated(tag):
496 def log_write(self, f, tag): argument
504 def analyze_write(self, f, tag, regno): argument
505 predicated = "true" if is_predicated(tag) else "false"
515 def decl_tcg(self, f, tag, regno): argument
520 def log_write(self, f, tag): argument
524 def analyze_write(self, f, tag, regno): argument
525 predicated = "true" if is_predicated(tag) else "false"
535 def decl_tcg(self, f, tag, regno): argument
551 def decl_tcg(self, f, tag, regno): argument
567 def decl_tcg(self, f, tag, regno): argument
572 def log_write(self, f, tag): argument
576 def analyze_write(self, f, tag, regno): argument
582 def decl_tcg(self, f, tag, regno): argument
593 def decl_tcg(self, f, tag, regno): argument
603 def decl_tcg(self, f, tag, regno): argument
609 def log_write(self, f, tag): argument
617 def analyze_write(self, f, tag, regno): argument
623 def decl_tcg(self, f, tag, regno): argument
629 def log_write(self, f, tag): argument
633 def analyze_write(self, f, tag, regno): argument
634 predicated = "true" if is_predicated(tag) else "false"
640 def decl_tcg(self, f, tag, regno): argument
654 def decl_tcg(self, f, tag, regno): argument
663 def log_write(self, f, tag): argument
671 def analyze_write(self, f, tag, regno): argument
672 predicated = "true" if is_predicated(tag) else "false"
682 def decl_tcg(self, f, tag, regno): argument
688 def log_write(self, f, tag): argument
692 def analyze_write(self, f, tag, regno): argument
693 predicated = "true" if is_predicated(tag) else "false"
703 def decl_tcg(self, f, tag, regno): argument
715 def decl_tcg(self, f, tag, regno): argument
721 if not skip_qemu_helper(tag):
726 def log_write(self, f, tag): argument
732 def analyze_write(self, f, tag, regno): argument
733 newv = hvx_newv(tag)
734 predicated = "true" if is_predicated(tag) else "false"
741 def decl_tcg(self, f, tag, regno): argument
746 if not skip_qemu_helper(tag):
761 def decl_tcg(self, f, tag, regno): argument
763 if skip_qemu_helper(tag):
778 def decl_tcg(self, f, tag, regno): argument
787 if not skip_qemu_helper(tag):
792 def log_write(self, f, tag): argument
802 def analyze_write(self, f, tag, regno): argument
803 newv = hvx_newv(tag)
804 predicated = "true" if is_predicated(tag) else "false"
811 def decl_tcg(self, f, tag, regno): argument
816 if not skip_qemu_helper(tag):
824 def log_write(self, f, tag): argument
837 def analyze_write(self, f, tag, regno): argument
838 newv = hvx_newv(tag)
839 predicated = "true" if is_predicated(tag) else "false"
846 def decl_tcg(self, f, tag, regno): argument
852 if not skip_qemu_helper(tag):
857 def log_write(self, f, tag): argument
863 def analyze_write(self, f, tag, regno): argument
864 newv = hvx_newv(tag)
865 predicated = "true" if is_predicated(tag) else "false"
872 def decl_tcg(self, f, tag, regno): argument
884 if not skip_qemu_helper(tag):
899 def decl_tcg(self, f, tag, regno): argument
911 if not skip_qemu_helper(tag):
916 def log_write(self, f, tag): argument
929 def analyze_write(self, f, tag, regno): argument
930 newv = hvx_newv(tag)
931 predicated = "true" if is_predicated(tag) else "false"
938 def decl_tcg(self, f, tag, regno): argument
944 if not skip_qemu_helper(tag):
949 def log_write(self, f, tag): argument
955 def analyze_write(self, f, tag, regno): argument
961 def decl_tcg(self, f, tag, regno): argument
967 if not skip_qemu_helper(tag):
982 def decl_tcg(self, f, tag, regno): argument
991 if not skip_qemu_helper(tag):
996 def log_write(self, f, tag): argument
1006 def analyze_write(self, f, tag, regno): argument
1072 def get_register(tag, regtype, regid): argument
1073 if f"{regtype}{regid}V" in semdict[tag]:
1078 def helper_ret_type(tag, regs): argument
1083 reg = get_register(tag, regtype, regid)
1094 def helper_args(tag, regs, imms): argument
1098 if need_env(tag):
1106 if is_predicated(tag):
1108 reg = get_register(tag, regtype, regid)
1114 reg = get_register(tag, regtype, regid)
1120 reg = get_register(tag, regtype, regid)
1133 if need_pkt_has_multi_cof(tag):
1139 if need_pkt_need_commit(tag):
1145 if need_PC(tag):
1151 if need_next_PC(tag):
1157 if need_p0(tag):
1163 if need_sp(tag):
1169 if need_slot(tag):
1175 if need_part1(tag):