mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 21:50:12 +01:00
isaspec: fix gen_max to be 2^32-1
The minus sign has higher preference than shift: >>> 1 << 32 - 1 2147483648 >>> (1 << 32) - 1 4294967295 Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14789>
This commit is contained in:
parent
9dc30f99ae
commit
40468430a4
1 changed files with 2 additions and 2 deletions
|
|
@ -265,7 +265,7 @@ class BitSet(object):
|
|||
self.encode = BitSetEncode(xml.find('encode'))
|
||||
|
||||
self.gen_min = 0
|
||||
self.gen_max = 1 << 32 - 1
|
||||
self.gen_max = (1 << 32) - 1
|
||||
|
||||
for gen in xml.findall('gen'):
|
||||
if 'min' in gen.attrib:
|
||||
|
|
@ -351,7 +351,7 @@ class BitSet(object):
|
|||
if self.extends is not None:
|
||||
parent = self.isa.bitsets[self.extends]
|
||||
|
||||
assert (self.gen_max == (1 << 32 - 1)) or (self.gen_max <= parent.get_gen_max()), "bitset {} should not have max gen higher than the parent's one".format(self.name)
|
||||
assert (self.gen_max == (1 << 32) - 1) or (self.gen_max <= parent.get_gen_max()), "bitset {} should not have max gen higher than the parent's one".format(self.name)
|
||||
|
||||
return min(self.gen_max, parent.get_gen_max())
|
||||
return self.gen_max
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue