]> Git Repo - qemu.git/blob - scripts/tracetool/format/tcg_helper_h.py
net: Pad short frames to minimum size before sending from SLiRP/TAP
[qemu.git] / scripts / tracetool / format / tcg_helper_h.py
1 # -*- coding: utf-8 -*-
2
3 """
4 Generate trace/generated-helpers.h.
5 """
6
7 __author__     = "Lluís Vilanova <[email protected]>"
8 __copyright__  = "Copyright 2012-2016, Lluís Vilanova <[email protected]>"
9 __license__    = "GPL version 2 or (at your option) any later version"
10
11 __maintainer__ = "Stefan Hajnoczi"
12 __email__      = "[email protected]"
13
14
15 from tracetool import out
16 from tracetool.transform import *
17 import tracetool.vcpu
18
19
20 def generate(events, backend, group):
21     events = [e for e in events
22               if "disable" not in e.properties]
23
24     out('/* This file is autogenerated by tracetool, do not edit. */',
25         '',
26         )
27
28     for e in events:
29         if "tcg-exec" not in e.properties:
30             continue
31
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())
38         if types != "":
39             types = ", " + types
40
41         flags = "TCG_CALL_NO_RWG, "
42
43         out(fmt,
44             flags=flags,
45             argc=len(args),
46             name=e.api() + "_proxy",
47             types=types,
48             )
This page took 0.026742 seconds and 4 git commands to generate.