[RFC PATCH v2 23/67] Hexagon generator phase 2 - qemu_wrap_generated.h

Taylor Simpson posted 67 patches 5 years, 8 months ago
There is a newer version of this series
[RFC PATCH v2 23/67] Hexagon generator phase 2 - qemu_wrap_generated.h
Posted by Taylor Simpson 5 years, 8 months ago
Gives a default definition of fWRAP_<tag> for each instruction

Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
---
 target/hexagon/do_qemu.py | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/target/hexagon/do_qemu.py b/target/hexagon/do_qemu.py
index 6f0e376..3f52ef3 100755
--- a/target/hexagon/do_qemu.py
+++ b/target/hexagon/do_qemu.py
@@ -767,3 +767,17 @@ realf.write(f.getvalue())
 realf.close()
 f.close()
 
+##
+## Generate the qemu_wrap_generated.h file
+##     Gives a default definition of fWRAP_<tag> for each instruction
+##
+f = StringIO()
+for tag in tags:
+    f.write( "#ifndef fWRAP_%s\n" % tag )
+    f.write( "#define fWRAP_%s(GENHLPR, SHORTCODE) GENHLPR\n" % tag )
+    f.write( "#endif\n\n" )
+realf = open('qemu_wrap_generated.h', 'wt')
+realf.write(f.getvalue())
+realf.close()
+f.close()
+
-- 
2.7.4