• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1  # RUN: llvm-mc -mcpu=skylake -filetype=obj -triple x86_64-pc-linux-gnu %s -x86-pad-max-prefix-size=5 | llvm-objdump -d - | FileCheck %s
2
3
4  # The first test check the correctness cornercase - can't add prefixes on a
5  # instruction following by a prefix.
6  .globl labeled_prefix_test
7labeled_prefix_test:
8# CHECK:       0: 2e 2e 2e 2e 2e e9 06 00 00 00    jmp
9# CHECK:       a: 3e e9 00 00 00 00                jmp
10  jmp bar
11  DS
12  jmp bar
13  .p2align 4
14bar:
15  ret
16
17  # The second test is similar to the second test - can't add prefixes on a
18  # instruction following by hardcode.
19  .p2align 5
20  .globl labeled_hardcode_test
21labeled_hardcode_test:
22# CHECK:      20: 2e 2e 2e 2e 2e e9 06 00 00 00    jmp
23# CHECK:      2a: 3e e9 00 00 00 00                jmp
24  jmp baz
25  .byte 0x3e
26  jmp baz
27  .p2align 4
28baz:
29  ret
30