Skip to content
This repository was archived by the owner on Jun 26, 2020. It is now read-only.

Commit 3e4e36f

Browse files
committed
Fix rebase
1 parent 974d23d commit 3e4e36f

File tree

1 file changed

+3
-24
lines changed

1 file changed

+3
-24
lines changed

cranelift-codegen/meta/src/shared/legalize.rs

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@ pub(crate) fn define(insts: &InstructionGroup, imm: &Immediates) -> TransformGro
185185
let offset = var("off");
186186
let vararg = var("vararg");
187187

188+
narrow.custom_legalize(load, "narrow_load");
189+
narrow.custom_legalize(store, "narrow_store");
190+
188191
narrow.legalize(
189192
def!(a = iadd(x, y)),
190193
vec![
@@ -273,30 +276,6 @@ pub(crate) fn define(insts: &InstructionGroup, imm: &Immediates) -> TransformGro
273276
],
274277
);
275278

276-
// FIXME generalize to any offset once offset+8 can be represented
277-
narrow.legalize(
278-
def!(a = load.I128(flags, ptr, Literal::constant(&imm.offset32, 0))),
279-
vec![
280-
def!(al = load.I64(flags, ptr, Literal::constant(&imm.offset32, 0))),
281-
def!(ah = load.I64(flags, ptr, Literal::constant(&imm.offset32, 8))),
282-
// `iconcat` expects the same byte order as stored in memory,
283-
// so no need to swap depending on endianness.
284-
def!(a = iconcat(al, ah)),
285-
],
286-
);
287-
288-
// FIXME generalize to any offset once offset+8 can be represented
289-
narrow.legalize(
290-
def!(store.I128(flags, a, ptr, Literal::constant(&imm.offset32, 0))),
291-
vec![
292-
// `isplit` gives the same byte order as stored in memory,
293-
// so no need to swap depending on endianness.
294-
def!((al, ah) = isplit(a)),
295-
def!(store.I64(flags, al, ptr, Literal::constant(&imm.offset32, 0))),
296-
def!(store.I64(flags, ah, ptr, Literal::constant(&imm.offset32, 8))),
297-
],
298-
);
299-
300279
// Widen instructions with one input operand.
301280
for &op in &[bnot, popcnt] {
302281
for &int_ty in &[I8, I16] {

0 commit comments

Comments
 (0)