pci: assert configuration access is within bounds
[qemu/ar7.git] / scripts / tracetool / format / tcg_helper_h.py
blob98ebe52f1807e67f6253a8f2db2ffaf3a6691e96
1 # -*- coding: utf-8 -*-
3 """
4 Generate trace/generated-helpers.h.
5 """
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@linux.vnet.ibm.com"
15 from tracetool import out
16 from tracetool.transform import *
17 import tracetool.vcpu
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. */',
25 '',
28 for e in events:
29 if "tcg-exec" not in e.properties:
30 continue
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
41 flags = "TCG_CALL_NO_RWG, "
43 out(fmt,
44 flags=flags,
45 argc=len(args),
46 name=e.api() + "_proxy",
47 types=types,