On Thu, 2023-08-17 at 12:07 +0100, Daniel P. Berrangé wrote:
> On Fri, Aug 11, 2023 at 03:50:09PM +0200, Tim Wiederhake wrote:
> > This is the data file that will be used to generate the C code.
> > All information, including the comments, is preserved.
> > 
> > Signed-off-by: Tim Wiederhake <twied...@redhat.com>
> > ---
> >  target/i386/feature_word_info.xml | 1607
> > +++++++++++++++++++++++++++++
> >  1 file changed, 1607 insertions(+)
> >  create mode 100644 target/i386/feature_word_info.xml
> > 
> > diff --git a/target/i386/feature_word_info.xml
> > b/target/i386/feature_word_info.xml
> > new file mode 100644
> > index 0000000000..ff741b9f5a
> > --- /dev/null
> > +++ b/target/i386/feature_word_info.xml
> > @@ -0,0 +1,1607 @@
> > +<feature_words>
> 
> I think adding data formats based on XML is pretty undesirable
> for QEMU. AFAIK, the only place we've used XML is where we
> needed to have interoperability with an external tool.
> 
> Can we not just do this using JSON instead, which would avoid
> the need to write python parsing code as we can directly load
> it into a python object.
> 
> With regards,
> Daniel

I thought of json as well, but that has some drawbacks over xml here:

Integer values, e.g. "eax=0x80000008", would need to be stored in
either decimal form or as a string. Both solutions are not desirable in
my opinion.

Additionally, preserving the comments is not as straight forward.
Comments in json are a non-standard extension and not understood by all
parsers, e.g. python's json module. This would require some regex-
preprocessing that comes with its own problems.

Regards,
Tim


Reply via email to