diff options
author | Peter Maydell | 2019-02-11 18:04:57 +0100 |
---|---|---|
committer | Peter Maydell | 2019-02-11 18:04:57 +0100 |
commit | 22c5f446514a2a4bb0dbe1fea26713da92fc85fa (patch) | |
tree | a2b37a81e8ae1f0764ecdafef2c652a889e5d628 /tcg/tcg.c | |
parent | Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-next-110219-1... (diff) | |
parent | cputlb: update TLB entry/index after tlb_fill (diff) | |
download | qemu-22c5f446514a2a4bb0dbe1fea26713da92fc85fa.tar.gz qemu-22c5f446514a2a4bb0dbe1fea26713da92fc85fa.tar.xz qemu-22c5f446514a2a4bb0dbe1fea26713da92fc85fa.zip |
Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20190211' into staging
Fix dynamic tlb resize
Fix x86 host vector saturation
Diagnose missing tcg labels
# gpg: Signature made Mon 11 Feb 2019 16:57:52 GMT
# gpg: using RSA key 64DF38E8AF7E215F
# gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [full]
# Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A 05C0 64DF 38E8 AF7E 215F
* remotes/rth/tags/pull-tcg-20190211:
cputlb: update TLB entry/index after tlb_fill
exec-all: document that tlb_fill can trigger a TLB resize
tcg/i386: fix unsigned vector saturating arithmetic
tcg: Diagnose referenced labels that have not been emitted
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tcg/tcg.c')
-rw-r--r-- | tcg/tcg.c | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -305,6 +305,9 @@ TCGLabel *gen_new_label(void) *l = (TCGLabel){ .id = s->nb_labels++ }; +#ifdef CONFIG_DEBUG_TCG + QSIMPLEQ_INSERT_TAIL(&s->labels, l, next); +#endif return l; } @@ -1092,6 +1095,9 @@ void tcg_func_start(TCGContext *s) QTAILQ_INIT(&s->ops); QTAILQ_INIT(&s->free_ops); +#ifdef CONFIG_DEBUG_TCG + QSIMPLEQ_INIT(&s->labels); +#endif } static inline TCGTemp *tcg_temp_alloc(TCGContext *s) @@ -3841,6 +3847,23 @@ int tcg_gen_code(TCGContext *s, TranslationBlock *tb) } #endif +#ifdef CONFIG_DEBUG_TCG + /* Ensure all labels referenced have been emitted. */ + { + TCGLabel *l; + bool error = false; + + QSIMPLEQ_FOREACH(l, &s->labels, next) { + if (unlikely(!l->present) && l->refs) { + qemu_log_mask(CPU_LOG_TB_OP, + "$L%d referenced but not present.\n", l->id); + error = true; + } + } + assert(!error); + } +#endif + #ifdef CONFIG_PROFILER atomic_set(&prof->opt_time, prof->opt_time - profile_getclock()); #endif |