Skip to content

portable-atomic 0.3.19 fails to compile on aarch64 / Apple Silicon #1400

Closed
@teohhanhui

Description

@teohhanhui
   Compiling portable-atomic v0.3.19
{standard input}: Assembler messages:
{standard input}:80: Error: selected processor does not support `casp x6,x7,x4,x5,[x0]'
{standard input}:103: Error: selected processor does not support `caspa x6,x7,x4,x5,[x0]'
{standard input}:126: Error: selected processor does not support `caspl x6,x7,x4,x5,[x0]'
{standard input}:149: Error: selected processor does not support `caspal x6,x7,x4,x5,[x0]'
error: Failed to assemble `.globl __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n0
       .type __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n0,@function
       .section .text.__inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n0,"ax",@progbits
       __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n0:
           stp fp, lr, [sp, #-32]!
           mov fp, sp
           str x19, [sp, #24]
           mov x19, x0
           ldr x3, [x19, 0x0]
       2:
       ldxp x0, x1, [x3]
       stxp w2, x0, x1, [x3]
       cbnz w2, 2b
           str x0, [x19, 0x0]
           str x1, [x19, 0x8]
           ldr x19, [sp, #24]
           ldp fp, lr, [sp], #32
           ret
       .size __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n0, .-__inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n0
       .text
       
       
       .globl __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n1
       .type __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n1,@function
       .section .text.__inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n1,"ax",@progbits
       __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n1:
           stp fp, lr, [sp, #-32]!
           mov fp, sp
           str x19, [sp, #24]
           mov x19, x0
           ldr x3, [x19, 0x0]
       2:
       ldaxp x0, x1, [x3]
       stxp w2, x0, x1, [x3]
       cbnz w2, 2b
           str x0, [x19, 0x0]
           str x1, [x19, 0x8]
           ldr x19, [sp, #24]
           ldp fp, lr, [sp], #32
           ret
       .size __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n1, .-__inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n1
       .text
       
       
       .globl __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n2
       .type __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n2,@function
       .section .text.__inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n2,"ax",@progbits
       __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n2:
           stp fp, lr, [sp, #-32]!
           mov fp, sp
           str x19, [sp, #24]
           mov x19, x0
           ldr x3, [x19, 0x0]
       2:
       ldaxp x0, x1, [x3]
       stlxp w2, x0, x1, [x3]
       cbnz w2, 2b
           str x0, [x19, 0x0]
           str x1, [x19, 0x8]
           ldr x19, [sp, #24]
           ldp fp, lr, [sp], #32
           ret
       .size __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n2, .-__inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n2
       .text
       
       
       .globl __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n3
       .type __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n3,@function
       .section .text.__inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n3,"ax",@progbits
       __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n3:
           stp fp, lr, [sp, #-32]!
           mov fp, sp
           str x19, [sp, #24]
           mov x19, x0
           ldr x0, [x19, 0x10]
           ldr x6, [x19, 0x0]
           ldr x7, [x19, 0x8]
           ldr x4, [x19, 0x18]
           ldr x5, [x19, 0x20]
       casp x6, x7, x4, x5, [x0]
           str x6, [x19, 0x0]
           str x7, [x19, 0x8]
           ldr x19, [sp, #24]
           ldp fp, lr, [sp], #32
           ret
       .size __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n3, .-__inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n3
       .text
       
       
       .globl __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n4
       .type __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n4,@function
       .section .text.__inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n4,"ax",@progbits
       __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n4:
           stp fp, lr, [sp, #-32]!
           mov fp, sp
           str x19, [sp, #24]
           mov x19, x0
           ldr x0, [x19, 0x10]
           ldr x6, [x19, 0x0]
           ldr x7, [x19, 0x8]
           ldr x4, [x19, 0x18]
           ldr x5, [x19, 0x20]
       caspa x6, x7, x4, x5, [x0]
           str x6, [x19, 0x0]
           str x7, [x19, 0x8]
           ldr x19, [sp, #24]
           ldp fp, lr, [sp], #32
           ret
       .size __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n4, .-__inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n4
       .text
       
       
       .globl __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n5
       .type __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n5,@function
       .section .text.__inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n5,"ax",@progbits
       __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n5:
           stp fp, lr, [sp, #-32]!
           mov fp, sp
           str x19, [sp, #24]
           mov x19, x0
           ldr x0, [x19, 0x10]
           ldr x6, [x19, 0x0]
           ldr x7, [x19, 0x8]
           ldr x4, [x19, 0x18]
           ldr x5, [x19, 0x20]
       caspl x6, x7, x4, x5, [x0]
           str x6, [x19, 0x0]
           str x7, [x19, 0x8]
           ldr x19, [sp, #24]
           ldp fp, lr, [sp], #32
           ret
       .size __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n5, .-__inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n5
       .text
       
       
       .globl __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n6
       .type __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n6,@function
       .section .text.__inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n6,"ax",@progbits
       __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n6:
           stp fp, lr, [sp, #-32]!
           mov fp, sp
           str x19, [sp, #24]
           mov x19, x0
           ldr x0, [x19, 0x10]
           ldr x6, [x19, 0x0]
           ldr x7, [x19, 0x8]
           ldr x4, [x19, 0x18]
           ldr x5, [x19, 0x20]
       caspal x6, x7, x4, x5, [x0]
           str x6, [x19, 0x0]
           str x7, [x19, 0x8]
           ldr x19, [sp, #24]
           ldp fp, lr, [sp], #32
           ret
       .size __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n6, .-__inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n6
       .text
       
       
       .globl __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n7
       .type __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n7,@function
       .section .text.__inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n7,"ax",@progbits
       __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n7:
           stp fp, lr, [sp, #-32]!
           mov fp, sp
           str x19, [sp, #24]
           mov x19, x0
           ldr x3, [x19, 0x0]
           ldr x4, [x19, 0x8]
           ldr x5, [x19, 0x10]
           ldr x6, [x19, 0x18]
           ldr x7, [x19, 0x20]
       2:
       ldxp x0, x1, [x3]
       cmp x0, x4
       cset w2, ne
       cmp x1, x5
       cinc w2, w2, ne
       cbz w2, 3f
       stxp w2, x0, x1, [x3]
       cbnz w2, 2b
       b 4f
       3:
       stxp w2, x6, x7, [x3]
       cbnz w2, 2b
       4:
           str x0, [x19, 0x0]
           str x1, [x19, 0x8]
           ldr x19, [sp, #24]
           ldp fp, lr, [sp], #32
           ret
       .size __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n7, .-__inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n7
       .text
       
       
       .globl __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n8
       .type __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n8,@function
       .section .text.__inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n8,"ax",@progbits
       __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n8:
           stp fp, lr, [sp, #-32]!
           mov fp, sp
           str x19, [sp, #24]
           mov x19, x0
           ldr x3, [x19, 0x0]
           ldr x4, [x19, 0x8]
           ldr x5, [x19, 0x10]
           ldr x6, [x19, 0x18]
           ldr x7, [x19, 0x20]
       2:
       ldaxp x0, x1, [x3]
       cmp x0, x4
       cset w2, ne
       cmp x1, x5
       cinc w2, w2, ne
       cbz w2, 3f
       stxp w2, x0, x1, [x3]
       cbnz w2, 2b
       b 4f
       3:
       stxp w2, x6, x7, [x3]
       cbnz w2, 2b
       4:
           str x0, [x19, 0x0]
           str x1, [x19, 0x8]
           ldr x19, [sp, #24]
           ldp fp, lr, [sp], #32
           ret
       .size __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n8, .-__inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n8
       .text
       
       
       .globl __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n9
       .type __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n9,@function
       .section .text.__inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n9,"ax",@progbits
       __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n9:
           stp fp, lr, [sp, #-32]!
           mov fp, sp
           str x19, [sp, #24]
           mov x19, x0
           ldr x3, [x19, 0x0]
           ldr x4, [x19, 0x8]
           ldr x5, [x19, 0x10]
           ldr x6, [x19, 0x18]
           ldr x7, [x19, 0x20]
       2:
       ldxp x0, x1, [x3]
       cmp x0, x4
       cset w2, ne
       cmp x1, x5
       cinc w2, w2, ne
       cbz w2, 3f
       stlxp w2, x0, x1, [x3]
       cbnz w2, 2b
       b 4f
       3:
       stlxp w2, x6, x7, [x3]
       cbnz w2, 2b
       4:
           str x0, [x19, 0x0]
           str x1, [x19, 0x8]
           ldr x19, [sp, #24]
           ldp fp, lr, [sp], #32
           ret
       .size __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n9, .-__inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n9
       .text
       
       
       .globl __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n10
       .type __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n10,@function
       .section .text.__inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n10,"ax",@progbits
       __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n10:
           stp fp, lr, [sp, #-32]!
           mov fp, sp
           str x19, [sp, #24]
           mov x19, x0
           ldr x3, [x19, 0x0]
           ldr x4, [x19, 0x8]
           ldr x5, [x19, 0x10]
           ldr x6, [x19, 0x18]
           ldr x7, [x19, 0x20]
       2:
       ldaxp x0, x1, [x3]
       cmp x0, x4
       cset w2, ne
       cmp x1, x5
       cinc w2, w2, ne
       cbz w2, 3f
       stlxp w2, x0, x1, [x3]
       cbnz w2, 2b
       b 4f
       3:
       stlxp w2, x6, x7, [x3]
       cbnz w2, 2b
       4:
           str x0, [x19, 0x0]
           str x1, [x19, 0x8]
           ldr x19, [sp, #24]
           ldp fp, lr, [sp], #32
           ret
       .size __inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n10, .-__inline_asm_portable_atomic__ee358c2b4b9105a6_cgu__0_n10
       .text
       
       
       `

error: could not compile `portable-atomic` (lib) due to previous error

cargo build works fine.

(I'm on Apple M2 if that makes any difference...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions