Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
axic committed Aug 7, 2020
1 parent 2d49525 commit 8e1197c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/fizzy/execute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -812,16 +812,14 @@ ExecutionResult execute(Instance& instance, FuncIdx func_idx, span<const Value>
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;
}
Expand Down Expand Up @@ -1386,7 +1384,7 @@ ExecutionResult execute(Instance& instance, FuncIdx func_idx, span<const Value>
case Instr::i64_extend_i32_s:
{
const auto value = stack.pop().as<int32_t>();
stack.push(int64_t{value});
stack.push(int64_t{value.i64});
break;
}
case Instr::i64_extend_i32_u:
Expand Down

0 comments on commit 8e1197c

Please sign in to comment.