2 # -*- coding: utf-8 -*-
5 Generate trace/generated-helpers.h.
8 __author__ = "Lluís Vilanova <vilanova@ac.upc.edu>"
9 __copyright__ = "Copyright 2012-2016, 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 *
21 def generate(events, backend):
22 events = [e for e in events
23 if "disable" not in e.properties]
25 out('/* This file is autogenerated by tracetool, do not edit. */',
30 if "tcg-exec" not in e.properties:
33 # TCG helper proxy declaration
34 fmt = "DEF_HELPER_FLAGS_%(argc)d(%(name)s, %(flags)svoid%(types)s)"
35 e_args = tracetool.vcpu.transform_args("tcg_helper_c", e.original, "header")
36 args = e_args.transform(HOST_2_TCG_COMPAT, HOST_2_TCG,
37 TCG_2_TCG_HELPER_DECL)
38 types = ", ".join(args.types())
42 flags = "TCG_CALL_NO_RWG, "
47 name=e.api() + "_proxy",