diff options
| author | 2011-09-23 17:34:19 -0700 | |
|---|---|---|
| committer | 2011-09-23 18:34:31 -0700 | |
| commit | ed3e930109e3f01804ca32cee4afe4f2d4b3f4d8 (patch) | |
| tree | 41c3ffd3fdade2244b4cd3824c98419edecbca86 /src/compiler/codegen/arm/ArchUtility.cc | |
| parent | 8060925c45cc2607ab92390d7366c6c0cfdfe4bb (diff) | |
assert to DCHECK conversion
Also replaced static function defs with a STATIC macro to make normally
hidden functions visible to DCHECK's traceback listing). Additionally,
added some portions of the new type & size inference mechanism (but not
taking advantage of them yet).
Change-Id: Ib42a08777f28ab879d0df37617e1b77e3f09ba52
Diffstat (limited to 'src/compiler/codegen/arm/ArchUtility.cc')
| -rw-r--r-- | src/compiler/codegen/arm/ArchUtility.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/compiler/codegen/arm/ArchUtility.cc b/src/compiler/codegen/arm/ArchUtility.cc index 350f38caeb..ccafecbda6 100644 --- a/src/compiler/codegen/arm/ArchUtility.cc +++ b/src/compiler/codegen/arm/ArchUtility.cc @@ -44,7 +44,7 @@ static const char* shiftNames[4] = { "ror"}; /* Decode and print a ARM register name */ -static char* decodeRegList(ArmOpcode opcode, int vector, char* buf) +STATIC char* decodeRegList(ArmOpcode opcode, int vector, char* buf) { int i; bool printed = false; @@ -68,7 +68,7 @@ static char* decodeRegList(ArmOpcode opcode, int vector, char* buf) return buf; } -static char* decodeFPCSRegList(int count, int base, char* buf) +STATIC char* decodeFPCSRegList(int count, int base, char* buf) { sprintf(buf, "s%d", base); for (int i = 1; i < count; i++) { @@ -77,7 +77,7 @@ static char* decodeFPCSRegList(int count, int base, char* buf) return buf; } -static int expandImmediate(int value) +STATIC int expandImmediate(int value) { int mode = (value & 0xf00) >> 8; u4 bits = value & 0xff; @@ -103,7 +103,7 @@ const char* ccNames[] = {"eq","ne","cs","cc","mi","pl","vs","vc", * Interpret a format string and build a string no longer than size * See format key in Assemble.c. */ -static void buildInsnString(const char* fmt, ArmLIR* lir, char* buf, +STATIC void buildInsnString(const char* fmt, ArmLIR* lir, char* buf, unsigned char* baseAddr, int size) { int i; @@ -116,13 +116,13 @@ static void buildInsnString(const char* fmt, ArmLIR* lir, char* buf, int operand; if (*fmt == '!') { fmt++; - assert(fmt < fmtEnd); + DCHECK_LT(fmt, fmtEnd); nc = *fmt++; if (nc=='!') { strcpy(tbuf, "!"); } else { - assert(fmt < fmtEnd); - assert((unsigned)(nc-'0') < 4); + DCHECK_LT(fmt, fmtEnd); + DCHECK((unsigned)(nc-'0') < 4); operand = lir->operands[nc-'0']; switch(*fmt++) { case 'H': |