mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 12:12:47 +01:00
e3a77ca3c8
The default CPU used by llvm-mc doesn't have the NOPL feature, but if we know we're compiling in 64-bit mode we should be able to use nopl.
22 lines
800 B
ArmAsm
22 lines
800 B
ArmAsm
# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown --x86-align-branch-boundary=16 --x86-align-branch=fused+jcc --mc-relax-all %s | llvm-objdump -d --no-show-raw-insn - | FileCheck %s
|
|
|
|
# Check using option --x86-align-branch-boundary=16 --x86-align-branch=fused+jcc --mc-relax-all with bundle won't make code crazy
|
|
|
|
# CHECK: 0: pushq %rbp
|
|
# CHECK-NEXT: 1: testq $2, %rdx
|
|
# CHECK-NEXT: 8: jne
|
|
# CHECK-NEXT: e: nop
|
|
# CHECK-NEXT: 10: jle
|
|
|
|
.text
|
|
.p2align 4
|
|
foo:
|
|
push %rbp
|
|
# Will be bundle-aligning to 8 byte boundaries
|
|
.bundle_align_mode 3
|
|
test $2, %rdx
|
|
jne foo
|
|
# This jle is 6 bytes long and should have started at 0xe, so two bytes
|
|
# of nop padding are inserted instead and it starts at 0x10
|
|
jle foo
|