• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# REQUIRES: ppc
2
3# RUN: llvm-mc -filetype=obj -triple=powerpc64le-unknown-linux %s -o %t.o
4# RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck %s
5
6# RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %s -o %t.o
7# RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck %s
8
9# CHECK: improper alignment for relocation R_PPC64_TOC16_LO_DS: 0x8009 is not aligned to 4 bytes
10
11        .global test
12        .p2align        4
13        .type   test,@function
14test:
15.Lgep:
16        addis 2, 12, .TOC.-.Lgep@ha
17        addi  2, 2,  .TOC.-.Lgep@l
18.Llep:
19        .localentry test, .Llep-.Lgep
20        addis 3, 2, word@toc@ha
21        lwa   3, word@toc@l(3)
22        blr
23
24       .p2align 4
25       .comm pad, 1, 1
26       .comm word, 4, 1
27