Index: src/arm/disasm-arm.cc |
diff --git a/src/arm/disasm-arm.cc b/src/arm/disasm-arm.cc |
index 604a2b88120d3d4591944dca153cbeea74f49e8b..85977b186e8a940558130f04c5f36d4ef32b005e 100644 |
--- a/src/arm/disasm-arm.cc |
+++ b/src/arm/disasm-arm.cc |
@@ -299,7 +299,7 @@ void Decoder::PrintSoftwareInterrupt(SoftwareInterruptCodes svc) { |
// Handle all register based formatting in this function to reduce the |
// complexity of FormatOption. |
int Decoder::FormatRegister(Instruction* instr, const char* format) { |
- ASSERT(format[0] == 'r'); |
+ DCHECK(format[0] == 'r'); |
if (format[1] == 'n') { // 'rn: Rn register |
int reg = instr->RnValue(); |
PrintRegister(reg); |
@@ -322,7 +322,7 @@ int Decoder::FormatRegister(Instruction* instr, const char* format) { |
return 2; |
} else if (format[1] == 'l') { |
// 'rlist: register list for load and store multiple instructions |
- ASSERT(STRING_STARTS_WITH(format, "rlist")); |
+ DCHECK(STRING_STARTS_WITH(format, "rlist")); |
int rlist = instr->RlistValue(); |
int reg = 0; |
Print("{"); |
@@ -348,7 +348,7 @@ int Decoder::FormatRegister(Instruction* instr, const char* format) { |
// Handle all VFP register based formatting in this function to reduce the |
// complexity of FormatOption. |
int Decoder::FormatVFPRegister(Instruction* instr, const char* format) { |
- ASSERT((format[0] == 'S') || (format[0] == 'D')); |
+ DCHECK((format[0] == 'S') || (format[0] == 'D')); |
VFPRegPrecision precision = |
format[0] == 'D' ? kDoublePrecision : kSinglePrecision; |
@@ -462,7 +462,7 @@ int Decoder::FormatOption(Instruction* instr, const char* format) { |
return 1; |
} |
case 'c': { // 'cond: conditional execution |
- ASSERT(STRING_STARTS_WITH(format, "cond")); |
+ DCHECK(STRING_STARTS_WITH(format, "cond")); |
PrintCondition(instr); |
return 4; |
} |
@@ -478,9 +478,9 @@ int Decoder::FormatOption(Instruction* instr, const char* format) { |
// BFC/BFI: |
// Bits 20-16 represent most-significant bit. Covert to width. |
width -= lsbit; |
- ASSERT(width > 0); |
+ DCHECK(width > 0); |
} |
- ASSERT((width + lsbit) <= 32); |
+ DCHECK((width + lsbit) <= 32); |
out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_, |
"#%d, #%d", lsbit, width); |
return 1; |
@@ -498,9 +498,9 @@ int Decoder::FormatOption(Instruction* instr, const char* format) { |
int width = (format[3] - '0') * 10 + (format[4] - '0'); |
int lsb = (format[6] - '0') * 10 + (format[7] - '0'); |
- ASSERT((width >= 1) && (width <= 32)); |
- ASSERT((lsb >= 0) && (lsb <= 31)); |
- ASSERT((width + lsb) <= 32); |
+ DCHECK((width >= 1) && (width <= 32)); |
+ DCHECK((lsb >= 0) && (lsb <= 31)); |
+ DCHECK((width + lsb) <= 32); |
out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_, |
"%d", |
@@ -520,7 +520,7 @@ int Decoder::FormatOption(Instruction* instr, const char* format) { |
return 2; |
} |
if (format[1] == 'e') { // 'memop: load/store instructions. |
- ASSERT(STRING_STARTS_WITH(format, "memop")); |
+ DCHECK(STRING_STARTS_WITH(format, "memop")); |
if (instr->HasL()) { |
Print("ldr"); |
} else { |
@@ -538,7 +538,7 @@ int Decoder::FormatOption(Instruction* instr, const char* format) { |
return 5; |
} |
// 'msg: for simulator break instructions |
- ASSERT(STRING_STARTS_WITH(format, "msg")); |
+ DCHECK(STRING_STARTS_WITH(format, "msg")); |
byte* str = |
reinterpret_cast<byte*>(instr->InstructionBits() & 0x0fffffff); |
out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_, |
@@ -548,13 +548,13 @@ int Decoder::FormatOption(Instruction* instr, const char* format) { |
case 'o': { |
if ((format[3] == '1') && (format[4] == '2')) { |
// 'off12: 12-bit offset for load and store instructions |
- ASSERT(STRING_STARTS_WITH(format, "off12")); |
+ DCHECK(STRING_STARTS_WITH(format, "off12")); |
out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_, |
"%d", instr->Offset12Value()); |
return 5; |
} else if (format[3] == '0') { |
// 'off0to3and8to19 16-bit immediate encoded in bits 19-8 and 3-0. |
- ASSERT(STRING_STARTS_WITH(format, "off0to3and8to19")); |
+ DCHECK(STRING_STARTS_WITH(format, "off0to3and8to19")); |
out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_, |
"%d", |
(instr->Bits(19, 8) << 4) + |
@@ -562,13 +562,13 @@ int Decoder::FormatOption(Instruction* instr, const char* format) { |
return 15; |
} |
// 'off8: 8-bit offset for extra load and store instructions |
- ASSERT(STRING_STARTS_WITH(format, "off8")); |
+ DCHECK(STRING_STARTS_WITH(format, "off8")); |
int offs8 = (instr->ImmedHValue() << 4) | instr->ImmedLValue(); |
out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_, "%d", offs8); |
return 4; |
} |
case 'p': { // 'pu: P and U bits for load and store instructions |
- ASSERT(STRING_STARTS_WITH(format, "pu")); |
+ DCHECK(STRING_STARTS_WITH(format, "pu")); |
PrintPU(instr); |
return 2; |
} |
@@ -578,29 +578,29 @@ int Decoder::FormatOption(Instruction* instr, const char* format) { |
case 's': { |
if (format[1] == 'h') { // 'shift_op or 'shift_rm or 'shift_sat. |
if (format[6] == 'o') { // 'shift_op |
- ASSERT(STRING_STARTS_WITH(format, "shift_op")); |
+ DCHECK(STRING_STARTS_WITH(format, "shift_op")); |
if (instr->TypeValue() == 0) { |
PrintShiftRm(instr); |
} else { |
- ASSERT(instr->TypeValue() == 1); |
+ DCHECK(instr->TypeValue() == 1); |
PrintShiftImm(instr); |
} |
return 8; |
} else if (format[6] == 's') { // 'shift_sat. |
- ASSERT(STRING_STARTS_WITH(format, "shift_sat")); |
+ DCHECK(STRING_STARTS_WITH(format, "shift_sat")); |
PrintShiftSat(instr); |
return 9; |
} else { // 'shift_rm |
- ASSERT(STRING_STARTS_WITH(format, "shift_rm")); |
+ DCHECK(STRING_STARTS_WITH(format, "shift_rm")); |
PrintShiftRm(instr); |
return 8; |
} |
} else if (format[1] == 'v') { // 'svc |
- ASSERT(STRING_STARTS_WITH(format, "svc")); |
+ DCHECK(STRING_STARTS_WITH(format, "svc")); |
PrintSoftwareInterrupt(instr->SvcValue()); |
return 3; |
} else if (format[1] == 'i') { // 'sign: signed extra loads and stores |
- ASSERT(STRING_STARTS_WITH(format, "sign")); |
+ DCHECK(STRING_STARTS_WITH(format, "sign")); |
if (instr->HasSign()) { |
Print("s"); |
} |
@@ -613,7 +613,7 @@ int Decoder::FormatOption(Instruction* instr, const char* format) { |
return 1; |
} |
case 't': { // 'target: target of branch instructions |
- ASSERT(STRING_STARTS_WITH(format, "target")); |
+ DCHECK(STRING_STARTS_WITH(format, "target")); |
int off = (instr->SImmed24Value() << 2) + 8; |
out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_, |
"%+d -> %s", |