blob: dd4496fe69b646a2b6136fcc447d3c49008ce612 [file] [log] [blame]
David Srbeckydd973932015-04-07 20:29:48 +01001static constexpr uint8_t expected_asm_kThumb2[] = {
2 0x2D, 0xE9, 0xE0, 0x4D, 0x2D, 0xED, 0x10, 0x8A, 0x89, 0xB0, 0x00, 0x90,
3 0xCD, 0xF8, 0x84, 0x10, 0x8D, 0xED, 0x22, 0x0A, 0xCD, 0xF8, 0x8C, 0x20,
4 0xCD, 0xF8, 0x90, 0x30, 0x88, 0xB0, 0x08, 0xB0, 0x09, 0xB0, 0xBD, 0xEC,
5 0x10, 0x8A, 0xBD, 0xE8, 0xE0, 0x8D,
6};
7static constexpr uint8_t expected_cfi_kThumb2[] = {
8 0x44, 0x0E, 0x1C, 0x85, 0x07, 0x86, 0x06, 0x87, 0x05, 0x88, 0x04, 0x8A,
9 0x03, 0x8B, 0x02, 0x8E, 0x01, 0x44, 0x0E, 0x5C, 0x05, 0x50, 0x17, 0x05,
10 0x51, 0x16, 0x05, 0x52, 0x15, 0x05, 0x53, 0x14, 0x05, 0x54, 0x13, 0x05,
11 0x55, 0x12, 0x05, 0x56, 0x11, 0x05, 0x57, 0x10, 0x05, 0x58, 0x0F, 0x05,
12 0x59, 0x0E, 0x05, 0x5A, 0x0D, 0x05, 0x5B, 0x0C, 0x05, 0x5C, 0x0B, 0x05,
13 0x5D, 0x0A, 0x05, 0x5E, 0x09, 0x05, 0x5F, 0x08, 0x42, 0x0E, 0x80, 0x01,
14 0x54, 0x0E, 0xA0, 0x01, 0x42, 0x0E, 0x80, 0x01, 0x0A, 0x42, 0x0E, 0x5C,
15 0x44, 0x0E, 0x1C, 0x06, 0x50, 0x06, 0x51, 0x06, 0x52, 0x06, 0x53, 0x06,
16 0x54, 0x06, 0x55, 0x06, 0x56, 0x06, 0x57, 0x06, 0x58, 0x06, 0x59, 0x06,
17 0x5A, 0x06, 0x5B, 0x06, 0x5C, 0x06, 0x5D, 0x06, 0x5E, 0x06, 0x5F, 0x44,
18 0x0B, 0x0E, 0x80, 0x01,
19};
20// 0x00000000: push {r5, r6, r7, r8, r10, r11, lr}
21// 0x00000004: .cfi_def_cfa_offset: 28
22// 0x00000004: .cfi_offset: r5 at cfa-28
23// 0x00000004: .cfi_offset: r6 at cfa-24
24// 0x00000004: .cfi_offset: r7 at cfa-20
25// 0x00000004: .cfi_offset: r8 at cfa-16
26// 0x00000004: .cfi_offset: r10 at cfa-12
27// 0x00000004: .cfi_offset: r11 at cfa-8
28// 0x00000004: .cfi_offset: r14 at cfa-4
29// 0x00000004: vpush.f32 {s16-s31}
30// 0x00000008: .cfi_def_cfa_offset: 92
31// 0x00000008: .cfi_offset_extended: r80 at cfa-92
32// 0x00000008: .cfi_offset_extended: r81 at cfa-88
33// 0x00000008: .cfi_offset_extended: r82 at cfa-84
34// 0x00000008: .cfi_offset_extended: r83 at cfa-80
35// 0x00000008: .cfi_offset_extended: r84 at cfa-76
36// 0x00000008: .cfi_offset_extended: r85 at cfa-72
37// 0x00000008: .cfi_offset_extended: r86 at cfa-68
38// 0x00000008: .cfi_offset_extended: r87 at cfa-64
39// 0x00000008: .cfi_offset_extended: r88 at cfa-60
40// 0x00000008: .cfi_offset_extended: r89 at cfa-56
41// 0x00000008: .cfi_offset_extended: r90 at cfa-52
42// 0x00000008: .cfi_offset_extended: r91 at cfa-48
43// 0x00000008: .cfi_offset_extended: r92 at cfa-44
44// 0x00000008: .cfi_offset_extended: r93 at cfa-40
45// 0x00000008: .cfi_offset_extended: r94 at cfa-36
46// 0x00000008: .cfi_offset_extended: r95 at cfa-32
47// 0x00000008: sub sp, sp, #36
48// 0x0000000a: .cfi_def_cfa_offset: 128
49// 0x0000000a: str r0, [sp, #0]
50// 0x0000000c: str.w r1, [sp, #132]
51// 0x00000010: vstr.f32 s0, [sp, #136]
52// 0x00000014: str.w r2, [sp, #140]
53// 0x00000018: str.w r3, [sp, #144]
54// 0x0000001c: sub sp, sp, #32
55// 0x0000001e: .cfi_def_cfa_offset: 160
56// 0x0000001e: add sp, sp, #32
57// 0x00000020: .cfi_def_cfa_offset: 128
58// 0x00000020: .cfi_remember_state
59// 0x00000020: add sp, sp, #36
60// 0x00000022: .cfi_def_cfa_offset: 92
61// 0x00000022: vpop.f32 {s16-s31}
62// 0x00000026: .cfi_def_cfa_offset: 28
63// 0x00000026: .cfi_restore_extended: r80
64// 0x00000026: .cfi_restore_extended: r81
65// 0x00000026: .cfi_restore_extended: r82
66// 0x00000026: .cfi_restore_extended: r83
67// 0x00000026: .cfi_restore_extended: r84
68// 0x00000026: .cfi_restore_extended: r85
69// 0x00000026: .cfi_restore_extended: r86
70// 0x00000026: .cfi_restore_extended: r87
71// 0x00000026: .cfi_restore_extended: r88
72// 0x00000026: .cfi_restore_extended: r89
73// 0x00000026: .cfi_restore_extended: r90
74// 0x00000026: .cfi_restore_extended: r91
75// 0x00000026: .cfi_restore_extended: r92
76// 0x00000026: .cfi_restore_extended: r93
77// 0x00000026: .cfi_restore_extended: r94
78// 0x00000026: .cfi_restore_extended: r95
79// 0x00000026: pop {r5, r6, r7, r8, r10, r11, pc}
80// 0x0000002a: .cfi_restore_state
81// 0x0000002a: .cfi_def_cfa_offset: 128
82
83static constexpr uint8_t expected_asm_kArm64[] = {
Zheng Xu69a50302015-04-14 20:04:41 +080084 0xFF, 0x03, 0x03, 0xD1, 0xF3, 0x53, 0x06, 0xA9, 0xF5, 0x5B, 0x07, 0xA9,
85 0xF7, 0x63, 0x08, 0xA9, 0xF9, 0x6B, 0x09, 0xA9, 0xFB, 0x73, 0x0A, 0xA9,
86 0xFD, 0x7B, 0x0B, 0xA9, 0xE8, 0x27, 0x02, 0x6D, 0xEA, 0x2F, 0x03, 0x6D,
Mathieu Chartiere401d142015-04-22 13:56:20 -070087 0xEC, 0x37, 0x04, 0x6D, 0xEE, 0x3F, 0x05, 0x6D, 0xE0, 0x03, 0x00, 0xF9,
88 0xE1, 0xCB, 0x00, 0xB9, 0xE0, 0xCF, 0x00, 0xBD, 0xE2, 0xD3, 0x00, 0xB9,
89 0xE3, 0xD7, 0x00, 0xB9, 0xFF, 0x83, 0x00, 0xD1, 0xFF, 0x83, 0x00, 0x91,
Serban Constantinescu9bd88b02015-04-22 16:24:46 +010090 0xF3, 0x53, 0x46, 0xA9, 0xF5, 0x5B, 0x47, 0xA9, 0xF7, 0x63, 0x48, 0xA9,
91 0xF9, 0x6B, 0x49, 0xA9, 0xFB, 0x73, 0x4A, 0xA9, 0xFD, 0x7B, 0x4B, 0xA9,
92 0xE8, 0x27, 0x42, 0x6D, 0xEA, 0x2F, 0x43, 0x6D, 0xEC, 0x37, 0x44, 0x6D,
93 0xEE, 0x3F, 0x45, 0x6D, 0xFF, 0x03, 0x03, 0x91, 0xC0, 0x03, 0x5F, 0xD6,
David Srbeckydd973932015-04-07 20:29:48 +010094};
95static constexpr uint8_t expected_cfi_kArm64[] = {
Zheng Xu69a50302015-04-14 20:04:41 +080096 0x44, 0x0E, 0xC0, 0x01, 0x44, 0x93, 0x18, 0x94, 0x16, 0x44, 0x95, 0x14,
97 0x96, 0x12, 0x44, 0x97, 0x10, 0x98, 0x0E, 0x44, 0x99, 0x0C, 0x9A, 0x0A,
98 0x44, 0x9B, 0x08, 0x9C, 0x06, 0x44, 0x9D, 0x04, 0x9E, 0x02, 0x44, 0x05,
99 0x48, 0x28, 0x05, 0x49, 0x26, 0x44, 0x05, 0x4A, 0x24, 0x05, 0x4B, 0x22,
100 0x44, 0x05, 0x4C, 0x20, 0x05, 0x4D, 0x1E, 0x44, 0x05, 0x4E, 0x1C, 0x05,
Serban Constantinescu9bd88b02015-04-22 16:24:46 +0100101 0x4F, 0x1A, 0x58, 0x0E, 0xE0, 0x01, 0x44, 0x0E, 0xC0, 0x01, 0x0A, 0x44,
102 0xD3, 0xD4, 0x44, 0xD5, 0xD6, 0x44, 0xD7, 0xD8, 0x44, 0xD9, 0xDA, 0x44,
103 0xDB, 0xDC, 0x44, 0xDD, 0xDE, 0x44, 0x06, 0x48, 0x06, 0x49, 0x44, 0x06,
104 0x4A, 0x06, 0x4B, 0x44, 0x06, 0x4C, 0x06, 0x4D, 0x44, 0x06, 0x4E, 0x06,
105 0x4F, 0x44, 0x0E, 0x00, 0x44, 0x0B, 0x0E, 0xC0, 0x01,
David Srbeckydd973932015-04-07 20:29:48 +0100106};
107// 0x00000000: sub sp, sp, #0xc0 (192)
108// 0x00000004: .cfi_def_cfa_offset: 192
Mathieu Chartiere401d142015-04-22 13:56:20 -0700109// 0x00000004: stp tr, x20, [sp, #96]
Zheng Xu69a50302015-04-14 20:04:41 +0800110// 0x00000008: .cfi_offset: r19 at cfa-96
111// 0x00000008: .cfi_offset: r20 at cfa-88
112// 0x00000008: stp x21, x22, [sp, #112]
113// 0x0000000c: .cfi_offset: r21 at cfa-80
114// 0x0000000c: .cfi_offset: r22 at cfa-72
115// 0x0000000c: stp x23, x24, [sp, #128]
116// 0x00000010: .cfi_offset: r23 at cfa-64
117// 0x00000010: .cfi_offset: r24 at cfa-56
118// 0x00000010: stp x25, x26, [sp, #144]
119// 0x00000014: .cfi_offset: r25 at cfa-48
120// 0x00000014: .cfi_offset: r26 at cfa-40
121// 0x00000014: stp x27, x28, [sp, #160]
122// 0x00000018: .cfi_offset: r27 at cfa-32
123// 0x00000018: .cfi_offset: r28 at cfa-24
124// 0x00000018: stp x29, lr, [sp, #176]
125// 0x0000001c: .cfi_offset: r29 at cfa-16
126// 0x0000001c: .cfi_offset: r30 at cfa-8
127// 0x0000001c: stp d8, d9, [sp, #32]
128// 0x00000020: .cfi_offset_extended: r72 at cfa-160
129// 0x00000020: .cfi_offset_extended: r73 at cfa-152
130// 0x00000020: stp d10, d11, [sp, #48]
131// 0x00000024: .cfi_offset_extended: r74 at cfa-144
132// 0x00000024: .cfi_offset_extended: r75 at cfa-136
133// 0x00000024: stp d12, d13, [sp, #64]
134// 0x00000028: .cfi_offset_extended: r76 at cfa-128
135// 0x00000028: .cfi_offset_extended: r77 at cfa-120
136// 0x00000028: stp d14, d15, [sp, #80]
137// 0x0000002c: .cfi_offset_extended: r78 at cfa-112
138// 0x0000002c: .cfi_offset_extended: r79 at cfa-104
Mathieu Chartiere401d142015-04-22 13:56:20 -0700139// 0x0000002c: str x0, [sp]
140// 0x00000030: str w1, [sp, #200]
141// 0x00000034: str s0, [sp, #204]
142// 0x00000038: str w2, [sp, #208]
143// 0x0000003c: str w3, [sp, #212]
Serban Constantinescu9bd88b02015-04-22 16:24:46 +0100144// 0x00000040: sub sp, sp, #0x20 (32)
145// 0x00000044: .cfi_def_cfa_offset: 224
146// 0x00000044: add sp, sp, #0x20 (32)
147// 0x00000048: .cfi_def_cfa_offset: 192
148// 0x00000048: .cfi_remember_state
Mathieu Chartiere401d142015-04-22 13:56:20 -0700149// 0x00000048: ldp tr, x20, [sp, #96]
Serban Constantinescu9bd88b02015-04-22 16:24:46 +0100150// 0x0000004c: .cfi_restore: r19
151// 0x0000004c: .cfi_restore: r20
152// 0x0000004c: ldp x21, x22, [sp, #112]
153// 0x00000050: .cfi_restore: r21
154// 0x00000050: .cfi_restore: r22
155// 0x00000050: ldp x23, x24, [sp, #128]
156// 0x00000054: .cfi_restore: r23
157// 0x00000054: .cfi_restore: r24
158// 0x00000054: ldp x25, x26, [sp, #144]
159// 0x00000058: .cfi_restore: r25
160// 0x00000058: .cfi_restore: r26
161// 0x00000058: ldp x27, x28, [sp, #160]
162// 0x0000005c: .cfi_restore: r27
163// 0x0000005c: .cfi_restore: r28
164// 0x0000005c: ldp x29, lr, [sp, #176]
165// 0x00000060: .cfi_restore: r29
166// 0x00000060: .cfi_restore: r30
167// 0x00000060: ldp d8, d9, [sp, #32]
168// 0x00000064: .cfi_restore_extended: r72
169// 0x00000064: .cfi_restore_extended: r73
170// 0x00000064: ldp d10, d11, [sp, #48]
171// 0x00000068: .cfi_restore_extended: r74
172// 0x00000068: .cfi_restore_extended: r75
173// 0x00000068: ldp d12, d13, [sp, #64]
174// 0x0000006c: .cfi_restore_extended: r76
175// 0x0000006c: .cfi_restore_extended: r77
176// 0x0000006c: ldp d14, d15, [sp, #80]
177// 0x00000070: .cfi_restore_extended: r78
178// 0x00000070: .cfi_restore_extended: r79
179// 0x00000070: add sp, sp, #0xc0 (192)
180// 0x00000074: .cfi_def_cfa_offset: 0
181// 0x00000074: ret
182// 0x00000078: .cfi_restore_state
183// 0x00000078: .cfi_def_cfa_offset: 192
David Srbeckydd973932015-04-07 20:29:48 +0100184
185static constexpr uint8_t expected_asm_kX86[] = {
186 0x57, 0x56, 0x55, 0x83, 0xC4, 0xE4, 0x50, 0x89, 0x4C, 0x24, 0x34, 0xF3,
187 0x0F, 0x11, 0x44, 0x24, 0x38, 0x89, 0x54, 0x24, 0x3C, 0x89, 0x5C, 0x24,
188 0x40, 0x83, 0xC4, 0xE0, 0x83, 0xC4, 0x20, 0x83, 0xC4, 0x20, 0x5D, 0x5E,
189 0x5F, 0xC3,
190};
191static constexpr uint8_t expected_cfi_kX86[] = {
192 0x41, 0x0E, 0x08, 0x87, 0x02, 0x41, 0x0E, 0x0C, 0x86, 0x03, 0x41, 0x0E,
193 0x10, 0x85, 0x04, 0x43, 0x0E, 0x2C, 0x41, 0x0E, 0x30, 0x55, 0x0E, 0x50,
194 0x43, 0x0E, 0x30, 0x0A, 0x43, 0x0E, 0x10, 0x41, 0x0E, 0x0C, 0xC5, 0x41,
195 0x0E, 0x08, 0xC6, 0x41, 0x0E, 0x04, 0xC7, 0x41, 0x0B, 0x0E, 0x30,
196};
197// 0x00000000: push edi
198// 0x00000001: .cfi_def_cfa_offset: 8
199// 0x00000001: .cfi_offset: r7 at cfa-8
200// 0x00000001: push esi
201// 0x00000002: .cfi_def_cfa_offset: 12
202// 0x00000002: .cfi_offset: r6 at cfa-12
203// 0x00000002: push ebp
204// 0x00000003: .cfi_def_cfa_offset: 16
205// 0x00000003: .cfi_offset: r5 at cfa-16
206// 0x00000003: add esp, -28
207// 0x00000006: .cfi_def_cfa_offset: 44
208// 0x00000006: push eax
209// 0x00000007: .cfi_def_cfa_offset: 48
210// 0x00000007: mov [esp + 52], ecx
211// 0x0000000b: movss [esp + 56], xmm0
212// 0x00000011: mov [esp + 60], edx
213// 0x00000015: mov [esp + 64], ebx
214// 0x00000019: add esp, -32
215// 0x0000001c: .cfi_def_cfa_offset: 80
216// 0x0000001c: add esp, 32
217// 0x0000001f: .cfi_def_cfa_offset: 48
218// 0x0000001f: .cfi_remember_state
219// 0x0000001f: add esp, 32
220// 0x00000022: .cfi_def_cfa_offset: 16
221// 0x00000022: pop ebp
222// 0x00000023: .cfi_def_cfa_offset: 12
223// 0x00000023: .cfi_restore: r5
224// 0x00000023: pop esi
225// 0x00000024: .cfi_def_cfa_offset: 8
226// 0x00000024: .cfi_restore: r6
227// 0x00000024: pop edi
228// 0x00000025: .cfi_def_cfa_offset: 4
229// 0x00000025: .cfi_restore: r7
230// 0x00000025: ret
231// 0x00000026: .cfi_restore_state
232// 0x00000026: .cfi_def_cfa_offset: 48
233
234static constexpr uint8_t expected_asm_kX86_64[] = {
235 0x41, 0x57, 0x41, 0x56, 0x41, 0x55, 0x41, 0x54, 0x55, 0x53, 0x48, 0x83,
236 0xEC, 0x48, 0xF2, 0x44, 0x0F, 0x11, 0x7C, 0x24, 0x40, 0xF2, 0x44, 0x0F,
237 0x11, 0x74, 0x24, 0x38, 0xF2, 0x44, 0x0F, 0x11, 0x6C, 0x24, 0x30, 0xF2,
Mathieu Chartiere401d142015-04-22 13:56:20 -0700238 0x44, 0x0F, 0x11, 0x64, 0x24, 0x28, 0x48, 0x89, 0x3C, 0x24, 0x89, 0xB4,
239 0x24, 0x88, 0x00, 0x00, 0x00, 0xF3, 0x0F, 0x11, 0x84, 0x24, 0x8C, 0x00,
240 0x00, 0x00, 0x89, 0x94, 0x24, 0x90, 0x00, 0x00, 0x00, 0x89, 0x8C, 0x24,
241 0x94, 0x00, 0x00, 0x00, 0x48, 0x83, 0xC4, 0xE0, 0x48, 0x83, 0xC4, 0x20,
242 0xF2, 0x44, 0x0F, 0x10, 0x64, 0x24, 0x28, 0xF2, 0x44, 0x0F, 0x10, 0x6C,
243 0x24, 0x30, 0xF2, 0x44, 0x0F, 0x10, 0x74, 0x24, 0x38, 0xF2, 0x44, 0x0F,
244 0x10, 0x7C, 0x24, 0x40, 0x48, 0x83, 0xC4, 0x48, 0x5B, 0x5D, 0x41, 0x5C,
245 0x41, 0x5D, 0x41, 0x5E, 0x41, 0x5F, 0xC3,
David Srbeckydd973932015-04-07 20:29:48 +0100246};
247static constexpr uint8_t expected_cfi_kX86_64[] = {
248 0x42, 0x0E, 0x10, 0x8F, 0x04, 0x42, 0x0E, 0x18, 0x8E, 0x06, 0x42, 0x0E,
249 0x20, 0x8D, 0x08, 0x42, 0x0E, 0x28, 0x8C, 0x0A, 0x41, 0x0E, 0x30, 0x86,
250 0x0C, 0x41, 0x0E, 0x38, 0x83, 0x0E, 0x44, 0x0E, 0x80, 0x01, 0x47, 0xA0,
Mathieu Chartiere401d142015-04-22 13:56:20 -0700251 0x10, 0x47, 0x9F, 0x12, 0x47, 0x9E, 0x14, 0x47, 0x9D, 0x16, 0x66, 0x0E,
David Srbeckydd973932015-04-07 20:29:48 +0100252 0xA0, 0x01, 0x44, 0x0E, 0x80, 0x01, 0x0A, 0x47, 0xDD, 0x47, 0xDE, 0x47,
253 0xDF, 0x47, 0xE0, 0x44, 0x0E, 0x38, 0x41, 0x0E, 0x30, 0xC3, 0x41, 0x0E,
254 0x28, 0xC6, 0x42, 0x0E, 0x20, 0xCC, 0x42, 0x0E, 0x18, 0xCD, 0x42, 0x0E,
255 0x10, 0xCE, 0x42, 0x0E, 0x08, 0xCF, 0x41, 0x0B, 0x0E, 0x80, 0x01,
256};
257// 0x00000000: push r15
258// 0x00000002: .cfi_def_cfa_offset: 16
259// 0x00000002: .cfi_offset: r15 at cfa-16
260// 0x00000002: push r14
261// 0x00000004: .cfi_def_cfa_offset: 24
262// 0x00000004: .cfi_offset: r14 at cfa-24
263// 0x00000004: push r13
264// 0x00000006: .cfi_def_cfa_offset: 32
265// 0x00000006: .cfi_offset: r13 at cfa-32
266// 0x00000006: push r12
267// 0x00000008: .cfi_def_cfa_offset: 40
268// 0x00000008: .cfi_offset: r12 at cfa-40
269// 0x00000008: push rbp
270// 0x00000009: .cfi_def_cfa_offset: 48
271// 0x00000009: .cfi_offset: r6 at cfa-48
272// 0x00000009: push rbx
273// 0x0000000a: .cfi_def_cfa_offset: 56
274// 0x0000000a: .cfi_offset: r3 at cfa-56
275// 0x0000000a: subq rsp, 72
276// 0x0000000e: .cfi_def_cfa_offset: 128
277// 0x0000000e: movsd [rsp + 64], xmm15
278// 0x00000015: .cfi_offset: r32 at cfa-64
279// 0x00000015: movsd [rsp + 56], xmm14
280// 0x0000001c: .cfi_offset: r31 at cfa-72
281// 0x0000001c: movsd [rsp + 48], xmm13
282// 0x00000023: .cfi_offset: r30 at cfa-80
283// 0x00000023: movsd [rsp + 40], xmm12
284// 0x0000002a: .cfi_offset: r29 at cfa-88
Mathieu Chartiere401d142015-04-22 13:56:20 -0700285// 0x0000002a: movq [rsp], rdi
286// 0x0000002e: mov [rsp + 136], esi
287// 0x00000035: movss [rsp + 140], xmm0
288// 0x0000003e: mov [rsp + 144], edx
289// 0x00000045: mov [rsp + 148], ecx
290// 0x0000004c: addq rsp, -32
291// 0x00000050: .cfi_def_cfa_offset: 160
292// 0x00000050: addq rsp, 32
293// 0x00000054: .cfi_def_cfa_offset: 128
294// 0x00000054: .cfi_remember_state
295// 0x00000054: movsd xmm12, [rsp + 40]
296// 0x0000005b: .cfi_restore: r29
297// 0x0000005b: movsd xmm13, [rsp + 48]
298// 0x00000062: .cfi_restore: r30
299// 0x00000062: movsd xmm14, [rsp + 56]
300// 0x00000069: .cfi_restore: r31
301// 0x00000069: movsd xmm15, [rsp + 64]
302// 0x00000070: .cfi_restore: r32
303// 0x00000070: addq rsp, 72
304// 0x00000074: .cfi_def_cfa_offset: 56
305// 0x00000074: pop rbx
306// 0x00000075: .cfi_def_cfa_offset: 48
307// 0x00000075: .cfi_restore: r3
308// 0x00000075: pop rbp
309// 0x00000076: .cfi_def_cfa_offset: 40
310// 0x00000076: .cfi_restore: r6
311// 0x00000076: pop r12
312// 0x00000078: .cfi_def_cfa_offset: 32
313// 0x00000078: .cfi_restore: r12
314// 0x00000078: pop r13
315// 0x0000007a: .cfi_def_cfa_offset: 24
316// 0x0000007a: .cfi_restore: r13
317// 0x0000007a: pop r14
318// 0x0000007c: .cfi_def_cfa_offset: 16
319// 0x0000007c: .cfi_restore: r14
320// 0x0000007c: pop r15
321// 0x0000007e: .cfi_def_cfa_offset: 8
322// 0x0000007e: .cfi_restore: r15
323// 0x0000007e: ret
324// 0x0000007f: .cfi_restore_state
325// 0x0000007f: .cfi_def_cfa_offset: 128
David Srbeckydd973932015-04-07 20:29:48 +0100326
327static constexpr uint8_t expected_asm_kMips[] = {
328 0xC0, 0xFF, 0xBD, 0x27, 0x3C, 0x00, 0xBF, 0xAF, 0x38, 0x00, 0xB8, 0xAF,
329 0x34, 0x00, 0xAF, 0xAF, 0x30, 0x00, 0xAE, 0xAF, 0x2C, 0x00, 0xAD, 0xAF,
330 0x28, 0x00, 0xAC, 0xAF, 0x24, 0x00, 0xAB, 0xAF, 0x20, 0x00, 0xAA, 0xAF,
331 0x1C, 0x00, 0xA9, 0xAF, 0x18, 0x00, 0xA8, 0xAF, 0x00, 0x00, 0xA4, 0xAF,
332 0x44, 0x00, 0xA5, 0xAF, 0x48, 0x00, 0xA6, 0xAF, 0x4C, 0x00, 0xA7, 0xAF,
333 0xE0, 0xFF, 0xBD, 0x27, 0x20, 0x00, 0xBD, 0x27, 0x18, 0x00, 0xA8, 0x8F,
334 0x1C, 0x00, 0xA9, 0x8F, 0x20, 0x00, 0xAA, 0x8F, 0x24, 0x00, 0xAB, 0x8F,
335 0x28, 0x00, 0xAC, 0x8F, 0x2C, 0x00, 0xAD, 0x8F, 0x30, 0x00, 0xAE, 0x8F,
336 0x34, 0x00, 0xAF, 0x8F, 0x38, 0x00, 0xB8, 0x8F, 0x3C, 0x00, 0xBF, 0x8F,
337 0x40, 0x00, 0xBD, 0x27, 0x09, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x00, 0x00,
338};
339static constexpr uint8_t expected_cfi_kMips[] = {
340 0x44, 0x0E, 0x40, 0x44, 0x9F, 0x01, 0x44, 0x98, 0x02, 0x44, 0x8F, 0x03,
341 0x44, 0x8E, 0x04, 0x44, 0x8D, 0x05, 0x44, 0x8C, 0x06, 0x44, 0x8B, 0x07,
342 0x44, 0x8A, 0x08, 0x44, 0x89, 0x09, 0x44, 0x88, 0x0A, 0x54, 0x0E, 0x60,
343 0x44, 0x0E, 0x40, 0x0A, 0x44, 0xC8, 0x44, 0xC9, 0x44, 0xCA, 0x44, 0xCB,
344 0x44, 0xCC, 0x44, 0xCD, 0x44, 0xCE, 0x44, 0xCF, 0x44, 0xD8, 0x44, 0xDF,
345 0x44, 0x0E, 0x00, 0x48, 0x0B, 0x0E, 0x40,
346};
347// 0x00000000: addiu r29, r29, -64
348// 0x00000004: .cfi_def_cfa_offset: 64
349// 0x00000004: sw r31, +60(r29)
350// 0x00000008: .cfi_offset: r31 at cfa-4
351// 0x00000008: sw r24, +56(r29)
352// 0x0000000c: .cfi_offset: r24 at cfa-8
353// 0x0000000c: sw r15, +52(r29)
354// 0x00000010: .cfi_offset: r15 at cfa-12
355// 0x00000010: sw r14, +48(r29)
356// 0x00000014: .cfi_offset: r14 at cfa-16
357// 0x00000014: sw r13, +44(r29)
358// 0x00000018: .cfi_offset: r13 at cfa-20
359// 0x00000018: sw r12, +40(r29)
360// 0x0000001c: .cfi_offset: r12 at cfa-24
361// 0x0000001c: sw r11, +36(r29)
362// 0x00000020: .cfi_offset: r11 at cfa-28
363// 0x00000020: sw r10, +32(r29)
364// 0x00000024: .cfi_offset: r10 at cfa-32
365// 0x00000024: sw r9, +28(r29)
366// 0x00000028: .cfi_offset: r9 at cfa-36
367// 0x00000028: sw r8, +24(r29)
368// 0x0000002c: .cfi_offset: r8 at cfa-40
369// 0x0000002c: sw r4, +0(r29)
370// 0x00000030: sw r5, +68(r29)
371// 0x00000034: sw r6, +72(r29)
372// 0x00000038: sw r7, +76(r29)
373// 0x0000003c: addiu r29, r29, -32
374// 0x00000040: .cfi_def_cfa_offset: 96
375// 0x00000040: addiu r29, r29, 32
376// 0x00000044: .cfi_def_cfa_offset: 64
377// 0x00000044: .cfi_remember_state
378// 0x00000044: lw r8, +24(r29)
379// 0x00000048: .cfi_restore: r8
380// 0x00000048: lw r9, +28(r29)
381// 0x0000004c: .cfi_restore: r9
382// 0x0000004c: lw r10, +32(r29)
383// 0x00000050: .cfi_restore: r10
384// 0x00000050: lw r11, +36(r29)
385// 0x00000054: .cfi_restore: r11
386// 0x00000054: lw r12, +40(r29)
387// 0x00000058: .cfi_restore: r12
388// 0x00000058: lw r13, +44(r29)
389// 0x0000005c: .cfi_restore: r13
390// 0x0000005c: lw r14, +48(r29)
391// 0x00000060: .cfi_restore: r14
392// 0x00000060: lw r15, +52(r29)
393// 0x00000064: .cfi_restore: r15
394// 0x00000064: lw r24, +56(r29)
395// 0x00000068: .cfi_restore: r24
396// 0x00000068: lw r31, +60(r29)
397// 0x0000006c: .cfi_restore: r31
398// 0x0000006c: addiu r29, r29, 64
399// 0x00000070: .cfi_def_cfa_offset: 0
Mathieu Chartiere401d142015-04-22 13:56:20 -0700400// 0x00000070: jr r31
David Srbeckydd973932015-04-07 20:29:48 +0100401// 0x00000074: nop
402// 0x00000078: .cfi_restore_state
403// 0x00000078: .cfi_def_cfa_offset: 64
404
405static constexpr uint8_t expected_asm_kMips64[] = {
406 0xA0, 0xFF, 0xBD, 0x67, 0x58, 0x00, 0xBF, 0xFF, 0x50, 0x00, 0xBE, 0xFF,
407 0x48, 0x00, 0xBC, 0xFF, 0x40, 0x00, 0xB7, 0xFF, 0x38, 0x00, 0xB6, 0xFF,
408 0x30, 0x00, 0xB5, 0xFF, 0x28, 0x00, 0xB4, 0xFF, 0x20, 0x00, 0xB3, 0xFF,
Mathieu Chartiere401d142015-04-22 13:56:20 -0700409 0x18, 0x00, 0xB2, 0xFF, 0x00, 0x00, 0xA4, 0xFF, 0x68, 0x00, 0xA5, 0xAF,
410 0x6C, 0x00, 0xAE, 0xE7, 0x70, 0x00, 0xA7, 0xAF, 0x74, 0x00, 0xA8, 0xAF,
David Srbeckydd973932015-04-07 20:29:48 +0100411 0xE0, 0xFF, 0xBD, 0x67, 0x20, 0x00, 0xBD, 0x67, 0x18, 0x00, 0xB2, 0xDF,
412 0x20, 0x00, 0xB3, 0xDF, 0x28, 0x00, 0xB4, 0xDF, 0x30, 0x00, 0xB5, 0xDF,
413 0x38, 0x00, 0xB6, 0xDF, 0x40, 0x00, 0xB7, 0xDF, 0x48, 0x00, 0xBC, 0xDF,
414 0x50, 0x00, 0xBE, 0xDF, 0x58, 0x00, 0xBF, 0xDF, 0x60, 0x00, 0xBD, 0x67,
415 0x09, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x00, 0x00,
416};
417static constexpr uint8_t expected_cfi_kMips64[] = {
418 0x44, 0x0E, 0x60, 0x44, 0x9F, 0x02, 0x44, 0x9E, 0x04, 0x44, 0x9C, 0x06,
419 0x44, 0x97, 0x08, 0x44, 0x96, 0x0A, 0x44, 0x95, 0x0C, 0x44, 0x94, 0x0E,
420 0x44, 0x93, 0x10, 0x44, 0x92, 0x12, 0x58, 0x0E, 0x80, 0x01, 0x44, 0x0E,
421 0x60, 0x0A, 0x44, 0xD2, 0x44, 0xD3, 0x44, 0xD4, 0x44, 0xD5, 0x44, 0xD6,
422 0x44, 0xD7, 0x44, 0xDC, 0x44, 0xDE, 0x44, 0xDF, 0x44, 0x0E, 0x00, 0x48,
423 0x0B, 0x0E, 0x60,
424};
425// 0x00000000: daddiu r29, r29, -96
426// 0x00000004: .cfi_def_cfa_offset: 96
427// 0x00000004: sd r31, +88(r29)
428// 0x00000008: .cfi_offset: r31 at cfa-8
429// 0x00000008: sd r30, +80(r29)
430// 0x0000000c: .cfi_offset: r30 at cfa-16
431// 0x0000000c: sd r28, +72(r29)
432// 0x00000010: .cfi_offset: r28 at cfa-24
433// 0x00000010: sd r23, +64(r29)
434// 0x00000014: .cfi_offset: r23 at cfa-32
435// 0x00000014: sd r22, +56(r29)
436// 0x00000018: .cfi_offset: r22 at cfa-40
437// 0x00000018: sd r21, +48(r29)
438// 0x0000001c: .cfi_offset: r21 at cfa-48
439// 0x0000001c: sd r20, +40(r29)
440// 0x00000020: .cfi_offset: r20 at cfa-56
441// 0x00000020: sd r19, +32(r29)
442// 0x00000024: .cfi_offset: r19 at cfa-64
443// 0x00000024: sd r18, +24(r29)
444// 0x00000028: .cfi_offset: r18 at cfa-72
Mathieu Chartiere401d142015-04-22 13:56:20 -0700445// 0x00000028: sd r4, +0(r29)
446// 0x0000002c: sw r5, +104(r29)
447// 0x00000030: swc1 f14, +108(r29)
448// 0x00000034: sw r7, +112(r29)
449// 0x00000038: sw r8, +116(r29)
David Srbeckydd973932015-04-07 20:29:48 +0100450// 0x0000003c: daddiu r29, r29, -32
451// 0x00000040: .cfi_def_cfa_offset: 128
452// 0x00000040: daddiu r29, r29, 32
453// 0x00000044: .cfi_def_cfa_offset: 96
454// 0x00000044: .cfi_remember_state
455// 0x00000044: ld r18, +24(r29)
456// 0x00000048: .cfi_restore: r18
457// 0x00000048: ld r19, +32(r29)
458// 0x0000004c: .cfi_restore: r19
459// 0x0000004c: ld r20, +40(r29)
460// 0x00000050: .cfi_restore: r20
461// 0x00000050: ld r21, +48(r29)
462// 0x00000054: .cfi_restore: r21
463// 0x00000054: ld r22, +56(r29)
464// 0x00000058: .cfi_restore: r22
465// 0x00000058: ld r23, +64(r29)
466// 0x0000005c: .cfi_restore: r23
467// 0x0000005c: ld r28, +72(r29)
468// 0x00000060: .cfi_restore: r28
469// 0x00000060: ld r30, +80(r29)
470// 0x00000064: .cfi_restore: r30
471// 0x00000064: ld r31, +88(r29)
472// 0x00000068: .cfi_restore: r31
473// 0x00000068: daddiu r29, r29, 96
474// 0x0000006c: .cfi_def_cfa_offset: 0
475// 0x0000006c: jr r31
476// 0x00000070: nop
477// 0x00000074: .cfi_restore_state
478// 0x00000074: .cfi_def_cfa_offset: 96