target/ppc: Implement gathering irq statistics
[qemu/armbru.git] / accel / tcg / tb-jmp-cache.h
blobbee87eb840def9b11e034db5c70dc261aaf8e70b
1 /*
2 * The per-CPU TranslationBlock jump cache.
4 * Copyright (c) 2003 Fabrice Bellard
6 * SPDX-License-Identifier: GPL-2.0-or-later
7 */
9 #ifndef ACCEL_TCG_TB_JMP_CACHE_H
10 #define ACCEL_TCG_TB_JMP_CACHE_H
12 #define TB_JMP_CACHE_BITS 12
13 #define TB_JMP_CACHE_SIZE (1 << TB_JMP_CACHE_BITS)
16 * Accessed in parallel; all accesses to 'tb' must be atomic.
17 * For CF_PCREL, accesses to 'pc' must be protected by a
18 * load_acquire/store_release to 'tb'.
20 struct CPUJumpCache {
21 struct rcu_head rcu;
22 struct {
23 TranslationBlock *tb;
24 target_ulong pc;
25 } array[TB_JMP_CACHE_SIZE];
28 #endif /* ACCEL_TCG_TB_JMP_CACHE_H */