xref: /llvm-project/llvm/test/tools/llvm-objdump/XCOFF/disassemble-abs.test (revision 2fd7657b6609454af7adb75765d164ec7d1bb80b)
1## Object files assembled on AIX from the following source:
2##        .csect [PR]
3##.main:
4##        .globl .main
5##        .extern .function
6##        bla     .function
7##        btla    .function
8##        ba      0x1234
9##        ba      -32
10##        bta     0x2348
11##        bta     -256
12#
13# RUN: yaml2obj %s --docnum=1 -o %t32.o
14# RUN: llvm-objdump -d %t32.o | FileCheck %s
15#
16# CHECK:        : file format aixcoff-rs6000
17# CHECK:        Disassembly of section .text:
18# CHECK:        00000000 <.main>:
19# CHECK:            0: 48 00 00 03   bla 0x0
20# CHECK-NEXT:       4: 41 80 00 03   btla    0, 0x0
21# CHECK-NEXT:       8: 48 00 12 36   ba 0x1234
22# CHECK-NEXT:       c: 4b ff ff e2   ba 0xffffffe0
23# CHECK-NEXT:      10: 41 80 23 4a   bta     0, 0x2348
24# CHECK-NEXT:      14: 41 80 ff 02   bta     0, 0xffffff00
25
26--- !XCOFF
27FileHeader:
28  MagicNumber:     0x1DF
29  NumberOfSections: 1
30  CreationTime:    1700148622
31  OffsetToSymbolTable: 0x68
32  EntriesInSymbolTable: 8
33  AuxiliaryHeaderSize: 0
34  Flags:           0x0
35Sections:
36  - Name:            .text
37    Address:         0x0
38    Size:            0x18
39    FileOffsetToData: 0x3C
40    FileOffsetToRelocations: 0x54
41    FileOffsetToLineNumbers: 0x0
42    NumberOfRelocations: 0x2
43    NumberOfLineNumbers: 0x0
44    Flags:           [ STYP_TEXT ]
45    SectionData:     4800000341800003480012364BFFFFE24180234A4180FF02
46    Relocations:
47      - Address:         0x0
48        Symbol:          0x2
49        Info:            0x99
50        Type:            0x18
51      - Address:         0x6
52        Symbol:          0x2
53        Info:            0x8F
54        Type:            0x18
55Symbols:
56  - Name:            .file
57    Value:           0x0
58    Section:         N_DEBUG
59    Type:            0xC03
60    StorageClass:    C_FILE
61    NumberOfAuxEntries: 1
62  - Name:            .function
63    Value:           0x0
64    Section:         N_UNDEF
65    Type:            0x0
66    StorageClass:    C_EXT
67    NumberOfAuxEntries: 1
68  - Name:            ''
69    Value:           0x0
70    Section:         .text
71    Type:            0x0
72    StorageClass:    C_HIDEXT
73    NumberOfAuxEntries: 1
74  - Name:            .main
75    Value:           0x0
76    Section:         .text
77    Type:            0x0
78    StorageClass:    C_EXT
79    NumberOfAuxEntries: 1
80StringTable:     {}
81...
82
83# RUN: yaml2obj %s --docnum=2 -o %t64.o
84# RUN: llvm-objdump -d %t64.o | FileCheck --check-prefixes=CHECK64 %s
85#
86
87# CHECK64:      : file format aix5coff64-rs6000
88# CHECK64:      Disassembly of section .text:
89# CHECK64:      0000000000000000 <.main>:
90# CHECK64-NEXT:       0: 48 00 00 03   bla 0x0
91# CHECK64-NEXT:       4: 41 80 00 03   btla    0, 0x0
92# CHECK64-NEXT:       8: 48 00 12 36   ba 0x1234
93# CHECK64-NEXT:       c: 4b ff ff e2   ba 0xffffffffffffffe0
94# CHECK64-NEXT:      10: 41 80 23 4a   bta     0, 0x2348
95# CHECK64-NEXT:      14: 41 80 ff 02   bta     0, 0xffffffffffffff00
96#
97--- !XCOFF
98FileHeader:
99  MagicNumber:     0x1F7
100  NumberOfSections: 1
101  CreationTime:    1701859282
102  AuxiliaryHeaderSize: 0
103  Flags:           0x0
104Sections:
105  - Name:            .text
106    Address:         0x0
107    Size:            0x18
108    FileOffsetToData: 0x60
109    FileOffsetToRelocations: 0x78
110    FileOffsetToLineNumbers: 0x0
111    NumberOfRelocations: 0x2
112    NumberOfLineNumbers: 0x0
113    Flags:           [ STYP_TEXT ]
114    SectionData:     4800000341800003480012364BFFFFE24180234A4180FF02
115    Relocations:
116      - Address:         0x0
117        Symbol:          0x1
118        Info:            0x99
119        Type:            0x18
120      - Address:         0x6
121        Symbol:          0x1
122        Info:            0x8F
123        Type:            0x18
124Symbols:
125  - Name:            .file
126    Section:         N_DEBUG
127    StorageClass:    C_FILE
128    NumberOfAuxEntries: 0
129  - Name:            .function
130    Section:         N_UNDEF
131    StorageClass:    C_EXT
132    NumberOfAuxEntries: 1
133    AuxEntries:
134      - Type:                   AUX_CSECT
135        StorageMappingClass:    XMC_PR
136        SymbolAlignmentAndType: 0
137  - Name:            ''
138    Section:         .text
139    StorageClass:    C_HIDEXT
140    NumberOfAuxEntries: 1
141    AuxEntries:
142      - Type:                   AUX_CSECT
143        StorageMappingClass:    XMC_PR
144        SymbolAlignmentAndType: 1
145  - Name:            .main
146    Section:         .text
147    StorageClass:    C_EXT
148    NumberOfAuxEntries: 1
149    AuxEntries:
150      - Type:                   AUX_CSECT
151        StorageMappingClass:    XMC_PR
152        SymbolAlignmentAndType: 2
153StringTable:
154  Strings:
155    - .file
156    - .function
157    - .text
158    - .main
159