26#define WIN32_NO_STATUS
45static BOOLEAN (
CDECL *pRtlDeleteFunctionTable)(RUNTIME_FUNCTION*);
48static void (
WINAPI *pRtlDeleteGrowableFunctionTable)(
void*);
49static NTSTATUS (
WINAPI *pRtlVirtualUnwind2)(
ULONG,
ULONG_PTR,
ULONG_PTR,RUNTIME_FUNCTION*,
CONTEXT*,
BOOLEAN*,
void**,
ULONG_PTR*,KNONVOLATILE_CONTEXT_POINTERS*,
ULONG_PTR*,
ULONG_PTR*,
PEXCEPTION_ROUTINE*,
ULONG);
54#define UWOP_TWOBYTES(x) (((x) >> 8) & 0xff), ((x) & 0xff)
55#define UWOP_THREEBYTES(x) (((x) >> 16) & 0xff), (((x) >> 8) & 0xff), ((x) & 0xff)
56#define UWOP_FOURBYTES(x) (((x) >> 24) & 0xff), (((x) >> 16) & 0xff), (((x) >> 8) & 0xff), ((x) & 0xff)
58#define UWOP_ALLOC_SMALL(size) (0x00 | (size/4))
59#define UWOP_SAVE_REGSW(regmask) UWOP_TWOBYTES((0x80 << 8) | (regmask))
60#define UWOP_SET_FP(reg) (0xC0 | reg)
61#define UWOP_SAVE_RANGE_4_7_LR(reg,lr) (0xD0 | (reg - 4) | ((lr) ? 0x04 : 0))
62#define UWOP_SAVE_RANGE_4_11_LR(reg,lr)(0xD8 | (reg - 8) | ((lr) ? 0x04 : 0))
63#define UWOP_SAVE_D8_RANGE(reg) (0xE0 | (reg - 8))
64#define UWOP_ALLOC_MEDIUMW(size) UWOP_TWOBYTES((0xE8 << 8) | (size/4))
65#define UWOP_SAVE_REGS(regmask) UWOP_TWOBYTES((0xEC << 8) | ((regmask) & 0xFF) | (((regmask) & (1<<lr)) ? 0x100 : 0))
66#define UWOP_SAVE_LR(offset) UWOP_TWOBYTES((0xEF << 8) | (offset/4))
67#define UWOP_SAVE_D0_RANGE(first,last) UWOP_TWOBYTES((0xF5 << 8) | (first << 4) | (last))
68#define UWOP_SAVE_D16_RANGE(first,last)UWOP_TWOBYTES((0xF6 << 8) | ((first - 16) << 4) | (last - 16))
69#define UWOP_ALLOC_LARGE(size) UWOP_THREEBYTES((0xF7 << 16) | (size/4))
70#define UWOP_ALLOC_HUGE(size) UWOP_FOURBYTES((0xF8u << 24) | (size/4))
71#define UWOP_ALLOC_LARGEW(size) UWOP_THREEBYTES((0xF9 << 16) | (size/4))
72#define UWOP_ALLOC_HUGEW(size) UWOP_FOURBYTES((0xFAu << 24) | (size/4))
73#define UWOP_MSFT_OP_MACHINE_FRAME 0xEE,0x01
74#define UWOP_MSFT_OP_CONTEXT 0xEE,0x02
75#define UWOP_NOP16 0xFB
76#define UWOP_NOP32 0xFC
77#define UWOP_END_NOP16 0xFD
78#define UWOP_END_NOP32 0xFE
98 const struct results_arm *
results;
99 unsigned int nb_results;
105 r0,
r1,
r2,
r3, r4, r5, r6, r7,
106 r8, r9, r10, r11, r12, lr,
sp,
107 d0, d1, d2, d3, d4, d5, d6, d7,
108 d8, d9, d10, d11, d12, d13, d14, d15,
109 d16, d17, d18, d19, d20, d21, d22, d23,
110 d24, d25, d26, d27, d28, d29, d30, d31,
113static const char *
const reg_names_arm[47] =
115 "r0",
"r1",
"r2",
"r3",
"r4",
"r5",
"r6",
"r7",
116 "r8",
"r9",
"r10",
"r11",
"r12",
"lr",
"sp",
117 "d0",
"d1",
"d2",
"d3",
"d4",
"d5",
"d6",
"d7",
118 "d8",
"d9",
"d10",
"d11",
"d12",
"d13",
"d14",
"d15",
119 "d16",
"d17",
"d18",
"d19",
"d20",
"d21",
"d22",
"d23",
120 "d24",
"d25",
"d26",
"d27",
"d28",
"d29",
"d30",
"d31",
123#define ORIG_LR 0xCCCCCCCC
125static void call_virtual_unwind_arm(
int testnum,
const struct unwind_test_arm *
test )
127 static const int code_offset = 1024;
128 static const int unwind_offset = 2048;
133 RUNTIME_FUNCTION runtime_func;
134 KNONVOLATILE_CONTEXT_POINTERS ctx_ptr;
136 ULONG fake_stack[256];
137 ULONG_PTR frame, orig_pc, orig_fp, unset_reg;
142 if (
test->unwind_info)
145 runtime_func.BeginAddress = code_offset;
146 if (
test->unwind_size)
147 runtime_func.UnwindData = unwind_offset;
149 memcpy(&runtime_func.UnwindData,
test->unwind_info, 4);
152 for (
i = 0;
i <
test->nb_results;
i++)
154 memset( &ctx_ptr, 0,
sizeof(ctx_ptr) );
156 memset( &unset_reg, 0x55,
sizeof(unset_reg) );
157 memset( &unset_reg64, 0x55,
sizeof(unset_reg64) );
158 for (
j = 0;
j < 256;
j++) fake_stack[
j] =
j * 4;
167 (
void *)orig_pc, *(
UINT *)orig_pc, (
void *)orig_fp, (
void *)
context.Sp );
169 if (
test->results[
i].handler == -2) orig_pc =
context.Lr;
171 if (pRtlVirtualUnwind2)
176 data = (
void *)0xdeadbeef;
179 test->unwind_info ? &runtime_func :
NULL, &new_context,
181 if (
test->results[
i].handler > 0)
189 else if (
test->results[
i].handler < -1)
193 ok(
data == (
void *)0xdeadbeef,
"handler data set to %p\n",
data );
203 data = (
void *)0xdeadbeef;
206 test->unwind_info ? &runtime_func :
NULL,
208 if (
test->results[
i].handler > 0)
218 ok(
data == (
test->results[
i].handler < -1 ? (
void *)0xdeadbeef :
NULL),
220 (
test->results[
i].handler < 0 ? (
void *)0xdeadbeef :
NULL) );
225 ok( frame == (
test->results[
i].frame_offset ? (
ULONG)fake_stack : 0) +
test->results[
i].frame,
"%u/%u: wrong frame %x/%x\n",
226 testnum,
i, (
int)((
char *)frame - (
char *)(
test->results[
i].frame_offset ? fake_stack :
NULL)),
test->results[
i].frame );
228 for (
j = 0;
j < 47;
j++)
230 for (
k = 0;
k < nb_regs;
k++)
232 if (
test->results[
i].regs[
k][0] == -1)
237 if (
test->results[
i].regs[
k][0] ==
j)
break;
240 if (
j >= 4 &&
j <= 11 && (&ctx_ptr.R4)[
j - 4])
242 ok(
k < nb_regs,
"%u/%u: register %s should not be set to %lx\n",
246 "%u/%u: register %s wrong %p/%x\n",
249 else if (
j == lr && ctx_ptr.Lr)
251 ok(
k < nb_regs,
"%u/%u: register %s should not be set to %lx\n",
255 "%u/%u: register %s wrong %p/%x\n",
262 "%u/%u: register %s wrong %p/%x\n",
264 else if (
test->results[
i].frame == 0xdeadbeef)
265 ok( (
void *)
context.Sp == fake_stack,
"%u/%u: wrong sp %p/%p\n",
268 ok(
context.Sp == frame,
"%u/%u: wrong sp %p/%p\n",
271 else if (
j >= d8 &&
j <= d15 && (&ctx_ptr.D8)[
j - d8])
273 ok(
k < nb_regs,
"%u/%u: register %s should not be set to %llx\n",
277 "%u/%u: register %s wrong %llx/%llx\n",
280 else if (
k < nb_regs)
284 "%u/%u: register %s wrong %p/%x\n",
288 "%u/%u: register %s wrong %p/%x\n",
292 "%u/%u: register %s wrong %llx/%llx\n",
297 ok(
k == nb_regs,
"%u/%u: register %s should be set\n",
testnum,
i, reg_names_arm[
j] );
299 ok(
context.Lr == ORIG_LR,
"%u/%u: register lr wrong %p/unset\n",
302 ok(
context.R11 == orig_fp,
"%u/%u: register fp wrong %p/unset\n",
306 "%u/%u: register %s wrong %p/unset\n",
310 "%u/%u: register %s wrong %llx/unset\n",
317#define DW(dword) ((dword >> 0) & 0xff), ((dword >> 8) & 0xff), ((dword >> 16) & 0xff), ((dword >> 24) & 0xff)
319static void test_virtual_unwind_arm(
void)
322 static const BYTE function_0[] =
326 0x2d, 0xed, 0x06, 0x8b,
328 0x2d, 0xed, 0x06, 0x3b,
329 0xaf, 0x3f, 0x00, 0x80,
330 0x6d, 0xed, 0x06, 0x1b,
331 0x2d, 0xe9, 0x00, 0x15,
334 0xbd, 0xec, 0x06, 0x8b,
340 static const DWORD unwind_info_0_header =
341 (
sizeof(function_0)/2) |
347 static const DWORD unwind_info_0_epilog0 =
352 static const BYTE unwind_info_0[] =
354 DW(unwind_info_0_header),
355 DW(unwind_info_0_epilog0),
358 UWOP_SAVE_REGSW((1<<r8)|(1<<r10)|(1<<r12)),
359 UWOP_SAVE_D16_RANGE(17,19),
361 UWOP_SAVE_D0_RANGE(3,5),
363 UWOP_SAVE_D8_RANGE(10),
365 UWOP_SAVE_RANGE_4_7_LR(6, 1),
368 UWOP_SAVE_D8_RANGE(10),
371 UWOP_SAVE_RANGE_4_7_LR(6, 1),
375 0x00, 0x02, 0x00, 0x00,
376 0x05, 0x06, 0x07, 0x08,
379 static const struct results_arm results_0[] =
382 { 0x00, 0x10, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
383 { 0x02, 0x10, 0, 0x0c, 0x010,
TRUE, { {r4,0x00}, {r5,0x04}, {r6,0x08}, {lr,0x0c}, {-1,-1} }},
384 { 0x04, 0x10, 0, 0x2c, 0x030,
TRUE, { {r4,0x20}, {r5,0x24}, {r6,0x28}, {lr,0x2c}, {-1,-1} }},
385 { 0x08, 0x10, 0, 0x44, 0x048,
TRUE, { {r4,0x38}, {r5,0x3c}, {r6,0x40}, {lr,0x44}, {d8, 0x400000000}, {d9, 0xc00000008}, {d10, 0x1400000010}, {-1,-1} }},
386 { 0x0a, 0x10, 0, 0x44, 0x048,
TRUE, { {r4,0x38}, {r5,0x3c}, {r6,0x40}, {lr,0x44}, {d8, 0x400000000}, {d9, 0xc00000008}, {d10, 0x1400000010}, {-1,-1} }},
387 { 0x0e, 0x10, 0, 0x5c, 0x060,
TRUE, { {r4,0x50}, {r5,0x54}, {r6,0x58}, {lr,0x5c}, {d8, 0x1c00000018}, {d9, 0x2400000020}, {d10, 0x2c00000028}, {d3, 0x400000000}, {d4, 0xc00000008}, {d5, 0x1400000010}, {-1,-1} }},
388 { 0x12, 0x10, 0, 0x5c, 0x060,
TRUE, { {r4,0x50}, {r5,0x54}, {r6,0x58}, {lr,0x5c}, {d8, 0x1c00000018}, {d9, 0x2400000020}, {d10, 0x2c00000028}, {d3, 0x400000000}, {d4, 0xc00000008}, {d5, 0x1400000010}, {-1,-1} }},
389 { 0x16, 0x10, 0, 0x74, 0x078,
TRUE, { {r4,0x68}, {r5,0x6c}, {r6,0x70}, {lr,0x74}, {d8, 0x3400000030}, {d9, 0x3c00000038}, {d10, 0x4400000040}, {d3, 0x1c00000018}, {d4, 0x2400000020}, {d5, 0x2c00000028}, {d17, 0x400000000}, {d18, 0xc00000008}, {d19, 0x1400000010}, {-1,-1} }},
390 { 0x1a, 0x10, 0, 0x80, 0x084,
TRUE, { {r4,0x74}, {r5,0x78}, {r6,0x7c}, {lr,0x80}, {d8, 0x400000003c}, {d9, 0x4800000044}, {d10, 0x500000004c}, {d3, 0x2800000024}, {d4, 0x300000002c}, {d5, 0x3800000034}, {d17, 0x100000000c}, {d18, 0x1800000014}, {d19, 0x200000001c}, {r8,0x00}, {r10,0x04}, {r12,0x08}, {-1,-1} }},
391 { 0x1c, 0x10, 1, 0x90, 0x094,
TRUE, { {r4,0x84}, {r5,0x88}, {r6,0x8c}, {lr,0x90}, {d8, 0x500000004c}, {d9, 0x5800000054}, {d10, 0x600000005c}, {d3, 0x3800000034}, {d4, 0x400000003c}, {d5, 0x4800000044}, {d17, 0x200000001c}, {d18, 0x2800000024}, {d19, 0x300000002c}, {r8,0x10}, {r10,0x14}, {r12,0x18}, {-1,-1} }},
392 { 0x1e, 0x10, 0, 0x3c, 0x040,
TRUE, { {r4,0x30}, {r5,0x34}, {r6,0x38}, {lr,0x3c}, {d8, 0x400000000}, {d9, 0xc00000008}, {d10, 0x1400000010}, {-1,-1} }},
393 { 0x22, 0x10, 0, 0x3c, 0x040,
TRUE, { {r4,0x30}, {r5,0x34}, {r6,0x38}, {lr,0x3c}, {-1,-1} }},
394 { 0x24, 0x10, 0, 0x2c, 0x030,
TRUE, { {r4,0x20}, {r5,0x24}, {r6,0x28}, {lr,0x2c}, {-1,-1} }},
395 { 0x26, 0x10, 0, 0x0c, 0x010,
TRUE, { {r4,0x00}, {r5,0x04}, {r6,0x08}, {lr,0x0c}, {-1,-1} }},
398 static const BYTE function_1[] =
401 0x4d, 0xf8, 0x20, 0xed,
403 0x5d, 0xf8, 0x20, 0xeb,
408 static const DWORD unwind_info_1_header =
409 (
sizeof(function_1)/2) |
415 static const DWORD unwind_info_1_header2 =
418 static const DWORD unwind_info_1_epilog0 =
423 static const BYTE unwind_info_1[] = {
424 DW(unwind_info_1_header),
425 DW(unwind_info_1_header2),
426 DW(unwind_info_1_epilog0),
429 UWOP_SAVE_RANGE_4_7_LR(5, 0),
433 UWOP_SAVE_RANGE_4_7_LR(5, 0),
437 static const struct results_arm results_1[] =
440 { 0x00, 0x00, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
441 { 0x02, 0x00, 0, ORIG_LR, 0x008,
TRUE, { {r4,0x00}, {r5,0x04}, {-1,-1} }},
442 { 0x06, 0x00, 0, 0x00, 0x028,
TRUE, { {r4,0x20}, {r5,0x24}, {lr,0x00}, {-1,-1} }},
443 { 0x08, 0x00, 0, 0x00, 0x028,
TRUE, { {r4,0x20}, {r5,0x24}, {lr,0x00}, {-1,-1} }},
444 { 0x0c, 0x00, 0, ORIG_LR, 0x008,
TRUE, { {r4,0x00}, {r5,0x04}, {-1,-1} }},
445 { 0x0e, 0x00, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
448 static const BYTE function_2[] =
457 0x00, 0xf0, 0x00, 0xb8,
460 static const DWORD unwind_info_2_header =
461 (
sizeof(function_2)/2) |
468 static const BYTE unwind_info_2[] =
470 DW(unwind_info_2_header),
473 UWOP_SAVE_REGS((1<<r7)),
478 static const struct results_arm results_2[] =
481 { 0x00, 0x00, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
482 { 0x02, 0x00, 0, ORIG_LR, 0x55555555,
FALSE, { {-1,-1} }},
483 { 0x04, 0x00, 0, ORIG_LR, 0x000,
FALSE, { {r7,0x00}, {-1,-1} }},
484 { 0x06, 0x00, 0, ORIG_LR, 0x010,
FALSE, { {r7,0x10}, {-1,-1} }},
485 { 0x08, 0x00, 0, ORIG_LR, 0x010,
FALSE, { {r7,0x10}, {-1,-1} }},
486 { 0x0a, 0x00, 0, ORIG_LR, 0x000,
FALSE, { {r7,0x00}, {-1,-1} }},
487 { 0x0c, 0x00, 0, ORIG_LR, 0x55555555,
FALSE, { {-1,-1} }},
488 { 0x0e, 0x00, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
491 static const BYTE function_3[] =
493 0xaf, 0x3f, 0x00, 0x80,
497 0xbd, 0xe8, 0xf0, 0x8f,
501 static const DWORD unwind_info_3_header =
502 (
sizeof(function_3)/2) |
509 static const BYTE unwind_info_3[] =
511 DW(unwind_info_3_header),
514 UWOP_SAVE_RANGE_4_11_LR(11, 1),
518 static const struct results_arm results_3[] =
521 { 0x00, 0x00, 0, 0x30, 0x034,
TRUE, { {r4,0x10}, {r5,0x14}, {r6,0x18}, {r7,0x1c}, {r8,0x20}, {r9,0x24}, {r10,0x28}, {r11,0x2c}, {lr,0x30}, {-1,-1} }},
522 { 0x04, 0x00, 0, 0x30, 0x034,
TRUE, { {r4,0x10}, {r5,0x14}, {r6,0x18}, {r7,0x1c}, {r8,0x20}, {r9,0x24}, {r10,0x28}, {r11,0x2c}, {lr,0x30}, {-1,-1} }},
523 { 0x06, 0x00, 0, 0x30, 0x034,
TRUE, { {r4,0x10}, {r5,0x14}, {r6,0x18}, {r7,0x1c}, {r8,0x20}, {r9,0x24}, {r10,0x28}, {r11,0x2c}, {lr,0x30}, {-1,-1} }},
524 { 0x08, 0x00, 0, 0x30, 0x034,
TRUE, { {r4,0x10}, {r5,0x14}, {r6,0x18}, {r7,0x1c}, {r8,0x20}, {r9,0x24}, {r10,0x28}, {r11,0x2c}, {lr,0x30}, {-1,-1} }},
525 { 0x0a, 0x00, 0, 0x20, 0x024,
TRUE, { {r4,0x00}, {r5,0x04}, {r6,0x08}, {r7,0x0c}, {r8,0x10}, {r9,0x14}, {r10,0x18}, {r11,0x1c}, {lr,0x20}, {-1,-1} }},
528 static const BYTE function_4[] =
530 0x2d, 0xe9, 0x00, 0x55,
534 0xbd, 0xe8, 0x00, 0x95,
537 static const DWORD unwind_info_4_header =
538 (
sizeof(function_4)/2) |
545 static const BYTE unwind_info_4[] =
547 DW(unwind_info_4_header),
549 UWOP_SAVE_REGS((1<<r4)|(1<<r6)),
550 UWOP_SAVE_REGSW((1<<r8)|(1<<r10)|(1<<r12)|(1<<lr)),
554 static const struct results_arm results_4[] =
557 { 0x00, 0x10, 0, ORIG_LR, 0x00000,
TRUE, { {-1,-1} }},
558 { 0x04, 0x10, 0, 0x0c, 0x00010,
TRUE, { {r8,0x00}, {r10,0x04}, {r12,0x08}, {lr,0x0c}, {-1,-1} }},
559 { 0x06, 0x10, 0, 0x14, 0x00018,
TRUE, { {r8,0x08}, {r10,0x0c}, {r12,0x10}, {lr,0x14}, {r4,0x00}, {r6,0x04}, {-1,-1} }},
560 { 0x08, 0x10, 0, 0x14, 0x00018,
TRUE, { {r8,0x08}, {r10,0x0c}, {r12,0x10}, {lr,0x14}, {r4,0x00}, {r6,0x04}, {-1,-1} }},
561 { 0x0a, 0x10, 0, 0x0c, 0x00010,
TRUE, { {r8,0x00}, {r10,0x04}, {r12,0x08}, {lr,0x0c}, {-1,-1} }},
564 static const BYTE function_5[] =
567 0xad, 0xf2, 0x08, 0x0d,
570 0xad, 0xf2, 0x40, 0x0d,
571 0xad, 0xf2, 0x80, 0x0d,
576 static const DWORD unwind_info_5_header =
577 (
sizeof(function_5)/2) |
584 static const BYTE unwind_info_5[] =
586 DW(unwind_info_5_header),
588 UWOP_ALLOC_HUGEW(128),
589 UWOP_ALLOC_LARGEW(64),
592 UWOP_ALLOC_MEDIUMW(8),
593 UWOP_SAVE_REGS((1<<r4)|(1<<r6)|(1<<lr)),
597 static const struct results_arm results_5[] =
600 { 0x00, 0x00, 0, ORIG_LR, 0x00000,
TRUE, { {-1,-1} }},
601 { 0x02, 0x00, 0, 0x008, 0x0000c,
TRUE, { {r4,0x00}, {r6,0x04}, {lr,0x08}, {-1,-1} }},
602 { 0x06, 0x00, 0, 0x010, 0x00014,
TRUE, { {r4,0x08}, {r6,0x0c}, {lr,0x10}, {-1,-1} }},
603 { 0x08, 0x00, 0, 0x020, 0x00024,
TRUE, { {r4,0x18}, {r6,0x1c}, {lr,0x20}, {-1,-1} }},
604 { 0x0a, 0x00, 0, 0x040, 0x00044,
TRUE, { {r4,0x38}, {r6,0x3c}, {lr,0x40}, {-1,-1} }},
605 { 0x0e, 0x00, 0, 0x080, 0x00084,
TRUE, { {r4,0x78}, {r6,0x7c}, {lr,0x80}, {-1,-1} }},
606 { 0x12, 0x00, 0, 0x100, 0x00104,
TRUE, { {r4,0xf8}, {r6,0xfc}, {lr,0x100}, {-1,-1} }},
607 { 0x14, 0x00, 0, 0x008, 0x0000c,
TRUE, { {r4,0x00}, {r6,0x04}, {lr,0x08}, {-1,-1} }},
610 static const BYTE function_6[] =
618 static const DWORD unwind_info_6_packed =
620 (
sizeof(function_6)/2 << 2) |
629 static const BYTE unwind_info_6[] = { DW(unwind_info_6_packed) };
631 static const struct results_arm results_6[] =
634 { 0x00, 0x00, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
635 { 0x02, 0x00, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
636 { 0x04, 0x00, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
637 { 0x06, 0x00, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
640 static const BYTE function_7[] =
648 static const DWORD unwind_info_7_packed =
650 (
sizeof(function_7)/2 << 2) |
659 static const BYTE unwind_info_7[] = { DW(unwind_info_7_packed) };
661 static const struct results_arm results_7[] =
664 { 0x00, 0x00, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
665 { 0x02, 0x00, 0, ORIG_LR, 0x004,
TRUE, { {r4,0x00}, {-1,-1} }},
666 { 0x04, 0x00, 0, ORIG_LR, 0x004,
TRUE, { {r4,0x00}, {-1,-1} }},
667 { 0x06, 0x00, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
670 static const BYTE function_8[] =
674 0xbd, 0xe8, 0x10, 0x40,
678 static const DWORD unwind_info_8_packed =
680 (
sizeof(function_8)/2 << 2) |
689 static const BYTE unwind_info_8[] = { DW(unwind_info_8_packed) };
691 static const struct results_arm results_8[] =
694 { 0x00, 0x00, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
695 { 0x02, 0x00, 0, 0x004, 0x008,
TRUE, { {r4,0x00}, {lr,0x04}, {-1,-1} }},
696 { 0x04, 0x00, 0, 0x004, 0x008,
TRUE, { {r4,0x00}, {lr,0x04}, {-1,-1} }},
697 { 0x06, 0x00, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
698 { 0x08, 0x00, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
701 static const BYTE function_9[] =
704 0x2d, 0xed, 0x02, 0x8b,
708 0xbd, 0xec, 0x02, 0x8b,
709 0x5d, 0xf8, 0x04, 0xeb,
710 0x00, 0xf0, 0x00, 0xb8,
713 static const DWORD unwind_info_9_packed =
715 (
sizeof(function_9)/2 << 2) |
724 static const BYTE unwind_info_9[] = { DW(unwind_info_9_packed) };
726 static const struct results_arm results_9[] =
729 { 0x00, 0x00, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
730 { 0x02, 0x00, 0, 0x00, 0x004,
TRUE, { {lr,0x00}, {-1,-1} }},
731 { 0x06, 0x00, 0, 0x08, 0x00c,
TRUE, { {lr,0x08}, {d8,0x400000000}, {-1,-1} }},
732 { 0x08, 0x00, 0, 0x28, 0x02c,
TRUE, { {lr,0x28}, {d8,0x2400000020}, {-1,-1} }},
733 { 0x0a, 0x00, 0, 0x28, 0x02c,
TRUE, { {lr,0x28}, {d8,0x2400000020}, {-1,-1} }},
736 { 0x0c, 0x00, 0, ORIG_LR, 0x008,
TRUE, { {d8,0x400000000}, {-1,-1} }},
737 { 0x10, 0x00, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
739 { 0x14, 0x00, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
742 static const BYTE function_10[] =
744 0x2d, 0xe9, 0x00, 0x48,
746 0x2d, 0xed, 0x04, 0x8b,
750 0xbd, 0xec, 0x04, 0x8b,
751 0xbd, 0xe8, 0x00, 0x48,
755 static const DWORD unwind_info_10_packed =
757 (
sizeof(function_10)/2 << 2) |
766 static const BYTE unwind_info_10[] = { DW(unwind_info_10_packed) };
768 static const struct results_arm results_10[] =
771 { 0x00, 0x00, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
772 { 0x04, 0x00, 0, 0x04, 0x008,
TRUE, { {r11,0x00}, {lr,0x04}, {-1,-1} }},
773 { 0x06, 0x00, 0, 0x04, 0x008,
TRUE, { {r11,0x00}, {lr,0x04}, {-1,-1} }},
774 { 0x0a, 0x00, 0, 0x14, 0x018,
TRUE, { {r11,0x10}, {lr,0x14}, {d8,0x400000000}, {d9,0xc00000008}, {-1,-1} }},
775 { 0x0c, 0x00, 0, 0x24, 0x028,
TRUE, { {r11,0x20}, {lr,0x24}, {d8,0x1400000010}, {d9,0x1c00000018}, {-1,-1} }},
776 { 0x0e, 0x00, 0, 0x24, 0x028,
TRUE, { {r11,0x20}, {lr,0x24}, {d8,0x1400000010}, {d9,0x1c00000018}, {-1,-1} }},
779 { 0x10, 0x00, 0, 0x14, 0x018,
TRUE, { {r11,0x10}, {lr,0x14}, {d8,0x400000000}, {d9,0xc00000008}, {-1,-1} }},
780 { 0x14, 0x00, 0, 0x04, 0x008,
TRUE, { {r11,0x00}, {lr,0x04}, {-1,-1} }},
782 { 0x18, 0x00, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
785 static const BYTE function_11[] =
787 0x2d, 0xe9, 0x00, 0x48,
789 0x2d, 0xed, 0x04, 0x8b,
793 0xbd, 0xec, 0x04, 0x8b,
794 0xbd, 0xe8, 0x00, 0x88,
797 static const DWORD unwind_info_11_packed =
799 (
sizeof(function_11)/2 << 2) |
808 static const BYTE unwind_info_11[] = { DW(unwind_info_11_packed) };
810 static const struct results_arm results_11[] =
813 { 0x00, 0x00, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
814 { 0x04, 0x00, 0, 0x04, 0x008,
TRUE, { {r11,0x00}, {lr,0x04}, {-1,-1} }},
815 { 0x06, 0x00, 0, 0x04, 0x008,
TRUE, { {r11,0x00}, {lr,0x04}, {-1,-1} }},
816 { 0x0a, 0x00, 0, 0x14, 0x018,
TRUE, { {r11,0x10}, {lr,0x14}, {d8,0x400000000}, {d9,0xc00000008}, {-1,-1} }},
817 { 0x0c, 0x00, 0, 0x24, 0x028,
TRUE, { {r11,0x20}, {lr,0x24}, {d8,0x1400000010}, {d9,0x1c00000018}, {-1,-1} }},
818 { 0x0e, 0x00, 0, 0x24, 0x028,
TRUE, { {r11,0x20}, {lr,0x24}, {d8,0x1400000010}, {d9,0x1c00000018}, {-1,-1} }},
819 { 0x10, 0x00, 0, 0x14, 0x018,
TRUE, { {r11,0x10}, {lr,0x14}, {d8,0x400000000}, {d9,0xc00000008}, {-1,-1} }},
820 { 0x14, 0x00, 0, 0x04, 0x008,
TRUE, { {r11,0x00}, {lr,0x04}, {-1,-1} }},
823 static const BYTE function_12[] =
825 0x2d, 0xed, 0x0e, 0x8b,
829 0xbd, 0xec, 0x0e, 0x8b,
830 0x00, 0xf0, 0x00, 0xb8,
833 static const DWORD unwind_info_12_packed =
835 (
sizeof(function_12)/2 << 2) |
844 static const BYTE unwind_info_12[] = { DW(unwind_info_12_packed) };
846 static const struct results_arm results_12[] =
849 { 0x00, 0x10, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
850 { 0x04, 0x00, 0, ORIG_LR, 0x038,
TRUE, { {d8,0x400000000}, {d9,0xc00000008}, {d10,0x1400000010}, {d11,0x1c00000018}, {d12,0x2400000020}, {d13,0x2c00000028}, {d14,0x3400000030}, {-1,-1} }},
851 { 0x06, 0x00, 0, ORIG_LR, 0x048,
TRUE, { {d8,0x1400000010}, {d9,0x1c00000018}, {d10,0x2400000020}, {d11,0x2c00000028}, {d12,0x3400000030}, {d13,0x3c00000038}, {d14,0x4400000040}, {-1,-1} }},
852 { 0x08, 0x00, 0, ORIG_LR, 0x048,
TRUE, { {d8,0x1400000010}, {d9,0x1c00000018}, {d10,0x2400000020}, {d11,0x2c00000028}, {d12,0x3400000030}, {d13,0x3c00000038}, {d14,0x4400000040}, {-1,-1} }},
853 { 0x0a, 0x00, 0, ORIG_LR, 0x038,
TRUE, { {d8,0x400000000}, {d9,0xc00000008}, {d10,0x1400000010}, {d11,0x1c00000018}, {d12,0x2400000020}, {d13,0x2c00000028}, {d14,0x3400000030}, {-1,-1} }},
854 { 0x0e, 0x10, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
857 static const BYTE function_13[] =
859 0x2d, 0xe9, 0xf0, 0x4f,
860 0x0d, 0xf1, 0x1c, 0x0b,
864 0x2d, 0xe8, 0xf0, 0x8f,
867 static const DWORD unwind_info_13_packed =
869 (
sizeof(function_13)/2 << 2) |
878 static const BYTE unwind_info_13[] = { DW(unwind_info_13_packed) };
880 static const struct results_arm results_13[] =
883 { 0x00, 0x10, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
884 { 0x04, 0x10, 0, 0x20, 0x024,
TRUE, { {r4,0x00}, {r5,0x04}, {r6,0x08}, {r7,0x0c}, {r8,0x10}, {r9,0x14}, {r10,0x18}, {r11,0x1c}, {lr,0x20}, {-1,-1} }},
885 { 0x08, 0x10, 0, 0x20, 0x024,
TRUE, { {r4,0x00}, {r5,0x04}, {r6,0x08}, {r7,0x0c}, {r8,0x10}, {r9,0x14}, {r10,0x18}, {r11,0x1c}, {lr,0x20}, {-1,-1} }},
886 { 0x0a, 0x10, 0, 0x34, 0x038,
TRUE, { {r4,0x14}, {r5,0x18}, {r6,0x1c}, {r7,0x20}, {r8,0x24}, {r9,0x28}, {r10,0x2c}, {r11,0x30}, {lr,0x34}, {-1,-1} }},
887 { 0x0c, 0x10, 0, 0x34, 0x038,
TRUE, { {r4,0x14}, {r5,0x18}, {r6,0x1c}, {r7,0x20}, {r8,0x24}, {r9,0x28}, {r10,0x2c}, {r11,0x30}, {lr,0x34}, {-1,-1} }},
888 { 0x0e, 0x10, 0, 0x20, 0x024,
TRUE, { {r4,0x00}, {r5,0x04}, {r6,0x08}, {r7,0x0c}, {r8,0x10}, {r9,0x14}, {r10,0x18}, {r11,0x1c}, {lr,0x20}, {-1,-1} }},
891 static const BYTE function_14[] =
893 0x2d, 0xe9, 0xf0, 0x4f,
897 0x2d, 0xe8, 0xf0, 0x8f,
900 static const DWORD unwind_info_14_packed =
902 (
sizeof(function_14)/2 << 2) |
911 static const BYTE unwind_info_14[] = { DW(unwind_info_14_packed) };
913 static const struct results_arm results_14[] =
916 { 0x00, 0x10, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
917 { 0x04, 0x10, 0, 0x20, 0x024,
TRUE, { {r4,0x00}, {r5,0x04}, {r6,0x08}, {r7,0x0c}, {r8,0x10}, {r9,0x14}, {r10,0x18}, {r11,0x1c}, {lr,0x20}, {-1,-1} }},
918 { 0x06, 0x10, 0, 0x34, 0x038,
TRUE, { {r4,0x14}, {r5,0x18}, {r6,0x1c}, {r7,0x20}, {r8,0x24}, {r9,0x28}, {r10,0x2c}, {r11,0x30}, {lr,0x34}, {-1,-1} }},
919 { 0x08, 0x10, 0, 0x34, 0x038,
TRUE, { {r4,0x14}, {r5,0x18}, {r6,0x1c}, {r7,0x20}, {r8,0x24}, {r9,0x28}, {r10,0x2c}, {r11,0x30}, {lr,0x34}, {-1,-1} }},
920 { 0x0a, 0x10, 0, 0x20, 0x024,
TRUE, { {r4,0x00}, {r5,0x04}, {r6,0x08}, {r7,0x0c}, {r8,0x10}, {r9,0x14}, {r10,0x18}, {r11,0x1c}, {lr,0x20}, {-1,-1} }},
923 static const BYTE function_15[] =
927 0xad, 0xf5, 0x00, 0x7d,
929 0x0d, 0xf5, 0x00, 0x7d,
931 0x5d, 0xf8, 0x14, 0xfb,
934 static const DWORD unwind_info_15_packed =
936 (
sizeof(function_15)/2 << 2) |
945 static const BYTE unwind_info_15[] = { DW(unwind_info_15_packed) };
947 static const struct results_arm results_15[] =
950 { 0x00, 0x10, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
951 { 0x02, 0x10, 0, ORIG_LR, 0x010,
TRUE, { {-1,-1} }},
952 { 0x04, 0x10, 0, 0x04, 0x018,
TRUE, { {r4,0x00}, {lr,0x04}, {-1,-1} }},
953 { 0x08, 0x10, 0, 0x204, 0x218,
TRUE, { {r4,0x200}, {lr,0x204}, {-1,-1} }},
954 { 0x0a, 0x10, 0, 0x204, 0x218,
TRUE, { {r4,0x200}, {lr,0x204}, {-1,-1} }},
955 { 0x0e, 0x10, 0, 0x04, 0x018,
TRUE, { {r4,0x00}, {lr,0x04}, {-1,-1} }},
956 { 0x10, 0x10, 0, 0x00, 0x014,
TRUE, { {lr,0x00}, {-1,-1} }},
959 static const BYTE function_16[] =
962 0x2d, 0xe9, 0x00, 0x48,
965 0xbd, 0xe8, 0x10, 0x40,
967 0x00, 0xf0, 0x00, 0xb8,
970 static const DWORD unwind_info_16_packed =
972 (
sizeof(function_16)/2 << 2) |
981 static const BYTE unwind_info_16[] = { DW(unwind_info_16_packed) };
983 static const struct results_arm results_16[] =
986 { 0x00, 0x10, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
987 { 0x02, 0x10, 0, ORIG_LR, 0x010,
TRUE, { {-1,-1} }},
988 { 0x06, 0x10, 0, 0x04, 0x018,
TRUE, { {r11,0x00}, {lr,0x04}, {-1,-1} }},
989 { 0x08, 0x10, 0, 0x04, 0x018,
TRUE, { {r11,0x00}, {lr,0x04}, {-1,-1} }},
990 { 0x0a, 0x10, 0, 0x04, 0x018,
TRUE, { {r11,0x00}, {lr,0x04}, {-1,-1} }},
991 { 0x0e, 0x10, 0, ORIG_LR, 0x010,
TRUE, { {-1,-1} }},
992 { 0x10, 0x10, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
995 static const BYTE function_17[] =
999 0xad, 0xf5, 0x00, 0x7d,
1001 0x0d, 0xf5, 0x00, 0x7d,
1007 static const DWORD unwind_info_17_packed =
1009 (
sizeof(function_17)/2 << 2) |
1018 static const BYTE unwind_info_17[] = { DW(unwind_info_17_packed) };
1020 static const struct results_arm results_17[] =
1023 { 0x00, 0x10, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
1024 { 0x02, 0x10, 0, ORIG_LR, 0x010,
TRUE, { {-1,-1} }},
1025 { 0x04, 0x10, 0, ORIG_LR, 0x014,
TRUE, { {r4,0x00}, {-1,-1} }},
1026 { 0x08, 0x10, 0, ORIG_LR, 0x214,
TRUE, { {r4,0x200}, {-1,-1} }},
1027 { 0x0a, 0x10, 0, ORIG_LR, 0x214,
TRUE, { {r4,0x200}, {-1,-1} }},
1028 { 0x0e, 0x10, 0, ORIG_LR, 0x014,
TRUE, { {r4,0x00}, {-1,-1} }},
1029 { 0x10, 0x10, 0, ORIG_LR, 0x010,
TRUE, { {-1,-1} }},
1030 { 0x12, 0x10, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
1033 static const BYTE function_18[] =
1040 static const DWORD unwind_info_18_packed =
1042 (
sizeof(function_18)/2 << 2) |
1051 static const BYTE unwind_info_18[] = { DW(unwind_info_18_packed) };
1053 static const struct results_arm results_18[] =
1056 { 0x00, 0x10, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
1057 { 0x02, 0x10, 0, 0x04, 0x008,
TRUE, { {lr,0x04}, {-1,-1} }},
1058 { 0x04, 0x10, 0, 0x04, 0x008,
TRUE, { {lr,0x04}, {-1,-1} }},
1061 static const BYTE function_19[] =
1071 static const DWORD unwind_info_19_packed =
1073 (
sizeof(function_19)/2 << 2) |
1082 static const BYTE unwind_info_19[] = { DW(unwind_info_19_packed) };
1084 static const struct results_arm results_19[] =
1087 { 0x00, 0x10, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
1088 { 0x02, 0x10, 0, ORIG_LR, 0x010,
TRUE, { {-1,-1} }},
1089 { 0x04, 0x10, 0, ORIG_LR, 0x024,
TRUE, { {r4,0x10}, {-1,-1} }},
1090 { 0x06, 0x10, 0, ORIG_LR, 0x024,
TRUE, { {r4,0x10}, {-1,-1} }},
1091 { 0x08, 0x10, 0, ORIG_LR, 0x010,
TRUE, { {-1,-1} }},
1092 { 0x0a, 0x10, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
1095 static const BYTE function_20[] =
1106 static const DWORD unwind_info_20_packed =
1108 (
sizeof(function_20)/2 << 2) |
1117 static const BYTE unwind_info_20[] = { DW(unwind_info_20_packed) };
1119 static const struct results_arm results_20[] =
1122 { 0x00, 0x10, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
1123 { 0x02, 0x10, 0, ORIG_LR, 0x010,
TRUE, { {-1,-1} }},
1124 { 0x04, 0x10, 0, ORIG_LR, 0x024,
TRUE, { {r4,0x10}, {-1,-1} }},
1125 { 0x06, 0x10, 0, ORIG_LR, 0x024,
TRUE, { {r4,0x10}, {-1,-1} }},
1126 { 0x08, 0x10, 0, ORIG_LR, 0x014,
TRUE, { {r4,0x00}, {-1,-1} }},
1127 { 0x0a, 0x10, 0, ORIG_LR, 0x010,
TRUE, { {-1,-1} }},
1128 { 0x0c, 0x10, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
1131 static const BYTE function_21[] =
1142 static const DWORD unwind_info_21_packed =
1144 (
sizeof(function_21)/2 << 2) |
1153 static const BYTE unwind_info_21[] = { DW(unwind_info_21_packed) };
1155 static const struct results_arm results_21[] =
1158 { 0x00, 0x10, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
1159 { 0x02, 0x10, 0, ORIG_LR, 0x010,
TRUE, { {-1,-1} }},
1160 { 0x04, 0x10, 0, ORIG_LR, 0x014,
TRUE, { {r4,0x00}, {-1,-1} }},
1161 { 0x06, 0x10, 0, ORIG_LR, 0x024,
TRUE, { {r4,0x10}, {-1,-1} }},
1162 { 0x08, 0x10, 0, ORIG_LR, 0x024,
TRUE, { {r4,0x10}, {-1,-1} }},
1163 { 0x0a, 0x10, 0, ORIG_LR, 0x010,
TRUE, { {-1,-1} }},
1164 { 0x0c, 0x10, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
1167 static const BYTE function_22[] =
1171 0x0d, 0xf5, 0x00, 0x7d,
1173 0x5d, 0xf8, 0x14, 0xfb,
1176 static const DWORD unwind_info_22_packed =
1178 (
sizeof(function_22)/2 << 2) |
1187 static const BYTE unwind_info_22[] = { DW(unwind_info_22_packed) };
1189 static const struct results_arm results_22[] =
1192 { 0x00, 0x10, 0, 0x204, 0x218,
TRUE, { {r4,0x200}, {lr,0x204}, {-1,-1} }},
1193 { 0x02, 0x10, 0, 0x204, 0x218,
TRUE, { {r4,0x200}, {lr,0x204}, {-1,-1} }},
1194 { 0x04, 0x10, 0, 0x204, 0x218,
TRUE, { {r4,0x200}, {lr,0x204}, {-1,-1} }},
1195 { 0x08, 0x10, 0, 0x04, 0x018,
TRUE, { {r4,0x00}, {lr,0x04}, {-1,-1} }},
1196 { 0x0a, 0x10, 0, 0x00, 0x014,
TRUE, { {lr,0x00}, {-1,-1} }},
1199 static const BYTE function_23[] =
1203 0xad, 0xf5, 0x00, 0x7d,
1208 static const DWORD unwind_info_23_packed =
1210 (
sizeof(function_23)/2 << 2) |
1219 static const BYTE unwind_info_23[] = { DW(unwind_info_23_packed) };
1221 static const struct results_arm results_23[] =
1224 { 0x00, 0x10, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
1225 { 0x02, 0x10, 0, ORIG_LR, 0x010,
TRUE, { {-1,-1} }},
1226 { 0x04, 0x10, 0, 0x04, 0x018,
TRUE, { {r4,0x00}, {lr,0x04}, {-1,-1} }},
1227 { 0x08, 0x10, 0, 0x204, 0x218,
TRUE, { {r4,0x200}, {lr,0x204}, {-1,-1} }},
1228 { 0x0a, 0x10, 0, 0x204, 0x218,
TRUE, { {r4,0x200}, {lr,0x204}, {-1,-1} }},
1231 static const BYTE function_24[] =
1233 0x2d, 0xe9, 0xfc, 0x48,
1234 0x0d, 0xf1, 0x18, 0x0b,
1237 0xbd, 0xe8, 0x10, 0x48,
1240 static const DWORD unwind_info_24_packed =
1242 (
sizeof(function_24)/2 << 2) |
1251 static const BYTE unwind_info_24[] = { DW(unwind_info_24_packed) };
1253 static const struct results_arm results_24[] =
1256 { 0x00, 0x10, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
1257 { 0x04, 0x10, 0, 0x1c, 0x020,
TRUE, { {r4,0x08}, {r5,0x0c}, {r6,0x10}, {r7,0x14}, {r11,0x18}, {lr,0x1c}, {-1,-1} }},
1258 { 0x08, 0x10, 0, 0x1c, 0x020,
TRUE, { {r4,0x08}, {r5,0x0c}, {r6,0x10}, {r7,0x14}, {r11,0x18}, {lr,0x1c}, {-1,-1} }},
1259 { 0x0a, 0x10, 0, 0x1c, 0x020,
TRUE, { {r4,0x08}, {r5,0x0c}, {r6,0x10}, {r7,0x14}, {r11,0x18}, {lr,0x1c}, {-1,-1} }},
1260 { 0x0c, 0x10, 0, 0x14, 0x018,
TRUE, { {r4,0x00}, {r5,0x04}, {r6,0x08}, {r7,0x0c}, {r11,0x10}, {lr,0x14}, {-1,-1} }},
1263 static const BYTE function_25[] =
1265 0x2d, 0xe9, 0xf0, 0x48,
1266 0x0d, 0xf1, 0x10, 0x0b,
1269 0xbd, 0xe8, 0xfc, 0x48,
1272 static const DWORD unwind_info_25_packed =
1274 (
sizeof(function_25)/2 << 2) |
1283 static const BYTE unwind_info_25[] = { DW(unwind_info_25_packed) };
1285 static const struct results_arm results_25[] =
1288 { 0x00, 0x10, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
1289 { 0x04, 0x10, 0, 0x14, 0x018,
TRUE, { {r4,0x00}, {r5,0x04}, {r6,0x08}, {r7,0x0c}, {r11,0x10}, {lr,0x14}, {-1,-1} }},
1290 { 0x08, 0x10, 0, 0x14, 0x018,
TRUE, { {r4,0x00}, {r5,0x04}, {r6,0x08}, {r7,0x0c}, {r11,0x10}, {lr,0x14}, {-1,-1} }},
1291 { 0x0a, 0x10, 0, 0x1c, 0x020,
TRUE, { {r4,0x08}, {r5,0x0c}, {r6,0x10}, {r7,0x14}, {r11,0x18}, {lr,0x1c}, {-1,-1} }},
1292 { 0x0c, 0x10, 0, 0x1c, 0x020,
TRUE, { {r4,0x08}, {r5,0x0c}, {r6,0x10}, {r7,0x14}, {r11,0x18}, {lr,0x1c}, {-1,-1} }},
1295 static const BYTE function_26[] =
1297 0x2d, 0xe9, 0x10, 0x08,
1298 0x0d, 0xf1, 0x1c, 0x0b,
1302 0xbd, 0xe8, 0x10, 0x08,
1307 static const DWORD unwind_info_26_packed =
1309 (
sizeof(function_26)/2 << 2) |
1318 static const BYTE unwind_info_26[] = { DW(unwind_info_26_packed) };
1320 static const struct results_arm results_26[] =
1323 { 0x00, 0x10, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
1324 { 0x04, 0x10, 0, ORIG_LR, 0x008,
TRUE, { {r4,0x00}, {r11,0x04}, {-1,-1} }},
1325 { 0x08, 0x10, 0, ORIG_LR, 0x008,
TRUE, { {r4,0x00}, {r11,0x04}, {-1,-1} }},
1326 { 0x0a, 0x10, 0, ORIG_LR, 0x018,
TRUE, { {r4,0x10}, {r11,0x14}, {-1,-1} }},
1327 { 0x0c, 0x10, 0, ORIG_LR, 0x018,
TRUE, { {r4,0x10}, {r11,0x14}, {-1,-1} }},
1328 { 0x0e, 0x10, 0, ORIG_LR, 0x008,
TRUE, { {r4,0x00}, {r11,0x04}, {-1,-1} }},
1329 { 0x12, 0x10, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
1332 static const BYTE function_27[] =
1340 static const DWORD unwind_info_27_packed =
1342 (
sizeof(function_27)/2 << 2) |
1351 static const BYTE unwind_info_27[] = { DW(unwind_info_27_packed) };
1353 static const struct results_arm results_27[] =
1356 { 0x00, 0x10, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
1357 { 0x02, 0x10, 0, ORIG_LR, 0x00c,
TRUE, { {-1,-1} }},
1358 { 0x04, 0x10, 0, ORIG_LR, 0x00c,
TRUE, { {-1,-1} }},
1359 { 0x06, 0x10, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
1362 static const BYTE function_28[] =
1370 static const DWORD unwind_info_28_packed =
1372 (
sizeof(function_28)/2 << 2) |
1381 static const BYTE unwind_info_28[] = { DW(unwind_info_28_packed) };
1383 static const struct results_arm results_28[] =
1386 { 0x00, 0x10, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
1387 { 0x02, 0x10, 0, ORIG_LR, 0x00c,
TRUE, { {-1,-1} }},
1388 { 0x04, 0x10, 0, ORIG_LR, 0x00c,
TRUE, { {-1,-1} }},
1389 { 0x06, 0x10, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
1392 static const BYTE function_29[] =
1398 static const DWORD unwind_info_29_header =
1399 (
sizeof(function_29)/2) |
1406 static const BYTE unwind_info_29[] =
1408 DW(unwind_info_29_header),
1409 UWOP_MSFT_OP_CONTEXT,
1413 static const struct results_arm results_29[] =
1416 { 0x00, 0x10, 0, 0x40, 0x38,
FALSE, { {r0,0x04}, {
r1,0x08}, {
r2,0x0c}, {
r3,0x10}, {r4,0x14}, {r5,0x18}, {r6,0x1c}, {r7,0x20}, {r8,0x24}, {r9,0x28}, {r10,0x2c}, {r11,0x30}, {r12,0x34}, {
sp,0x38}, {lr,0x3c},
1417 {d0,0x5400000050}, {d1,0x5c00000058}, {d2,0x6400000060}, {d3,0x6c00000068}, {d4,0x7400000070}, {d5,0x7c00000078}, {d6,0x8400000080}, {d7,0x8c00000088},
1418 {d8,0x9400000090}, {d9,0x9c00000098}, {d10,0xa4000000a0}, {d11,0xac000000a8}, {d12,0xb4000000b0}, {d13,0xbc000000b8}, {d14,0xc4000000c0}, {d15,0xcc000000c8},
1419 {d16,0xd4000000d0}, {d17,0xdc000000d8}, {d18,0xe4000000e0}, {d19,0xec000000e8}, {d20,0xf4000000f0}, {d21,0xfc000000f8}, {d22,0x10400000100}, {d23,0x10c00000108},
1420 {d24,0x11400000110}, {d25,0x11c00000118}, {d26,0x12400000120}, {d27,0x12c00000128}, {d28,0x13400000130}, {d29,0x13c00000138}, {d30,0x14400000140}, {d31,0x14c00000148} }},
1423 static const BYTE function_30[] =
1431 static const DWORD unwind_info_30_header =
1432 (
sizeof(function_30)/2) |
1439 static const BYTE unwind_info_30[] =
1441 DW(unwind_info_30_header),
1443 UWOP_SAVE_REGS((1<<lr)),
1444 UWOP_MSFT_OP_MACHINE_FRAME,
1448 static const struct results_arm results_30[] =
1451 { 0x00, 0x10, 0, 0x04, 0x00,
FALSE, { {
sp,0x00}, {-1,-1} }},
1452 { 0x02, 0x10, 0, 0x08, 0x04,
FALSE, { {lr,0x00}, {
sp,0x04}, {-1,-1} }},
1453 { 0x04, 0x10, 0, 0x14, 0x10,
FALSE, { {lr,0x0c}, {
sp,0x10}, {-1,-1} }},
1456 static const BYTE function_31[] =
1462 static const struct results_arm results_31[] =
1465 { 0x00, 0, -1, ORIG_LR, 0x00,
TRUE, { {-1,-1} }},
1466 { 0x02, 0, -1, ORIG_LR, 0x00,
TRUE, { {-1,-1} }},
1467 { 0x04, 0, -2, 0, 0xdeadbeef,
FALSE, { {-1,-1} }},
1470 static const struct unwind_test_arm
tests[] =
1472#define TEST(func, unwind, size, results) \
1473 { func, sizeof(func), unwind, size, results, ARRAY_SIZE(results) }
1474 TEST(function_0, unwind_info_0,
sizeof(unwind_info_0), results_0),
1475 TEST(function_1, unwind_info_1,
sizeof(unwind_info_1), results_1),
1476 TEST(function_2, unwind_info_2,
sizeof(unwind_info_2), results_2),
1477 TEST(function_3, unwind_info_3,
sizeof(unwind_info_3), results_3),
1478 TEST(function_4, unwind_info_4,
sizeof(unwind_info_4), results_4),
1479 TEST(function_5, unwind_info_5,
sizeof(unwind_info_5), results_5),
1480 TEST(function_6, unwind_info_6, 0, results_6),
1481 TEST(function_7, unwind_info_7, 0, results_7),
1482 TEST(function_8, unwind_info_8, 0, results_8),
1483 TEST(function_9, unwind_info_9, 0, results_9),
1484 TEST(function_10, unwind_info_10, 0, results_10),
1485 TEST(function_11, unwind_info_11, 0, results_11),
1486 TEST(function_12, unwind_info_12, 0, results_12),
1487 TEST(function_13, unwind_info_13, 0, results_13),
1488 TEST(function_14, unwind_info_14, 0, results_14),
1489 TEST(function_15, unwind_info_15, 0, results_15),
1490 TEST(function_16, unwind_info_16, 0, results_16),
1491 TEST(function_17, unwind_info_17, 0, results_17),
1492 TEST(function_18, unwind_info_18, 0, results_18),
1493 TEST(function_19, unwind_info_19, 0, results_19),
1494 TEST(function_20, unwind_info_20, 0, results_20),
1495 TEST(function_21, unwind_info_21, 0, results_21),
1496 TEST(function_22, unwind_info_22, 0, results_22),
1497 TEST(function_23, unwind_info_23, 0, results_23),
1498 TEST(function_24, unwind_info_24, 0, results_24),
1499 TEST(function_25, unwind_info_25, 0, results_25),
1500 TEST(function_26, unwind_info_26, 0, results_26),
1501 TEST(function_27, unwind_info_27, 0, results_27),
1502 TEST(function_28, unwind_info_28, 0, results_28),
1503 TEST(function_29, unwind_info_29,
sizeof(unwind_info_29), results_29),
1504 TEST(function_30, unwind_info_30,
sizeof(unwind_info_30), results_30),
1505 TEST(function_31,
NULL, 0, results_31),
1511 call_virtual_unwind_arm(
i, &
tests[
i] );
1516#if defined(__aarch64__) || defined(__x86_64__)
1518#define UWOP_TWOBYTES(x) (((x) >> 8) & 0xff), ((x) & 0xff)
1520#define UWOP_ALLOC_SMALL(size) (0x00 | (size/16))
1521#define UWOP_SAVE_R19R20_X(offset) (0x20 | (offset/8))
1522#define UWOP_SAVE_FPLR(offset) (0x40 | (offset/8))
1523#define UWOP_SAVE_FPLR_X(offset) (0x80 | (offset/8 - 1))
1524#define UWOP_ALLOC_MEDIUM(size) UWOP_TWOBYTES((0xC0 << 8) | (size/16))
1525#define UWOP_SAVE_REGP(reg, offset) UWOP_TWOBYTES((0xC8 << 8) | ((reg - 19) << 6) | (offset/8))
1526#define UWOP_SAVE_REGP_X(reg, offset) UWOP_TWOBYTES((0xCC << 8) | ((reg - 19) << 6) | (offset/8 - 1))
1527#define UWOP_SAVE_REG(reg, offset) UWOP_TWOBYTES((0xD0 << 8) | ((reg - 19) << 6) | (offset/8))
1528#define UWOP_SAVE_REG_X(reg, offset) UWOP_TWOBYTES((0xD4 << 8) | ((reg - 19) << 5) | (offset/8 - 1))
1529#define UWOP_SAVE_LRP(reg, offset) UWOP_TWOBYTES((0xD6 << 8) | ((reg - 19)/2 << 6) | (offset/8))
1530#define UWOP_SAVE_FREGP(reg, offset) UWOP_TWOBYTES((0xD8 << 8) | ((reg - 8) << 6) | (offset/8))
1531#define UWOP_SAVE_FREGP_X(reg, offset) UWOP_TWOBYTES((0xDA << 8) | ((reg - 8) << 6) | (offset/8 - 1))
1532#define UWOP_SAVE_FREG(reg, offset) UWOP_TWOBYTES((0xDC << 8) | ((reg - 8) << 6) | (offset/8))
1533#define UWOP_SAVE_FREG_X(reg, offset) UWOP_TWOBYTES((0xDE << 8) | ((reg - 8) << 5) | (offset/8 - 1))
1534#define UWOP_ALLOC_LARGE(size) UWOP_TWOBYTES((0xE0 << 8) | ((size/16) >> 16)), UWOP_TWOBYTES(size/16)
1535#define UWOP_SET_FP 0xE1
1536#define UWOP_ADD_FP(offset) UWOP_TWOBYTES((0xE2 << 8) | (offset/8))
1537#define UWOP_NOP 0xE3
1538#define UWOP_END 0xE4
1539#define UWOP_END_C 0xE5
1540#define UWOP_SAVE_NEXT 0xE6
1541#define UWOP_SAVE_ANY_REG(reg,offset) 0xE7,(reg),(offset)
1542#define UWOP_TRAP_FRAME 0xE8
1543#define UWOP_MACHINE_FRAME 0xE9
1544#define UWOP_CONTEXT 0xEA
1545#define UWOP_EC_CONTEXT 0xEB
1546#define UWOP_CLEAR_UNWOUND_TO_CALL 0xEC
1559struct unwind_test_arm64
1561 const BYTE *function;
1562 size_t function_size;
1565 const struct results_arm64 *
results;
1566 unsigned int nb_results;
1568 int last_set_reg_ptr;
1569 int stack_value_index;
1577 x16,
x17, x18, x19, x20, x21, x22, x23,
1578 x24, x25, x26, x27, x28, x29, lr,
sp,
1579 d0, d1, d2, d3, d4, d5, d6, d7,
1580 d8, d9, d10, d11, d12, d13, d14, d15
1583static const char *
const reg_names_arm64[48] =
1585 "x0",
"x1",
"x2",
"x3",
"x4",
"x5",
"x6",
"x7",
1586 "x8",
"x9",
"x10",
"x11",
"x12",
"x13",
"x14",
"x15",
1587 "x16",
"x17",
"x18",
"x19",
"x20",
"x21",
"x22",
"x23",
1588 "x24",
"x25",
"x26",
"x27",
"x28",
"x29",
"lr",
"sp",
1589 "d0",
"d1",
"d2",
"d3",
"d4",
"d5",
"d6",
"d7",
1590 "d8",
"d9",
"d10",
"d11",
"d12",
"d13",
"d14",
"d15",
1593#define ORIG_LR 0xCCCCCCCC
1595static void call_virtual_unwind_arm64(
void *
code_mem,
int testnum,
const struct unwind_test_arm64 *
test )
1597 static const int code_offset = 1024;
1598 static const int unwind_offset = 2048;
1607 KNONVOLATILE_CONTEXT_POINTERS ctx_ptr;
1611 ULONG64 frame, orig_pc, orig_fp, unset_reg, sp_offset = 0, regval, *regptr;
1615 if (
test->unwind_info)
1619 if (
test->unwind_size)
1625 for (
i = 0;
i <
test->nb_results;
i++)
1628 if (
test->results[
i].handler == -2)
continue;
1631 memset( &ctx_ptr, 0x55,
sizeof(ctx_ptr) );
1633 memset( &unset_reg, 0x55,
sizeof(unset_reg) );
1634 for (
j = 0;
j < 256;
j++) fake_stack[
j] =
j * 8;
1635 if (
test->stack_value_index != -1) fake_stack[
test->stack_value_index] =
test->stack_value;
1640 context.ContextFlags = 0xcccc;
1646 trace(
"pc=%p (%02x) fp=%p sp=%p\n", (
void *)orig_pc, *(
UINT *)orig_pc, (
void *)orig_fp, (
void *)
context.Sp );
1648 if (
test->results[
i].handler == -2) orig_pc =
context.Lr;
1650 if (pRtlVirtualUnwind2)
1654 data = (
void *)0xdeadbeef;
1657 test->unwind_info ? (RUNTIME_FUNCTION *)&runtime_func :
NULL,
1660 if (
test->results[
i].handler > 0)
1666 "wrong handler data %lx\n", *(
DWORD *)
data );
1668 else if (
test->results[
i].handler < -1)
1672 ok(
data == (
void *)0xdeadbeef,
"handler data set to %p\n",
data );
1682 data = (
void *)0xdeadbeef;
1685 test->unwind_info ? (RUNTIME_FUNCTION *)&runtime_func :
NULL,
1687 if (
test->results[
i].handler > 0)
1692 "wrong handler data %lx\n", *(
DWORD *)
data );
1697 ok(
data == (
test->results[
i].handler < -1 ? (
void *)0xdeadbeef :
NULL),
1698 "handler data set to %p/%p\n",
data,
1699 (
test->results[
i].handler < 0 ? (
void *)0xdeadbeef :
NULL) );
1704 ok( frame == (
test->results[
i].frame_offset ? (
ULONG64)fake_stack : 0) +
test->results[
i].frame,
"wrong frame %p/%p\n",
1705 (
void *)frame, (
char *)(
test->results[
i].frame_offset ? fake_stack :
NULL) +
test->results[
i].frame );
1706 if (
test->results[
i].handler == -2)
1708 ok(
context.ContextFlags == 0xcccc,
"wrong flags %lx\n",
context.ContextFlags );
1713 if (!
test->unwound_clear || i < test->unwound_clear)
1715 "wrong flags %lx\n",
context.ContextFlags );
1718 "wrong flags %lx\n",
context.ContextFlags );
1721 for (
k = 0;
k < nb_regs;
k++)
1723 if (
test->results[
i].regs[
k][0] == -1)
1725 if (
test->results[
i].regs[
k][0] ==
sp) {
1728 sp_offset =
test->results[
i].regs[
k][1];
1732 ok( frame - sp_offset ==
context.Sp,
"wrong sp %p/%p\n",
1733 (
void *)(frame - sp_offset), (
void *)
context.Sp);
1737 for (
j = 0;
j <
sizeof(ctx_ptr)/
sizeof(
void*);
j++)
1738 ok( ((
void **)&ctx_ptr)[
j] == (
void *)unset_reg,
1739 "ctx_ptr %u set to %p\n",
j, ((
void **)&ctx_ptr)[
j] );
1742 for (
j = 0;
j < 48;
j++)
1746#define GET(i) case i: regval = context.X##i; break
1751 case x13:
case x14:
continue;
1754 case x18:
case x23:
case x24:
case x28:
continue;
1759 case x29: regval =
context.Fp;
break;
1760 case lr: regval =
context.Lr;
break;
1762 default: regval =
context.V[
j - d0].Low;
break;
1767 if (
j >= 19 &&
j <= 30) regptr = (&ctx_ptr.X19)[
j - 19];
1768 else if (
j >= d8 &&
j <= d15) regptr = (&ctx_ptr.D8)[
j - d8];
1771 for (
k = 0;
k < nb_regs;
k++)
1773 if (
test->results[
i].regs[
k][0] == -1)
1778 if (
test->results[
i].regs[
k][0] ==
j)
break;
1783 ok( regval ==
test->results[
i].regs[
k][1],
1784 "register %s wrong %I64x/%I64x\n", reg_names_arm64[
j], regval,
test->results[
i].regs[
k][1] );
1787 if (
test->last_set_reg_ptr &&
j >
test->last_set_reg_ptr &&
j <= 30)
1788 ok( regptr == (
void *)unset_reg,
"register %s should not have pointer set\n", reg_names_arm64[
j] );
1791 ok( regptr != (
void *)unset_reg,
"register %s should have pointer set\n", reg_names_arm64[
j] );
1792 if (regptr != (
void *)unset_reg)
1793 ok( *regptr == regval,
"register %s should have reg pointer to %I64x / %I64x\n",
1794 reg_names_arm64[
j], *regptr, regval );
1800 ok(
k == nb_regs,
"register %s should be set\n", reg_names_arm64[
j] );
1801 ok( !regptr || regptr == (
void *)unset_reg,
"register %s should not have pointer set\n", reg_names_arm64[
j] );
1803 ok(
context.Lr == ORIG_LR,
"register lr wrong %I64x/unset\n",
context.Lr );
1805 ok(
context.Fp == orig_fp,
"register fp wrong %I64x/unset\n",
context.Fp );
1807 ok( regval == unset_reg,
"register %s wrong %I64x/unset\n", reg_names_arm64[
j], regval);
1815#define DW(dword) ((dword >> 0) & 0xff), ((dword >> 8) & 0xff), ((dword >> 16) & 0xff), ((dword >> 24) & 0xff)
1817static void test_virtual_unwind_arm64(
void)
1819 static const BYTE function_0[] =
1821 0xff, 0x83, 0x00, 0xd1,
1822 0xf3, 0x53, 0x01, 0xa9,
1823 0x1f, 0x20, 0x03, 0xd5,
1824 0xf3, 0x53, 0x41, 0xa9,
1825 0xff, 0x83, 0x00, 0x91,
1826 0xc0, 0x03, 0x5f, 0xd6,
1829 static const DWORD unwind_info_0_header =
1830 (
sizeof(function_0)/4) |
1835 static const DWORD unwind_info_0_epilog0 =
1839 static const BYTE unwind_info_0[] =
1841 DW(unwind_info_0_header),
1842 DW(unwind_info_0_epilog0),
1844 UWOP_SAVE_REGP(19, 16),
1848 UWOP_SAVE_REGP(19, 16),
1852 0x00, 0x02, 0x00, 0x00,
1853 0x05, 0x06, 0x07, 0x08,
1856 static const struct results_arm64 results_0[] =
1859 { 0x00, 0x00, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
1860 { 0x04, 0x00, 0, ORIG_LR, 0x020,
TRUE, { {-1,-1} }},
1861 { 0x08, 0x00, 1, ORIG_LR, 0x020,
TRUE, { {x19,0x10}, {x20,0x18}, {-1,-1} }},
1862 { 0x0c, 0x00, 0, ORIG_LR, 0x020,
TRUE, { {x19,0x10}, {x20,0x18}, {-1,-1} }},
1863 { 0x10, 0x00, 0, ORIG_LR, 0x020,
TRUE, { {-1,-1} }},
1864 { 0x14, 0x00, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
1868 static const BYTE function_1[] =
1870 0xf3, 0x53, 0xbe, 0xa9,
1871 0xfe, 0x0b, 0x00, 0xf9,
1872 0xff, 0x43, 0x00, 0xd1,
1873 0x1f, 0x20, 0x03, 0xd5,
1874 0xff, 0x43, 0x00, 0x91,
1875 0xfe, 0x0b, 0x40, 0xf9,
1876 0xf3, 0x53, 0xc2, 0xa8,
1877 0xc0, 0x03, 0x5f, 0xd6,
1880 static const DWORD unwind_info_1_packed =
1882 (
sizeof(function_1)/4 << 2) |
1889 static const BYTE unwind_info_1[] = { DW(unwind_info_1_packed) };
1891 static const struct results_arm64 results_1[] =
1894 { 0x00, 0x00, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
1895 { 0x04, 0x00, 0, ORIG_LR, 0x020,
TRUE, { {x19,0x00}, {x20,0x08}, {-1,-1} }},
1896 { 0x08, 0x00, 0, 0x10, 0x020,
TRUE, { {x19,0x00}, {x20,0x08}, {lr,0x10}, {-1,-1} }},
1897 { 0x0c, 0x00, 0, 0x20, 0x030,
TRUE, { {x19,0x10}, {x20,0x18}, {lr,0x20}, {-1,-1} }},
1898 { 0x10, 0x00, 0, 0x20, 0x030,
TRUE, { {x19,0x10}, {x20,0x18}, {lr,0x20}, {-1,-1} }},
1899 { 0x14, 0x00, 0, 0x10, 0x020,
TRUE, { {x19,0x00}, {x20,0x08}, {lr,0x10}, {-1,-1} }},
1900 { 0x18, 0x00, 0, ORIG_LR, 0x020,
TRUE, { {x19,0x00}, {x20,0x08}, {-1,-1} }},
1901 { 0x1c, 0x00, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
1904 static const BYTE function_2[] =
1906 0xff, 0x43, 0x00, 0xd1,
1907 0x1f, 0x20, 0x03, 0xd5,
1908 0xff, 0x43, 0x00, 0xd1,
1909 0x1f, 0x20, 0x03, 0xd5,
1910 0xc0, 0x03, 0x5f, 0xd6,
1913 static const DWORD unwind_info_2_header =
1914 (
sizeof(function_2)/4) |
1920 static const BYTE unwind_info_2[] =
1922 DW(unwind_info_2_header),
1933 static const struct results_arm64 results_2[] =
1936 { 0x00, 0x00, 0, ORIG_LR, 0x010,
TRUE, { {-1,-1} }},
1937 { 0x04, 0x00, 0, 0x0008, 0x010,
FALSE, { {-1,-1} }},
1938 { 0x08, 0x00, 0, 0x0018, 0x020,
FALSE, { {-1,-1} }},
1939 { 0x0c, 0x00, 0, 0x0018, 0x020,
FALSE, { {-1,-1} }},
1940 { 0x10, 0x00, 0, 0x0018, 0x020,
FALSE, { {-1,-1} }},
1943 static const BYTE function_3[] =
1945 0xff, 0x43, 0x00, 0xd1,
1946 0x1f, 0x20, 0x03, 0xd5,
1947 0xff, 0x43, 0x00, 0xd1,
1948 0x1f, 0x20, 0x03, 0xd5,
1949 0xc0, 0x03, 0x5f, 0xd6,
1952 static const DWORD unwind_info_3_header =
1953 (
sizeof(function_3)/4) |
1959 static const BYTE unwind_info_3[] =
1961 DW(unwind_info_3_header),
1969 static const struct results_arm64 results_3[] =
1972 { 0x00, 0x00, 0, ORIG_LR, 0x010,
TRUE, { {-1,-1} }},
1973 { 0x04, 0x00, 0 , 0x0108, 0x110,
FALSE, { {
x0, 0x08}, {
x1, 0x10}, {
x2, 0x18}, {
x3, 0x20}, {
x4, 0x28}, {
x5, 0x30}, {
x6, 0x38}, {
x7, 0x40}, {
x8, 0x48}, {
x9, 0x50}, {
x10, 0x58}, {
x11, 0x60}, {
x12, 0x68}, {
x13, 0x70}, {
x14, 0x78}, {
x15, 0x80}, {
x16, 0x88}, {
x17, 0x90}, {x18, 0x98}, {x19, 0xA0}, {x20, 0xA8}, {x21, 0xB0}, {x22, 0xB8}, {x23, 0xC0}, {x24, 0xC8}, {x25, 0xD0}, {x26, 0xD8}, {x27, 0xE0}, {x28, 0xE8}, {x29, 0xF0}, {lr, 0xF8}, {d0, 0x110}, {d1, 0x120}, {d2, 0x130}, {d3, 0x140}, {d4, 0x150}, {d5, 0x160}, {d6, 0x170}, {d7, 0x180}, {d8, 0x190}, {d9, 0x1a0}, {d10, 0x1b0}, {d11, 0x1c0}, {d12, 0x1d0}, {d13, 0x1e0}, {d14, 0x1f0}, {d15, 0x200}, {-1,-1} }},
1974 { 0x08, 0x00, 0 , 0x0118, 0x120,
FALSE, { {
x0, 0x18}, {
x1, 0x20}, {
x2, 0x28}, {
x3, 0x30}, {
x4, 0x38}, {
x5, 0x40}, {
x6, 0x48}, {
x7, 0x50}, {
x8, 0x58}, {
x9, 0x60}, {
x10, 0x68}, {
x11, 0x70}, {
x12, 0x78}, {
x13, 0x80}, {
x14, 0x88}, {
x15, 0x90}, {
x16, 0x98}, {
x17, 0xA0}, {x18, 0xA8}, {x19, 0xB0}, {x20, 0xB8}, {x21, 0xC0}, {x22, 0xC8}, {x23, 0xD0}, {x24, 0xD8}, {x25, 0xE0}, {x26, 0xE8}, {x27, 0xF0}, {x28, 0xF8}, {x29, 0x100}, {lr, 0x108}, {d0, 0x120}, {d1, 0x130}, {d2, 0x140}, {d3, 0x150}, {d4, 0x160}, {d5, 0x170}, {d6, 0x180}, {d7, 0x190}, {d8, 0x1a0}, {d9, 0x1b0}, {d10, 0x1c0}, {d11, 0x1d0}, {d12, 0x1e0}, {d13, 0x1f0}, {d14, 0x200}, {d15, 0x210}, {-1,-1} }},
1975 { 0x0c, 0x00, 0 , 0x0118, 0x120,
FALSE, { {
x0, 0x18}, {
x1, 0x20}, {
x2, 0x28}, {
x3, 0x30}, {
x4, 0x38}, {
x5, 0x40}, {
x6, 0x48}, {
x7, 0x50}, {
x8, 0x58}, {
x9, 0x60}, {
x10, 0x68}, {
x11, 0x70}, {
x12, 0x78}, {
x13, 0x80}, {
x14, 0x88}, {
x15, 0x90}, {
x16, 0x98}, {
x17, 0xA0}, {x18, 0xA8}, {x19, 0xB0}, {x20, 0xB8}, {x21, 0xC0}, {x22, 0xC8}, {x23, 0xD0}, {x24, 0xD8}, {x25, 0xE0}, {x26, 0xE8}, {x27, 0xF0}, {x28, 0xF8}, {x29, 0x100}, {lr, 0x108}, {d0, 0x120}, {d1, 0x130}, {d2, 0x140}, {d3, 0x150}, {d4, 0x160}, {d5, 0x170}, {d6, 0x180}, {d7, 0x190}, {d8, 0x1a0}, {d9, 0x1b0}, {d10, 0x1c0}, {d11, 0x1d0}, {d12, 0x1e0}, {d13, 0x1f0}, {d14, 0x200}, {d15, 0x210}, {-1,-1} }},
1976 { 0x10, 0x00, 0 , 0x0118, 0x120,
FALSE, { {
x0, 0x18}, {
x1, 0x20}, {
x2, 0x28}, {
x3, 0x30}, {
x4, 0x38}, {
x5, 0x40}, {
x6, 0x48}, {
x7, 0x50}, {
x8, 0x58}, {
x9, 0x60}, {
x10, 0x68}, {
x11, 0x70}, {
x12, 0x78}, {
x13, 0x80}, {
x14, 0x88}, {
x15, 0x90}, {
x16, 0x98}, {
x17, 0xA0}, {x18, 0xA8}, {x19, 0xB0}, {x20, 0xB8}, {x21, 0xC0}, {x22, 0xC8}, {x23, 0xD0}, {x24, 0xD8}, {x25, 0xE0}, {x26, 0xE8}, {x27, 0xF0}, {x28, 0xF8}, {x29, 0x100}, {lr, 0x108}, {d0, 0x120}, {d1, 0x130}, {d2, 0x140}, {d3, 0x150}, {d4, 0x160}, {d5, 0x170}, {d6, 0x180}, {d7, 0x190}, {d8, 0x1a0}, {d9, 0x1b0}, {d10, 0x1c0}, {d11, 0x1d0}, {d12, 0x1e0}, {d13, 0x1f0}, {d14, 0x200}, {d15, 0x210}, {-1,-1} }},
1979 static const BYTE function_4[] =
1981 0xff, 0x43, 0x00, 0xd1,
1982 0xff, 0x03, 0x08, 0xd1,
1983 0xff, 0x43, 0x40, 0xd1,
1984 0xfd, 0x03, 0x00, 0x91,
1985 0xf3, 0x53, 0xbe, 0xa9,
1986 0xf5, 0x5b, 0x01, 0xa9,
1987 0xf7, 0x0f, 0x1e, 0xf8,
1988 0xf8, 0x07, 0x00, 0xf9,
1989 0xf9, 0x7b, 0x01, 0xa9,
1990 0xfd, 0x7b, 0x03, 0xa9,
1991 0xfd, 0x7b, 0xbe, 0xa9,
1992 0xf3, 0x53, 0xbe, 0xa9,
1993 0xe8, 0x27, 0xbe, 0x6d,
1994 0xea, 0x2f, 0x01, 0x6d,
1995 0xec, 0x0f, 0x1e, 0xfc,
1996 0xed, 0x07, 0x00, 0xfd,
1997 0xfd, 0x43, 0x00, 0x91,
1998 0xc0, 0x03, 0x5f, 0xd6,
2001 static const DWORD unwind_info_4_header =
2002 (
sizeof(function_4)/4) |
2008 static const BYTE unwind_info_4[] =
2010 DW(unwind_info_4_header),
2013 UWOP_SAVE_FREG(13, 8),
2014 UWOP_SAVE_FREG_X(12, 32),
2015 UWOP_SAVE_FREGP(10, 16),
2016 UWOP_SAVE_FREGP_X(8, 32),
2017 UWOP_SAVE_R19R20_X(32),
2018 UWOP_SAVE_FPLR_X(32),
2020 UWOP_SAVE_LRP(25, 16),
2021 UWOP_SAVE_REG(24, 8),
2022 UWOP_SAVE_REG_X(23, 32),
2023 UWOP_SAVE_REGP(21, 16),
2024 UWOP_SAVE_REGP_X(19, 32),
2027 UWOP_ALLOC_MEDIUM(512),
2032 static const struct results_arm64 results_4[] =
2035 { 0x00, 0x10, 0, ORIG_LR, 0x00000,
TRUE, { {-1,-1} }},
2036 { 0x04, 0x10, 0, ORIG_LR, 0x00010,
TRUE, { {-1,-1} }},
2037 { 0x08, 0x10, 0, ORIG_LR, 0x00210,
TRUE, { {-1,-1} }},
2038 { 0x0c, 0x10, 0, ORIG_LR, 0x10210,
TRUE, { {-1,-1} }},
2039 { 0x14, 0x00, 0, ORIG_LR, 0x10210,
TRUE, { {x19, 0x00}, {x20, 0x08}, {-1,-1} }},
2040 { 0x18, 0x00, 0, ORIG_LR, 0x10210,
TRUE, { {x19, 0x00}, {x20, 0x08}, {x21, 0x10}, {x22, 0x18}, {-1,-1} }},
2041 { 0x1c, 0x00, 0, ORIG_LR, 0x10210,
TRUE, { {x19, 0x20}, {x20, 0x28}, {x21, 0x30}, {x22, 0x38}, {x23, 0x00}, {-1,-1} }},
2042 { 0x20, 0x00, 0, ORIG_LR, 0x10210,
TRUE, { {x19, 0x20}, {x20, 0x28}, {x21, 0x30}, {x22, 0x38}, {x23, 0x00}, {x24, 0x08}, {-1,-1} }},
2043 { 0x24, 0x00, 0, 0x0018, 0x10210,
TRUE, { {x19, 0x20}, {x20, 0x28}, {x21, 0x30}, {x22, 0x38}, {x23, 0x00}, {x24, 0x08}, {x25, 0x10}, {lr, 0x18}, {-1,-1} }},
2044 { 0x28, 0x00, 0, 0x0018, 0x10220,
FALSE, { {x19, 0x20}, {x20, 0x28}, {x21, 0x30}, {x22, 0x38}, {x23, 0x00}, {x24, 0x08}, {x25, 0x10}, {lr, 0x18}, {x29, 0x10}, {-1,-1} }},
2045 { 0x2c, 0x00, 0, 0x0038, 0x10240,
FALSE, { {x19, 0x40}, {x20, 0x48}, {x21, 0x50}, {x22, 0x58}, {x23, 0x20}, {x24, 0x28}, {x25, 0x30}, {lr, 0x38}, {x29, 0x30}, {-1,-1} }},
2046 { 0x30, 0x00, 0, 0x0058, 0x10260,
FALSE, { {x19, 0x60}, {x20, 0x68}, {x21, 0x70}, {x22, 0x78}, {x23, 0x40}, {x24, 0x48}, {x25, 0x50}, {lr, 0x58}, {x29, 0x50}, {-1,-1} }},
2047 { 0x34, 0x00, 0, 0x0078, 0x10280,
FALSE, { {x19, 0x80}, {x20, 0x88}, {x21, 0x90}, {x22, 0x98}, {x23, 0x60}, {x24, 0x68}, {x25, 0x70}, {lr, 0x78}, {x29, 0x70}, {d8, 0x00}, {d9, 0x08}, {-1,-1} }},
2048 { 0x38, 0x00, 0, 0x0078, 0x10280,
FALSE, { {x19, 0x80}, {x20, 0x88}, {x21, 0x90}, {x22, 0x98}, {x23, 0x60}, {x24, 0x68}, {x25, 0x70}, {lr, 0x78}, {x29, 0x70}, {d8, 0x00}, {d9, 0x08}, {d10, 0x10}, {d11, 0x18}, {-1,-1} }},
2049 { 0x3c, 0x00, 0, 0x0098, 0x102a0,
FALSE, { {x19, 0xa0}, {x20, 0xa8}, {x21, 0xb0}, {x22, 0xb8}, {x23, 0x80}, {x24, 0x88}, {x25, 0x90}, {lr, 0x98}, {x29, 0x90}, {d8, 0x20}, {d9, 0x28}, {d10, 0x30}, {d11, 0x38}, {d12, 0x00}, {-1,-1} }},
2050 { 0x40, 0x00, 0, 0x0098, 0x102a0,
FALSE, { {x19, 0xa0}, {x20, 0xa8}, {x21, 0xb0}, {x22, 0xb8}, {x23, 0x80}, {x24, 0x88}, {x25, 0x90}, {lr, 0x98}, {x29, 0x90}, {d8, 0x20}, {d9, 0x28}, {d10, 0x30}, {d11, 0x38}, {d12, 0x00}, {d13, 0x08}, {-1,-1} }},
2051 { 0x44, 0x20, 0, 0x00a8, 0x102b0,
FALSE, { {x19, 0xb0}, {x20, 0xb8}, {x21, 0xc0}, {x22, 0xc8}, {x23, 0x90}, {x24, 0x98}, {x25, 0xa0}, {lr, 0xa8}, {x29, 0xa0}, {d8, 0x30}, {d9, 0x38}, {d10, 0x40}, {d11, 0x48}, {d12, 0x10}, {d13, 0x18}, {-1,-1} }},
2054 static const BYTE function_5[] =
2056 0xf3, 0x53, 0xbe, 0xa9,
2057 0xf5, 0x5b, 0x01, 0xa9,
2058 0xf7, 0x63, 0xbc, 0xa9,
2059 0xf9, 0x6b, 0x01, 0xa9,
2060 0xfb, 0x73, 0x02, 0xa9,
2061 0xfd, 0x7b, 0x03, 0xa9,
2062 0xe8, 0x27, 0xbc, 0x6d,
2063 0xea, 0x2f, 0x01, 0x6d,
2064 0xec, 0x37, 0x02, 0x6d,
2065 0xee, 0x3f, 0x03, 0x6d,
2066 0xc0, 0x03, 0x5f, 0xd6,
2069 static const DWORD unwind_info_5_header =
2070 (
sizeof(function_5)/4) |
2076 static const BYTE unwind_info_5[] =
2078 DW(unwind_info_5_header),
2081 UWOP_SAVE_FREGP(12, 32),
2083 UWOP_SAVE_FREGP_X(8, 64),
2085 UWOP_SAVE_REGP(27, 32),
2087 UWOP_SAVE_REGP_X(23, 64),
2089 UWOP_SAVE_R19R20_X(32),
2098 static const struct results_arm64 results_5[] =
2101 { 0x00, 0x00, 0, ORIG_LR, 0x00000,
TRUE, { {-1,-1} }},
2102 { 0x04, 0x00, 0, ORIG_LR, 0x00020,
TRUE, { {x19, 0x00}, {x20, 0x08}, {-1,-1} }},
2103 { 0x08, 0x00, 0, ORIG_LR, 0x00020,
TRUE, { {x19, 0x00}, {x20, 0x08}, {x21, 0x10}, {x22, 0x18}, {-1,-1} }},
2104 { 0x0c, 0x00, 0, ORIG_LR, 0x00060,
TRUE, { {x19, 0x40}, {x20, 0x48}, {x21, 0x50}, {x22, 0x58}, {x23, 0x00}, {x24, 0x08}, {-1,-1} }},
2105 { 0x10, 0x00, 0, ORIG_LR, 0x00060,
TRUE, { {x19, 0x40}, {x20, 0x48}, {x21, 0x50}, {x22, 0x58}, {x23, 0x00}, {x24, 0x08}, {x25, 0x10}, {x26, 0x18}, {-1,-1} }},
2106 { 0x14, 0x00, 0, ORIG_LR, 0x00060,
TRUE, { {x19, 0x40}, {x20, 0x48}, {x21, 0x50}, {x22, 0x58}, {x23, 0x00}, {x24, 0x08}, {x25, 0x10}, {x26, 0x18}, {x27, 0x20}, {x28, 0x28}, {-1,-1} }},
2107 { 0x18, 0x00, 0, 0x38, 0x00060,
TRUE, { {x19, 0x40}, {x20, 0x48}, {x21, 0x50}, {x22, 0x58}, {x23, 0x00}, {x24, 0x08}, {x25, 0x10}, {x26, 0x18}, {x27, 0x20}, {x28, 0x28}, {x29, 0x30}, {lr, 0x38}, {-1,-1} }},
2108 { 0x1c, 0x00, 0, 0x78, 0x000a0,
TRUE, { {x19, 0x80}, {x20, 0x88}, {x21, 0x90}, {x22, 0x98}, {x23, 0x40}, {x24, 0x48}, {x25, 0x50}, {x26, 0x58}, {x27, 0x60}, {x28, 0x68}, {x29, 0x70}, {lr, 0x78}, {d8, 0x00}, {d9, 0x08}, {-1,-1} }},
2110 { 0x20, 0x00, 0, 0x78, 0x000a0,
TRUE, { {x19, 0x80}, {x20, 0x88}, {x21, 0x90}, {x22, 0x98}, {x23, 0x40}, {x24, 0x48}, {x25, 0x50}, {x26, 0x58}, {x27, 0x60}, {x28, 0x68}, {x29, 0x70}, {lr, 0x78}, {d8, 0x00}, {d9, 0x08}, {d10, 0x10}, {d11, 0x18}, {-1,-1} }},
2111 { 0x24, 0x00, 0, 0x78, 0x000a0,
TRUE, { {x19, 0x80}, {x20, 0x88}, {x21, 0x90}, {x22, 0x98}, {x23, 0x40}, {x24, 0x48}, {x25, 0x50}, {x26, 0x58}, {x27, 0x60}, {x28, 0x68}, {x29, 0x70}, {lr, 0x78}, {d8, 0x00}, {d9, 0x08}, {d10, 0x10}, {d11, 0x18}, {d12, 0x20}, {d13, 0x28}, {-1,-1} }},
2112 { 0x28, 0x00, 0, 0x78, 0x000a0,
TRUE, { {x19, 0x80}, {x20, 0x88}, {x21, 0x90}, {x22, 0x98}, {x23, 0x40}, {x24, 0x48}, {x25, 0x50}, {x26, 0x58}, {x27, 0x60}, {x28, 0x68}, {x29, 0x70}, {lr, 0x78}, {d8, 0x00}, {d9, 0x08}, {d10, 0x10}, {d11, 0x18}, {d12, 0x20}, {d13, 0x28}, {d14, 0x30}, {d15, 0x38}, {-1,-1} }},
2116 static const BYTE function_6[] =
2118 0xf3, 0x53, 0xbd, 0xa9,
2119 0xf5, 0x0b, 0x00, 0xf9,
2120 0xe8, 0xa7, 0x01, 0x6d,
2121 0xea, 0x17, 0x00, 0xfd,
2122 0xff, 0x03, 0x00, 0xd1,
2123 0x1f, 0x20, 0x03, 0xd5,
2124 0xff, 0x03, 0x00, 0x91,
2125 0xea, 0x17, 0x40, 0xfd,
2126 0xe8, 0xa7, 0x41, 0x6d,
2127 0xf5, 0x0b, 0x40, 0xf9,
2128 0xf3, 0x53, 0xc3, 0xa8,
2129 0xc0, 0x03, 0x5f, 0xd6,
2132 static const DWORD unwind_info_6_packed =
2134 (
sizeof(function_6)/4 << 2) |
2141 static const BYTE unwind_info_6[] = { DW(unwind_info_6_packed) };
2143 static const struct results_arm64 results_6[] =
2146 { 0x00, 0x00, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
2147 { 0x04, 0x00, 0, ORIG_LR, 0x030,
TRUE, { {x19,0x00}, {x20,0x08}, {-1,-1} }},
2148 { 0x08, 0x00, 0, ORIG_LR, 0x030,
TRUE, { {x19,0x00}, {x20,0x08}, {x21, 0x10}, {-1,-1} }},
2149 { 0x0c, 0x00, 0, ORIG_LR, 0x030,
TRUE, { {x19,0x00}, {x20,0x08}, {x21, 0x10}, {d8, 0x18}, {d9, 0x20}, {-1,-1} }},
2150 { 0x10, 0x00, 0, ORIG_LR, 0x030,
TRUE, { {x19,0x00}, {x20,0x08}, {x21, 0x10}, {d8, 0x18}, {d9, 0x20}, {d10, 0x28}, {-1,-1} }},
2151 { 0x14, 0x00, 0, ORIG_LR, 0x030,
TRUE, { {x19,0x00}, {x20,0x08}, {x21, 0x10}, {d8, 0x18}, {d9, 0x20}, {d10, 0x28}, {-1,-1} }},
2152 { 0x18, 0x00, 0, ORIG_LR, 0x030,
TRUE, { {x19,0x00}, {x20,0x08}, {x21, 0x10}, {d8, 0x18}, {d9, 0x20}, {d10, 0x28}, {-1,-1} }},
2153 { 0x1c, 0x00, 0, ORIG_LR, 0x030,
TRUE, { {x19,0x00}, {x20,0x08}, {x21, 0x10}, {d8, 0x18}, {d9, 0x20}, {d10, 0x28}, {-1,-1} }},
2154 { 0x20, 0x00, 0, ORIG_LR, 0x030,
TRUE, { {x19,0x00}, {x20,0x08}, {x21, 0x10}, {d8, 0x18}, {d9, 0x20}, {-1,-1} }},
2155 { 0x24, 0x00, 0, ORIG_LR, 0x030,
TRUE, { {x19,0x00}, {x20,0x08}, {x21, 0x10}, {-1,-1} }},
2156 { 0x28, 0x00, 0, ORIG_LR, 0x030,
TRUE, { {x19,0x00}, {x20,0x08}, {-1,-1} }},
2157 { 0x2c, 0x00, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
2160 static const BYTE function_7[] =
2162 0xf3, 0x0f, 0x1d, 0xf8,
2163 0xe8, 0xa7, 0x00, 0x6d,
2164 0xea, 0xaf, 0x01, 0x6d,
2165 0xff, 0x03, 0x00, 0xd1,
2166 0x1f, 0x20, 0x03, 0xd5,
2167 0xff, 0x03, 0x00, 0x91,
2168 0xea, 0xaf, 0x41, 0x6d,
2169 0xe8, 0xa7, 0x40, 0x6d,
2170 0xf3, 0x07, 0x43, 0xf8,
2171 0xc0, 0x03, 0x5f, 0xd6,
2174 static const DWORD unwind_info_7_packed =
2176 (
sizeof(function_7)/4 << 2) |
2183 static const BYTE unwind_info_7[] = { DW(unwind_info_7_packed) };
2185 static const struct results_arm64 results_7[] =
2188 { 0x00, 0x00, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
2189 { 0x04, 0x00, 0, ORIG_LR, 0x030,
TRUE, { {x19, 0x00}, {-1,-1} }},
2190 { 0x08, 0x00, 0, ORIG_LR, 0x030,
TRUE, { {x19, 0x00}, {d8, 0x08}, {d9, 0x10}, {-1,-1} }},
2191 { 0x0c, 0x00, 0, ORIG_LR, 0x030,
TRUE, { {x19, 0x00}, {d8, 0x08}, {d9, 0x10}, {d10, 0x18}, {d11, 0x20}, {-1,-1} }},
2192 { 0x10, 0x00, 0, ORIG_LR, 0x030,
TRUE, { {x19, 0x00}, {d8, 0x08}, {d9, 0x10}, {d10, 0x18}, {d11, 0x20}, {-1,-1} }},
2193 { 0x14, 0x00, 0, ORIG_LR, 0x030,
TRUE, { {x19, 0x00}, {d8, 0x08}, {d9, 0x10}, {d10, 0x18}, {d11, 0x20}, {-1,-1} }},
2194 { 0x18, 0x00, 0, ORIG_LR, 0x030,
TRUE, { {x19, 0x00}, {d8, 0x08}, {d9, 0x10}, {d10, 0x18}, {d11, 0x20}, {-1,-1} }},
2195 { 0x1c, 0x00, 0, ORIG_LR, 0x030,
TRUE, { {x19, 0x00}, {d8, 0x08}, {d9, 0x10}, {-1,-1} }},
2196 { 0x20, 0x00, 0, ORIG_LR, 0x030,
TRUE, { {x19, 0x00}, {-1,-1} }},
2197 { 0x24, 0x00, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
2200 static const BYTE function_8[] =
2202 0xe8, 0x27, 0xbf, 0x6d,
2203 0xff, 0x83, 0x00, 0xd1,
2204 0x1f, 0x20, 0x03, 0xd5,
2205 0xff, 0x83, 0x00, 0x91,
2206 0xe8, 0x27, 0xc1, 0x6c,
2207 0xc0, 0x03, 0x5f, 0xd6,
2210 static const DWORD unwind_info_8_packed =
2212 (
sizeof(function_8)/4 << 2) |
2219 static const BYTE unwind_info_8[] = { DW(unwind_info_8_packed) };
2221 static const struct results_arm64 results_8[] =
2224 { 0x00, 0x00, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
2225 { 0x04, 0x00, 0, ORIG_LR, 0x010,
TRUE, { {d8, 0x00}, {d9, 0x08}, {-1,-1} }},
2226 { 0x08, 0x00, 0, ORIG_LR, 0x030,
TRUE, { {d8, 0x20}, {d9, 0x28}, {-1,-1} }},
2227 { 0x0c, 0x00, 0, ORIG_LR, 0x030,
TRUE, { {d8, 0x20}, {d9, 0x28}, {-1,-1} }},
2228 { 0x10, 0x00, 0, ORIG_LR, 0x010,
TRUE, { {d8, 0x00}, {d9, 0x08}, {-1,-1} }},
2229 { 0x14, 0x00, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
2232 static const BYTE function_9[] =
2234 0xf3, 0x0f, 0x1b, 0xf8,
2235 0xe0, 0x87, 0x00, 0xa9,
2236 0xe2, 0x8f, 0x01, 0xa9,
2237 0xe4, 0x97, 0x02, 0xa9,
2238 0xe6, 0x9f, 0x03, 0xa9,
2239 0xff, 0x83, 0x00, 0xd1,
2240 0x1f, 0x20, 0x03, 0xd5,
2241 0xff, 0x83, 0x00, 0x91,
2242 0x1f, 0x20, 0x03, 0xd5,
2243 0x1f, 0x20, 0x03, 0xd5,
2244 0x1f, 0x20, 0x03, 0xd5,
2245 0x1f, 0x20, 0x03, 0xd5,
2246 0xf3, 0x0f, 0x1b, 0xf8,
2247 0xc0, 0x03, 0x5f, 0xd6,
2250 static const DWORD unwind_info_9_packed =
2252 (
sizeof(function_9)/4 << 2) |
2259 static const BYTE unwind_info_9[] = { DW(unwind_info_9_packed) };
2261 static const struct results_arm64 results_9[] =
2264 { 0x00, 0x00, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
2265 { 0x04, 0x00, 0, ORIG_LR, 0x050,
TRUE, { {x19, 0x00}, {-1,-1} }},
2266 { 0x08, 0x00, 0, ORIG_LR, 0x050,
TRUE, { {x19, 0x00}, {-1,-1} }},
2267 { 0x0c, 0x00, 0, ORIG_LR, 0x050,
TRUE, { {x19, 0x00}, {-1,-1} }},
2268 { 0x10, 0x00, 0, ORIG_LR, 0x050,
TRUE, { {x19, 0x00}, {-1,-1} }},
2269 { 0x14, 0x00, 0, ORIG_LR, 0x050,
TRUE, { {x19, 0x00}, {-1,-1} }},
2270 { 0x18, 0x00, 0, ORIG_LR, 0x070,
TRUE, { {x19, 0x20}, {-1,-1} }},
2271 { 0x1c, 0x00, 0, ORIG_LR, 0x070,
TRUE, { {x19, 0x20}, {-1,-1} }},
2272 { 0x20, 0x00, 0, ORIG_LR, 0x070,
TRUE, { {x19, 0x20}, {-1,-1} }},
2273 { 0x24, 0x00, 0, ORIG_LR, 0x070,
TRUE, { {x19, 0x20}, {-1,-1} }},
2274 { 0x28, 0x00, 0, ORIG_LR, 0x070,
TRUE, { {x19, 0x20}, {-1,-1} }},
2275 { 0x2c, 0x00, 0, ORIG_LR, 0x070,
TRUE, { {x19, 0x20}, {-1,-1} }},
2276 { 0x30, 0x00, 0, ORIG_LR, 0x050,
TRUE, { {x19, 0x00}, {-1,-1} }},
2277 { 0x34, 0x00, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
2280 static const BYTE function_10[] =
2282 0xfe, 0x0f, 0x1f, 0xf8,
2283 0xff, 0x43, 0x00, 0xd1,
2284 0x1f, 0x20, 0x03, 0xd5,
2285 0xff, 0x43, 0x00, 0x91,
2286 0xfe, 0x07, 0x41, 0xf8,
2287 0xc0, 0x03, 0x5f, 0xd6,
2290 static const DWORD unwind_info_10_packed =
2292 (
sizeof(function_10)/4 << 2) |
2299 static const BYTE unwind_info_10[] = { DW(unwind_info_10_packed) };
2301 static const struct results_arm64 results_10[] =
2304 { 0x00, 0x00, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
2305 { 0x04, 0x00, 0, 0x00, 0x010,
TRUE, { {lr, 0x00}, {-1,-1} }},
2306 { 0x08, 0x00, 0, 0x10, 0x020,
TRUE, { {lr, 0x10}, {-1,-1} }},
2307 { 0x0c, 0x00, 0, 0x10, 0x020,
TRUE, { {lr, 0x10}, {-1,-1} }},
2308 { 0x10, 0x00, 0, 0x00, 0x010,
TRUE, { {lr, 0x00}, {-1,-1} }},
2309 { 0x14, 0x00, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
2312 static const BYTE function_11[] =
2314 0xf3, 0x53, 0xbe, 0xa9,
2315 0xf5, 0x7b, 0x01, 0xa9,
2316 0xff, 0x43, 0x00, 0xd1,
2317 0x1f, 0x20, 0x03, 0xd5,
2318 0xff, 0x43, 0x00, 0x91,
2319 0xf5, 0x7b, 0x41, 0xa9,
2320 0xf3, 0x53, 0xc2, 0xa8,
2321 0xc0, 0x03, 0x5f, 0xd6,
2324 static const DWORD unwind_info_11_packed =
2326 (
sizeof(function_11)/4 << 2) |
2333 static const BYTE unwind_info_11[] = { DW(unwind_info_11_packed) };
2335 static const struct results_arm64 results_11[] =
2338 { 0x00, 0x00, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
2339 { 0x04, 0x00, 0, ORIG_LR, 0x020,
TRUE, { {x19, 0x00}, {x20, 0x08}, {-1,-1} }},
2340 { 0x08, 0x00, 0, 0x18, 0x020,
TRUE, { {x19, 0x00}, {x20, 0x08}, {x21, 0x10}, {lr, 0x18}, {-1,-1} }},
2341 { 0x0c, 0x00, 0, 0x28, 0x030,
TRUE, { {x19, 0x10}, {x20, 0x18}, {x21, 0x20}, {lr, 0x28}, {-1,-1} }},
2342 { 0x10, 0x00, 0, 0x28, 0x030,
TRUE, { {x19, 0x10}, {x20, 0x18}, {x21, 0x20}, {lr, 0x28}, {-1,-1} }},
2343 { 0x14, 0x00, 0, 0x18, 0x020,
TRUE, { {x19, 0x00}, {x20, 0x08}, {x21, 0x10}, {lr, 0x18}, {-1,-1} }},
2344 { 0x18, 0x00, 0, ORIG_LR, 0x020,
TRUE, { {x19, 0x00}, {x20, 0x08}, {-1,-1} }},
2345 { 0x1c, 0x00, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
2348 static const BYTE function_12[] =
2350 0xf3, 0x53, 0xbf, 0xa9,
2351 0xfd, 0x7b, 0xbe, 0xa9,
2352 0xfd, 0x03, 0x00, 0x91,
2353 0x1f, 0x20, 0x03, 0xd5,
2354 0xbf, 0x03, 0x00, 0x91,
2355 0xfd, 0x7b, 0xc2, 0xa8,
2356 0xf3, 0x53, 0xc1, 0xa8,
2357 0xc0, 0x03, 0x5f, 0xd6,
2360 static const DWORD unwind_info_12_packed =
2362 (
sizeof(function_12)/4 << 2) |
2369 static const BYTE unwind_info_12[] = { DW(unwind_info_12_packed) };
2371 static const struct results_arm64 results_12[] =
2374 { 0x00, 0x10, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
2375 { 0x04, 0x10, 0, ORIG_LR, 0x010,
TRUE, { {x19, 0x00}, {x20, 0x08}, {-1,-1} }},
2376 { 0x08, 0x10, 0, 0x08, 0x030,
TRUE, { {x19, 0x20}, {x20, 0x28}, {x29, 0x00}, {lr, 0x08}, {-1,-1} }},
2377 { 0x0c, 0x10, 0, 0x18, 0x040,
TRUE, { {x19, 0x30}, {x20, 0x38}, {x29, 0x10}, {lr, 0x18}, {-1,-1} }},
2378 { 0x10, 0x10, 0, 0x18, 0x040,
TRUE, { {x19, 0x30}, {x20, 0x38}, {x29, 0x10}, {lr, 0x18}, {-1,-1} }},
2379 { 0x14, 0x10, 0, 0x08, 0x030,
TRUE, { {x19, 0x20}, {x20, 0x28}, {x29, 0x00}, {lr, 0x08}, {-1,-1} }},
2380 { 0x18, 0x10, 0, ORIG_LR, 0x010,
TRUE, { {x19, 0x00}, {x20, 0x08}, {-1,-1} }},
2381 { 0x1c, 0x10, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
2384 static const BYTE function_13[] =
2386 0xf3, 0x53, 0xbf, 0xa9,
2387 0xff, 0x43, 0x08, 0xd1,
2388 0xfd, 0x7b, 0x00, 0xd1,
2389 0xfd, 0x03, 0x00, 0x91,
2390 0x1f, 0x20, 0x03, 0xd5,
2391 0xbf, 0x03, 0x00, 0x91,
2392 0xfd, 0x7b, 0x40, 0xa9,
2393 0xff, 0x43, 0x08, 0x91,
2394 0xf3, 0x53, 0xc1, 0xa8,
2395 0xc0, 0x03, 0x5f, 0xd6,
2398 static const DWORD unwind_info_13_packed =
2400 (
sizeof(function_13)/4 << 2) |
2407 static const BYTE unwind_info_13[] = { DW(unwind_info_13_packed) };
2409 static const struct results_arm64 results_13[] =
2412 { 0x00, 0x10, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
2413 { 0x04, 0x10, 0, ORIG_LR, 0x010,
TRUE, { {x19, 0x00}, {x20, 0x08}, {-1,-1} }},
2414 { 0x08, 0x10, 0, ORIG_LR, 0x220,
TRUE, { {x19, 0x210}, {x20, 0x218}, {-1,-1} }},
2415 { 0x0c, 0x10, 0, 0x08, 0x220,
TRUE, { {x19, 0x210}, {x20, 0x218}, {x29, 0x00}, {lr, 0x08}, {-1,-1} }},
2416 { 0x10, 0x10, 0, 0x18, 0x230,
TRUE, { {x19, 0x220}, {x20, 0x228}, {x29, 0x10}, {lr, 0x18}, {-1,-1} }},
2417 { 0x14, 0x10, 0, 0x18, 0x230,
TRUE, { {x19, 0x220}, {x20, 0x228}, {x29, 0x10}, {lr, 0x18}, {-1,-1} }},
2418 { 0x18, 0x10, 0, 0x08, 0x220,
TRUE, { {x19, 0x210}, {x20, 0x218}, {x29, 0x00}, {lr, 0x08}, {-1,-1} }},
2419 { 0x1c, 0x10, 0, ORIG_LR, 0x220,
TRUE, { {x19, 0x210}, {x20, 0x218}, {-1,-1} }},
2420 { 0x20, 0x10, 0, ORIG_LR, 0x010,
TRUE, { {x19, 0x00}, {x20, 0x08}, {-1,-1} }},
2421 { 0x24, 0x10, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
2424 static const BYTE function_14[] =
2426 0xe6, 0x9f, 0xba, 0xad,
2427 0xe8, 0x27, 0x01, 0xad,
2428 0xea, 0x2f, 0x02, 0xad,
2429 0xec, 0x37, 0x03, 0xad,
2430 0xee, 0x3f, 0x04, 0xad,
2431 0xfd, 0x7b, 0x0a, 0xa9,
2432 0xfd, 0x83, 0x02, 0x91,
2433 0x1f, 0x20, 0x03, 0xd5,
2434 0xfd, 0x7b, 0x4a, 0xa9,
2435 0xee, 0x3f, 0x44, 0xad,
2436 0xec, 0x37, 0x43, 0xad,
2437 0xea, 0x2f, 0x42, 0xad,
2438 0xe8, 0x27, 0x41, 0xad,
2439 0xe6, 0x9f, 0xc5, 0xac,
2440 0xc0, 0x03, 0x5f, 0xd6,
2443 static const DWORD unwind_info_14_header =
2444 (
sizeof(function_14)/4) |
2450 static const BYTE unwind_info_14[] =
2452 DW(unwind_info_14_header),
2454 UWOP_SAVE_FPLR(0xa0),
2455 UWOP_SAVE_ANY_REG(0x4e,0x88),
2457 UWOP_SAVE_ANY_REG(0x4a,0x84),
2458 UWOP_SAVE_ANY_REG(0x48,0x82),
2459 UWOP_SAVE_ANY_REG(0x66,0x8a),
2464 static const struct results_arm64 results_14[] =
2467 { 0x00, 0x00, 0, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
2468 { 0x04, 0x00, 0, ORIG_LR, 0x0b0,
TRUE, { {d6, 0x00}, {d7, 0x10}, {-1,-1} }},
2469 { 0x08, 0x00, 0, ORIG_LR, 0x0b0,
TRUE, { {d6, 0x00}, {d7, 0x10}, {d8, 0x20}, {d9, 0x30}, {-1,-1} }},
2470 { 0x0c, 0x00, 0, ORIG_LR, 0x0b0,
TRUE, { {d6, 0x00}, {d7, 0x10}, {d8, 0x20}, {d9, 0x30}, {d10, 0x40}, {d11, 0x50}, {-1,-1} }},
2471 { 0x10, 0x00, 0, ORIG_LR, 0x0b0,
TRUE, { {d6, 0x00}, {d7, 0x10}, {d8, 0x20}, {d9, 0x30}, {d10, 0x40}, {d11, 0x50}, {d12, 0x60}, {d13, 0x70}, {-1,-1} }},
2472 { 0x14, 0x00, 0, ORIG_LR, 0x0b0,
TRUE, { {d6, 0x00}, {d7, 0x10}, {d8, 0x20}, {d9, 0x30}, {d10, 0x40}, {d11, 0x50}, {d12, 0x60}, {d13, 0x70}, {d14, 0x80}, {d15, 0x90}, {-1,-1} }},
2473 { 0x18, 0x00, 0, 0xa8, 0x0b0,
TRUE, { {d6, 0x00}, {d7, 0x10}, {d8, 0x20}, {d9, 0x30}, {d10, 0x40}, {d11, 0x50}, {d12, 0x60}, {d13, 0x70}, {d14, 0x80}, {d15, 0x90}, {lr, 0xa8}, {x29, 0xa0}, {-1,-1} }},
2474 { 0x1c, 0xa0, 0, 0xa8, 0x0b0,
TRUE, { {d6, 0x00}, {d7, 0x10}, {d8, 0x20}, {d9, 0x30}, {d10, 0x40}, {d11, 0x50}, {d12, 0x60}, {d13, 0x70}, {d14, 0x80}, {d15, 0x90}, {lr, 0xa8}, {x29, 0xa0}, {-1,-1} }},
2477 static const BYTE function_15[] =
2479 0x1f, 0x20, 0x03, 0xd5,
2480 0x1f, 0x20, 0x03, 0xd5,
2481 0x1f, 0x20, 0x03, 0xd5,
2482 0x1f, 0x20, 0x03, 0xd5,
2483 0x1f, 0x20, 0x03, 0xd5,
2484 0xc0, 0x03, 0x5f, 0xd6,
2487 static const DWORD unwind_info_15_header =
2488 (
sizeof(function_15)/4) |
2494 static const BYTE unwind_info_15[] =
2496 DW(unwind_info_15_header),
2499 UWOP_SAVE_REGP(19, 0x10),
2500 UWOP_SAVE_FPLR_X(0x20),
2506 static const struct results_arm64 results_15[] =
2509 { 0x00, 0x00, 0, 0x08, 0x020,
TRUE, { {x29, 0x00}, {lr, 0x08}, {x19,0x10}, {x20,0x18}, {-1,-1} }},
2510 { 0x04, 0x00, 0, 0x08, 0x020,
TRUE, { {x29, 0x00}, {lr, 0x08}, {x19,0x10}, {x20,0x18}, {-1,-1} }},
2511 { 0x08, 0x00, 0, 0x08, 0x020,
TRUE, { {x29, 0x00}, {lr, 0x08}, {x19,0x10}, {x20,0x18}, {-1,-1} }},
2512 { 0x0c, 0x00, 0, 0x08, 0x020,
TRUE, { {x29, 0x00}, {lr, 0x08}, {x19,0x10}, {x20,0x18}, {-1,-1} }},
2513 { 0x10, 0x00, 0, 0x08, 0x020,
TRUE, { {x29, 0x00}, {lr, 0x08}, {x19,0x10}, {x20,0x18}, {-1,-1} }},
2514 { 0x14, 0x00, 0, 0x08, 0x020,
TRUE, { {x29, 0x00}, {lr, 0x08}, {x19,0x10}, {x20,0x18}, {-1,-1} }},
2517 static const BYTE function_16[] =
2519 0xff, 0x43, 0x00, 0xd1,
2520 0x1f, 0x20, 0x03, 0xd5,
2521 0xff, 0x43, 0x00, 0xd1,
2522 0x1f, 0x20, 0x03, 0xd5,
2523 0xc0, 0x03, 0x5f, 0xd6,
2526 static const DWORD unwind_info_16_header =
2527 (
sizeof(function_16)/4) |
2533 static const BYTE unwind_info_16[] =
2535 DW(unwind_info_16_header),
2543 static const struct results_arm64 results_16[] =
2546 { 0x00, 0x00, 0, ORIG_LR, 0x010,
TRUE, { {-1,-1} }},
2547 { 0x04, 0x00, 0 , 0x00f8, 0x0a8,
FALSE, { {
x0, 0x80}, {
x1, 0x88}, {
x2, 0xb8}, {
x3, 0xc0}, {
x4, 0xc8}, {
x5, 0xd0}, {
x6, 0x130}, {
x7, 0x140}, {
x8, 0x78}, {
x9, 0x150}, {
x10, 0x160}, {
x11, 0x170}, {
x12, 0x180}, {
x13, 0}, {
x14, 0}, {
x15, 0x190}, {
x16, 0x0158014801380128}, {
x17, 0x0198018801780168}, {x18, 0}, {x19, 0xd8}, {x20, 0xe0}, {x21, 0xe8}, {x22, 0x0f0}, {x23, 0}, {x24, 0}, {x25, 0xa8}, {x26, 0xb0}, {x27, 0x90}, {x28, 0}, {x29, 0xa0}, {lr, 0x120}, {d0, 0x1a0}, {d1, 0x1b0}, {d2, 0x1c0}, {d3, 0x1d0}, {d4, 0x1e0}, {d5, 0x1f0}, {d6, 0x200}, {d7, 0x210}, {d8, 0x220}, {d9, 0x230}, {d10, 0x240}, {d11, 0x250}, {d12, 0x260}, {d13, 0x270}, {d14, 0x280}, {d15, 0x290}, {-1,-1} }},
2548 { 0x08, 0x00, 0 , 0x0108, 0x0b8,
FALSE, { {
x0, 0x90}, {
x1, 0x98}, {
x2, 0xc8}, {
x3, 0xd0}, {
x4, 0xd8}, {
x5, 0xe0}, {
x6, 0x140}, {
x7, 0x150}, {
x8, 0x88}, {
x9, 0x160}, {
x10, 0x170}, {
x11, 0x180}, {
x12, 0x190}, {
x13, 0}, {
x14, 0}, {
x15, 0x1a0}, {
x16, 0x0168015801480138}, {
x17, 0x01a8019801880178}, {x18, 0}, {x19, 0xe8}, {x20, 0xf0}, {x21, 0xf8}, {x22, 0x100}, {x23, 0}, {x24, 0}, {x25, 0xb8}, {x26, 0xc0}, {x27, 0xa0}, {x28, 0}, {x29, 0xb0}, {lr, 0x130}, {d0, 0x1b0}, {d1, 0x1c0}, {d2, 0x1d0}, {d3, 0x1e0}, {d4, 0x1f0}, {d5, 0x200}, {d6, 0x210}, {d7, 0x220}, {d8, 0x230}, {d9, 0x240}, {d10, 0x250}, {d11, 0x260}, {d12, 0x270}, {d13, 0x280}, {d14, 0x290}, {d15, 0x2a0}, {-1,-1} }},
2549 { 0x0c, 0x00, 0 , 0x0108, 0x0b8,
FALSE, { {
x0, 0x90}, {
x1, 0x98}, {
x2, 0xc8}, {
x3, 0xd0}, {
x4, 0xd8}, {
x5, 0xe0}, {
x6, 0x140}, {
x7, 0x150}, {
x8, 0x88}, {
x9, 0x160}, {
x10, 0x170}, {
x11, 0x180}, {
x12, 0x190}, {
x13, 0}, {
x14, 0}, {
x15, 0x1a0}, {
x16, 0x0168015801480138}, {
x17, 0x01a8019801880178}, {x18, 0}, {x19, 0xe8}, {x20, 0xf0}, {x21, 0xf8}, {x22, 0x100}, {x23, 0}, {x24, 0}, {x25, 0xb8}, {x26, 0xc0}, {x27, 0xa0}, {x28, 0}, {x29, 0xb0}, {lr, 0x130}, {d0, 0x1b0}, {d1, 0x1c0}, {d2, 0x1d0}, {d3, 0x1e0}, {d4, 0x1f0}, {d5, 0x200}, {d6, 0x210}, {d7, 0x220}, {d8, 0x230}, {d9, 0x240}, {d10, 0x250}, {d11, 0x260}, {d12, 0x270}, {d13, 0x280}, {d14, 0x290}, {d15, 0x2a0}, {-1,-1} }},
2550 { 0x10, 0x00, 0 , 0x0108, 0x0b8,
FALSE, { {
x0, 0x90}, {
x1, 0x98}, {
x2, 0xc8}, {
x3, 0xd0}, {
x4, 0xd8}, {
x5, 0xe0}, {
x6, 0x140}, {
x7, 0x150}, {
x8, 0x88}, {
x9, 0x160}, {
x10, 0x170}, {
x11, 0x180}, {
x12, 0x190}, {
x13, 0}, {
x14, 0}, {
x15, 0x1a0}, {
x16, 0x0168015801480138}, {
x17, 0x01a8019801880178}, {x18, 0}, {x19, 0xe8}, {x20, 0xf0}, {x21, 0xf8}, {x22, 0x100}, {x23, 0}, {x24, 0}, {x25, 0xb8}, {x26, 0xc0}, {x27, 0xa0}, {x28, 0}, {x29, 0xb0}, {lr, 0x130}, {d0, 0x1b0}, {d1, 0x1c0}, {d2, 0x1d0}, {d3, 0x1e0}, {d4, 0x1f0}, {d5, 0x200}, {d6, 0x210}, {d7, 0x220}, {d8, 0x230}, {d9, 0x240}, {d10, 0x250}, {d11, 0x260}, {d12, 0x270}, {d13, 0x280}, {d14, 0x290}, {d15, 0x2a0}, {-1,-1} }},
2553 static const BYTE function_17[] =
2555 0xff, 0x43, 0x00, 0xd1,
2556 0xff, 0x43, 0x00, 0xd1,
2557 0x1f, 0x20, 0x03, 0xd5,
2558 0xc0, 0x03, 0x5f, 0xd6,
2561 static const DWORD unwind_info_17_header =
2562 (
sizeof(function_17)/4) |
2568 static const BYTE unwind_info_17[] =
2570 DW(unwind_info_17_header),
2572 UWOP_CLEAR_UNWOUND_TO_CALL,
2578 static const struct results_arm64 results_17[] =
2581 { 0x00, 0x00, 0, ORIG_LR, 0x010,
TRUE, { {-1,-1} }},
2582 { 0x04, 0x00, 0, ORIG_LR, 0x020,
TRUE, { {-1,-1} }},
2583 { 0x08, 0x00, 0, ORIG_LR, 0x020,
TRUE, { {-1,-1} }},
2584 { 0x0c, 0x00, 0, ORIG_LR, 0x020,
TRUE, { {-1,-1} }},
2587 static const BYTE function_18[] =
2589 0x1f, 0x20, 0x03, 0xd5,
2590 0x1f, 0x20, 0x03, 0xd5,
2591 0xc0, 0x03, 0x5f, 0xd6,
2594 static const struct results_arm64 results_18[] =
2597 { 0x00, 0x00, -1, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
2598 { 0x04, 0x00, -1, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
2599 { 0x08, 0x00, -1, ORIG_LR, 0x000,
TRUE, { {-1,-1} }},
2600 { 0x0c, 0x00, -2, 0, 0xdeadbeef,
FALSE, { {-1,-1} }},
2603 static const struct unwind_test_arm64
tests[] =
2605#define TEST(func, unwind, size, results, unwound_clear, last_ptr, stack_value_index, stack_value) \
2606 { func, sizeof(func), unwind, size, results, ARRAY_SIZE(results), unwound_clear, last_ptr, stack_value_index, stack_value }
2607 TEST(function_0, unwind_info_0,
sizeof(unwind_info_0), results_0, 0, 0, -1, 0),
2608 TEST(function_1, unwind_info_1, 0, results_1, 0, 0, -1, 0),
2609 TEST(function_2, unwind_info_2,
sizeof(unwind_info_2), results_2, 1, 0, -1, 0),
2611 TEST(function_4, unwind_info_4,
sizeof(unwind_info_4), results_4, 0, 0, -1, 0),
2612 TEST(function_5, unwind_info_5,
sizeof(unwind_info_5), results_5, 0, 0, -1, 0),
2613 TEST(function_6, unwind_info_6, 0, results_6, 0, 0, -1, 0),
2614 TEST(function_7, unwind_info_7, 0, results_7, 0, 0, -1, 0),
2615 TEST(function_8, unwind_info_8, 0, results_8, 0, 0, -1, 0),
2616 TEST(function_9, unwind_info_9, 0, results_9, 0, 0, -1, 0),
2617 TEST(function_10, unwind_info_10, 0, results_10, 0, 0, -1, 0),
2618 TEST(function_11, unwind_info_11, 0, results_11, 0, 0, -1, 0),
2619 TEST(function_12, unwind_info_12, 0, results_12, 0, 0, -1, 0),
2620 TEST(function_13, unwind_info_13, 0, results_13, 0, 0, -1, 0),
2621 TEST(function_14, unwind_info_14,
sizeof(unwind_info_14), results_14, 0, 0, -1, 0),
2622 TEST(function_15, unwind_info_15,
sizeof(unwind_info_15), results_15, 0, 0, -1, 0),
2624 TEST(function_17, unwind_info_17,
sizeof(unwind_info_17), results_17, 2, 0, -1, 0),
2625 TEST(function_18,
NULL, 0, results_18, 0, 0, -1, 0),
2632 SIZE_T code_size = 0x10000;
2637 if (!pNtAllocateVirtualMemoryEx ||
2641 trace(
"running arm64ec tests\n" );
2650#undef UWOP_ALLOC_SMALL
2651#undef UWOP_ALLOC_LARGE
2657#define UWOP_PUSH_NONVOL 0
2658#define UWOP_ALLOC_LARGE 1
2659#define UWOP_ALLOC_SMALL 2
2660#define UWOP_SET_FPREG 3
2661#define UWOP_SAVE_NONVOL 4
2662#define UWOP_SAVE_NONVOL_FAR 5
2663#define UWOP_SAVE_XMM128 8
2664#define UWOP_SAVE_XMM128_FAR 9
2665#define UWOP_PUSH_MACHFRAME 10
2677struct unwind_test_x86
2679 const BYTE *function;
2680 size_t function_size;
2682 const struct results_x86 *
results;
2683 unsigned int nb_results;
2684 const struct results_x86 *broken_results;
2689 rax, rcx, rdx, rbx, rsp, rbp, rsi, rdi,
2690 r8, r9, r10, r11, r12, r13, r14, r15
2693static const char *
const reg_names_x86[16] =
2695 "rax",
"rcx",
"rdx",
"rbx",
"rsp",
"rbp",
"rsi",
"rdi",
2696 "r8",
"r9",
"r10",
"r11",
"r12",
"r13",
"r14",
"r15"
2699#define UWOP(code,info) (UWOP_##code | ((info) << 4))
2701static void call_virtual_unwind_x86(
int testnum,
const struct unwind_test_x86 *
test )
2703 static const int code_offset = 1024;
2704 static const int unwind_offset = 2048;
2709 RUNTIME_FUNCTION runtime_func;
2710 KNONVOLATILE_CONTEXT_POINTERS ctx_ptr;
2713 ULONG64 frame, orig_rip, orig_rbp, unset_reg;
2714 void *expected_handler, *broken_handler;
2717 if (
test->unwind_info)
2719 UINT unwind_size = 4 + 2 *
test->unwind_info[2] + 8;
2721 runtime_func.BeginAddress = code_offset;
2722 runtime_func.EndAddress = code_offset +
test->function_size;
2723 runtime_func.UnwindData = unwind_offset;
2728 for (
i = 0;
i <
test->nb_results;
i++)
2730 memset( &ctx_ptr, 0,
sizeof(ctx_ptr) );
2732 memset( &unset_reg, 0x55,
sizeof(unset_reg) );
2733 for (
j = 0;
j < 256;
j++) fake_stack[
j] =
j * 8;
2741 (
void *)orig_rip, *(
BYTE *)orig_rip, (
void *)orig_rbp, (
void *)
context.Rsp );
2743 if (!
test->unwind_info) fake_stack[0] = 0x1234;
2745 broken_handler =
test->broken_results &&
test->broken_results[
i].handler ? (
char *)
code_mem + 0x200 :
NULL;
2747 if (pRtlVirtualUnwind2)
2752 data = (
void *)0xdeadbeef;
2754 test->unwind_info ? &runtime_func :
NULL, &new_context,
2759 "%u/%u: wrong handler %p/%p\n",
testnum,
i,
handler, expected_handler );
2767 data = (
void *)0xdeadbeef;
2769 test->unwind_info ? &runtime_func :
NULL,
2773 broken_handler =
test->broken_results &&
test->broken_results[
i].handler ? (
char *)
code_mem + 0x200 :
NULL;
2776 "%u/%u: wrong handler %p/%p\n",
testnum,
i,
handler, expected_handler );
2788 "%u/%u: wrong frame %p/%p\n",
2789 testnum,
i, (
void *)frame, (
char *)fake_stack +
test->results[
i].frame );
2791 for (
j = 0;
j < 16;
j++)
2795 for (
k = 0;
k < nb_regs;
k++)
2797 if (
test->results[
i].regs[
k][0] == -1)
2802 if (
test->results[
i].regs[
k][0] ==
j)
break;
2805 if (
test->broken_results)
2807 for (broken_k = 0; broken_k < nb_regs; broken_k++)
2809 if (
test->broken_results[
i].regs[broken_k][0] == -1)
2814 if (
test->broken_results[
i].regs[broken_k][0] ==
j)
2825 ULONG64 expected_rsp, broken_rsp;
2827 ok( !ctx_ptr.IntegerContext[
j],
2828 "%u/%u: rsp should not be set in ctx_ptr\n",
testnum,
i );
2829 expected_rsp =
test->results[
i].regs[
k][1] < 0
2831 if (
test->broken_results)
2832 broken_rsp =
test->broken_results[
i].regs[
k][1] < 0
2833 ? -
test->broken_results[
i].regs[
k][1]
2836 broken_rsp = expected_rsp;
2839 "%u/%u: register rsp wrong %p/%p\n",
2844 if (ctx_ptr.IntegerContext[
j])
2846 ok(
k < nb_regs ||
broken( broken_k < nb_regs ),
"%u/%u: register %s should not be set to %Ix\n",
2850 ==
test->broken_results[
i].regs[broken_k][1] ),
2851 "%u/%u: register %s wrong %p/%x\n",
2856 ok(
k == nb_regs ||
broken( broken_k == nb_regs ),
"%u/%u: register %s should be set\n",
2859 ok(
context.Rbp == orig_rbp,
"%u/%u: register rbp wrong %p/unset\n",
2863 "%u/%u: register %s wrong %p/unset\n",
2870static void test_virtual_unwind_x86(
void)
2872 static const BYTE function_0[] =
2875 0x48, 0x81, 0xec, 0x10, 0x01, 0x00, 0x00,
2876 0x48, 0x8d, 0x6c, 0x24, 0x30,
2877 0x48, 0x89, 0x9d, 0xf0, 0x00, 0x00, 0x00,
2878 0x48, 0x89, 0xb5, 0xf8, 0x00, 0x00, 0x00,
2880 0x48, 0x8b, 0x9d, 0xf0, 0x00, 0x00, 0x00,
2881 0x48, 0x8b, 0xb5, 0xf8, 0x00, 0x00, 0x00,
2882 0x48, 0x8d, 0xa5, 0xe0, 0x00, 0x00, 0x00,
2887 static const BYTE unwind_info_0[] =
2889 1 | (UNW_FLAG_EHANDLER << 3),
2894 0x1c, UWOP(SAVE_NONVOL, rsi), 0x25, 0,
2895 0x15, UWOP(SAVE_NONVOL, rbx), 0x24, 0,
2896 0x0e, UWOP(SET_FPREG, rbp),
2897 0x09, UWOP(ALLOC_LARGE, 0), 0x22, 0,
2898 0x02, UWOP(PUSH_NONVOL, rbp),
2900 0x00, 0x02, 0x00, 0x00,
2901 0x05, 0x06, 0x07, 0x08,
2904 static const struct results_x86 results_0[] =
2907 { 0x00, 0x40,
FALSE, 0x000, 0x000, { {rsp,0x008}, {-1,-1} }},
2908 { 0x02, 0x40,
FALSE, 0x008, 0x000, { {rsp,0x010}, {rbp,0x000}, {-1,-1} }},
2909 { 0x09, 0x40,
FALSE, 0x118, 0x000, { {rsp,0x120}, {rbp,0x110}, {-1,-1} }},
2910 { 0x0e, 0x40,
FALSE, 0x128, 0x010, { {rsp,0x130}, {rbp,0x120}, {-1,-1} }},
2911 { 0x15, 0x40,
FALSE, 0x128, 0x010, { {rsp,0x130}, {rbp,0x120}, {rbx,0x130}, {-1,-1} }},
2912 { 0x1c, 0x40,
TRUE, 0x128, 0x010, { {rsp,0x130}, {rbp,0x120}, {rbx,0x130}, {rsi,0x138}, {-1,-1}}},
2913 { 0x1d, 0x40,
TRUE, 0x128, 0x010, { {rsp,0x130}, {rbp,0x120}, {rbx,0x130}, {rsi,0x138}, {-1,-1}}},
2914 { 0x24, 0x40,
TRUE, 0x128, 0x010, { {rsp,0x130}, {rbp,0x120}, {rbx,0x130}, {rsi,0x138}, {-1,-1}}},
2915 { 0x2b, 0x40,
FALSE, 0x128, 0x010, { {rsp,0x130}, {rbp,0x120}, {-1,-1}}},
2916 { 0x32, 0x40,
FALSE, 0x008, 0x010, { {rsp,0x010}, {rbp,0x000}, {-1,-1}}},
2917 { 0x33, 0x40,
FALSE, 0x000, 0x010, { {rsp,0x008}, {-1,-1}}},
2920 static const struct results_x86 broken_results_0[] =
2923 { 0x00, 0x40,
FALSE, 0x000, 0x000, { {rsp,0x008}, {-1,-1} }},
2924 { 0x02, 0x40,
FALSE, 0x008, 0x000, { {rsp,0x010}, {rbp,0x000}, {-1,-1} }},
2925 { 0x09, 0x40,
FALSE, 0x118, 0x000, { {rsp,0x120}, {rbp,0x110}, {-1,-1} }},
2926 { 0x0e, 0x40,
FALSE, 0x128, 0x010, { {rsp,0x130}, {rbp,0x120}, {-1,-1} }},
2927 { 0x15, 0x40,
FALSE, 0x128, 0x010, { {rsp,0x130}, {rbp,0x120}, {rbx,0x130}, {-1,-1} }},
2928 { 0x1c, 0x40,
TRUE, 0x128, 0x010, { {rsp,0x130}, {rbp,0x120}, {rbx,0x130}, {rsi,0x138}, {-1,-1}}},
2929 { 0x1d, 0x40,
TRUE, 0x128, 0x010, { {rsp,0x130}, {rbp,0x120}, {rbx,0x130}, {rsi,0x138}, {-1,-1}}},
2930 { 0x24, 0x40,
TRUE, 0x128, 0x010, { {rsp,0x130}, {rbp,0x120}, {rbx,0x130}, {rsi,0x138}, {-1,-1}}},
2932 { 0x2b, 0x40,
FALSE, 0x128, 0x128, { {rsp,0x130}, {rbp,0x120}, {-1,-1}}},
2933 { 0x32, 0x40,
FALSE, 0x008, 0x008, { {rsp,0x010}, {rbp,0x000}, {-1,-1}}},
2934 { 0x33, 0x40,
FALSE, 0x000, 0x000, { {rsp,0x008}, {-1,-1}}},
2937 static const BYTE function_1[] =
2944 0x48, 0x83, 0xec, 0x30,
2946 0x48, 0x83, 0xc4, 0x30,
2955 static const BYTE unwind_info_1[] =
2957 1 | (UNW_FLAG_EHANDLER << 3),
2962 0x0a, UWOP(ALLOC_SMALL, 5),
2963 0x06, UWOP(PUSH_NONVOL, r12),
2964 0x04, UWOP(PUSH_NONVOL, rdi),
2965 0x03, UWOP(PUSH_NONVOL, rsi),
2966 0x02, UWOP(PUSH_NONVOL, rbp),
2967 0x01, UWOP(PUSH_NONVOL, rbx),
2969 0x00, 0x02, 0x00, 0x00,
2970 0x05, 0x06, 0x07, 0x08,
2973 static const struct results_x86 results_1[] =
2976 { 0x00, 0x50,
FALSE, 0x000, 0x000, { {rsp,0x008}, {-1,-1} }},
2977 { 0x01, 0x50,
FALSE, 0x008, 0x000, { {rsp,0x010}, {rbx,0x000}, {-1,-1} }},
2978 { 0x02, 0x50,
FALSE, 0x010, 0x000, { {rsp,0x018}, {rbx,0x008}, {rbp,0x000}, {-1,-1} }},
2979 { 0x03, 0x50,
FALSE, 0x018, 0x000, { {rsp,0x020}, {rbx,0x010}, {rbp,0x008}, {rsi,0x000}, {-1,-1} }},
2980 { 0x04, 0x50,
FALSE, 0x020, 0x000, { {rsp,0x028}, {rbx,0x018}, {rbp,0x010}, {rsi,0x008}, {rdi,0x000}, {-1,-1} }},
2981 { 0x06, 0x50,
FALSE, 0x028, 0x000, { {rsp,0x030}, {rbx,0x020}, {rbp,0x018}, {rsi,0x010}, {rdi,0x008}, {r12,0x000}, {-1,-1} }},
2982 { 0x0a, 0x50,
TRUE, 0x058, 0x000, { {rsp,0x060}, {rbx,0x050}, {rbp,0x048}, {rsi,0x040}, {rdi,0x038}, {r12,0x030}, {-1,-1} }},
2983 { 0x0c, 0x50,
FALSE, 0x058, 0x000, { {rsp,0x060}, {rbx,0x050}, {rbp,0x048}, {rsi,0x040}, {rdi,0x038}, {r12,0x030}, {-1,-1} }},
2984 { 0x10, 0x50,
FALSE, 0x028, 0x000, { {rsp,0x030}, {rbx,0x020}, {rbp,0x018}, {rsi,0x010}, {rdi,0x008}, {r12,0x000}, {-1,-1} }},
2985 { 0x12, 0x50,
FALSE, 0x020, 0x000, { {rsp,0x028}, {rbx,0x018}, {rbp,0x010}, {rsi,0x008}, {rdi,0x000}, {-1,-1} }},
2986 { 0x13, 0x50,
FALSE, 0x018, 0x000, { {rsp,0x020}, {rbx,0x010}, {rbp,0x008}, {rsi,0x000}, {-1,-1} }},
2987 { 0x14, 0x50,
FALSE, 0x010, 0x000, { {rsp,0x018}, {rbx,0x008}, {rbp,0x000}, {-1,-1} }},
2988 { 0x15, 0x50,
FALSE, 0x008, 0x000, { {rsp,0x010}, {rbx,0x000}, {-1,-1} }},
2989 { 0x16, 0x50,
FALSE, 0x000, 0x000, { {rsp,0x008}, {-1,-1} }},
2992 static const BYTE function_2[] =
3000 static const BYTE unwind_info_2[] =
3002 1 | (UNW_FLAG_EHANDLER << 3),
3007 0x01, UWOP(PUSH_NONVOL, rbp),
3008 0x00, UWOP(PUSH_MACHFRAME, 0),
3010 0x00, 0x02, 0x00, 0x00,
3011 0x05, 0x06, 0x07, 0x08,
3014 static const struct results_x86 results_2[] =
3017 { 0x01, 0x50,
TRUE, 0x008, 0x000, { {rsp,-0x020}, {rbp,0x000}, {-1,-1} }},
3020 static const BYTE unwind_info_3[] =
3022 1 | (UNW_FLAG_EHANDLER << 3),
3027 0x01, UWOP(PUSH_NONVOL, rbp),
3028 0x00, UWOP(PUSH_MACHFRAME, 1),
3030 0x00, 0x02, 0x00, 0x00,
3031 0x05, 0x06, 0x07, 0x08,
3034 static const struct results_x86 results_3[] =
3037 { 0x01, 0x50,
TRUE, 0x010, 0x000, { {rsp,-0x028}, {rbp,0x000}, {-1,-1} }},
3040 static const BYTE function_4[] =
3047 static const BYTE unwind_info_4[] =
3049 1 | (UNW_FLAG_EHANDLER << 3),
3054 0x00, 0x02, 0x00, 0x00,
3055 0x05, 0x06, 0x07, 0x08,
3058 static const struct results_x86 results_4[] =
3061 { 0x01, 0x50,
TRUE, 0x000, 0x000, { {rsp,0x008}, {-1,-1} }},
3064 static const struct results_x86 broken_results_4[] =
3067 { 0x01, 0x50,
FALSE, 0x008, 0x000, { {rsp,0x010}, {rbp,0x000}, {-1,-1} }},
3071 static const BYTE function_5[] =
3078 static const struct results_x86 results_5[] =
3081 { 0x01, 0x00,
FALSE, 0x1234, 0x000, { {rsp,0x08}, {-1,-1} }},
3082 { 0x02, 0x00,
FALSE, 0x1234, 0x000, { {rsp,0x08}, {-1,-1} }},
3086 static const struct unwind_test_x86
tests[] =
3088 { function_0,
sizeof(function_0), unwind_info_0, results_0,
ARRAY_SIZE(results_0), broken_results_0 },
3089 { function_1,
sizeof(function_1), unwind_info_1, results_1,
ARRAY_SIZE(results_1) },
3090 { function_2,
sizeof(function_2), unwind_info_2, results_2,
ARRAY_SIZE(results_2) },
3091 { function_2,
sizeof(function_2), unwind_info_3, results_3,
ARRAY_SIZE(results_3) },
3094 { function_4,
sizeof(function_4), unwind_info_4, results_4,
ARRAY_SIZE(results_4), broken_results_4 },
3096 { function_5,
sizeof(function_5),
NULL, results_5,
ARRAY_SIZE(results_5) },
3102 call_virtual_unwind_x86(
i, &
tests[
i] );
3108#define SET_RUNTIME_FUNC_LEN(func,len) do { (func)->EndAddress = (func)->BeginAddress + (len); } while(0)
3109#elif defined(__arm__)
3110#define SET_RUNTIME_FUNC_LEN(func,len) do { (func)->FunctionLength = len / 2; (func)->Flag = 1; } while(0)
3112#define SET_RUNTIME_FUNC_LEN(func,len) do { (func)->FunctionLength = len / 4; (func)->Flag = 1; } while(0)
3117 static const int code_offset = 1024;
3118 static RUNTIME_FUNCTION runtime_func;
3121 runtime_func.BeginAddress = code_offset + 16;
3122 runtime_func.UnwindData = 0;
3124 return &runtime_func;
3129 static const int code_offset = 1024;
3130 char buf[2 *
sizeof(RUNTIME_FUNCTION) + 4];
3132 RUNTIME_FUNCTION *runtime_func, *
func;
3134 void *growable_table, *
ptr;
3140 if (!pRtlInstallFunctionTableCallback || !pRtlLookupFunctionEntry)
3142 win_skip(
"Dynamic unwind functions not found\n" );
3147 runtime_func = (RUNTIME_FUNCTION *)
buf;
3148 runtime_func->BeginAddress = code_offset;
3149 runtime_func->UnwindData = 0;
3152 "RtlAddFunctionTable failed for runtime_func = %p (aligned)\n", runtime_func );
3158 "RtlLookupFunctionEntry returned unexpected function, expected: NULL, got: %p\n",
func );
3160 "RtlLookupFunctionEntry modified base address, expected: 0, got: %Ix\n",
base );
3165 ok(
func == runtime_func,
3166 "RtlLookupFunctionEntry didn't return expected function, expected: %p, got: %p\n", runtime_func,
func );
3168 "RtlLookupFunctionEntry returned invalid base, expected: %Ix, got: %Ix\n", (
ULONG_PTR)
code_mem,
base );
3171 ok( pRtlDeleteFunctionTable( runtime_func ),
3172 "RtlDeleteFunctionTable failed for runtime_func = %p (aligned)\n", runtime_func );
3173 ok( !pRtlDeleteFunctionTable( runtime_func ),
3174 "RtlDeleteFunctionTable returned success for nonexistent table runtime_func = %p\n", runtime_func );
3177 runtime_func = (RUNTIME_FUNCTION *)((
ULONG_PTR)
buf | 0x3);
3178 runtime_func->BeginAddress = code_offset;
3179 runtime_func->UnwindData = 0;
3182 "RtlAddFunctionTable failed for runtime_func = %p (unaligned)\n", runtime_func );
3183 ok( pRtlDeleteFunctionTable( runtime_func ),
3184 "RtlDeleteFunctionTable failed for runtime_func = %p (unaligned)\n", runtime_func );
3187 runtime_func = (RUNTIME_FUNCTION *)
buf;
3188 runtime_func->BeginAddress = code_offset;
3189 runtime_func->UnwindData = 0;
3192 "RtlAddFunctionTable failed for runtime_func = %p (first attempt)\n", runtime_func );
3194 "RtlAddFunctionTable failed for runtime_func = %p (second attempt)\n", runtime_func );
3195 ok( pRtlDeleteFunctionTable( runtime_func ),
3196 "RtlDeleteFunctionTable failed for runtime_func = %p (first attempt)\n", runtime_func );
3197 ok( pRtlDeleteFunctionTable( runtime_func ),
3198 "RtlDeleteFunctionTable failed for runtime_func = %p (second attempt)\n", runtime_func );
3199 ok( !pRtlDeleteFunctionTable( runtime_func ),
3200 "RtlDeleteFunctionTable returned success for nonexistent table runtime_func = %p\n", runtime_func );
3204 "RtlAddFunctionTable failed for empty table\n" );
3205 ok( pRtlDeleteFunctionTable( runtime_func ),
3206 "RtlDeleteFunctionTable failed for empty table\n" );
3207 ok( !pRtlDeleteFunctionTable( runtime_func ),
3208 "RtlDeleteFunctionTable succeeded twice for empty table\n" );
3213 "RtlInstallFunctionTableCallback returned success for table = %Ix\n",
table );
3218 "RtlInstallFunctionTableCallback failed for table = %Ix\n",
table );
3225 "RtlLookupFunctionEntry returned unexpected function, expected: NULL, got: %p\n",
func );
3227 "RtlLookupFunctionEntry modified base address, expected: 0, got: %Ix\n",
base );
3229 "RtlLookupFunctionEntry issued %ld unexpected calls to dynamic_unwind_callback\n",
count );
3236 "RtlLookupFunctionEntry issued %ld calls to dynamic_unwind_callback, expected: 1\n",
count );
3240 "RtlLookupFunctionEntry didn't return expected function, got: %p\n",
func );
3247 "RtlDeleteFunctionTable failed for table = %p\n", (
PVOID)
table );
3249 "RtlDeleteFunctionTable returned success for nonexistent table = %p\n", (
PVOID)
table );
3251 if (!pRtlAddGrowableFunctionTable)
3253 win_skip(
"Growable function tables are not supported.\n");
3257 runtime_func = (RUNTIME_FUNCTION *)
buf;
3258 runtime_func->BeginAddress = code_offset;
3259 runtime_func->UnwindData = 0;
3262 runtime_func->BeginAddress = code_offset + 16;
3263 runtime_func->UnwindData = 0;
3265 runtime_func = (RUNTIME_FUNCTION *)
buf;
3267 growable_table =
NULL;
3269 ok(!
status,
"RtlAddGrowableFunctionTable failed for runtime_func = %p (aligned), %#lx.\n", runtime_func,
status );
3270 ok(growable_table != 0,
"Unexpected table value.\n");
3271 pRtlDeleteGrowableFunctionTable( growable_table );
3273 growable_table =
NULL;
3275 ok(!
status,
"RtlAddGrowableFunctionTable failed for runtime_func = %p (aligned), %#lx.\n", runtime_func,
status );
3276 ok(growable_table != 0,
"Unexpected table value.\n");
3277 pRtlDeleteGrowableFunctionTable( growable_table );
3279 growable_table =
NULL;
3281 ok(!
status,
"RtlAddGrowableFunctionTable failed for runtime_func = %p (aligned), %#lx.\n", runtime_func,
status );
3282 ok(growable_table != 0,
"Unexpected table value.\n");
3283 pRtlDeleteGrowableFunctionTable( growable_table );
3285 growable_table =
NULL;
3288 ok(!
status,
"RtlAddGrowableFunctionTable failed for runtime_func = %p (aligned), %#lx.\n", runtime_func,
status );
3289 ok(growable_table != 0,
"Unexpected table value.\n");
3294 "RtlLookupFunctionEntry didn't return expected function, expected: %p, got: %p\n", runtime_func,
func );
3296 pRtlGrowFunctionTable( growable_table, 1 );
3300 ok(
func == runtime_func,
3301 "RtlLookupFunctionEntry didn't return expected function, expected: %p, got: %p\n", runtime_func,
func );
3303 "RtlLookupFunctionEntry returned invalid base, expected: %Ix, got: %Ix\n", (
ULONG_PTR)
code_mem,
base );
3309 "RtlLookupFunctionEntry didn't return expected function, expected: %p, got: %p\n", runtime_func,
func );
3311 pRtlGrowFunctionTable( growable_table, 2 );
3315 ok(
func == runtime_func + 1,
3316 "RtlLookupFunctionEntry didn't return expected function, expected: %p, got: %p\n", runtime_func,
func );
3318 "RtlLookupFunctionEntry returned invalid base, expected: %Ix, got: %Ix\n", (
ULONG_PTR)
code_mem,
base );
3323 ok(
base == 0xdeadbeef,
"RtlLookupFunctionTable wrong base, got: %Ix\n",
base );
3327 ok(
func ==
NULL,
"RtlLookupFunctionTable wrong table, got: %p\n",
func );
3328 ok(
base == 0xdeadbeef,
"RtlLookupFunctionTable wrong base, got: %Ix\n",
base );
3336 ok(
func ==
ptr,
"RtlLookupFunctionTable wrong table, got: %p / %p\n",
func,
ptr );
3337 ok(
len == len2 || !
ptr,
"RtlLookupFunctionTable wrong len, got: %lu / %lu\n",
len, len2 );
3339 pRtlDeleteGrowableFunctionTable( growable_table );
3345 if (pNtAllocateVirtualMemoryEx &&
3349 static const BYTE fast_forward[] = { 0x48, 0x8b, 0xc4, 0x48, 0x89, 0x58, 0x20, 0x55, 0x5d, 0xe9 };
3353 trace(
"running arm64ec tests\n" );
3355 if (!
memcmp( pRtlLookupFunctionEntry, fast_forward,
sizeof(fast_forward) ))
3357 ptr = (
char *)pRtlLookupFunctionEntry +
sizeof(fast_forward);
3364 ok(
func !=
ptr,
"RtlLookupFunctionTable wrong table, got: %p / %p\n",
func,
ptr );
3368 "RtlLookupFunctonTable wrong table, got: %p / %p\n",
func, (
char *)
base +
metadata->ExtraRFETable );
3369 ok(
len ==
metadata->ExtraRFETableSize,
"RtlLookupFunctionTable wrong len, got: %lu / %lu\n",
3374 arm64func->
Flag = 1;
3376 arm64func->
RegF = 1;
3377 arm64func->
RegI = 1;
3383 arm64func->
Flag = 1;
3385 arm64func->
RegF = 1;
3386 arm64func->
RegI = 1;
3391 growable_table =
NULL;
3392 status = pRtlAddGrowableFunctionTable( &growable_table, (RUNTIME_FUNCTION *)
buf,
3393 2, 2, ec_code, ec_code + code_offset + 64 );
3394 ok( !
status,
"RtlAddGrowableFunctionTable failed %lx\n",
status );
3397 func = pRtlLookupFunctionEntry( ec_code + code_offset + 8, &
base,
NULL );
3398 ok(
func == (RUNTIME_FUNCTION *)
buf,
"RtlLookupFunctionEntry expected func: %p, got: %p\n",
3400 ok(
base == ec_code,
"RtlLookupFunctionEntry expected base: %Ix, got: %Ix\n",
3404 func = pRtlLookupFunctionEntry( ec_code + code_offset + 16, &
base,
NULL );
3405 ok(
func == (RUNTIME_FUNCTION *)(
buf +
sizeof(*arm64func)),
3406 "RtlLookupFunctionEntry expected func: %p, got: %p\n",
buf +
sizeof(*arm64func),
func );
3407 ok(
base == ec_code,
"RtlLookupFunctionEntry expected base: %Ix, got: %Ix\n", ec_code,
base );
3410 func = pRtlLookupFunctionEntry( ec_code + code_offset + 32, &
base,
NULL );
3411 ok( !
func,
"RtlLookupFunctionEntry got: %p\n",
func );
3412 ok(
base == 0xdeadbeef,
"RtlLookupFunctionEntry got: %Ix\n",
base );
3414 pRtlDeleteGrowableFunctionTable( growable_table );
3426#define X(f) p##f = (void*)GetProcAddress(ntdll, #f)
3440 test_virtual_unwind_arm();
3441#elif defined(__aarch64__)
3442 test_virtual_unwind_arm64();
3443#elif defined(__x86_64__)
3444 test_virtual_unwind_x86();
3446 test_virtual_unwind_arm64();
static struct _test_info results[8]
#define GetCurrentProcess()
EXCEPTION_ROUTINE * PEXCEPTION_ROUTINE
#define RtlImageDirectoryEntryToData
#define IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
UINT(* handler)(MSIPACKAGE *)
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLenum GLuint GLenum GLsizei const GLchar * buf
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl void winetest_pop_context(void)
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl winetest_push_context(const char *fmt,...) __WINE_PRINTF_ATTR(1
#define memcpy(s1, s2, n)
static struct test_info tests[]
static ULONG_PTR UNWIND_HISTORY_TABLE *static ULONG_PTR ULONG *static PVOID
static RUNTIME_FUNCTION CONTEXT BOOLEAN void ULONG_PTR KNONVOLATILE_CONTEXT_POINTERS ULONG_PTR ULONG_PTR PEXCEPTION_ROUTINE ULONG
static ULONG_PTR UNWIND_HISTORY_TABLE *static ULONG_PTR ULONG *static DWORD64
static ULONG_PTR UNWIND_HISTORY_TABLE *static ULONG_PTR ULONG *static PGET_RUNTIME_FUNCTION_CALLBACK
static ULONG_PTR UNWIND_HISTORY_TABLE *static ULONG_PTR ULONG *static DWORD
static void test_dynamic_unwind(void)
static RUNTIME_FUNCTION ULONG_PTR
#define SET_RUNTIME_FUNC_LEN(func, len)
static ULONG_PTR UNWIND_HISTORY_TABLE *static ULONG_PTR ULONG *static PCWSTR
static PRUNTIME_FUNCTION(WINAPI *pRtlLookupFunctionEntry)(ULONG_PTR
static RUNTIME_FUNCTION *CALLBACK dynamic_unwind_callback(DWORD_PTR pc, PVOID context)
static float int float int float int x3
static float int float int float int float int x4
static int double int int double int int double int int double int int double int int double int int double int int double int int x17
static int double int int double int int double int int double int int double int int double int int double int int x15
static float int float int float int float int float int x5
static int double int int double int int double int int double int int double int int double int int x13
static float int float int float int float int float int float int x6
static int double int int double int int double int int double int int double int int x11
static double int double int double int double int double int double int double int double int x8
static double int double int double int double int double int double int double int x7
static int double int int double int int double int int double int int x9
static int double int int double int int double int int double int int double int int double int int double int x14
static int double int int double int int double int int double int int double int x10
static int double int int double int int double int int double int int double int int double int x12
static int double int int double int int double int int double int int double int int double int int double int int double int x16
#define PAGE_EXECUTE_READWRITE
#define STATUS_BAD_FUNCTION_TABLE
#define IMAGE_DIRECTORY_ENTRY_EXCEPTION
NTSYSAPI NTSTATUS WINAPI RtlAddGrowableFunctionTable(void **, PRUNTIME_FUNCTION, ULONG, ULONG, ULONG_PTR, ULONG_PTR)
NTSYSAPI BOOLEAN CDECL RtlAddFunctionTable(RUNTIME_FUNCTION *, ULONG, ULONG_PTR)
NTSYSAPI PEXCEPTION_ROUTINE WINAPI RtlVirtualUnwind(ULONG, ULONG_PTR, ULONG_PTR, RUNTIME_FUNCTION *, CONTEXT *, void **, ULONG_PTR *, KNONVOLATILE_CONTEXT_POINTERS *)
NTSYSAPI void WINAPI RtlGrowFunctionTable(void *, ULONG)
NTSYSAPI NTSTATUS WINAPI RtlVirtualUnwind2(ULONG, ULONG_PTR, ULONG_PTR, RUNTIME_FUNCTION *, CONTEXT *, BOOLEAN *, void **, ULONG_PTR *, KNONVOLATILE_CONTEXT_POINTERS *, ULONG_PTR *, ULONG_PTR *, PEXCEPTION_ROUTINE *, ULONG)
NTSYSAPI PRUNTIME_FUNCTION WINAPI RtlLookupFunctionEntry(ULONG_PTR, ULONG_PTR *, UNWIND_HISTORY_TABLE *)
NTSYSAPI BOOLEAN CDECL RtlDeleteFunctionTable(RUNTIME_FUNCTION *)
NTSYSAPI void WINAPI RtlDeleteGrowableFunctionTable(void *)
NTSYSAPI BOOLEAN CDECL RtlInstallFunctionTableCallback(ULONG_PTR, ULONG_PTR, ULONG, PGET_RUNTIME_FUNCTION_CALLBACK, PVOID, PCWSTR)
NTSYSAPI PRUNTIME_FUNCTION WINAPI RtlLookupFunctionTable(ULONG_PTR, ULONG_PTR *, ULONG *)
LPVOID NTAPI VirtualAlloc(IN LPVOID lpAddress, IN SIZE_T dwSize, IN DWORD flAllocationType, IN DWORD flProtect)
BOOL NTAPI VirtualFree(IN LPVOID lpAddress, IN SIZE_T dwSize, IN DWORD dwFreeType)
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
NTSYSAPI NTSTATUS WINAPI NtAllocateVirtualMemoryEx(HANDLE, PVOID *, SIZE_T *, ULONG, ULONG, MEM_EXTENDED_PARAMETER *, ULONG)
#define MEM_EXTENDED_PARAMETER_EC_CODE
#define CONTEXT_ARM64_UNWOUND_TO_CALL
@ MemExtendedParameterAttributeFlags