Lines Matching refs:mod
50 def map_modifier(body, prefix, mod, domain, target):
63 return mod
71 body.append("assert({} < {});".format(mod, len(domain)))
73 return "{}_table[{}]".format(prefix, mod)
80 def pack_modifier(mod, width, default, opts, body, pack_exprs):
82 (raw, arg) = (mod[0:-1], mod[-1]) if mod[-1] in "0123" else (mod, 0)
86 ir_value = "bytes2" if mod == "bytes2" else "{}[{}]".format(raw, arg) if mod[-1] in "0123" else mod
121 mapped = map_modifier(body, mod, ir_value, lists, opts)
122 body.append('unsigned {} = {};'.format(mod, mapped))
123 body.append('assert({} < {});'.format(mod, 1 << width))
231 for ((mod, _, width), default, opts) in st[1].get("modifiers", []):
232 if mod in modifiers_handled:
235 modifiers_handled.append(mod)
236 pack_modifier(mod, width, default, opts, common_body, pack_exprs)
238 imm_map[mod] = { x: y for y, x in enumerate(opts) }
241 for ((mod, pos, width), default, opts) in st[1].get("modifiers", []):
243 pack_exprs[i].append('({} << {})'.format(mod, pos))
253 for ((mod, _, width), default, opts) in st[1].get("modifiers", []):
254 if mod[-1] in str(src_a):
255 vars_to_swap.append(mod[0:-1])