47 lines · plain
1# REQUIRES: aarch642# RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %s -o %t.o3# RUN: not %lld -arch arm64 %t.o -o %t 2>&1 | FileCheck %s --implicit-check-not=_byte \4# RUN: --implicit-check-not=_correct5 6# CHECK-DAG: error: {{.*}}:(symbol _main+0x4): 16-bit LDR/STR to 0x[[#%X,]] (_half) is not 2-byte aligned7# CHECK-DAG: error: {{.*}}:(symbol _main+0xc): 32-bit LDR/STR to 0x[[#%X,]] (_word) is not 4-byte aligned8# CHECK-DAG: error: {{.*}}:(symbol _main+0x14): 64-bit LDR/STR to 0x[[#%X,]] (_double) is not 8-byte aligned9# CHECK-DAG: error: {{.*}}:(symbol _main+0x1c): 128-bit LDR/STR to 0x[[#%X,]] (_quad) is not 16-byte aligned10 11.globl _main12_main:13 adrp x0, _half@PAGE14 ldrh w0, [x0, _half@PAGEOFF]15 16 adrp x1, _word@PAGE17 ldr w1, [x1, _word@PAGEOFF]18 19 adrp x2, _double@PAGE20 ldr x2, [x2, _double@PAGEOFF]21 22 adrp x3, _quad@PAGE23 ldr q0, [x3, _quad@PAGEOFF]24 25 adrp x4, _byte@PAGE26 ldrb w4, [x4, _byte@PAGEOFF]27 28 adrp x5, _correct@PAGE29 ldr x5, [x5, _correct@PAGEOFF]30 31.data32.p2align 433_correct:34.8byte 035.byte 036_half:37.2byte 038_word:39.4byte 040_double:41.8byte 042_quad:43.8byte 044.8byte 045_byte:46.byte 047