diff options
Diffstat (limited to 'test/ELF/ppc64-error-missaligned-dq.s')
-rw-r--r-- | test/ELF/ppc64-error-missaligned-dq.s | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/ELF/ppc64-error-missaligned-dq.s b/test/ELF/ppc64-error-missaligned-dq.s new file mode 100644 index 000000000000..68ad2e5c46f8 --- /dev/null +++ b/test/ELF/ppc64-error-missaligned-dq.s @@ -0,0 +1,26 @@ +# REQUIRES: ppc +# +# RUN: llvm-mc -filetype=obj -triple=powerpc64le-unknown-linux %s -o %t.o +# RUN: not ld.lld %t.o -o %t 2>&1 | FileCheck %s + +# RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %s -o %t.o +# RUN: not ld.lld %t.o -o %t 2>&1 | FileCheck %s + +# CHECK: improper alignment for relocation R_PPC64_TOC16_LO_DS: 0x8001 is not aligned to 16 bytes + + .global test + .p2align 4 + .type test,@function +test: +.Lgep: + addis 2, 12, .TOC.-.Lgep@ha + addi 2, 2, .TOC.-.Lgep@l +.Llep: + .localentry test, .Llep-.Lgep + addis 3, 2, qword@toc@ha + lxv 3, qword@toc@l(3) + blr + + .comm pad, 1, 1 + .comm qword, 16, 1 + |