1 ## Ensure that per-page compact encodings (indexes 127 and greater)
2 ## appear in the output of llvm-objdump --unwind-info
3 ## Verify that the common encodings table is full at 0x7f (127) entries.
5 ## TODO(gkm): The input is a binary object file constructed from a
6 ## large generated assembler file. For sake of expediency and
7 ## test-time performance, I am following the unfortunate precedent
8 ## that MachO test inputs are binary.
10 ## Non-MachO tests largely use YAML inputs. As I understand it, the
11 ## rationale is that these MachO tests were written prior to
12 ## availability of sufficiently-expressive YAML processors.
14 ## I consider YAML a submoptimal input format. Better would be
15 ## assembler language inputs convertable to binary via llvm-mc. In
16 ## the case of this test however, the input is very large and the
17 ## overhead of llvm-mc is terrible (~10s) on a debug build. Overhead
18 ## for a release build of llvm-mc is acceptable at ~1s. It would be
19 ## good if there were a way to prefer an installed version of llvm-mc
20 ## to process tests in debug build trees when not testing llvm-mc
23 # RUN: llvm-objdump --unwind-info %p/Inputs/unwind-info-excess.macho-x86_64 2>/dev/null | FileCheck %s
25 # CHECK:Contents of __unwind_info section:
26 # CHECK-NEXT: Version: 0x1
27 # CHECK-NEXT: Common encodings array section offset: 0x1c
28 # CHECK-NEXT: Number of common encodings in array: 0x7f
30 # CHECK: Second level indices:
31 # CHECK: Second level index[0]: offset in section
32 # CHECK: Page encodings: (count = 17)
33 # CHECK: encoding[127]: 0x01010003
34 # CHECK: encoding[128]: 0x01010002
35 # CHECK: encoding[129]: 0x01010001
36 # CHECK: encoding[130]: 0x0102001d
37 # CHECK: encoding[131]: 0x01020015
38 # CHECK: encoding[132]: 0x0102000d
39 # CHECK: encoding[133]: 0x0102001c
40 # CHECK: encoding[134]: 0x01020014
41 # CHECK: encoding[135]: 0x0102000c
42 # CHECK: encoding[136]: 0x01020013
43 # CHECK: encoding[137]: 0x0102000b
44 # CHECK: encoding[138]: 0x01020022
45 # CHECK: encoding[139]: 0x0102001a
46 # CHECK: encoding[140]: 0x0102000a
47 # CHECK: encoding[141]: 0x01020021
48 # CHECK: encoding[142]: 0x01020019
49 # CHECK: encoding[143]: 0x01020011
51 # CHECK: [{{[0-9]+}}]: function offset={{[x0-9a-f]+}}, encoding[127]=0x01010003
52 # CHECK: [{{[0-9]+}}]: function offset={{[x0-9a-f]+}}, encoding[128]=0x01010002
53 # CHECK: [{{[0-9]+}}]: function offset={{[x0-9a-f]+}}, encoding[129]=0x01010001
54 # CHECK: [{{[0-9]+}}]: function offset={{[x0-9a-f]+}}, encoding[130]=0x0102001d
55 # CHECK: [{{[0-9]+}}]: function offset={{[x0-9a-f]+}}, encoding[131]=0x01020015
56 # CHECK: [{{[0-9]+}}]: function offset={{[x0-9a-f]+}}, encoding[132]=0x0102000d
57 # CHECK: [{{[0-9]+}}]: function offset={{[x0-9a-f]+}}, encoding[133]=0x0102001c
58 # CHECK: [{{[0-9]+}}]: function offset={{[x0-9a-f]+}}, encoding[134]=0x01020014
59 # CHECK: [{{[0-9]+}}]: function offset={{[x0-9a-f]+}}, encoding[135]=0x0102000c
60 # CHECK: [{{[0-9]+}}]: function offset={{[x0-9a-f]+}}, encoding[136]=0x01020013
61 # CHECK: [{{[0-9]+}}]: function offset={{[x0-9a-f]+}}, encoding[137]=0x0102000b
62 # CHECK: [{{[0-9]+}}]: function offset={{[x0-9a-f]+}}, encoding[138]=0x01020022
63 # CHECK: [{{[0-9]+}}]: function offset={{[x0-9a-f]+}}, encoding[139]=0x0102001a
64 # CHECK: [{{[0-9]+}}]: function offset={{[x0-9a-f]+}}, encoding[140]=0x0102000a
65 # CHECK: [{{[0-9]+}}]: function offset={{[x0-9a-f]+}}, encoding[141]=0x01020021
66 # CHECK: [{{[0-9]+}}]: function offset={{[x0-9a-f]+}}, encoding[142]=0x01020019
67 # CHECK: [{{[0-9]+}}]: function offset={{[x0-9a-f]+}}, encoding[143]=0x01020011