Closed GrayJack closed 3 weeks ago
Is this actual or expected output? And what should the other output should be?
Sorry, I forgot to include that.
The expected result would be:
.globl _strchr
.p2align 2
_strchr:
ldrb w9, [x0]
cbz w9, LBB439_4
and w8, w1, #0xff
LBB439_2:
cmp w9, w8
b.eq LBB439_5
ldrb w9, [x0, #1]!
cbnz w9, LBB439_2
LBB439_4:
mov x0, #0
LBB439_5:
ret
Will take a look. Can you include the .s
file from target
folder? You should be able to find exact name if you pass one or more -v
flags - this way I should be able to test if it worked without having to mess with cross-compilation.
Sure! Here it is:
0.2.41 is out, this issue should be fixed.
I noticed that the output of
cargo asm
on aarch64 removes the labels used on the branching instructionscbz
andcbnz
.I made a simple
strchr
example:Output:
Expected result should be:
I tested this on aarch64 macOS and Linux and this happens to these instruction on both.