diff options
| author | 2011-10-07 14:31:02 -0700 | |
|---|---|---|
| committer | 2011-10-07 15:08:48 -0700 | |
| commit | f5a7a476e7ea63e094ff0f011dccc170607e6f6b (patch) | |
| tree | 4f07e57d5e3d2a82eeefcb7c6409f36b383b1d96 /src/compiler/codegen/arm | |
| parent | c2858561314513cc7bce2da7e13664aefef5a2ac (diff) | |
Enhance CHECK_EQ and friends to allow extra detail to be appended (like CHECK).
Change-Id: Iaa980892ab31621c8bcca9ea7c6c4ee743333f45
Diffstat (limited to 'src/compiler/codegen/arm')
| -rw-r--r-- | src/compiler/codegen/arm/ArchUtility.cc | 2 | ||||
| -rw-r--r-- | src/compiler/codegen/arm/Thumb2/Factory.cc | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/codegen/arm/ArchUtility.cc b/src/compiler/codegen/arm/ArchUtility.cc index edce1148ce..aef98faff5 100644 --- a/src/compiler/codegen/arm/ArchUtility.cc +++ b/src/compiler/codegen/arm/ArchUtility.cc @@ -122,7 +122,7 @@ STATIC void buildInsnString(const char* fmt, ArmLIR* lir, char* buf, strcpy(tbuf, "!"); } else { DCHECK_LT(fmt, fmtEnd); - DCHECK((unsigned)(nc-'0') < 4); + DCHECK_LT((unsigned)(nc-'0'), 4U); operand = lir->operands[nc-'0']; switch(*fmt++) { case 'H': diff --git a/src/compiler/codegen/arm/Thumb2/Factory.cc b/src/compiler/codegen/arm/Thumb2/Factory.cc index 318be5abcf..1ea565a543 100644 --- a/src/compiler/codegen/arm/Thumb2/Factory.cc +++ b/src/compiler/codegen/arm/Thumb2/Factory.cc @@ -341,7 +341,7 @@ STATIC ArmLIR* opRegRegShift(CompilationUnit* cUnit, OpKind op, int rDestSrc1, LOG(FATAL) << "Bad opcode: " << (int)op; break; } - DCHECK(opcode >= 0); + DCHECK_GE(static_cast<int>(opcode), 0); if (EncodingMap[opcode].flags & IS_BINARY_OP) return newLIR2(cUnit, opcode, rDestSrc1, rSrc2); else if (EncodingMap[opcode].flags & IS_TERTIARY_OP) { @@ -418,7 +418,7 @@ STATIC ArmLIR* opRegRegRegShift(CompilationUnit* cUnit, OpKind op, LOG(FATAL) << "Bad opcode: " << (int)op; break; } - DCHECK(opcode >= 0); + DCHECK_GE(static_cast<int>(opcode), 0); if (EncodingMap[opcode].flags & IS_QUAD_OP) return newLIR4(cUnit, opcode, rDest, rSrc1, rSrc2, shift); else { |