1## Check that BOLT handles code with jrcxz instruction that has a one-byte 2## signed offset restriction. If we try to separate jrcxz instruction from its 3## destination, e.g. by placing it in a different code fragment, then the link 4## step will fail. 5 6# REQUIRES: system-linux 7 8# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o 9# RUN: link_fdata %s %t.o %t.fdata 10# RUN: llvm-strip --strip-unneeded %t.o 11# RUN: %clang %cflags %t.o -o %t.exe -Wl,-q 12 13## Disable relocation mode to leave main fragment in its original location. 14 15# RUN: llvm-bolt %t.exe -o %t.bolt --data %t.fdata --reorder-blocks=ext-tsp \ 16# RUN: --split-functions --relocs=0 17 18 .text 19 .globl main 20 .type main,@function 21main: 22# FDATA: 0 [unknown] 0 1 main 0 0 1 23# FDATA: 1 main 0 1 main #.hot# 0 1 24.cfi_startproc 25 jrcxz .Lcold 26.hot: 27 ret 28 29.Lcold: 30 xorl %eax,%eax 31 ret 32.cfi_endproc 33.size main,.-main 34