def get_disp_nt_seq(ptrn_wrds, disp_nts): """ @param ptrn_wrds: list of tokens in instructions pattern @type ptrn_wrds: [string] @param disp_nts: list of names of [BR]?DISP_WIDTH-binding NTs @type disp_nts: [string] @return nt_names: list of names of [BR]?DISP_WIDTH binding NTs @type nt_names: [string] Returns a list of names of [BR]?DISP_WIDTH NTs in the pattern. """ return ild_nt.get_nt_seq(ptrn_wrds, list(disp_nts))
def get_imm_nt_seq(ptrn_wrds, imm_nts): """ @param ptrn_wrds: list of tokens in instructions pattern @type ptrn_wrds: [string] @param imm_nts: list of names of IMM_WIDTH-binding NTs @type imm_nts: [string] @return nt_names: list of names of IMM_WIDTH binding NTs @type nt_names: [string] Returns a list of names of IMM-binding NTs in the pattern. generally there is only one NT for IMM_WIDTH. But ENTER, EXTRQ and INSERTQ instructions have two immediate NTs in pattern. This strange NT UIMM8_1 doesn't bind IMM_WIDTH. We should take special care of it. It is also possible to track captured operands and to check if UIMM1 is among them, that would be a more generic way, but more complicated and it seems a waste to implement it for just one rare UIMM_1 NT. """ return ild_nt.get_nt_seq(ptrn_wrds, list(imm_nts) + [_uimm1_nt])
def get_eosz_nt_seq(ptrn_wrds, eosz_nts): return ild_nt.get_nt_seq(ptrn_wrds, eosz_nts, implied_nt=_eosz_default_nt)