ART: Allow to compile interpret-only mips64 files
Include enough infrastructure to allow cross-compiling for mips64,
interpret-only. This includes the instruction-set-features, frame
size info and utils assembler.
Also add a disassembler for oatdump, and support in patchoat.
Note: the runtime cannot run mips64, yet.
Change-Id: Id106581fa76b478984741c62a8a03be0f370d992
diff --git a/runtime/arch/instruction_set_features.cc b/runtime/arch/instruction_set_features.cc
index 1072562..1fd1dea 100644
--- a/runtime/arch/instruction_set_features.cc
+++ b/runtime/arch/instruction_set_features.cc
@@ -23,6 +23,7 @@
#include "arm/instruction_set_features_arm.h"
#include "arm64/instruction_set_features_arm64.h"
#include "mips/instruction_set_features_mips.h"
+#include "mips64/instruction_set_features_mips64.h"
#include "x86/instruction_set_features_x86.h"
#include "x86_64/instruction_set_features_x86_64.h"
@@ -43,6 +44,9 @@
case kMips:
result = MipsInstructionSetFeatures::FromVariant(variant, error_msg);
break;
+ case kMips64:
+ result = Mips64InstructionSetFeatures::FromVariant(variant, error_msg);
+ break;
case kX86:
result = X86InstructionSetFeatures::FromVariant(variant, error_msg);
break;
@@ -71,6 +75,9 @@
case kMips:
result = MipsInstructionSetFeatures::FromBitmap(bitmap);
break;
+ case kMips64:
+ result = Mips64InstructionSetFeatures::FromBitmap(bitmap);
+ break;
case kX86:
result = X86InstructionSetFeatures::FromBitmap(bitmap);
break;
@@ -98,6 +105,9 @@
case kMips:
result = MipsInstructionSetFeatures::FromCppDefines();
break;
+ case kMips64:
+ result = Mips64InstructionSetFeatures::FromCppDefines();
+ break;
case kX86:
result = X86InstructionSetFeatures::FromCppDefines();
break;
@@ -125,6 +135,9 @@
case kMips:
result = MipsInstructionSetFeatures::FromCpuInfo();
break;
+ case kMips64:
+ result = Mips64InstructionSetFeatures::FromCpuInfo();
+ break;
case kX86:
result = X86InstructionSetFeatures::FromCpuInfo();
break;
@@ -151,6 +164,9 @@
case kMips:
result = MipsInstructionSetFeatures::FromHwcap();
break;
+ case kMips64:
+ result = Mips64InstructionSetFeatures::FromHwcap();
+ break;
case kX86:
result = X86InstructionSetFeatures::FromHwcap();
break;
@@ -177,6 +193,9 @@
case kMips:
result = MipsInstructionSetFeatures::FromAssembly();
break;
+ case kMips64:
+ result = Mips64InstructionSetFeatures::FromAssembly();
+ break;
case kX86:
result = X86InstructionSetFeatures::FromAssembly();
break;
@@ -250,6 +269,11 @@
return down_cast<const MipsInstructionSetFeatures*>(this);
}
+const Mips64InstructionSetFeatures* InstructionSetFeatures::AsMips64InstructionSetFeatures() const {
+ DCHECK_EQ(kMips64, GetInstructionSet());
+ return down_cast<const Mips64InstructionSetFeatures*>(this);
+}
+
const X86InstructionSetFeatures* InstructionSetFeatures::AsX86InstructionSetFeatures() const {
DCHECK(kX86 == GetInstructionSet() || kX86_64 == GetInstructionSet());
return down_cast<const X86InstructionSetFeatures*>(this);