1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/test/MC/COFF/cross-section-relative-err.s
Fangrui Song bb7326c8ea [AArch64][X86] Allow 64-bit label differences lower to IMAGE_REL_*_REL32
`IMAGE_REL_ARM64_REL64/IMAGE_REL_AMD64_REL64` do not exist and `.quad a - .` is
currently not representable.

For instrumentation, `.quad a - .` is useful representing a cross-section
reference in a metadata section, to allow ELF medium/large code models. The COFF
limitation makes such generic instrumentations inconvenient. I plan to make a
PGO/coverage metadata section field relative in D104556.

Differential Revision: https://reviews.llvm.org/D104564
2021-06-21 14:32:25 -07:00

13 lines
506 B
ArmAsm

// RUN: not llvm-mc -filetype=obj -triple i686-pc-win32 %s -o /dev/null 2>&1 | FileCheck %s --check-prefixes=CHECK,I686
// RUN: not llvm-mc -filetype=obj -triple x86_64-pc-win32 %s -o /dev/null 2>&1 | FileCheck %s
// CHECK: [[@LINE+1]]:{{[0-9]+}}: error: Cannot represent this expression
.byte foo - .
// CHECK: [[@LINE+1]]:{{[0-9]+}}: error: Cannot represent this expression
.short foo - .
// I686: [[@LINE+1]]:{{[0-9]+}}: error: Cannot represent this expression
.quad foo - .