[libc] Switch to using the generic `<gpuintrin.h>` implementations (#121810)
[llvm-project.git] / lld / test / MachO / arm64-objc-stubs-fix.s
blob0dbec361f4b7e5122b2950e7e7e5da4c01e9937e
1 # REQUIRES: aarch64
3 # RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %s -o %t.o
4 # RUN: %lld -arch arm64 -lSystem -fixup_chains -o %t.out %t.o
5 # RUN: llvm-otool -vs __TEXT __objc_stubs %t.out | FileCheck %s --check-prefix=CHECK --check-prefix=FIRST
7 # Prepend a dummy entry to check if the address for _objc_msgSend is valid.
8 # RUN: %lld -arch arm64 -lSystem -fixup_chains -e _dummy -U _dummy -o %t.out %t.o
9 # RUN: llvm-otool -vs __TEXT __objc_stubs %t.out | FileCheck %s --check-prefix=CHECK --check-prefix=SECOND
11 # CHECK: Contents of (__TEXT,__objc_stubs) section
13 # CHECK-NEXT: _objc_msgSend$foo:
14 # CHECK-NEXT: adrp x1, 8 ; 0x100008000
15 # CHECK-NEXT: ldr x1, [x1]
16 # CHECK-NEXT: adrp x16, 4 ; 0x100004000
17 # FIRST-NEXT: ldr x16, [x16]
18 # SECOND-NEXT:ldr x16, [x16, #0x8]
19 # CHECK-NEXT: br x16
20 # CHECK-NEXT: brk #0x1
21 # CHECK-NEXT: brk #0x1
22 # CHECK-NEXT: brk #0x1
24 # CHECK-EMPTY:
26 .text
27 .globl _objc_msgSend
28 _objc_msgSend:
29 ret
31 .globl _main
32 _main:
33 bl _objc_msgSend$foo
34 ret