blob: 2125f6eb01baf04426c5578d67ebfe8cbe18728b [file] [log] [blame]
static constexpr uint8_t expected_asm_kThumb2[] = {
0x60, 0xB5, 0x2D, 0xED, 0x02, 0x8A, 0x8B, 0xB0, 0x00, 0x90, 0x0B, 0xB0,
0xBD, 0xEC, 0x02, 0x8A, 0x60, 0xBD,
};
static constexpr uint8_t expected_cfi_kThumb2[] = {
0x42, 0x0E, 0x0C, 0x85, 0x03, 0x86, 0x02, 0x8E, 0x01, 0x44, 0x0E, 0x14,
0x05, 0x50, 0x05, 0x05, 0x51, 0x04, 0x42, 0x0E, 0x40, 0x42, 0x0A, 0x42,
0x0E, 0x14, 0x44, 0x0E, 0x0C, 0x06, 0x50, 0x06, 0x51, 0x42, 0x0B, 0x0E,
0x40,
};
// 0x00000000: push {r5, r6, lr}
// 0x00000002: .cfi_def_cfa_offset: 12
// 0x00000002: .cfi_offset: r5 at cfa-12
// 0x00000002: .cfi_offset: r6 at cfa-8
// 0x00000002: .cfi_offset: r14 at cfa-4
// 0x00000002: vpush.f32 {s16-s17}
// 0x00000006: .cfi_def_cfa_offset: 20
// 0x00000006: .cfi_offset_extended: r80 at cfa-20
// 0x00000006: .cfi_offset_extended: r81 at cfa-16
// 0x00000006: sub sp, sp, #44
// 0x00000008: .cfi_def_cfa_offset: 64
// 0x00000008: str r0, [sp, #0]
// 0x0000000a: .cfi_remember_state
// 0x0000000a: add sp, sp, #44
// 0x0000000c: .cfi_def_cfa_offset: 20
// 0x0000000c: vpop.f32 {s16-s17}
// 0x00000010: .cfi_def_cfa_offset: 12
// 0x00000010: .cfi_restore_extended: r80
// 0x00000010: .cfi_restore_extended: r81
// 0x00000010: pop {r5, r6, pc}
// 0x00000012: .cfi_restore_state
// 0x00000012: .cfi_def_cfa_offset: 64
static constexpr uint8_t expected_asm_kArm64[] = {
0xE0, 0x0F, 0x1C, 0xB8, 0xF3, 0xD3, 0x02, 0xA9, 0xFE, 0x1F, 0x00, 0xF9,
0xE8, 0xA7, 0x01, 0x6D, 0xE8, 0xA7, 0x41, 0x6D, 0xF3, 0xD3, 0x42, 0xA9,
0xFE, 0x1F, 0x40, 0xF9, 0xFF, 0x03, 0x01, 0x91, 0xC0, 0x03, 0x5F, 0xD6,
};
static constexpr uint8_t expected_cfi_kArm64[] = {
0x44, 0x0E, 0x40, 0x44, 0x93, 0x06, 0x94, 0x04, 0x44, 0x9E, 0x02, 0x44,
0x05, 0x48, 0x0A, 0x05, 0x49, 0x08, 0x0A, 0x44, 0x06, 0x48, 0x06, 0x49,
0x44, 0xD3, 0xD4, 0x44, 0xDE, 0x44, 0x0E, 0x00, 0x44, 0x0B, 0x0E, 0x40,
};
// 0x00000000: str w0, [sp, #-64]!
// 0x00000004: .cfi_def_cfa_offset: 64
// 0x00000004: stp x19, x20, [sp, #40]
// 0x00000008: .cfi_offset: r19 at cfa-24
// 0x00000008: .cfi_offset: r20 at cfa-16
// 0x00000008: str lr, [sp, #56]
// 0x0000000c: .cfi_offset: r30 at cfa-8
// 0x0000000c: stp d8, d9, [sp, #24]
// 0x00000010: .cfi_offset_extended: r72 at cfa-40
// 0x00000010: .cfi_offset_extended: r73 at cfa-32
// 0x00000010: .cfi_remember_state
// 0x00000010: ldp d8, d9, [sp, #24]
// 0x00000014: .cfi_restore_extended: r72
// 0x00000014: .cfi_restore_extended: r73
// 0x00000014: ldp x19, x20, [sp, #40]
// 0x00000018: .cfi_restore: r19
// 0x00000018: .cfi_restore: r20
// 0x00000018: ldr lr, [sp, #56]
// 0x0000001c: .cfi_restore: r30
// 0x0000001c: add sp, sp, #0x40 (64)
// 0x00000020: .cfi_def_cfa_offset: 0
// 0x00000020: ret
// 0x00000024: .cfi_restore_state
// 0x00000024: .cfi_def_cfa_offset: 64
static constexpr uint8_t expected_asm_kX86[] = {
0x56, 0x55, 0x83, 0xEC, 0x34, 0x89, 0x04, 0x24, 0x83, 0xC4, 0x34, 0x5D,
0x5E, 0xC3,
};
static constexpr uint8_t expected_cfi_kX86[] = {
0x41, 0x0E, 0x08, 0x86, 0x02, 0x41, 0x0E, 0x0C, 0x85, 0x03, 0x43, 0x0E,
0x40, 0x43, 0x0A, 0x43, 0x0E, 0x0C, 0x41, 0x0E, 0x08, 0xC5, 0x41, 0x0E,
0x04, 0xC6, 0x41, 0x0B, 0x0E, 0x40,
};
// 0x00000000: push esi
// 0x00000001: .cfi_def_cfa_offset: 8
// 0x00000001: .cfi_offset: r6 at cfa-8
// 0x00000001: push ebp
// 0x00000002: .cfi_def_cfa_offset: 12
// 0x00000002: .cfi_offset: r5 at cfa-12
// 0x00000002: sub esp, 52
// 0x00000005: .cfi_def_cfa_offset: 64
// 0x00000005: mov [esp], eax
// 0x00000008: .cfi_remember_state
// 0x00000008: add esp, 52
// 0x0000000b: .cfi_def_cfa_offset: 12
// 0x0000000b: pop ebp
// 0x0000000c: .cfi_def_cfa_offset: 8
// 0x0000000c: .cfi_restore: r5
// 0x0000000c: pop esi
// 0x0000000d: .cfi_def_cfa_offset: 4
// 0x0000000d: .cfi_restore: r6
// 0x0000000d: ret
// 0x0000000e: .cfi_restore_state
// 0x0000000e: .cfi_def_cfa_offset: 64
static constexpr uint8_t expected_asm_kX86_64[] = {
0x55, 0x53, 0x48, 0x83, 0xEC, 0x28, 0xF2, 0x44, 0x0F, 0x11, 0x6C, 0x24,
0x20, 0xF2, 0x44, 0x0F, 0x11, 0x64, 0x24, 0x18, 0x89, 0x3C, 0x24, 0xF2,
0x44, 0x0F, 0x10, 0x64, 0x24, 0x18, 0xF2, 0x44, 0x0F, 0x10, 0x6C, 0x24,
0x20, 0x48, 0x83, 0xC4, 0x28, 0x5B, 0x5D, 0xC3,
};
static constexpr uint8_t expected_cfi_kX86_64[] = {
0x41, 0x0E, 0x10, 0x86, 0x04, 0x41, 0x0E, 0x18, 0x83, 0x06, 0x44, 0x0E,
0x40, 0x47, 0x9E, 0x08, 0x47, 0x9D, 0x0A, 0x43, 0x0A, 0x47, 0xDD, 0x47,
0xDE, 0x44, 0x0E, 0x18, 0x41, 0x0E, 0x10, 0xC3, 0x41, 0x0E, 0x08, 0xC6,
0x41, 0x0B, 0x0E, 0x40,
};
// 0x00000000: push rbp
// 0x00000001: .cfi_def_cfa_offset: 16
// 0x00000001: .cfi_offset: r6 at cfa-16
// 0x00000001: push rbx
// 0x00000002: .cfi_def_cfa_offset: 24
// 0x00000002: .cfi_offset: r3 at cfa-24
// 0x00000002: subq rsp, 40
// 0x00000006: .cfi_def_cfa_offset: 64
// 0x00000006: movsd [rsp + 32], xmm13
// 0x0000000d: .cfi_offset: r30 at cfa-32
// 0x0000000d: movsd [rsp + 24], xmm12
// 0x00000014: .cfi_offset: r29 at cfa-40
// 0x00000014: mov [rsp], edi
// 0x00000017: .cfi_remember_state
// 0x00000017: movsd xmm12, [rsp + 24]
// 0x0000001e: .cfi_restore: r29
// 0x0000001e: movsd xmm13, [rsp + 32]
// 0x00000025: .cfi_restore: r30
// 0x00000025: addq rsp, 40
// 0x00000029: .cfi_def_cfa_offset: 24
// 0x00000029: pop rbx
// 0x0000002a: .cfi_def_cfa_offset: 16
// 0x0000002a: .cfi_restore: r3
// 0x0000002a: pop rbp
// 0x0000002b: .cfi_def_cfa_offset: 8
// 0x0000002b: .cfi_restore: r6
// 0x0000002b: ret
// 0x0000002c: .cfi_restore_state
// 0x0000002c: .cfi_def_cfa_offset: 64