Aarch64Disassembler.c 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /** @file
  2. Default exception handler
  3. Copyright (c) 2014, ARM Limited. All rights reserved.
  4. SPDX-License-Identifier: BSD-2-Clause-Patent
  5. **/
  6. #include <Base.h>
  7. #include <Library/BaseLib.h>
  8. #include <Library/PrintLib.h>
  9. #include <Library/ArmDisassemblerLib.h>
  10. /**
  11. Place a disassembly of **OpCodePtr into buffer, and update OpCodePtr to
  12. point to next instruction.
  13. @param OpCodePtrPtr Pointer to pointer of instruction to disassemble.
  14. @param Thumb TRUE for Thumb(2), FALSE for ARM instruction stream
  15. @param Extended TRUE dump hex for instruction too.
  16. @param ItBlock Size of IT Block
  17. @param Buf Buffer to sprintf disassembly into.
  18. @param Size Size of Buf in bytes.
  19. **/
  20. VOID
  21. DisassembleInstruction (
  22. IN UINT8 **OpCodePtr,
  23. IN BOOLEAN Thumb,
  24. IN BOOLEAN Extended,
  25. IN OUT UINT32 *ItBlock,
  26. OUT CHAR8 *Buf,
  27. OUT UINTN Size
  28. )
  29. {
  30. // Not yet supported for AArch64.
  31. // Put error in the buffer as we have no return code and the buffer may be
  32. // printed directly so needs a '\0'.
  33. AsciiSPrint (Buf, Size, "AArch64 not supported");
  34. return;
  35. }