From 82488f563e7f72f8c626052893c1792d76ab3faf Mon Sep 17 00:00:00 2001 From: buzbee Date: Fri, 2 Mar 2012 08:20:26 -0800 Subject: Multi-target Codegen cleanup Trying to get a bit more consistent in the abstraction layer naming: genXXX -> high-level codegen, for ex: genIGet() opXXX -> instruction-level output, for ex: opRegImm() Also more fleshing out of the Mips codegen support. Change-Id: Iafdf397cbb5015bfe3aa2c38680d96c7c05f8bc4 --- src/compiler/codegen/mips/ArchUtility.cc | 62 +++----------------------------- 1 file changed, 4 insertions(+), 58 deletions(-) (limited to 'src/compiler/codegen/mips/ArchUtility.cc') diff --git a/src/compiler/codegen/mips/ArchUtility.cc b/src/compiler/codegen/mips/ArchUtility.cc index 7f7aeb3b90..40188ce181 100644 --- a/src/compiler/codegen/mips/ArchUtility.cc +++ b/src/compiler/codegen/mips/ArchUtility.cc @@ -22,33 +22,6 @@ namespace art { -MipsConditionCode oatMipsConditionEncoding(ConditionCode code) -{ - MipsConditionCode res; - switch(code) { - case kCondEq: res = kMipsCondEq; break; - case kCondNe: res = kMipsCondNe; break; - case kCondCs: res = kMipsCondCs; break; - case kCondCc: res = kMipsCondCc; break; - case kCondMi: res = kMipsCondMi; break; - case kCondPl: res = kMipsCondPl; break; - case kCondVs: res = kMipsCondVs; break; - case kCondVc: res = kMipsCondVc; break; - case kCondHi: res = kMipsCondHi; break; - case kCondLs: res = kMipsCondLs; break; - case kCondGe: res = kMipsCondGe; break; - case kCondLt: res = kMipsCondLt; break; - case kCondGt: res = kMipsCondGt; break; - case kCondLe: res = kMipsCondLe; break; - case kCondAl: res = kMipsCondAl; break; - case kCondNv: res = kMipsCondNv; break; - default: - LOG(FATAL) << "Bad condition code" << (int)code; - res = (MipsConditionCode)0; // Quiet gcc - } - return res; -} - /* For dumping instructions */ #define MIPS_REG_COUNT 32 static const char *mipsRegName[MIPS_REG_COUNT] = { @@ -112,37 +85,6 @@ std::string buildInsnString(const char *fmt, LIR *lir, unsigned char* baseAddr) case 'F': sprintf(tbuf,"%d", operand*2); break; - case 'c': - switch (operand) { - case kMipsCondEq: - strcpy(tbuf, "eq"); - break; - case kMipsCondNe: - strcpy(tbuf, "ne"); - break; - case kMipsCondLt: - strcpy(tbuf, "lt"); - break; - case kMipsCondGe: - strcpy(tbuf, "ge"); - break; - case kMipsCondGt: - strcpy(tbuf, "gt"); - break; - case kMipsCondLe: - strcpy(tbuf, "le"); - break; - case kMipsCondCs: - strcpy(tbuf, "cs"); - break; - case kMipsCondMi: - strcpy(tbuf, "mi"); - break; - default: - strcpy(tbuf, ""); - break; - } - break; case 't': sprintf(tbuf,"0x%08x (L%p)", (int) baseAddr + lir->offset + 4 + @@ -172,6 +114,10 @@ std::string buildInsnString(const char *fmt, LIR *lir, unsigned char* baseAddr) DCHECK(operand >= 0 && operand < MIPS_REG_COUNT); strcpy(tbuf, mipsRegName[operand]); break; + case 'N': + // Placeholder for delay slot handling + strcpy(tbuf, "; nop"); + break; default: strcpy(tbuf,"DecodeError"); break; -- cgit v1.2.3-59-g8ed1b