Legalize i64.const by breaking it into two i32.const, on 32-bits platforms;

This commit is contained in:
Benjamin Bouvier
2019-08-30 13:01:03 +02:00
parent 6f1ed94e82
commit 3aa76b558c
5 changed files with 62 additions and 9 deletions

View File

@@ -188,6 +188,10 @@ pub(crate) fn define(insts: &InstructionGroup, imm: &Immediates) -> TransformGro
narrow.custom_legalize(load, "narrow_load");
narrow.custom_legalize(store, "narrow_store");
// iconst.i64 can't be legalized in the meta langage (because integer literals can't be
// embedded as part of arguments), so use a custom legalization for now.
narrow.custom_legalize(iconst, "narrow_iconst");
narrow.legalize(
def!(a = iadd(x, y)),
vec![