3 # RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %s -o %t.o
4 # RUN: %lld -arch arm64 %t.o -o %t
5 # RUN: llvm-objdump -d --macho %t | FileCheck %s
8 ## Out of range, before
10 # CHECK-NEXT: add x0, x0
14 ## Registers don't match (invalid input)
17 ## Not an adrp instruction (invalid input)
23 ## In range, add's destination register is not the same as its source
26 ## Valid, non-adjacent instructions - start
28 ## Out of range, after
30 # CHECK-NEXT: add x9, x9
31 ## Valid, non-adjacent instructions - end
45 adrp x0
, _before_far@PAGE
47 add x0
, x0
, _before_far@PAGEOFF
49 adrp x1
, _before_near@PAGE
51 add x1
, x1
, _before_near@PAGEOFF
53 adrp x2
, _before_near@PAGE
55 add x0
, x0
, _before_near@PAGEOFF
59 add x4
, x4
, _after_near@PAGEOFF
61 adrp x5
, _after_near@PAGE
63 add x5
, x5
, _after_near@PAGEOFF
65 adrp x6
, _after_near@PAGE
67 add x7
, x6
, _after_near@PAGEOFF
69 adrp x8
, _after_near@PAGE
71 adrp x9
, _after_far@PAGE
73 add x9
, x9
, _after_far@PAGEOFF
75 add x8
, x8
, _after_near@PAGEOFF