2 # -*- coding: utf-8 -*-
5 Generate trace/generated-helpers.h.
8 __author__
= "Lluís Vilanova <vilanova@ac.upc.edu>"
9 __copyright__
= "Copyright 2012-2014, Lluís Vilanova <vilanova@ac.upc.edu>"
10 __license__
= "GPL version 2 or (at your option) any later version"
12 __maintainer__
= "Stefan Hajnoczi"
13 __email__
= "stefanha@linux.vnet.ibm.com"
16 from tracetool
import out
17 from tracetool
.transform
import *
20 def generate(events
, backend
):
21 events
= [e
for e
in events
22 if "disable" not in e
.properties
]
24 out('/* This file is autogenerated by tracetool, do not edit. */',
29 if "tcg-exec" not in e
.properties
:
32 # tracetool.generate always transforms types to host
33 e_args
= e
.original
.args
35 # TCG helper proxy declaration
36 fmt
= "DEF_HELPER_FLAGS_%(argc)d(%(name)s, %(flags)svoid%(types)s)"
37 args
= e_args
.transform(HOST_2_TCG_COMPAT
, HOST_2_TCG
,
38 TCG_2_TCG_HELPER_DECL
)
39 types
= ", ".join(args
.types())
43 flags
= "TCG_CALL_NO_RWG, "
48 name
=e
.api() + "_proxy",