Will be used to split a value into needed number of 32 bit words.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321>
parts.append('v[' + str(i) + ']')
return ', '.join(parts)
+
+ def split_bits(self, value):
+ ''' Split `value` into a list of 32-bit integers '''
+ mask, parts = (1 << 32) - 1, []
+ words = self.bitsize / 32
+
+ while value:
+ parts.append(hex(value & mask))
+ value >>= 32
+
+ # Add 'missing' words
+ while len(parts) < words:
+ parts.append('0x0')
+
+ return parts