summaryrefslogtreecommitdiff
path: root/src/compiler.cc
diff options
context:
space:
mode:
author jeffhao <jeffhao@google.com> 2012-08-24 17:56:54 -0700
committer jeffhao <jeffhao@google.com> 2012-08-27 11:33:05 -0700
commit7fbee0731b14b5bf392a4254f5cd84685ab517da (patch)
treeb24cf6d9eed7935e3b26d63cf2292fd8c008005b /src/compiler.cc
parentf3a26411e0e8b56b64d184d3e946e72f9c31e4c7 (diff)
Preliminary changes to allow mips target to build.
It compiles, but it doesn't work yet. Change-Id: I2973a03bd956d8d398b9cfd1047e66fbf3ff439c
Diffstat (limited to 'src/compiler.cc')
-rw-r--r--src/compiler.cc36
1 files changed, 24 insertions, 12 deletions
diff --git a/src/compiler.cc b/src/compiler.cc
index e31b9b5dda..466e2df6c4 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -409,12 +409,17 @@ Compiler::~Compiler() {
ByteArray* Compiler::CreateResolutionStub(InstructionSet instruction_set,
Runtime::TrampolineType type) {
- if (instruction_set == kX86) {
- return x86::X86CreateResolutionTrampoline(type);
- } else {
- CHECK(instruction_set == kArm || instruction_set == kThumb2);
- // Generates resolution stub using ARM instruction set
- return arm::ArmCreateResolutionTrampoline(type);
+ switch (instruction_set) {
+ case kArm:
+ case kThumb2:
+ return arm::ArmCreateResolutionTrampoline(type);
+ case kMips:
+ return mips::MipsCreateResolutionTrampoline(type);
+ case kX86:
+ return x86::X86CreateResolutionTrampoline(type);
+ default:
+ LOG(FATAL) << "Unknown InstructionSet: " << instruction_set;
+ return NULL;
}
}
@@ -423,6 +428,8 @@ ByteArray* Compiler::CreateJniDlsymLookupStub(InstructionSet instruction_set) {
case kArm:
case kThumb2:
return arm::CreateJniDlsymLookupStub();
+ case kMips:
+ return mips::CreateJniDlsymLookupStub();
case kX86:
return x86::CreateJniDlsymLookupStub();
default:
@@ -432,12 +439,17 @@ ByteArray* Compiler::CreateJniDlsymLookupStub(InstructionSet instruction_set) {
}
ByteArray* Compiler::CreateAbstractMethodErrorStub(InstructionSet instruction_set) {
- if (instruction_set == kX86) {
- return x86::CreateAbstractMethodErrorStub();
- } else {
- CHECK(instruction_set == kArm || instruction_set == kThumb2);
- // Generates resolution stub using ARM instruction set
- return arm::CreateAbstractMethodErrorStub();
+ switch (instruction_set) {
+ case kArm:
+ case kThumb2:
+ return arm::CreateAbstractMethodErrorStub();
+ case kMips:
+ return mips::CreateAbstractMethodErrorStub();
+ case kX86:
+ return x86::CreateAbstractMethodErrorStub();
+ default:
+ LOG(FATAL) << "Unknown InstructionSet: " << instruction_set;
+ return NULL;
}
}