Lines Matching refs:low
35 def __init__(self, name, low, high, shr, type, parser):
37 self.low = low
44 if low < 0 or low > 31:
45 raise parser.error("low attribute out of range: %d" % low)
48 if high < low:
49 raise parser.error("low is greater than high: low=%d, high=%d" % (low, high))
50 if self.type == "boolean" and not low == high:
52 elif self.type == "float" and not (high - low == 31 or high - low == 15):
76 elif self.type == "float" and self.high - self.low == 31:
79 elif self.type == "float" and self.high - self.low == 15:
100 def mask(low, high):
101 return ((0xffffffff >> (32 - (high + 1 - low))) << low)
165 known_mask |= mask(f.low, f.high)
169 print(" assert((%-40s & 0x%08x) == 0);" % (val, 0xffffffff ^ mask(0 , f.high - f.low)))
185 print(" (%-40s << %2d) |" % (val, f.low))
220 if not f.name and f.low == 0 and f.shr == 0 and not f.type in ["float", "fixed", "ufixed"]:
222 elif f.type == "boolean" or (f.type == None and f.low == f.high):
223 tab_to("#define %s" % name, "0x%08x" % (1 << f.low))
225 tab_to("#define %s__MASK" % name, "0x%08x" % mask(f.low, f.high))
226 tab_to("#define %s__SHIFT" % name, "%d" % f.low)
317 high = low = int(attrs["pos"], 0)
318 elif "high" in attrs and "low" in attrs:
320 low = int(attrs["low"], 0)
322 low = 0
335 b = Field(name, low, high, shr, type, self)