2020-04-11 12:32:35 +08:00
|
|
|
# RUN: llvm-mc -filetype=obj -triple x86_64 --x86-align-branch-boundary=32 --x86-align-branch=ret %s | llvm-readobj -S | FileCheck %s
|
2020-03-15 06:09:04 +08:00
|
|
|
|
|
|
|
# Check the aligment of section that contains instructions to be aligned
|
|
|
|
# is correctly set.
|
|
|
|
|
|
|
|
# CHECK: Name: text1
|
|
|
|
# CHECK: AddressAlignment: 32
|
2020-04-15 16:18:11 +08:00
|
|
|
.section text1, "ax"
|
2020-03-15 06:09:04 +08:00
|
|
|
foo:
|
|
|
|
ret
|
|
|
|
|
|
|
|
# CHECK: Name: text2
|
|
|
|
# CHECK: AddressAlignment: 1
|
2020-04-15 16:18:11 +08:00
|
|
|
.section text2, "ax"
|
2020-03-15 06:09:04 +08:00
|
|
|
nop
|
|
|
|
|
|
|
|
# CHECK: Name: text3
|
|
|
|
# CHECK: AddressAlignment: 1
|
2020-04-15 16:18:11 +08:00
|
|
|
.section text3, "ax"
|
2020-03-15 06:09:04 +08:00
|
|
|
jmp foo
|