================ @@ -0,0 +1,286 @@ +// REQUIRES: x86 +// RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o +// RUN: ld.lld --branch-to-branch %t.o -shared -o %t +// RUN: llvm-objdump -d --show-all-symbols %t | FileCheck %s +// RUN: ld.lld -O2 %t.o -shared -o %t +// RUN: llvm-objdump -d --show-all-symbols %t | FileCheck %s +// RUN: ld.lld %t.o -shared -o %t +// RUN: llvm-objdump -d --show-all-symbols %t | FileCheck --check-prefix=O0 %s + +// Mostly positive cases, except for f2. +.section .text.jt1,"ax",@llvm_cfi_jump_table,8 +// Function fits. +f1: +jmp f1.cfi +.balign 8, 0xcc + +// Function too large. +f2: +jmp f2.cfi +.balign 8, 0xcc + +// Function too large, but may be placed at the end. +// Because this causes the jump table to move, it is tested below. +f3: +jmp f3.cfi +.balign 8, 0xcc + +// Mostly negative cases, except for f4. +.section .text.jt2,"ax",@llvm_cfi_jump_table,16 +// Function already moved into jt1. +// CHECK: <f1a>: ---------------- MaskRay wrote:
In newer tests we prefer this style (instructions are indented by 2 relative to the label) ``` # CHECK: <f1a>: # CHECK-NEXT: jmp ... ``` https://github.com/llvm/llvm-project/pull/147424 _______________________________________________ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
