Fix rebase

This commit is contained in:
bjorn3
2019-09-07 11:51:23 +02:00
committed by Dan Gohman
parent e8d4ef7c3d
commit 0273eb84e0

View File

@@ -185,6 +185,9 @@ pub(crate) fn define(insts: &InstructionGroup, imm: &Immediates) -> TransformGro
let offset = var("off"); let offset = var("off");
let vararg = var("vararg"); let vararg = var("vararg");
narrow.custom_legalize(load, "narrow_load");
narrow.custom_legalize(store, "narrow_store");
narrow.legalize( narrow.legalize(
def!(a = iadd(x, y)), def!(a = iadd(x, y)),
vec![ vec![
@@ -273,30 +276,6 @@ pub(crate) fn define(insts: &InstructionGroup, imm: &Immediates) -> TransformGro
], ],
); );
// FIXME generalize to any offset once offset+8 can be represented
narrow.legalize(
def!(a = load.I128(flags, ptr, Literal::constant(&imm.offset32, 0))),
vec![
def!(al = load.I64(flags, ptr, Literal::constant(&imm.offset32, 0))),
def!(ah = load.I64(flags, ptr, Literal::constant(&imm.offset32, 8))),
// `iconcat` expects the same byte order as stored in memory,
// so no need to swap depending on endianness.
def!(a = iconcat(al, ah)),
],
);
// FIXME generalize to any offset once offset+8 can be represented
narrow.legalize(
def!(store.I128(flags, a, ptr, Literal::constant(&imm.offset32, 0))),
vec![
// `isplit` gives the same byte order as stored in memory,
// so no need to swap depending on endianness.
def!((al, ah) = isplit(a)),
def!(store.I64(flags, al, ptr, Literal::constant(&imm.offset32, 0))),
def!(store.I64(flags, ah, ptr, Literal::constant(&imm.offset32, 8))),
],
);
// Widen instructions with one input operand. // Widen instructions with one input operand.
for &op in &[bnot, popcnt] { for &op in &[bnot, popcnt] {
for &int_ty in &[I8, I16] { for &int_ty in &[I8, I16] {