From 1ed760cc7809c1610e943c6218cee9f296ad0e6d Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 2 Oct 2013 07:17:07 -0400 Subject: Driver code generation for boolean fields. --- devtools/tablegen.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'devtools') diff --git a/devtools/tablegen.py b/devtools/tablegen.py index cdad2633..779f6ed7 100755 --- a/devtools/tablegen.py +++ b/devtools/tablegen.py @@ -113,6 +113,8 @@ def make_driver_code(wfp): (target, {'u':'U', 'e':'U', 'i':'S'}[ftype[0].lower()], offset, width) elif ftype == 't': print >>wfp, indent + "UCHARS(%s, %s);" % (offset, target) + elif ftype == 'b': + print >>wfp, indent + "%s\t= (bool)UBITS(%s, 1);" % (target, offset) else: print >>wfp, indent + "/* %s bits of type %s */" % (width,ftype) last = name -- cgit v1.2.1