• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1static constexpr uint8_t expected_asm_kThumb2[] = {
2    0x60, 0xB5, 0x2D, 0xED, 0x02, 0x8A, 0x8B, 0xB0, 0x00, 0x90, 0x0B, 0xB0,
3    0xBD, 0xEC, 0x02, 0x8A, 0x60, 0xBD,
4};
5static constexpr uint8_t expected_cfi_kThumb2[] = {
6    0x42, 0x0E, 0x0C, 0x85, 0x03, 0x86, 0x02, 0x8E, 0x01, 0x44, 0x0E, 0x14,
7    0x05, 0x50, 0x05, 0x05, 0x51, 0x04, 0x42, 0x0E, 0x40, 0x42, 0x0A, 0x42,
8    0x0E, 0x14, 0x44, 0x0E, 0x0C, 0x06, 0x50, 0x06, 0x51, 0x42, 0x0B, 0x0E,
9    0x40,
10};
11// 0x00000000: push {r5, r6, lr}
12// 0x00000002: .cfi_def_cfa_offset: 12
13// 0x00000002: .cfi_offset: r5 at cfa-12
14// 0x00000002: .cfi_offset: r6 at cfa-8
15// 0x00000002: .cfi_offset: r14 at cfa-4
16// 0x00000002: vpush.f32 {s16-s17}
17// 0x00000006: .cfi_def_cfa_offset: 20
18// 0x00000006: .cfi_offset_extended: r80 at cfa-20
19// 0x00000006: .cfi_offset_extended: r81 at cfa-16
20// 0x00000006: sub sp, sp, #44
21// 0x00000008: .cfi_def_cfa_offset: 64
22// 0x00000008: str r0, [sp, #0]
23// 0x0000000a: .cfi_remember_state
24// 0x0000000a: add sp, sp, #44
25// 0x0000000c: .cfi_def_cfa_offset: 20
26// 0x0000000c: vpop.f32 {s16-s17}
27// 0x00000010: .cfi_def_cfa_offset: 12
28// 0x00000010: .cfi_restore_extended: r80
29// 0x00000010: .cfi_restore_extended: r81
30// 0x00000010: pop {r5, r6, pc}
31// 0x00000012: .cfi_restore_state
32// 0x00000012: .cfi_def_cfa_offset: 64
33
34static constexpr uint8_t expected_asm_kArm64[] = {
35    0xE0, 0x0F, 0x1C, 0xF8, 0xF4, 0xD7, 0x02, 0xA9, 0xFE, 0x1F, 0x00, 0xF9,
36    0xE8, 0xA7, 0x01, 0x6D, 0xE8, 0xA7, 0x41, 0x6D, 0xF4, 0xD7, 0x42, 0xA9,
37    0xFE, 0x1F, 0x40, 0xF9, 0xFF, 0x03, 0x01, 0x91, 0xC0, 0x03, 0x5F, 0xD6,
38};
39static constexpr uint8_t expected_cfi_kArm64[] = {
40    0x44, 0x0E, 0x40, 0x44, 0x94, 0x06, 0x95, 0x04, 0x44, 0x9E, 0x02, 0x44,
41    0x05, 0x48, 0x0A, 0x05, 0x49, 0x08, 0x0A, 0x44, 0x06, 0x48, 0x06, 0x49,
42    0x44, 0xD4, 0xD5, 0x44, 0xDE, 0x44, 0x0E, 0x00, 0x44, 0x0B, 0x0E, 0x40,
43};
44// 0x00000000: str x0, [sp, #-64]!
45// 0x00000004: .cfi_def_cfa_offset: 64
46// 0x00000004: stp x20, x21, [sp, #40]
47// 0x00000008: .cfi_offset: r20 at cfa-24
48// 0x00000008: .cfi_offset: r21 at cfa-16
49// 0x00000008: str lr, [sp, #56]
50// 0x0000000c: .cfi_offset: r30 at cfa-8
51// 0x0000000c: stp d8, d9, [sp, #24]
52// 0x00000010: .cfi_offset_extended: r72 at cfa-40
53// 0x00000010: .cfi_offset_extended: r73 at cfa-32
54// 0x00000010: .cfi_remember_state
55// 0x00000010: ldp d8, d9, [sp, #24]
56// 0x00000014: .cfi_restore_extended: r72
57// 0x00000014: .cfi_restore_extended: r73
58// 0x00000014: ldp x20, x21, [sp, #40]
59// 0x00000018: .cfi_restore: r20
60// 0x00000018: .cfi_restore: r21
61// 0x00000018: ldr lr, [sp, #56]
62// 0x0000001c: .cfi_restore: r30
63// 0x0000001c: add sp, sp, #0x40 (64)
64// 0x00000020: .cfi_def_cfa_offset: 0
65// 0x00000020: ret
66// 0x00000024: .cfi_restore_state
67// 0x00000024: .cfi_def_cfa_offset: 64
68
69static constexpr uint8_t expected_asm_kX86[] = {
70    0x56, 0x55, 0x83, 0xEC, 0x34, 0x89, 0x04, 0x24, 0x83, 0xC4, 0x34, 0x5D,
71    0x5E, 0xC3,
72};
73static constexpr uint8_t expected_cfi_kX86[] = {
74    0x41, 0x0E, 0x08, 0x86, 0x02, 0x41, 0x0E, 0x0C, 0x85, 0x03, 0x43, 0x0E,
75    0x40, 0x43, 0x0A, 0x43, 0x0E, 0x0C, 0x41, 0x0E, 0x08, 0xC5, 0x41, 0x0E,
76    0x04, 0xC6, 0x41, 0x0B, 0x0E, 0x40,
77};
78// 0x00000000: push esi
79// 0x00000001: .cfi_def_cfa_offset: 8
80// 0x00000001: .cfi_offset: r6 at cfa-8
81// 0x00000001: push ebp
82// 0x00000002: .cfi_def_cfa_offset: 12
83// 0x00000002: .cfi_offset: r5 at cfa-12
84// 0x00000002: sub esp, 52
85// 0x00000005: .cfi_def_cfa_offset: 64
86// 0x00000005: mov [esp], eax
87// 0x00000008: .cfi_remember_state
88// 0x00000008: add esp, 52
89// 0x0000000b: .cfi_def_cfa_offset: 12
90// 0x0000000b: pop ebp
91// 0x0000000c: .cfi_def_cfa_offset: 8
92// 0x0000000c: .cfi_restore: r5
93// 0x0000000c: pop esi
94// 0x0000000d: .cfi_def_cfa_offset: 4
95// 0x0000000d: .cfi_restore: r6
96// 0x0000000d: ret
97// 0x0000000e: .cfi_restore_state
98// 0x0000000e: .cfi_def_cfa_offset: 64
99
100static constexpr uint8_t expected_asm_kX86_64[] = {
101    0x55, 0x53, 0x48, 0x83, 0xEC, 0x28, 0xF2, 0x44, 0x0F, 0x11, 0x6C, 0x24,
102    0x20, 0xF2, 0x44, 0x0F, 0x11, 0x64, 0x24, 0x18, 0x48, 0x89, 0x3C, 0x24,
103    0xF2, 0x44, 0x0F, 0x10, 0x64, 0x24, 0x18, 0xF2, 0x44, 0x0F, 0x10, 0x6C,
104    0x24, 0x20, 0x48, 0x83, 0xC4, 0x28, 0x5B, 0x5D, 0xC3,
105};
106static constexpr uint8_t expected_cfi_kX86_64[] = {
107    0x41, 0x0E, 0x10, 0x86, 0x04, 0x41, 0x0E, 0x18, 0x83, 0x06, 0x44, 0x0E,
108    0x40, 0x47, 0x9E, 0x08, 0x47, 0x9D, 0x0A, 0x44, 0x0A, 0x47, 0xDD, 0x47,
109    0xDE, 0x44, 0x0E, 0x18, 0x41, 0x0E, 0x10, 0xC3, 0x41, 0x0E, 0x08, 0xC6,
110    0x41, 0x0B, 0x0E, 0x40,
111};
112// 0x00000000: push rbp
113// 0x00000001: .cfi_def_cfa_offset: 16
114// 0x00000001: .cfi_offset: r6 at cfa-16
115// 0x00000001: push rbx
116// 0x00000002: .cfi_def_cfa_offset: 24
117// 0x00000002: .cfi_offset: r3 at cfa-24
118// 0x00000002: subq rsp, 40
119// 0x00000006: .cfi_def_cfa_offset: 64
120// 0x00000006: movsd [rsp + 32], xmm13
121// 0x0000000d: .cfi_offset: r30 at cfa-32
122// 0x0000000d: movsd [rsp + 24], xmm12
123// 0x00000014: .cfi_offset: r29 at cfa-40
124// 0x00000014: movq [rsp], rdi
125// 0x00000018: .cfi_remember_state
126// 0x00000018: movsd xmm12, [rsp + 24]
127// 0x0000001f: .cfi_restore: r29
128// 0x0000001f: movsd xmm13, [rsp + 32]
129// 0x00000026: .cfi_restore: r30
130// 0x00000026: addq rsp, 40
131// 0x0000002a: .cfi_def_cfa_offset: 24
132// 0x0000002a: pop rbx
133// 0x0000002b: .cfi_def_cfa_offset: 16
134// 0x0000002b: .cfi_restore: r3
135// 0x0000002b: pop rbp
136// 0x0000002c: .cfi_def_cfa_offset: 8
137// 0x0000002c: .cfi_restore: r6
138// 0x0000002c: ret
139// 0x0000002d: .cfi_restore_state
140// 0x0000002d: .cfi_def_cfa_offset: 64
141
142static constexpr uint8_t expected_asm_kMips[] = {
143    0xE4, 0xFF, 0xBD, 0x27, 0x18, 0x00, 0xBF, 0xAF, 0x14, 0x00, 0xB1, 0xAF,
144    0x10, 0x00, 0xB0, 0xAF, 0x08, 0x00, 0xB6, 0xE7, 0x0C, 0x00, 0xB7, 0xE7,
145    0x00, 0x00, 0xB4, 0xE7, 0x04, 0x00, 0xB5, 0xE7, 0xDC, 0xFF, 0xBD, 0x27,
146    0x00, 0x00, 0xA4, 0xAF, 0x24, 0x00, 0xBD, 0x27, 0x00, 0x00, 0xB4, 0xC7,
147    0x04, 0x00, 0xB5, 0xC7, 0x08, 0x00, 0xB6, 0xC7, 0x0C, 0x00, 0xB7, 0xC7,
148    0x10, 0x00, 0xB0, 0x8F, 0x14, 0x00, 0xB1, 0x8F, 0x18, 0x00, 0xBF, 0x8F,
149    0x1C, 0x00, 0xBD, 0x27, 0x09, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x00, 0x00,
150};
151static constexpr uint8_t expected_cfi_kMips[] = {
152    0x44, 0x0E, 0x1C, 0x44, 0x9F, 0x01, 0x44, 0x91, 0x02, 0x44, 0x90, 0x03,
153    0x54, 0x0E, 0x40, 0x44, 0x0A, 0x44, 0x0E, 0x1C, 0x54, 0xD0, 0x44, 0xD1,
154    0x44, 0xDF, 0x44, 0x0E, 0x00, 0x48, 0x0B, 0x0E, 0x40,
155};
156// 0x00000000: addiu r29, r29, -28
157// 0x00000004: .cfi_def_cfa_offset: 28
158// 0x00000004: sw r31, +24(r29)
159// 0x00000008: .cfi_offset: r31 at cfa-4
160// 0x00000008: sw r17, +20(r29)
161// 0x0000000c: .cfi_offset: r17 at cfa-8
162// 0x0000000c: sw r16, +16(r29)
163// 0x00000010: .cfi_offset: r16 at cfa-12
164// 0x00000010: swc1 f22, +8(r29)
165// 0x00000014: swc1 f23, +12(r29)
166// 0x00000018: swc1 f20, +0(r29)
167// 0x0000001c: swc1 f21, +4(r29)
168// 0x00000020: addiu r29, r29, -36
169// 0x00000024: .cfi_def_cfa_offset: 64
170// 0x00000024: sw r4, +0(r29)
171// 0x00000028: .cfi_remember_state
172// 0x00000028: addiu r29, r29, 36
173// 0x0000002c: .cfi_def_cfa_offset: 28
174// 0x0000002c: lwc1 f20, +0(r29)
175// 0x00000030: lwc1 f21, +4(r29)
176// 0x00000034: lwc1 f22, +8(r29)
177// 0x00000038: lwc1 f23, +12(r29)
178// 0x0000003c: lw r16, +16(r29)
179// 0x00000040: .cfi_restore: r16
180// 0x00000040: lw r17, +20(r29)
181// 0x00000044: .cfi_restore: r17
182// 0x00000044: lw r31, +24(r29)
183// 0x00000048: .cfi_restore: r31
184// 0x00000048: addiu r29, r29, 28
185// 0x0000004c: .cfi_def_cfa_offset: 0
186// 0x0000004c: jr r31
187// 0x00000050: nop
188// 0x00000054: .cfi_restore_state
189// 0x00000054: .cfi_def_cfa_offset: 64
190
191static constexpr uint8_t expected_asm_kMips64[] = {
192    0xD8, 0xFF, 0xBD, 0x67, 0x20, 0x00, 0xBF, 0xFF, 0x18, 0x00, 0xB1, 0xFF,
193    0x10, 0x00, 0xB0, 0xFF, 0x08, 0x00, 0xB9, 0xF7, 0x00, 0x00, 0xB8, 0xF7,
194    0xE8, 0xFF, 0xBD, 0x67, 0x00, 0x00, 0xA4, 0xFF, 0x18, 0x00, 0xBD, 0x67,
195    0x00, 0x00, 0xB8, 0xD7, 0x08, 0x00, 0xB9, 0xD7, 0x10, 0x00, 0xB0, 0xDF,
196    0x18, 0x00, 0xB1, 0xDF, 0x20, 0x00, 0xBF, 0xDF, 0x28, 0x00, 0xBD, 0x67,
197    0x09, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x00, 0x00,
198};
199static constexpr uint8_t expected_cfi_kMips64[] = {
200    0x44, 0x0E, 0x28, 0x44, 0x9F, 0x02, 0x44, 0x91, 0x04, 0x44, 0x90, 0x06,
201    0x44, 0xB9, 0x08, 0x44, 0xB8, 0x0A, 0x44, 0x0E, 0x40, 0x44, 0x0A, 0x44,
202    0x0E, 0x28, 0x44, 0xF8, 0x44, 0xF9, 0x44, 0xD0, 0x44, 0xD1, 0x44, 0xDF,
203    0x44, 0x0E, 0x00, 0x48, 0x0B, 0x0E, 0x40,
204};
205// 0x00000000: daddiu r29, r29, -40
206// 0x00000004: .cfi_def_cfa_offset: 40
207// 0x00000004: sd r31, +32(r29)
208// 0x00000008: .cfi_offset: r31 at cfa-8
209// 0x00000008: sd r17, +24(r29)
210// 0x0000000c: .cfi_offset: r17 at cfa-16
211// 0x0000000c: sd r16, +16(r29)
212// 0x00000010: .cfi_offset: r16 at cfa-24
213// 0x00000010: sdc1 f25, +8(r29)
214// 0x00000014: .cfi_offset: r57 at cfa-32
215// 0x00000014: sdc1 f24, +0(r29)
216// 0x00000018: .cfi_offset: r56 at cfa-40
217// 0x00000018: daddiu r29, r29, -24
218// 0x0000001c: .cfi_def_cfa_offset: 64
219// 0x0000001c: sd r4, +0(r29)
220// 0x00000020: .cfi_remember_state
221// 0x00000020: daddiu r29, r29, 24
222// 0x00000024: .cfi_def_cfa_offset: 40
223// 0x00000024: ldc1 f24, +0(r29)
224// 0x00000028: .cfi_restore: r56
225// 0x00000028: ldc1 f25, +8(r29)
226// 0x0000002c: .cfi_restore: r57
227// 0x0000002c: ld r16, +16(r29)
228// 0x00000030: .cfi_restore: r16
229// 0x00000030: ld r17, +24(r29)
230// 0x00000034: .cfi_restore: r17
231// 0x00000034: ld r31, +32(r29)
232// 0x00000038: .cfi_restore: r31
233// 0x00000038: daddiu r29, r29, 40
234// 0x0000003c: .cfi_def_cfa_offset: 0
235// 0x0000003c: jr r31
236// 0x00000040: nop
237// 0x00000044: .cfi_restore_state
238// 0x00000044: .cfi_def_cfa_offset: 64
239
240static constexpr uint8_t expected_asm_kThumb2_adjust[] = {
241    0x60, 0xB5, 0x2D, 0xED, 0x02, 0x8A, 0x8B, 0xB0, 0x00, 0x90, 0x00, 0x28,
242    0x40, 0xD0, 0x00, 0x68, 0x00, 0x68, 0x00, 0x68, 0x00, 0x68, 0x00, 0x68,
243    0x00, 0x68, 0x00, 0x68, 0x00, 0x68, 0x00, 0x68, 0x00, 0x68, 0x00, 0x68,
244    0x00, 0x68, 0x00, 0x68, 0x00, 0x68, 0x00, 0x68, 0x00, 0x68, 0x00, 0x68,
245    0x00, 0x68, 0x00, 0x68, 0x00, 0x68, 0x00, 0x68, 0x00, 0x68, 0x00, 0x68,
246    0x00, 0x68, 0x00, 0x68, 0x00, 0x68, 0x00, 0x68, 0x00, 0x68, 0x00, 0x68,
247    0x00, 0x68, 0x00, 0x68, 0x00, 0x68, 0x00, 0x68, 0x00, 0x68, 0x00, 0x68,
248    0x00, 0x68, 0x00, 0x68, 0x00, 0x68, 0x00, 0x68, 0x00, 0x68, 0x00, 0x68,
249    0x00, 0x68, 0x00, 0x68, 0x00, 0x68, 0x00, 0x68, 0x00, 0x68, 0x00, 0x68,
250    0x00, 0x68, 0x00, 0x68, 0x00, 0x68, 0x00, 0x68, 0x00, 0x68, 0x00, 0x68,
251    0x00, 0x68, 0x00, 0x68, 0x00, 0x68, 0x00, 0x68, 0x00, 0x68, 0x00, 0x68,
252    0x00, 0x68, 0x00, 0x68, 0x00, 0x68, 0x00, 0x68, 0x00, 0x68, 0x00, 0x68,
253    0x0B, 0xB0, 0xBD, 0xEC, 0x02, 0x8A, 0x60, 0xBD,
254};
255static constexpr uint8_t expected_cfi_kThumb2_adjust[] = {
256    0x42, 0x0E, 0x0C, 0x85, 0x03, 0x86, 0x02, 0x8E, 0x01, 0x44, 0x0E, 0x14,
257    0x05, 0x50, 0x05, 0x05, 0x51, 0x04, 0x42, 0x0E, 0x40, 0x02, 0x88, 0x0A,
258    0x42, 0x0E, 0x14, 0x44, 0x0E, 0x0C, 0x06, 0x50, 0x06, 0x51, 0x42, 0x0B,
259    0x0E, 0x40,
260};
261// 0x00000000: push {r5, r6, lr}
262// 0x00000002: .cfi_def_cfa_offset: 12
263// 0x00000002: .cfi_offset: r5 at cfa-12
264// 0x00000002: .cfi_offset: r6 at cfa-8
265// 0x00000002: .cfi_offset: r14 at cfa-4
266// 0x00000002: vpush.f32 {s16-s17}
267// 0x00000006: .cfi_def_cfa_offset: 20
268// 0x00000006: .cfi_offset_extended: r80 at cfa-20
269// 0x00000006: .cfi_offset_extended: r81 at cfa-16
270// 0x00000006: sub sp, sp, #44
271// 0x00000008: .cfi_def_cfa_offset: 64
272// 0x00000008: str r0, [sp, #0]
273// 0x0000000a: cmp r0, #0
274// 0x0000000c: beq +128 (0x00000090)
275// 0x0000000e: ldr r0, [r0, #0]
276// 0x00000010: ldr r0, [r0, #0]
277// 0x00000012: ldr r0, [r0, #0]
278// 0x00000014: ldr r0, [r0, #0]
279// 0x00000016: ldr r0, [r0, #0]
280// 0x00000018: ldr r0, [r0, #0]
281// 0x0000001a: ldr r0, [r0, #0]
282// 0x0000001c: ldr r0, [r0, #0]
283// 0x0000001e: ldr r0, [r0, #0]
284// 0x00000020: ldr r0, [r0, #0]
285// 0x00000022: ldr r0, [r0, #0]
286// 0x00000024: ldr r0, [r0, #0]
287// 0x00000026: ldr r0, [r0, #0]
288// 0x00000028: ldr r0, [r0, #0]
289// 0x0000002a: ldr r0, [r0, #0]
290// 0x0000002c: ldr r0, [r0, #0]
291// 0x0000002e: ldr r0, [r0, #0]
292// 0x00000030: ldr r0, [r0, #0]
293// 0x00000032: ldr r0, [r0, #0]
294// 0x00000034: ldr r0, [r0, #0]
295// 0x00000036: ldr r0, [r0, #0]
296// 0x00000038: ldr r0, [r0, #0]
297// 0x0000003a: ldr r0, [r0, #0]
298// 0x0000003c: ldr r0, [r0, #0]
299// 0x0000003e: ldr r0, [r0, #0]
300// 0x00000040: ldr r0, [r0, #0]
301// 0x00000042: ldr r0, [r0, #0]
302// 0x00000044: ldr r0, [r0, #0]
303// 0x00000046: ldr r0, [r0, #0]
304// 0x00000048: ldr r0, [r0, #0]
305// 0x0000004a: ldr r0, [r0, #0]
306// 0x0000004c: ldr r0, [r0, #0]
307// 0x0000004e: ldr r0, [r0, #0]
308// 0x00000050: ldr r0, [r0, #0]
309// 0x00000052: ldr r0, [r0, #0]
310// 0x00000054: ldr r0, [r0, #0]
311// 0x00000056: ldr r0, [r0, #0]
312// 0x00000058: ldr r0, [r0, #0]
313// 0x0000005a: ldr r0, [r0, #0]
314// 0x0000005c: ldr r0, [r0, #0]
315// 0x0000005e: ldr r0, [r0, #0]
316// 0x00000060: ldr r0, [r0, #0]
317// 0x00000062: ldr r0, [r0, #0]
318// 0x00000064: ldr r0, [r0, #0]
319// 0x00000066: ldr r0, [r0, #0]
320// 0x00000068: ldr r0, [r0, #0]
321// 0x0000006a: ldr r0, [r0, #0]
322// 0x0000006c: ldr r0, [r0, #0]
323// 0x0000006e: ldr r0, [r0, #0]
324// 0x00000070: ldr r0, [r0, #0]
325// 0x00000072: ldr r0, [r0, #0]
326// 0x00000074: ldr r0, [r0, #0]
327// 0x00000076: ldr r0, [r0, #0]
328// 0x00000078: ldr r0, [r0, #0]
329// 0x0000007a: ldr r0, [r0, #0]
330// 0x0000007c: ldr r0, [r0, #0]
331// 0x0000007e: ldr r0, [r0, #0]
332// 0x00000080: ldr r0, [r0, #0]
333// 0x00000082: ldr r0, [r0, #0]
334// 0x00000084: ldr r0, [r0, #0]
335// 0x00000086: ldr r0, [r0, #0]
336// 0x00000088: ldr r0, [r0, #0]
337// 0x0000008a: ldr r0, [r0, #0]
338// 0x0000008c: ldr r0, [r0, #0]
339// 0x0000008e: ldr r0, [r0, #0]
340// 0x00000090: .cfi_remember_state
341// 0x00000090: add sp, sp, #44
342// 0x00000092: .cfi_def_cfa_offset: 20
343// 0x00000092: vpop.f32 {s16-s17}
344// 0x00000096: .cfi_def_cfa_offset: 12
345// 0x00000096: .cfi_restore_extended: r80
346// 0x00000096: .cfi_restore_extended: r81
347// 0x00000096: pop {r5, r6, pc}
348// 0x00000098: .cfi_restore_state
349// 0x00000098: .cfi_def_cfa_offset: 64
350
351static constexpr uint8_t expected_asm_kMips_adjust_head[] = {
352    0xE4, 0xFF, 0xBD, 0x27, 0x18, 0x00, 0xBF, 0xAF, 0x14, 0x00, 0xB1, 0xAF,
353    0x10, 0x00, 0xB0, 0xAF, 0x08, 0x00, 0xB6, 0xE7, 0x0C, 0x00, 0xB7, 0xE7,
354    0x00, 0x00, 0xB4, 0xE7, 0x04, 0x00, 0xB5, 0xE7, 0xDC, 0xFF, 0xBD, 0x27,
355    0x00, 0x00, 0xA4, 0xAF, 0x08, 0x00, 0x04, 0x14, 0xFC, 0xFF, 0xBD, 0x27,
356    0x00, 0x00, 0xBF, 0xAF, 0x00, 0x00, 0x10, 0x04, 0x02, 0x00, 0x01, 0x3C,
357    0x18, 0x00, 0x21, 0x34, 0x21, 0x08, 0x3F, 0x00, 0x00, 0x00, 0xBF, 0x8F,
358    0x09, 0x00, 0x20, 0x00, 0x04, 0x00, 0xBD, 0x27,
359};
360static constexpr uint8_t expected_asm_kMips_adjust_tail[] = {
361    0x24, 0x00, 0xBD, 0x27, 0x00, 0x00, 0xB4, 0xC7, 0x04, 0x00, 0xB5, 0xC7,
362    0x08, 0x00, 0xB6, 0xC7, 0x0C, 0x00, 0xB7, 0xC7, 0x10, 0x00, 0xB0, 0x8F,
363    0x14, 0x00, 0xB1, 0x8F, 0x18, 0x00, 0xBF, 0x8F, 0x1C, 0x00, 0xBD, 0x27,
364    0x09, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x00, 0x00,
365};
366static constexpr uint8_t expected_cfi_kMips_adjust[] = {
367    0x44, 0x0E, 0x1C, 0x44, 0x9F, 0x01, 0x44, 0x91, 0x02, 0x44, 0x90, 0x03,
368    0x54, 0x0E, 0x40, 0x4C, 0x0E, 0x44, 0x60, 0x0E, 0x40, 0x04, 0x04, 0x00,
369    0x02, 0x00, 0x0A, 0x44, 0x0E, 0x1C, 0x54, 0xD0, 0x44, 0xD1, 0x44, 0xDF,
370    0x44, 0x0E, 0x00, 0x48, 0x0B, 0x0E, 0x40,
371};
372// 0x00000000: addiu r29, r29, -28
373// 0x00000004: .cfi_def_cfa_offset: 28
374// 0x00000004: sw r31, +24(r29)
375// 0x00000008: .cfi_offset: r31 at cfa-4
376// 0x00000008: sw r17, +20(r29)
377// 0x0000000c: .cfi_offset: r17 at cfa-8
378// 0x0000000c: sw r16, +16(r29)
379// 0x00000010: .cfi_offset: r16 at cfa-12
380// 0x00000010: swc1 f22, +8(r29)
381// 0x00000014: swc1 f23, +12(r29)
382// 0x00000018: swc1 f20, +0(r29)
383// 0x0000001c: swc1 f21, +4(r29)
384// 0x00000020: addiu r29, r29, -36
385// 0x00000024: .cfi_def_cfa_offset: 64
386// 0x00000024: sw r4, +0(r29)
387// 0x00000028: bne r0, r4, 0x0000004c ; +36
388// 0x0000002c: addiu r29, r29, -4
389// 0x00000030: .cfi_def_cfa_offset: 68
390// 0x00000030: sw r31, +0(r29)
391// 0x00000034: bltzal r0, 0x00000038 ; +4
392// 0x00000038: lui r1, 0x20000
393// 0x0000003c: ori r1, r1, 24
394// 0x00000040: addu r1, r1, r31
395// 0x00000044: lw r31, +0(r29)
396// 0x00000048: jr r1
397// 0x0000004c: addiu r29, r29, 4
398// 0x00000050: .cfi_def_cfa_offset: 64
399// 0x00000050: nop
400//             ...
401// 0x00020050: nop
402// 0x00020054: .cfi_remember_state
403// 0x00020054: addiu r29, r29, 36
404// 0x00020058: .cfi_def_cfa_offset: 28
405// 0x00020058: lwc1 f20, +0(r29)
406// 0x0002005c: lwc1 f21, +4(r29)
407// 0x00020060: lwc1 f22, +8(r29)
408// 0x00020064: lwc1 f23, +12(r29)
409// 0x00020068: lw r16, +16(r29)
410// 0x0002006c: .cfi_restore: r16
411// 0x0002006c: lw r17, +20(r29)
412// 0x00020070: .cfi_restore: r17
413// 0x00020070: lw r31, +24(r29)
414// 0x00020074: .cfi_restore: r31
415// 0x00020074: addiu r29, r29, 28
416// 0x00020078: .cfi_def_cfa_offset: 0
417// 0x00020078: jr r31
418// 0x0002007c: nop
419// 0x00020080: .cfi_restore_state
420// 0x00020080: .cfi_def_cfa_offset: 64
421
422static constexpr uint8_t expected_asm_kMips64_adjust_head[] = {
423    0xD8, 0xFF, 0xBD, 0x67, 0x20, 0x00, 0xBF, 0xFF, 0x18, 0x00, 0xB1, 0xFF,
424    0x10, 0x00, 0xB0, 0xFF, 0x08, 0x00, 0xB9, 0xF7, 0x00, 0x00, 0xB8, 0xF7,
425    0xE8, 0xFF, 0xBD, 0x67, 0x00, 0x00, 0xA4, 0xFF, 0x02, 0x00, 0xA6, 0x60,
426    0x02, 0x00, 0x3E, 0xEC, 0x0C, 0x00, 0x01, 0xD8,
427};
428static constexpr uint8_t expected_asm_kMips64_adjust_tail[] = {
429    0x18, 0x00, 0xBD, 0x67, 0x00, 0x00, 0xB8, 0xD7, 0x08, 0x00, 0xB9, 0xD7,
430    0x10, 0x00, 0xB0, 0xDF, 0x18, 0x00, 0xB1, 0xDF, 0x20, 0x00, 0xBF, 0xDF,
431    0x28, 0x00, 0xBD, 0x67, 0x09, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x00, 0x00,
432};
433static constexpr uint8_t expected_cfi_kMips64_adjust[] = {
434    0x44, 0x0E, 0x28, 0x44, 0x9F, 0x02, 0x44, 0x91, 0x04, 0x44, 0x90, 0x06,
435    0x44, 0xB9, 0x08, 0x44, 0xB8, 0x0A, 0x44, 0x0E, 0x40, 0x04, 0x14, 0x00,
436    0x02, 0x00, 0x0A, 0x44, 0x0E, 0x28, 0x44, 0xF8, 0x44, 0xF9, 0x44, 0xD0,
437    0x44, 0xD1, 0x44, 0xDF, 0x44, 0x0E, 0x00, 0x48, 0x0B, 0x0E, 0x40,
438};
439// 0x00000000: daddiu r29, r29, -40
440// 0x00000004: .cfi_def_cfa_offset: 40
441// 0x00000004: sd r31, +32(r29)
442// 0x00000008: .cfi_offset: r31 at cfa-8
443// 0x00000008: sd r17, +24(r29)
444// 0x0000000c: .cfi_offset: r17 at cfa-16
445// 0x0000000c: sd r16, +16(r29)
446// 0x00000010: .cfi_offset: r16 at cfa-24
447// 0x00000010: sdc1 f25, +8(r29)
448// 0x00000014: .cfi_offset: r57 at cfa-32
449// 0x00000014: sdc1 f24, +0(r29)
450// 0x00000018: .cfi_offset: r56 at cfa-40
451// 0x00000018: daddiu r29, r29, -24
452// 0x0000001c: .cfi_def_cfa_offset: 64
453// 0x0000001c: sd r4, +0(r29)
454// 0x00000020: bnec r5, r6, 0x0000002c ; +12
455// 0x00000024: auipc r1, 2
456// 0x00000028: jic r1, 12 ; b 0x00020030 ; +131080
457// 0x0000002c: nop
458//             ...
459// 0x0002002c: nop
460// 0x00020030: .cfi_remember_state
461// 0x00020030: daddiu r29, r29, 24
462// 0x00020034: .cfi_def_cfa_offset: 40
463// 0x00020034: ldc1 f24, +0(r29)
464// 0x00020038: .cfi_restore: r56
465// 0x00020038: ldc1 f25, +8(r29)
466// 0x0002003c: .cfi_restore: r57
467// 0x0002003c: ld r16, +16(r29)
468// 0x00020040: .cfi_restore: r16
469// 0x00020040: ld r17, +24(r29)
470// 0x00020044: .cfi_restore: r17
471// 0x00020044: ld r31, +32(r29)
472// 0x00020048: .cfi_restore: r31
473// 0x00020048: daddiu r29, r29, 40
474// 0x0002004c: .cfi_def_cfa_offset: 0
475// 0x0002004c: jr r31
476// 0x00020050: nop
477// 0x00020054: .cfi_restore_state
478// 0x00020054: .cfi_def_cfa_offset: 64
479