| Index: src/arm64/disasm-arm64.cc
|
| diff --git a/src/arm64/disasm-arm64.cc b/src/arm64/disasm-arm64.cc
|
| index fb3b692d08f5afdf4c2217ce038bfbda58fb6b5a..00c3ec25d6a76331547e6e5ecbc14e6196703789 100644
|
| --- a/src/arm64/disasm-arm64.cc
|
| +++ b/src/arm64/disasm-arm64.cc
|
| @@ -19,7 +19,7 @@ namespace v8 {
|
| namespace internal {
|
|
|
|
|
| -Disassembler::Disassembler() {
|
| +DisassemblingDecoder::DisassemblingDecoder() {
|
| buffer_size_ = 256;
|
| buffer_ = reinterpret_cast<char*>(malloc(buffer_size_));
|
| buffer_pos_ = 0;
|
| @@ -27,7 +27,7 @@ Disassembler::Disassembler() {
|
| }
|
|
|
|
|
| -Disassembler::Disassembler(char* text_buffer, int buffer_size) {
|
| +DisassemblingDecoder::DisassemblingDecoder(char* text_buffer, int buffer_size) {
|
| buffer_size_ = buffer_size;
|
| buffer_ = text_buffer;
|
| buffer_pos_ = 0;
|
| @@ -35,19 +35,17 @@ Disassembler::Disassembler(char* text_buffer, int buffer_size) {
|
| }
|
|
|
|
|
| -Disassembler::~Disassembler() {
|
| +DisassemblingDecoder::~DisassemblingDecoder() {
|
| if (own_buffer_) {
|
| free(buffer_);
|
| }
|
| }
|
|
|
|
|
| -char* Disassembler::GetOutput() {
|
| - return buffer_;
|
| -}
|
| +char* DisassemblingDecoder::GetOutput() { return buffer_; }
|
|
|
|
|
| -void Disassembler::VisitAddSubImmediate(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitAddSubImmediate(Instruction* instr) {
|
| bool rd_is_zr = RdIsZROrSP(instr);
|
| bool stack_op = (rd_is_zr || RnIsZROrSP(instr)) &&
|
| (instr->ImmAddSub() == 0) ? true : false;
|
| @@ -92,7 +90,7 @@ void Disassembler::VisitAddSubImmediate(Instruction* instr) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitAddSubShifted(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitAddSubShifted(Instruction* instr) {
|
| bool rd_is_zr = RdIsZROrSP(instr);
|
| bool rn_is_zr = RnIsZROrSP(instr);
|
| const char *mnemonic = "";
|
| @@ -139,7 +137,7 @@ void Disassembler::VisitAddSubShifted(Instruction* instr) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitAddSubExtended(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitAddSubExtended(Instruction* instr) {
|
| bool rd_is_zr = RdIsZROrSP(instr);
|
| const char *mnemonic = "";
|
| Extend mode = static_cast<Extend>(instr->ExtendMode());
|
| @@ -177,7 +175,7 @@ void Disassembler::VisitAddSubExtended(Instruction* instr) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitAddSubWithCarry(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitAddSubWithCarry(Instruction* instr) {
|
| bool rn_is_zr = RnIsZROrSP(instr);
|
| const char *mnemonic = "";
|
| const char *form = "'Rd, 'Rn, 'Rm";
|
| @@ -212,7 +210,7 @@ void Disassembler::VisitAddSubWithCarry(Instruction* instr) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitLogicalImmediate(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitLogicalImmediate(Instruction* instr) {
|
| bool rd_is_zr = RdIsZROrSP(instr);
|
| bool rn_is_zr = RnIsZROrSP(instr);
|
| const char *mnemonic = "";
|
| @@ -255,7 +253,7 @@ void Disassembler::VisitLogicalImmediate(Instruction* instr) {
|
| }
|
|
|
|
|
| -bool Disassembler::IsMovzMovnImm(unsigned reg_size, uint64_t value) {
|
| +bool DisassemblingDecoder::IsMovzMovnImm(unsigned reg_size, uint64_t value) {
|
| DCHECK((reg_size == kXRegSizeInBits) ||
|
| ((reg_size == kWRegSizeInBits) && (value <= 0xffffffff)));
|
|
|
| @@ -284,7 +282,7 @@ bool Disassembler::IsMovzMovnImm(unsigned reg_size, uint64_t value) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitLogicalShifted(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitLogicalShifted(Instruction* instr) {
|
| bool rd_is_zr = RdIsZROrSP(instr);
|
| bool rn_is_zr = RnIsZROrSP(instr);
|
| const char *mnemonic = "";
|
| @@ -335,7 +333,7 @@ void Disassembler::VisitLogicalShifted(Instruction* instr) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitConditionalCompareRegister(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitConditionalCompareRegister(Instruction* instr) {
|
| const char *mnemonic = "";
|
| const char *form = "'Rn, 'Rm, 'INzcv, 'Cond";
|
|
|
| @@ -350,7 +348,8 @@ void Disassembler::VisitConditionalCompareRegister(Instruction* instr) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitConditionalCompareImmediate(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitConditionalCompareImmediate(
|
| + Instruction* instr) {
|
| const char *mnemonic = "";
|
| const char *form = "'Rn, 'IP, 'INzcv, 'Cond";
|
|
|
| @@ -365,7 +364,7 @@ void Disassembler::VisitConditionalCompareImmediate(Instruction* instr) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitConditionalSelect(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitConditionalSelect(Instruction* instr) {
|
| bool rnm_is_zr = (RnIsZROrSP(instr) && RmIsZROrSP(instr));
|
| bool rn_is_rm = (instr->Rn() == instr->Rm());
|
| const char *mnemonic = "";
|
| @@ -418,7 +417,7 @@ void Disassembler::VisitConditionalSelect(Instruction* instr) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitBitfield(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitBitfield(Instruction* instr) {
|
| unsigned s = instr->ImmS();
|
| unsigned r = instr->ImmR();
|
| unsigned rd_size_minus_1 =
|
| @@ -496,7 +495,7 @@ void Disassembler::VisitBitfield(Instruction* instr) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitExtract(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitExtract(Instruction* instr) {
|
| const char *mnemonic = "";
|
| const char *form = "'Rd, 'Rn, 'Rm, 'IExtract";
|
|
|
| @@ -517,7 +516,7 @@ void Disassembler::VisitExtract(Instruction* instr) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitPCRelAddressing(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitPCRelAddressing(Instruction* instr) {
|
| switch (instr->Mask(PCRelAddressingMask)) {
|
| case ADR: Format(instr, "adr", "'Xd, 'AddrPCRelByte"); break;
|
| // ADRP is not implemented.
|
| @@ -526,7 +525,7 @@ void Disassembler::VisitPCRelAddressing(Instruction* instr) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitConditionalBranch(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitConditionalBranch(Instruction* instr) {
|
| switch (instr->Mask(ConditionalBranchMask)) {
|
| case B_cond: Format(instr, "b.'CBrn", "'BImmCond"); break;
|
| default: UNREACHABLE();
|
| @@ -534,7 +533,8 @@ void Disassembler::VisitConditionalBranch(Instruction* instr) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitUnconditionalBranchToRegister(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitUnconditionalBranchToRegister(
|
| + Instruction* instr) {
|
| const char *mnemonic = "unimplemented";
|
| const char *form = "'Xn";
|
|
|
| @@ -554,7 +554,7 @@ void Disassembler::VisitUnconditionalBranchToRegister(Instruction* instr) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitUnconditionalBranch(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitUnconditionalBranch(Instruction* instr) {
|
| const char *mnemonic = "";
|
| const char *form = "'BImmUncn";
|
|
|
| @@ -567,7 +567,7 @@ void Disassembler::VisitUnconditionalBranch(Instruction* instr) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitDataProcessing1Source(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitDataProcessing1Source(Instruction* instr) {
|
| const char *mnemonic = "";
|
| const char *form = "'Rd, 'Rn";
|
|
|
| @@ -588,7 +588,7 @@ void Disassembler::VisitDataProcessing1Source(Instruction* instr) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitDataProcessing2Source(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitDataProcessing2Source(Instruction* instr) {
|
| const char *mnemonic = "unimplemented";
|
| const char *form = "'Rd, 'Rn, 'Rm";
|
|
|
| @@ -609,7 +609,7 @@ void Disassembler::VisitDataProcessing2Source(Instruction* instr) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitDataProcessing3Source(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitDataProcessing3Source(Instruction* instr) {
|
| bool ra_is_zr = RaIsZROrSP(instr);
|
| const char *mnemonic = "";
|
| const char *form = "'Xd, 'Wn, 'Wm, 'Xa";
|
| @@ -687,7 +687,7 @@ void Disassembler::VisitDataProcessing3Source(Instruction* instr) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitCompareBranch(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitCompareBranch(Instruction* instr) {
|
| const char *mnemonic = "";
|
| const char *form = "'Rt, 'BImmCmpa";
|
|
|
| @@ -702,7 +702,7 @@ void Disassembler::VisitCompareBranch(Instruction* instr) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitTestBranch(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitTestBranch(Instruction* instr) {
|
| const char *mnemonic = "";
|
| // If the top bit of the immediate is clear, the tested register is
|
| // disassembled as Wt, otherwise Xt. As the top bit of the immediate is
|
| @@ -719,7 +719,7 @@ void Disassembler::VisitTestBranch(Instruction* instr) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitMoveWideImmediate(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitMoveWideImmediate(Instruction* instr) {
|
| const char *mnemonic = "";
|
| const char *form = "'Rd, 'IMoveImm";
|
|
|
| @@ -758,7 +758,7 @@ void Disassembler::VisitMoveWideImmediate(Instruction* instr) {
|
| V(LDR_s, "ldr", "'St") \
|
| V(LDR_d, "ldr", "'Dt")
|
|
|
| -void Disassembler::VisitLoadStorePreIndex(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitLoadStorePreIndex(Instruction* instr) {
|
| const char *mnemonic = "unimplemented";
|
| const char *form = "(LoadStorePreIndex)";
|
|
|
| @@ -772,7 +772,7 @@ void Disassembler::VisitLoadStorePreIndex(Instruction* instr) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitLoadStorePostIndex(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitLoadStorePostIndex(Instruction* instr) {
|
| const char *mnemonic = "unimplemented";
|
| const char *form = "(LoadStorePostIndex)";
|
|
|
| @@ -786,7 +786,7 @@ void Disassembler::VisitLoadStorePostIndex(Instruction* instr) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitLoadStoreUnsignedOffset(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitLoadStoreUnsignedOffset(Instruction* instr) {
|
| const char *mnemonic = "unimplemented";
|
| const char *form = "(LoadStoreUnsignedOffset)";
|
|
|
| @@ -801,7 +801,7 @@ void Disassembler::VisitLoadStoreUnsignedOffset(Instruction* instr) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitLoadStoreRegisterOffset(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitLoadStoreRegisterOffset(Instruction* instr) {
|
| const char *mnemonic = "unimplemented";
|
| const char *form = "(LoadStoreRegisterOffset)";
|
|
|
| @@ -816,7 +816,7 @@ void Disassembler::VisitLoadStoreRegisterOffset(Instruction* instr) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitLoadStoreUnscaledOffset(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitLoadStoreUnscaledOffset(Instruction* instr) {
|
| const char *mnemonic = "unimplemented";
|
| const char *form = "'Wt, ['Xns'ILS]";
|
| const char *form_x = "'Xt, ['Xns'ILS]";
|
| @@ -847,7 +847,7 @@ void Disassembler::VisitLoadStoreUnscaledOffset(Instruction* instr) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitLoadLiteral(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitLoadLiteral(Instruction* instr) {
|
| const char *mnemonic = "ldr";
|
| const char *form = "(LoadLiteral)";
|
|
|
| @@ -873,7 +873,7 @@ void Disassembler::VisitLoadLiteral(Instruction* instr) {
|
| V(STP_d, "stp", "'Dt, 'Dt2", "8") \
|
| V(LDP_d, "ldp", "'Dt, 'Dt2", "8")
|
|
|
| -void Disassembler::VisitLoadStorePairPostIndex(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitLoadStorePairPostIndex(Instruction* instr) {
|
| const char *mnemonic = "unimplemented";
|
| const char *form = "(LoadStorePairPostIndex)";
|
|
|
| @@ -887,7 +887,7 @@ void Disassembler::VisitLoadStorePairPostIndex(Instruction* instr) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitLoadStorePairPreIndex(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitLoadStorePairPreIndex(Instruction* instr) {
|
| const char *mnemonic = "unimplemented";
|
| const char *form = "(LoadStorePairPreIndex)";
|
|
|
| @@ -901,7 +901,7 @@ void Disassembler::VisitLoadStorePairPreIndex(Instruction* instr) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitLoadStorePairOffset(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitLoadStorePairOffset(Instruction* instr) {
|
| const char *mnemonic = "unimplemented";
|
| const char *form = "(LoadStorePairOffset)";
|
|
|
| @@ -915,7 +915,7 @@ void Disassembler::VisitLoadStorePairOffset(Instruction* instr) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitFPCompare(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitFPCompare(Instruction* instr) {
|
| const char *mnemonic = "unimplemented";
|
| const char *form = "'Fn, 'Fm";
|
| const char *form_zero = "'Fn, #0.0";
|
| @@ -931,7 +931,7 @@ void Disassembler::VisitFPCompare(Instruction* instr) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitFPConditionalCompare(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitFPConditionalCompare(Instruction* instr) {
|
| const char *mnemonic = "unimplemented";
|
| const char *form = "'Fn, 'Fm, 'INzcv, 'Cond";
|
|
|
| @@ -946,7 +946,7 @@ void Disassembler::VisitFPConditionalCompare(Instruction* instr) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitFPConditionalSelect(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitFPConditionalSelect(Instruction* instr) {
|
| const char *mnemonic = "";
|
| const char *form = "'Fd, 'Fn, 'Fm, 'Cond";
|
|
|
| @@ -959,7 +959,7 @@ void Disassembler::VisitFPConditionalSelect(Instruction* instr) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitFPDataProcessing1Source(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitFPDataProcessing1Source(Instruction* instr) {
|
| const char *mnemonic = "unimplemented";
|
| const char *form = "'Fd, 'Fn";
|
|
|
| @@ -987,7 +987,7 @@ void Disassembler::VisitFPDataProcessing1Source(Instruction* instr) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitFPDataProcessing2Source(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitFPDataProcessing2Source(Instruction* instr) {
|
| const char *mnemonic = "";
|
| const char *form = "'Fd, 'Fn, 'Fm";
|
|
|
| @@ -1011,7 +1011,7 @@ void Disassembler::VisitFPDataProcessing2Source(Instruction* instr) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitFPDataProcessing3Source(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitFPDataProcessing3Source(Instruction* instr) {
|
| const char *mnemonic = "";
|
| const char *form = "'Fd, 'Fn, 'Fm, 'Fa";
|
|
|
| @@ -1030,7 +1030,7 @@ void Disassembler::VisitFPDataProcessing3Source(Instruction* instr) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitFPImmediate(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitFPImmediate(Instruction* instr) {
|
| const char *mnemonic = "";
|
| const char *form = "(FPImmediate)";
|
|
|
| @@ -1043,7 +1043,7 @@ void Disassembler::VisitFPImmediate(Instruction* instr) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitFPIntegerConvert(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitFPIntegerConvert(Instruction* instr) {
|
| const char *mnemonic = "unimplemented";
|
| const char *form = "(FPIntegerConvert)";
|
| const char *form_rf = "'Rd, 'Fn";
|
| @@ -1099,7 +1099,7 @@ void Disassembler::VisitFPIntegerConvert(Instruction* instr) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitFPFixedPointConvert(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitFPFixedPointConvert(Instruction* instr) {
|
| const char *mnemonic = "";
|
| const char *form = "'Rd, 'Fn, 'IFPFBits";
|
| const char *form_fr = "'Fd, 'Rn, 'IFPFBits";
|
| @@ -1126,7 +1126,7 @@ void Disassembler::VisitFPFixedPointConvert(Instruction* instr) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitSystem(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitSystem(Instruction* instr) {
|
| // Some system instructions hijack their Op and Cp fields to represent a
|
| // range of immediates instead of indicating a different instruction. This
|
| // makes the decoding tricky.
|
| @@ -1187,7 +1187,7 @@ void Disassembler::VisitSystem(Instruction* instr) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitException(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitException(Instruction* instr) {
|
| const char *mnemonic = "unimplemented";
|
| const char *form = "'IDebug";
|
|
|
| @@ -1206,23 +1206,23 @@ void Disassembler::VisitException(Instruction* instr) {
|
| }
|
|
|
|
|
| -void Disassembler::VisitUnimplemented(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitUnimplemented(Instruction* instr) {
|
| Format(instr, "unimplemented", "(Unimplemented)");
|
| }
|
|
|
|
|
| -void Disassembler::VisitUnallocated(Instruction* instr) {
|
| +void DisassemblingDecoder::VisitUnallocated(Instruction* instr) {
|
| Format(instr, "unallocated", "(Unallocated)");
|
| }
|
|
|
|
|
| -void Disassembler::ProcessOutput(Instruction* /*instr*/) {
|
| +void DisassemblingDecoder::ProcessOutput(Instruction* /*instr*/) {
|
| // The base disasm does nothing more than disassembling into a buffer.
|
| }
|
|
|
|
|
| -void Disassembler::Format(Instruction* instr, const char* mnemonic,
|
| - const char* format) {
|
| +void DisassemblingDecoder::Format(Instruction* instr, const char* mnemonic,
|
| + const char* format) {
|
| // TODO(mcapewel) don't think I can use the instr address here - there needs
|
| // to be a base address too
|
| DCHECK(mnemonic != NULL);
|
| @@ -1237,7 +1237,7 @@ void Disassembler::Format(Instruction* instr, const char* mnemonic,
|
| }
|
|
|
|
|
| -void Disassembler::Substitute(Instruction* instr, const char* string) {
|
| +void DisassemblingDecoder::Substitute(Instruction* instr, const char* string) {
|
| char chr = *string++;
|
| while (chr != '\0') {
|
| if (chr == '\'') {
|
| @@ -1250,7 +1250,8 @@ void Disassembler::Substitute(Instruction* instr, const char* string) {
|
| }
|
|
|
|
|
| -int Disassembler::SubstituteField(Instruction* instr, const char* format) {
|
| +int DisassemblingDecoder::SubstituteField(Instruction* instr,
|
| + const char* format) {
|
| switch (format[0]) {
|
| case 'R': // Register. X or W, selected by sf bit.
|
| case 'F': // FP Register. S or D, selected by type field.
|
| @@ -1276,8 +1277,8 @@ int Disassembler::SubstituteField(Instruction* instr, const char* format) {
|
| }
|
|
|
|
|
| -int Disassembler::SubstituteRegisterField(Instruction* instr,
|
| - const char* format) {
|
| +int DisassemblingDecoder::SubstituteRegisterField(Instruction* instr,
|
| + const char* format) {
|
| unsigned reg_num = 0;
|
| unsigned field_len = 2;
|
| switch (format[1]) {
|
| @@ -1341,8 +1342,8 @@ int Disassembler::SubstituteRegisterField(Instruction* instr,
|
| }
|
|
|
|
|
| -int Disassembler::SubstituteImmediateField(Instruction* instr,
|
| - const char* format) {
|
| +int DisassemblingDecoder::SubstituteImmediateField(Instruction* instr,
|
| + const char* format) {
|
| DCHECK(format[0] == 'I');
|
|
|
| switch (format[1]) {
|
| @@ -1452,8 +1453,8 @@ int Disassembler::SubstituteImmediateField(Instruction* instr,
|
| }
|
|
|
|
|
| -int Disassembler::SubstituteBitfieldImmediateField(Instruction* instr,
|
| - const char* format) {
|
| +int DisassemblingDecoder::SubstituteBitfieldImmediateField(Instruction* instr,
|
| + const char* format) {
|
| DCHECK((format[0] == 'I') && (format[1] == 'B'));
|
| unsigned r = instr->ImmR();
|
| unsigned s = instr->ImmS();
|
| @@ -1488,8 +1489,8 @@ int Disassembler::SubstituteBitfieldImmediateField(Instruction* instr,
|
| }
|
|
|
|
|
| -int Disassembler::SubstituteLiteralField(Instruction* instr,
|
| - const char* format) {
|
| +int DisassemblingDecoder::SubstituteLiteralField(Instruction* instr,
|
| + const char* format) {
|
| DCHECK(strncmp(format, "LValue", 6) == 0);
|
| USE(format);
|
|
|
| @@ -1507,7 +1508,8 @@ int Disassembler::SubstituteLiteralField(Instruction* instr,
|
| }
|
|
|
|
|
| -int Disassembler::SubstituteShiftField(Instruction* instr, const char* format) {
|
| +int DisassemblingDecoder::SubstituteShiftField(Instruction* instr,
|
| + const char* format) {
|
| DCHECK(format[0] == 'H');
|
| DCHECK(instr->ShiftDP() <= 0x3);
|
|
|
| @@ -1530,8 +1532,8 @@ int Disassembler::SubstituteShiftField(Instruction* instr, const char* format) {
|
| }
|
|
|
|
|
| -int Disassembler::SubstituteConditionField(Instruction* instr,
|
| - const char* format) {
|
| +int DisassemblingDecoder::SubstituteConditionField(Instruction* instr,
|
| + const char* format) {
|
| DCHECK(format[0] == 'C');
|
| const char* condition_code[] = { "eq", "ne", "hs", "lo",
|
| "mi", "pl", "vs", "vc",
|
| @@ -1551,8 +1553,8 @@ int Disassembler::SubstituteConditionField(Instruction* instr,
|
| }
|
|
|
|
|
| -int Disassembler::SubstitutePCRelAddressField(Instruction* instr,
|
| - const char* format) {
|
| +int DisassemblingDecoder::SubstitutePCRelAddressField(Instruction* instr,
|
| + const char* format) {
|
| USE(format);
|
| DCHECK(strncmp(format, "AddrPCRel", 9) == 0);
|
|
|
| @@ -1572,8 +1574,8 @@ int Disassembler::SubstitutePCRelAddressField(Instruction* instr,
|
| }
|
|
|
|
|
| -int Disassembler::SubstituteBranchTargetField(Instruction* instr,
|
| - const char* format) {
|
| +int DisassemblingDecoder::SubstituteBranchTargetField(Instruction* instr,
|
| + const char* format) {
|
| DCHECK(strncmp(format, "BImm", 4) == 0);
|
|
|
| int64_t offset = 0;
|
| @@ -1599,8 +1601,8 @@ int Disassembler::SubstituteBranchTargetField(Instruction* instr,
|
| }
|
|
|
|
|
| -int Disassembler::SubstituteExtendField(Instruction* instr,
|
| - const char* format) {
|
| +int DisassemblingDecoder::SubstituteExtendField(Instruction* instr,
|
| + const char* format) {
|
| DCHECK(strncmp(format, "Ext", 3) == 0);
|
| DCHECK(instr->ExtendMode() <= 7);
|
| USE(format);
|
| @@ -1626,8 +1628,8 @@ int Disassembler::SubstituteExtendField(Instruction* instr,
|
| }
|
|
|
|
|
| -int Disassembler::SubstituteLSRegOffsetField(Instruction* instr,
|
| - const char* format) {
|
| +int DisassemblingDecoder::SubstituteLSRegOffsetField(Instruction* instr,
|
| + const char* format) {
|
| DCHECK(strncmp(format, "Offsetreg", 9) == 0);
|
| const char* extend_mode[] = { "undefined", "undefined", "uxtw", "lsl",
|
| "undefined", "undefined", "sxtw", "sxtx" };
|
| @@ -1655,8 +1657,8 @@ int Disassembler::SubstituteLSRegOffsetField(Instruction* instr,
|
| }
|
|
|
|
|
| -int Disassembler::SubstitutePrefetchField(Instruction* instr,
|
| - const char* format) {
|
| +int DisassemblingDecoder::SubstitutePrefetchField(Instruction* instr,
|
| + const char* format) {
|
| DCHECK(format[0] == 'P');
|
| USE(format);
|
|
|
| @@ -1670,8 +1672,8 @@ int Disassembler::SubstitutePrefetchField(Instruction* instr,
|
| return 6;
|
| }
|
|
|
| -int Disassembler::SubstituteBarrierField(Instruction* instr,
|
| - const char* format) {
|
| +int DisassemblingDecoder::SubstituteBarrierField(Instruction* instr,
|
| + const char* format) {
|
| DCHECK(format[0] == 'M');
|
| USE(format);
|
|
|
| @@ -1689,13 +1691,13 @@ int Disassembler::SubstituteBarrierField(Instruction* instr,
|
| }
|
|
|
|
|
| -void Disassembler::ResetOutput() {
|
| +void DisassemblingDecoder::ResetOutput() {
|
| buffer_pos_ = 0;
|
| buffer_[buffer_pos_] = 0;
|
| }
|
|
|
|
|
| -void Disassembler::AppendToOutput(const char* format, ...) {
|
| +void DisassemblingDecoder::AppendToOutput(const char* format, ...) {
|
| va_list args;
|
| va_start(args, format);
|
| buffer_pos_ += vsnprintf(&buffer_[buffer_pos_], buffer_size_, format, args);
|
| @@ -1761,7 +1763,7 @@ const char* NameConverter::NameInCode(byte* addr) const {
|
|
|
| //------------------------------------------------------------------------------
|
|
|
| -class BufferDisassembler : public v8::internal::Disassembler {
|
| +class BufferDisassembler : public v8::internal::DisassemblingDecoder {
|
| public:
|
| explicit BufferDisassembler(v8::internal::Vector<char> out_buffer)
|
| : out_buffer_(out_buffer) { }
|
|
|