+#if SUPPORT_ARCH_arm64
+template <>
+void UnwindPrinter<arm64>::decode(uint32_t encoding, const uint8_t* funcStart, char* str)
+{
+ uint32_t stackSize;
+ switch ( encoding & UNWIND_ARM64_MODE_MASK ) {
+ case UNWIND_ARM64_MODE_FRAMELESS:
+ stackSize = EXTRACT_BITS(encoding, UNWIND_ARM64_FRAMELESS_STACK_SIZE_MASK);
+ if ( stackSize == 0 )
+ strcpy(str, "no frame, no saved registers ");
+ else
+ sprintf(str, "stack size=%d: ", 16 * stackSize);
+ if ( encoding & UNWIND_ARM64_FRAME_X19_X20_PAIR )
+ strcat(str, "x19/20 ");
+ if ( encoding & UNWIND_ARM64_FRAME_X21_X22_PAIR )
+ strcat(str, "x21/22 ");
+ if ( encoding & UNWIND_ARM64_FRAME_X23_X24_PAIR )
+ strcat(str, "x23/24 ");
+ if ( encoding & UNWIND_ARM64_FRAME_X25_X26_PAIR )
+ strcat(str, "x25/26 ");
+ if ( encoding & UNWIND_ARM64_FRAME_X27_X28_PAIR )
+ strcat(str, "x27/28 ");
+ if ( encoding & UNWIND_ARM64_FRAME_D8_D9_PAIR )
+ strcat(str, "d8/9 ");
+ if ( encoding & UNWIND_ARM64_FRAME_D10_D11_PAIR )
+ strcat(str, "d10/11 ");
+ if ( encoding & UNWIND_ARM64_FRAME_D12_D13_PAIR )
+ strcat(str, "d12/13 ");
+ if ( encoding & UNWIND_ARM64_FRAME_D14_D15_PAIR )
+ strcat(str, "d14/15 ");
+ break;
+ break;
+ case UNWIND_ARM64_MODE_DWARF:
+ sprintf(str, "dwarf offset 0x%08X, ", encoding & UNWIND_X86_64_DWARF_SECTION_OFFSET);
+ break;
+ case UNWIND_ARM64_MODE_FRAME:
+ strcpy(str, "std frame: ");
+ if ( encoding & UNWIND_ARM64_FRAME_X19_X20_PAIR )
+ strcat(str, "x19/20 ");
+ if ( encoding & UNWIND_ARM64_FRAME_X21_X22_PAIR )
+ strcat(str, "x21/22 ");
+ if ( encoding & UNWIND_ARM64_FRAME_X23_X24_PAIR )
+ strcat(str, "x23/24 ");
+ if ( encoding & UNWIND_ARM64_FRAME_X25_X26_PAIR )
+ strcat(str, "x25/26 ");
+ if ( encoding & UNWIND_ARM64_FRAME_X27_X28_PAIR )
+ strcat(str, "x27/28 ");
+ if ( encoding & UNWIND_ARM64_FRAME_D8_D9_PAIR )
+ strcat(str, "d8/9 ");
+ if ( encoding & UNWIND_ARM64_FRAME_D10_D11_PAIR )
+ strcat(str, "d10/11 ");
+ if ( encoding & UNWIND_ARM64_FRAME_D12_D13_PAIR )
+ strcat(str, "d12/13 ");
+ if ( encoding & UNWIND_ARM64_FRAME_D14_D15_PAIR )
+ strcat(str, "d14/15 ");
+ break;
+ case UNWIND_ARM64_MODE_FRAME_OLD:
+ strcpy(str, "old frame: ");
+ if ( encoding & UNWIND_ARM64_FRAME_X21_X22_PAIR_OLD )
+ strcat(str, "x21/22 ");
+ if ( encoding & UNWIND_ARM64_FRAME_X23_X24_PAIR_OLD )
+ strcat(str, "x23/24 ");
+ if ( encoding & UNWIND_ARM64_FRAME_X25_X26_PAIR_OLD )
+ strcat(str, "x25/26 ");
+ if ( encoding & UNWIND_ARM64_FRAME_X27_X28_PAIR_OLD )
+ strcat(str, "x27/28 ");
+ if ( encoding & UNWIND_ARM64_FRAME_D8_D9_PAIR_OLD )
+ strcat(str, "d8/9 ");
+ if ( encoding & UNWIND_ARM64_FRAME_D10_D11_PAIR_OLD )
+ strcat(str, "d10/11 ");
+ if ( encoding & UNWIND_ARM64_FRAME_D12_D13_PAIR_OLD )
+ strcat(str, "d12/13 ");
+ if ( encoding & UNWIND_ARM64_FRAME_D14_D15_PAIR_OLD )
+ strcat(str, "d14/15 ");
+ break;
+ }
+}
+#endif