1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00
llvm-mirror/test/MC/AsmParser/align_invalid.s
Fangrui Song 4460105032 [MC] Reject byte alignment if larger than or equal to 2**32
This is consistent with the resolution to power-of-2 alignments.
Otherwise, emitCodeAlignment and emitValueToAlignment cannot handle alignments
larger than 2**32 and will trigger assertion failure (PR35218).

Note: GNU as as of 2.35 will use 1 for such a large byte `.align`
2020-12-20 14:17:00 -08:00

15 lines
435 B
ArmAsm

# RUN: not llvm-mc -triple i386-linux-gnu < %s 2>&1 | FileCheck %s -check-prefix=ELF
# RUN: not llvm-mc -triple i386-apple-darwin < %s 2>&1 | FileCheck %s -check-prefix=DARWIN
.align 3
# ELF: error: alignment must be a power of 2
# DARWIN-NOT: error
.align 32
# ELF-NOT: error
# DARWIN: error: invalid alignment value
.align 0x100000000
# ELF: error: alignment must be smaller than 2**32
# DARWIN: error: invalid alignment value