I have written the following assembly for ARMv8:
.text
.align 4
.global permute
.type permute, %function
permute:
ld2 {v0.2d - v1.2d}, [x0], #32
ld2 {v2.2d - v3.2d}, [x0], #32
ld2 {v4.2d - v5.2d}, [x0], #32
ld2 {v6.2d - v7.2d}, [x0]
zip1 v8.2d, v0.2d, v4.2d
st1 {v0.2d - v3.2d}, [x1], #64
st1 {v4.2d - v7.2d}, [x1]
The function permute
is called from a regular C program with two byte pointers of length 128 as inputs. This compiles fine, but when I run it I get Illegal instruction
. If I comment out the zip1
instruction, it also runs fine.
Any tips on what might be wrong, and how to debug Illegal instruction
in general?