1 # -*- coding: utf-8 -*-
4 Generate trace/generated-helpers.h.
7 __author__
= "Lluís Vilanova <vilanova@ac.upc.edu>"
8 __copyright__
= "Copyright 2012-2016, Lluís Vilanova <vilanova@ac.upc.edu>"
9 __license__
= "GPL version 2 or (at your option) any later version"
11 __maintainer__
= "Stefan Hajnoczi"
12 __email__
= "stefanha@redhat.com"
15 from tracetool
import out
16 from tracetool
.transform
import *
20 def generate(events
, backend
, group
):
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 # TCG helper proxy declaration
33 fmt
= "DEF_HELPER_FLAGS_%(argc)d(%(name)s, %(flags)svoid%(types)s)"
34 e_args
= tracetool
.vcpu
.transform_args("tcg_helper_c", e
.original
, "header")
35 args
= e_args
.transform(HOST_2_TCG_COMPAT
, HOST_2_TCG
,
36 TCG_2_TCG_HELPER_DECL
)
37 types
= ", ".join(args
.types())
41 flags
= "TCG_CALL_NO_RWG, "
46 name
=e
.api() + "_proxy",