From 8e1197cc85caa8e02f021303685fb83844ba4bb4 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Fri, 7 Aug 2020 00:44:08 +0100 Subject: [PATCH] f --- lib/fizzy/execute.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/fizzy/execute.cpp b/lib/fizzy/execute.cpp index a4ecb41e1..b199c1b70 100644 --- a/lib/fizzy/execute.cpp +++ b/lib/fizzy/execute.cpp @@ -812,16 +812,14 @@ ExecutionResult execute(Instance& instance, FuncIdx func_idx, span if (idx < instance.imported_globals.size()) { assert(instance.imported_globals[idx].is_mutable); - // Using uint64_t as that equlas to the stack width. - *instance.imported_globals[idx].value = stack.pop().i64; + *instance.imported_globals[idx].value = stack.pop(); } else { const auto module_global_idx = idx - instance.imported_globals.size(); assert(module_global_idx < instance.module.globalsec.size()); assert(instance.module.globalsec[module_global_idx].type.is_mutable); - // Using uint64_t as that equlas to the stack width. - instance.globals[module_global_idx] = stack.pop().i64; + instance.globals[module_global_idx] = stack.pop(); } break; } @@ -1386,7 +1384,7 @@ ExecutionResult execute(Instance& instance, FuncIdx func_idx, span case Instr::i64_extend_i32_s: { const auto value = stack.pop().as(); - stack.push(int64_t{value}); + stack.push(int64_t{value.i64}); break; } case Instr::i64_extend_i32_u: