Home | History | Annotate | Download | only in AArch64
      1 // RUN: not llvm-mc -triple arm64 -show-encoding < %s 2>%t | FileCheck %s
      2 // RUN: FileCheck --check-prefix=CHECK-ERRORS < %t %s
      3 
      4 adr x0, #0
      5 adr x0, #1
      6 adr x0, 1f
      7 adr x0, foo
      8 // CHECK: adr x0, #0          // encoding: [0x00,0x00,0x00,0x10]
      9 // CHECK: adr x0, #1          // encoding: [0x00,0x00,0x00,0x30]
     10 // CHECK: adr x0, .Ltmp0      // encoding: [A,A,A,0x10'A']
     11 // CHECK-NEXT:                //   fixup A - offset: 0, value: .Ltmp0, kind: fixup_aarch64_pcrel_adr_imm21
     12 // CHECK: adr x0, foo         // encoding: [A,A,A,0x10'A']
     13 // CHECK-NEXT:                //   fixup A - offset: 0, value: foo, kind: fixup_aarch64_pcrel_adr_imm21
     14 
     15 adrp x0, #0
     16 adrp x0, #4096
     17 adrp x0, 1f
     18 adrp x0, foo
     19 // CHECK: adrp    x0, #0      // encoding: [0x00,0x00,0x00,0x90]
     20 // CHECK: adrp    x0, #4096   // encoding: [0x00,0x00,0x00,0xb0]
     21 // CHECK: adrp    x0, .Ltmp0  // encoding: [A,A,A,0x90'A']
     22 // CHECK-NEXT:                //   fixup A - offset: 0, value: .Ltmp0, kind: fixup_aarch64_pcrel_adrp_imm21
     23 // CHECK: adrp    x0, foo     // encoding: [A,A,A,0x90'A']
     24 // CHECK-NEXT:                //   fixup A - offset: 0, value: foo, kind: fixup_aarch64_pcrel_adrp_imm21
     25 
     26 adr x0, #0xffffffff
     27 adrp x0, #0xffffffff
     28 adrp x0, #1
     29 // CHECK-ERRORS: error: expected label or encodable integer pc offset
     30 // CHECK-ERRORS: error: expected label or encodable integer pc offset
     31 // CHECK-ERRORS: error: expected label or encodable integer pc offset
     32