diff options
| author | 2012-03-02 08:20:26 -0800 | |
|---|---|---|
| committer | 2012-03-02 13:02:52 -0800 | |
| commit | 82488f563e7f72f8c626052893c1792d76ab3faf (patch) | |
| tree | e17e3bc62adf8b57bfeb86a3a879dfb099d3d1d7 /src/compiler/codegen/mips/ArchUtility.cc | |
| parent | 013b6f296ff7c0cb6aa5aeb6868df05995eeadb7 (diff) | |
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
Diffstat (limited to 'src/compiler/codegen/mips/ArchUtility.cc')
| -rw-r--r-- | src/compiler/codegen/mips/ArchUtility.cc | 62 |
1 files changed, 4 insertions, 58 deletions
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; |