TianoCore EDK2 master
|
#include <Base.h>
#include <Library/BaseLib.h>
#include <Library/PrintLib.h>
#include <Library/ArmDisassemblerLib.h>
Go to the source code of this file.
Macros | |
#define | COND(_a) gCondition[((_a) >> 28)] |
#define | LDM_EXT(_reg, _off) ((_reg == 13) ? gLdmStack[(_off)] : gLdmAdr[(_off)]) |
#define | SIGN(_U) ((_U) ? "" : "-") |
#define | WRITE(_Write) ((_Write) ? "!" : "") |
#define | BYTE(_B) ((_B) ? "B":"") |
#define | USER(_B) ((_B) ? "^" : "") |
Functions | |
CHAR8 * | MRegList (UINT32 OpCode) |
CHAR8 * | FieldMask (IN UINT32 Mask) |
UINT32 | RotateRight (IN UINT32 Op, IN UINT32 Shift) |
VOID | DisassembleArmInstruction (IN UINT32 **OpCodePtr, OUT CHAR8 *Buf, OUT UINTN Size, IN BOOLEAN Extended) |
Variables | |
CHAR8 * | gCondition [] |
CHAR8 * | gReg [] |
CHAR8 * | gLdmAdr [] |
CHAR8 * | gLdmStack [] |
CHAR8 | mMregListStr [4 *15+1] |
Default exception handler
Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.
Copyright (c) 2021, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file ArmDisassembler.c.
#define BYTE | ( | _B | ) | ((_B) ? "B":"") |
Definition at line 74 of file ArmDisassembler.c.
#define COND | ( | _a | ) | gCondition[((_a) >> 28)] |
Definition at line 35 of file ArmDisassembler.c.
#define LDM_EXT | ( | _reg, | |
_off | |||
) | ((_reg == 13) ? gLdmStack[(_off)] : gLdmAdr[(_off)]) |
Definition at line 70 of file ArmDisassembler.c.
#define SIGN | ( | _U | ) | ((_U) ? "" : "-") |
Definition at line 72 of file ArmDisassembler.c.
#define USER | ( | _B | ) | ((_B) ? "^" : "") |
Definition at line 75 of file ArmDisassembler.c.
#define WRITE | ( | _Write | ) | ((_Write) ? "!" : "") |
Definition at line 73 of file ArmDisassembler.c.
VOID DisassembleArmInstruction | ( | IN UINT32 ** | OpCodePtr, |
OUT CHAR8 * | Buf, | ||
OUT UINTN | Size, | ||
IN BOOLEAN | Extended | ||
) |
Place a disassembly of **OpCodePtr into buffer, and update OpCodePtr to point to next instruction.
We cheat and only decode instructions that access memory. If the instruction is not found we dump the instruction in hex.
OpCodePtr | Pointer to pointer of ARM instruction to disassemble. |
Buf | Buffer to sprintf disassembly into. |
Size | Size of Buf in bytes. |
Extended | TRUE dump hex for instruction too. |
Definition at line 154 of file ArmDisassembler.c.
CHAR8 * FieldMask | ( | IN UINT32 | Mask | ) |
Definition at line 124 of file ArmDisassembler.c.
CHAR8 * MRegList | ( | UINT32 | OpCode | ) |
Definition at line 80 of file ArmDisassembler.c.
Definition at line 132 of file ArmDisassembler.c.
CHAR8* gCondition[] |
Definition at line 16 of file ArmDisassembler.c.
CHAR8* gLdmAdr[] |
Definition at line 56 of file ArmDisassembler.c.
CHAR8* gLdmStack[] |
Definition at line 63 of file ArmDisassembler.c.
CHAR8* gReg[] |
Definition at line 37 of file ArmDisassembler.c.
CHAR8 mMregListStr[4 *15+1] |
Definition at line 77 of file ArmDisassembler.c.