Update wasm backend
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
This commit is contained in:
+1
-1
@@ -225,7 +225,7 @@ static void tlb_mmu_resize_locked(CPUTLBDesc *desc, CPUTLBDescFast *fast,
|
||||
rate = desc->window_max_entries * 100 / old_size;
|
||||
|
||||
if (rate > 70) {
|
||||
new_size = MIN(old_size << 1, 1 << CPU_TLB_DYN_MAX_BITS);
|
||||
new_size = MIN(old_size << 1, (uint64_t)1 << CPU_TLB_DYN_MAX_BITS);
|
||||
} else if (rate < 30 && window_expired) {
|
||||
size_t ceil = pow2ceil(desc->window_max_entries);
|
||||
size_t expected_rate = desc->window_max_entries * 100 / ceil;
|
||||
|
||||
@@ -879,10 +879,18 @@ static inline void tb_jmp_unlink(TranslationBlock *dest)
|
||||
qemu_spin_unlock(&dest->jmp_lock);
|
||||
}
|
||||
|
||||
#if !defined(CONFIG_TCG_INTERPRETER) && defined(EMSCRIPTEN)
|
||||
#include "../../tcg/wasm32.h"
|
||||
#endif
|
||||
|
||||
static void tb_jmp_cache_inval_tb(TranslationBlock *tb)
|
||||
{
|
||||
CPUState *cpu;
|
||||
|
||||
#if defined(EMSCRIPTEN) && !defined(CONFIG_TCG_INTERPRETER)
|
||||
remove_tb(tb->tc.ptr);
|
||||
#endif
|
||||
|
||||
if (tb_cflags(tb) & CF_PCREL) {
|
||||
/* A TB may be at any virtual address */
|
||||
CPU_FOREACH(cpu) {
|
||||
|
||||
@@ -61,12 +61,18 @@ static void mttcg_force_rcu(Notifier *notify, void *data)
|
||||
* variable current_cpu can be used deep in the code to find the
|
||||
* current CPUState for a given thread.
|
||||
*/
|
||||
|
||||
#if defined(EMSCRIPTEN) && !defined(CONFIG_TCG_INTERPRETER)
|
||||
#include "../../tcg/wasm32.h"
|
||||
#endif
|
||||
static void *mttcg_cpu_thread_fn(void *arg)
|
||||
{
|
||||
MttcgForceRcuNotifier force_rcu;
|
||||
CPUState *cpu = arg;
|
||||
|
||||
#if defined(EMSCRIPTEN) && !defined(CONFIG_TCG_INTERPRETER)
|
||||
init_wasm32();
|
||||
#endif
|
||||
|
||||
assert(tcg_enabled());
|
||||
g_assert(!icount_enabled());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user