x86/gen-cpuid: Rework internal logic to ease future changes
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 25 Feb 2020 12:59:35 +0000 (12:59 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 27 Feb 2020 18:54:58 +0000 (18:54 +0000)
commitdca31274846c8e7bb9814a9a643509780bdc021e
tree4468955d480393035f4ad676aad7ea3f0b11c41a
parent90f5b8819c2f73ec1b7fa293e7fb2a4dd256d838
x86/gen-cpuid: Rework internal logic to ease future changes

Better split the logic between parse/calculate/write.  Collect the feature
comment by their comment character(s), and perform the accumulation operations
in crunch_numbers().

Avoid rendering the featuresets to C uint32_t's in crunch_numbers(), and
instead do this in write_results().  Update format_uint32s() to call
featureset_to_uint32s() internally.

No functional change - the generated cpuid-autogen.h is identical.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/tools/gen-cpuid.py