// This enumeration should mirror the declarations in // runtime/arch/arm64/registers_arm64.h. We do not include that file to // avoid a dependency on libart. enum {
TR = 19,
IP0 = 16,
IP1 = 17,
FP = 29,
LR = 30
};
void CustomDisassembler::AppendRegisterNameToOutput(const Instruction* instr, const CPURegister& reg) {
USE(instr); if (reg.IsRegister() && reg.Is64Bits()) { if (reg.GetCode() == TR) {
AppendToOutput("tr"); return;
} elseif (reg.GetCode() == LR) {
AppendToOutput("lr"); return;
} // Fall through.
} // Print other register names as usual.
Disassembler::AppendRegisterNameToOutput(instr, reg);
}
// These regexs are long, but it is an attempt to match the mapping entry keys in the // #define DEFAULT_FORM_TO_VISITOR_MAP(VISITORCLASS) in the file // external/vixl/src/aarch64/decoder-visitor-map-aarch64.h // for the ::VisitLoadLiteralInstr, ::VisitLoadStoreUnsignedOffset or ::VisitUnconditionalBranch // function addresess key values. // N.B. the mapping are many to one. if (std::regex_match(form, std::regex("(ldrsw|ldr|prfm)_(32|64|d|b|h|q|s)_loadlit"))) {
VisitLoadLiteralInstr(instr); return;
}
if (std::regex_match(form, std::regex( "(ldrb|ldrh|ldrsb|ldrsh|ldrsw|ldr|prfm|strb|strh|str)_(32|64|d|b|h|q|s)_ldst_pos"))) {
VisitLoadStoreUnsignedOffsetInstr(instr); return;
}
if (std::regex_match(form, std::regex("(bl|b)_only_branch_imm"))) {
VisitUnconditionalBranchInstr(instr); return;
}
}
void CustomDisassembler::VisitLoadLiteralInstr(const Instruction* instr) { if (!read_literals_) { return;
}
// Get address of literal. Bail if not within expected buffer range to // avoid trying to fetch invalid literals (we can encounter this when // interpreting raw data as instructions). void* data_address = instr->GetLiteralAddress<void*>();
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.