brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 66547a5 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  .word foo + 0xfffffeff13  .word foo - 0x8000010014 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 = 0xfffffeff22//         S + A = 0xffffffff23// 22015c: S = 0x100, A = -0x8000010024//         S + A = 0x8000000025// LE-NEXT: 220158 ffffffff 0000008026// BE-NEXT: 220158 ffffffff 8000000027 28// RUN: not ld.lld %t.o %t255.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=OVERFLOW129// OVERFLOW1: relocation R_AARCH64_ABS32 out of range: -2147483649 is not in [-2147483648, 4294967295]; 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_ABS32 out of range: 4294967296 is not in [-2147483648, 4294967295]; references 'foo'33