brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 0ced866 Raw
33 lines · plain
1// REQUIRES: aarch642// RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o3// RUN: llvm-mc -filetype=obj -triple=aarch64 %S/Inputs/abs255.s -o %t255.o4// RUN: llvm-mc -filetype=obj -triple=aarch64 %S/Inputs/abs256.s -o %t256.o5// RUN: llvm-mc -filetype=obj -triple=aarch64 %S/Inputs/abs257.s -o %t257.o6// RUN: llvm-mc -filetype=obj -triple=aarch64_be %s -o %t.be.o7// RUN: llvm-mc -filetype=obj -triple=aarch64_be %S/Inputs/abs256.s -o %t256.be.o8 9.globl _start10_start:11.data12  .hword foo + 0xfeff13  .hword foo - 0x810014 15// RUN: ld.lld %t.o %t256.o -o %t16// RUN: llvm-objdump -s --section=.data %t | FileCheck %s --check-prefixes=CHECK,LE17// RUN: ld.lld %t.be.o %t256.be.o -o %t.be18// RUN: llvm-objdump -s --section=.data %t.be | FileCheck %s --check-prefixes=CHECK,BE19 20// CHECK: Contents of section .data:21// 220158: S = 0x100, A = 0xfeff22//         S + A = 0xffff23// 22015c: S = 0x100, A = -0x810024//         S + A = 0x800025// LE-NEXT: 220158 ffff008026// BE-NEXT: 220158 ffff800027 28// RUN: not ld.lld %t.o %t255.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=OVERFLOW129// OVERFLOW1: relocation R_AARCH64_ABS16 out of range: -32769 is not in [-32768, 65535]; references 'foo'30 31// RUN: not ld.lld %t.o %t257.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=OVERFLOW232// OVERFLOW2: relocation R_AARCH64_ABS16 out of range: 65536 is not in [-32768, 65535]; references 'foo'33