projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e2f114b
)
broadcom/xml: Throw an #error in XML-based codegen for a >1bit bool
author
Eric Anholt
<eric@anholt.net>
Mon, 23 Oct 2017 19:47:28 +0000
(12:47 -0700)
committer
Eric Anholt
<eric@anholt.net>
Mon, 30 Oct 2017 20:31:12 +0000
(13:31 -0700)
I've debugged two nasty errors now due to copy-and-pasting a bool type
when writing a uint field. Make sure I don't do that again.
src/broadcom/cle/gen_pack_header.py
patch
|
blob
|
history
diff --git
a/src/broadcom/cle/gen_pack_header.py
b/src/broadcom/cle/gen_pack_header.py
index badcc2c587c078ad39f871dc1ecc16e5e8c41d06..d458c2b1c40e3e4e4a284f342f6c2be91118d6a3 100644
(file)
--- a/
src/broadcom/cle/gen_pack_header.py
+++ b/
src/broadcom/cle/gen_pack_header.py
@@
-111,6
+111,9
@@
class Field(object):
self.end = self.start + int(attrs["size"]) - 1
self.type = attrs["type"]
+ if self.type == 'bool' and self.start != self.end:
+ print("#error Field {} has bool type but more than one bit of size".format(self.name));
+
if "prefix" in attrs:
self.prefix = safe_name(attrs["prefix"]).upper()
else: