[InstCombine] Signed saturation patterns
[llvm-complete.git] / test / tools / obj2yaml / elf-stack-sizes.yaml
blob56a05739d10aa30a332abf127e04b9e5ffda73f8
1 ## Check how obj2yaml produces YAML .stack_sizes descriptions.
3 ## Check that obj2yaml uses the "Entries" tag to describe a .stack_sizes section
4 ## when it can extract <address, size> pairs.
6 # RUN: yaml2obj --docnum=1 %s -o %t1
7 # RUN: obj2yaml %t1 | FileCheck %s --check-prefix=VALID
9 # VALID:      --- !ELF
10 # VALID-NEXT: FileHeader:
11 # VALID-NEXT:   Class:   ELFCLASS64
12 # VALID-NEXT:   Data:    ELFDATA2LSB
13 # VALID-NEXT:   Type:    ET_EXEC
14 # VALID-NEXT:   Machine: EM_X86_64
15 # VALID-NEXT: Sections:
16 # VALID-NEXT:   - Name: .stack_sizes
17 # VALID-NEXT:     Type: SHT_PROGBITS
18 # VALID-NEXT:     Entries:
19 # VALID-NEXT:       - Address: 0x0000000000000010
20 # VALID-NEXT:         Size:    0x0000000000000020
21 # VALID-NEXT:       - Address: 0x0000000000000030
22 # VALID-NEXT:         Size:    0x0000000000000040
24 --- !ELF
25 FileHeader:
26   Class:   ELFCLASS64
27   Data:    ELFDATA2LSB
28   Type:    ET_EXEC
29   Machine: EM_X86_64
30 Sections:
31   - Name:    .stack_sizes
32     Type:    SHT_PROGBITS
33     Content: "100000000000000020300000000000000040"
35 ## Check that obj2yaml uses the "Content" tag to describe a .stack_sizes section
36 ## when it can't extract the entries, for example, when section data is truncated.
38 # RUN: yaml2obj --docnum=2 %s -o %t2
39 # RUN: obj2yaml %t2 | FileCheck %s --check-prefix=INVALID
41 # INVALID:      --- !ELF
42 # INVALID-NEXT: FileHeader:
43 # INVALID-NEXT:   Class:   ELFCLASS64
44 # INVALID-NEXT:   Data:    ELFDATA2LSB
45 # INVALID-NEXT:   Type:    ET_EXEC
46 # INVALID-NEXT:   Machine: EM_X86_64
47 # INVALID-NEXT: Sections:
48 # INVALID-NEXT:   - Name:    .stack_sizes
49 # INVALID-NEXT:     Type:    SHT_PROGBITS
50 # INVALID-NEXT:     Content: '1000000000000000203000000000000000'
52 --- !ELF
53 FileHeader:
54   Class:   ELFCLASS64
55   Data:    ELFDATA2LSB
56   Type:    ET_EXEC
57   Machine: EM_X86_64
58 Sections:
59   - Name:    .stack_sizes
60     Type:    SHT_PROGBITS
61     Content: "1000000000000000203000000000000000"
63 ## Check obj2yaml can dump empty .stack_sizes.
65 # RUN: yaml2obj --docnum=3 %s -o %t3
66 # RUN: obj2yaml %t3 | FileCheck %s --check-prefix=EMPTY
68 # EMPTY:      --- !ELF
69 # EMPTY-NEXT: FileHeader:
70 # EMPTY-NEXT:   Class:   ELFCLASS64
71 # EMPTY-NEXT:   Data:    ELFDATA2LSB
72 # EMPTY-NEXT:   Type:    ET_EXEC
73 # EMPTY-NEXT:   Machine: EM_X86_64
74 # EMPTY-NEXT: Sections:
75 # EMPTY-NEXT:   - Name:    .stack_sizes
76 # EMPTY-NEXT:     Type:    SHT_PROGBITS
77 # EMPTY-NEXT:     Content: ''
79 --- !ELF
80 FileHeader:
81   Class:   ELFCLASS64
82   Data:    ELFDATA2LSB
83   Type:    ET_EXEC
84   Machine: EM_X86_64
85 Sections:
86   - Name:    .stack_sizes
87     Type:    SHT_PROGBITS
88     Content: ""