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
diff --git a/src/compiler/codegen/arm/ArchUtility.cc b/src/compiler/codegen/arm/ArchUtility.cc
index 350f38c..ccafecb 100644
--- a/src/compiler/codegen/arm/ArchUtility.cc
+++ b/src/compiler/codegen/arm/ArchUtility.cc
@@ -44,7 +44,7 @@
"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 @@
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 @@
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 @@
* 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 @@
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':