qemu-devel
[Top][All Lists]
Advanced

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

Re: [RFC PATCH 24/66] Hexagon generator phase 2 - op_attribs_generated.h


From: Philippe Mathieu-Daudé
Subject: Re: [RFC PATCH 24/66] Hexagon generator phase 2 - op_attribs_generated.h
Date: Tue, 11 Feb 2020 09:01:48 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

On 2/11/20 1:40 AM, Taylor Simpson wrote:
Lists all the attributes associated with each instruction

Signed-off-by: Taylor Simpson <address@hidden>
---
  target/hexagon/do_qemu.py | 13 +++++++++++++
  1 file changed, 13 insertions(+)

diff --git a/target/hexagon/do_qemu.py b/target/hexagon/do_qemu.py
index 5439964..f297931 100755
--- a/target/hexagon/do_qemu.py
+++ b/target/hexagon/do_qemu.py
@@ -797,3 +797,16 @@ realf.write(f.getvalue())
  realf.close()
  f.close()
+##
+## Generate the op_attribs_generated.h file
+##     Lists all the attributes associated with each instruction
+##
+f = StringIO()
+for tag in tags:
+    f.write('OP_ATTRIB(%s,ATTRIBS(%s))\n' % \
+        (tag,string.join(sorted(attribdict[tag]),",")))
+realf = open('op_attribs_generated.h', 'wt')
+realf.write(f.getvalue())
+realf.close()
+f.close()
+


This fails with Python 3:

  GEN     Hexagon generated files
Traceback (most recent call last):
  File "target/hexagon/do_qemu.py", line 952, in <module>
    (tag,string.join(sorted(attribdict[tag]),",")))
AttributeError: module 'string' has no attribute 'join'




reply via email to

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