Closed
Description
export fn foo(bitstring: u64, dest: [*]u8, src: [*][8]u8) void {
dest[0..8].* = src[bitstring >> 56];
}
Compiled for the Apple M3:
foo:
lsr x8, x0, #53
and x8, x8, #0x7f8
ldr x8, [x2, x8]
str x8, [x1]
ret
I think it should be:
foo:
lsr x8, x0, #56
ldr x8, [x2, x8, lsl #3]
str x8, [x1]
ret