qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/4] target/i386: Translate feature_word_info to xml


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 2/4] target/i386: Translate feature_word_info to xml
Date: Wed, 6 Sep 2023 16:33:29 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.0

On 21/8/23 11:54, Tim Wiederhake wrote:
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 <twiederh@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.

Would YAML work?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]