brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 045abbe Raw
55 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin19.0.0 -emit-compact-unwind-non-canonical=true %s -o %t.o3# RUN: %lld -arch x86_64 -dylib %t.o -o %t.dylib4# RUN: llvm-objdump --macho --syms --unwind-info %t.dylib | FileCheck %s5 6## Both _f and _g have the same compact unwind encoding,7## but different stack sizes. So their compact unwindings8## can't be merged.9# CHECK:  SYMBOL TABLE:10# CHECK:  [[#%x,F:]] g  F __TEXT,__text _f11# CHECK:  [[#%x,G:]] g  F __TEXT,__text _g12# CHECK: Number of common encodings in array:       0x113# CHECK:  Common encodings: (count = 1)14# CHECK:    encoding[0]: 0x0303200015# CHECK:  Second level indices:16# CHECK:    Second level index[0]:17# CHECK:      [0]: function offset=0x[[#%.8x,F]], encoding[0]=0x0303200018# CHECK:      [1]: function offset=0x[[#%.8x,G]], encoding[0]=0x0303200019 20## Based on compiling21##     int f() {22##       char alloca[3260] = { 0 };23##       return alloca[0];24##     }25##26##     int g() {27##       char alloca[2560] = { 0 };28##       return alloca[0];29##     }30## with `-fomit-frame-pointer -fno-stack-protector -S`.31.section __TEXT,__text,regular,pure_instructions32.build_version macos, 10, 15 sdk_version 10, 15, 633 34.globl _f35.p2align 4, 0x9036_f:37  .cfi_startproc38  subq $3272, %rsp39  .cfi_def_cfa_offset 328040  addq $3272, %rsp41  retq42  .cfi_endproc43 44.globl _g45.p2align 4, 0x9046_g:47  .cfi_startproc48  subq $2568, %rsp49  .cfi_def_cfa_offset 257650  addq $2568, %rsp51  retq52  .cfi_endproc53 54.subsections_via_symbols55