summaryrefslogtreecommitdiffstats
path: root/libart
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2014-07-08 17:12:54 +0100
committerNarayan Kamath <narayan@google.com>2014-07-09 18:38:05 +0100
commit32f32721e65c93a3aaf8a792b7742aabe7e29e7e (patch)
treeffe9433aae13c15a228d00d3b3a93685248a3485 /libart
parentd4a9e5b226d8df8ab9398265fde9ec97156d8fc6 (diff)
downloadlibcore-32f32721e65c93a3aaf8a792b7742aabe7e29e7e.zip
libcore-32f32721e65c93a3aaf8a792b7742aabe7e29e7e.tar.gz
libcore-32f32721e65c93a3aaf8a792b7742aabe7e29e7e.tar.bz2
API to query whether a given instruction set / abi is 64bit.
This is required to implement some aspects of the multi lib installation process. Change-Id: I962d0510b94fb85c4be9f90e6145dac50a4eadf2
Diffstat (limited to 'libart')
-rw-r--r--libart/src/main/java/dalvik/system/VMRuntime.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/libart/src/main/java/dalvik/system/VMRuntime.java b/libart/src/main/java/dalvik/system/VMRuntime.java
index 48b2dfa..a905c71 100644
--- a/libart/src/main/java/dalvik/system/VMRuntime.java
+++ b/libart/src/main/java/dalvik/system/VMRuntime.java
@@ -39,6 +39,7 @@ public final class VMRuntime {
ABI_TO_INSTRUCTION_SET_MAP.put("armeabi", "arm");
ABI_TO_INSTRUCTION_SET_MAP.put("armeabi-v7a", "arm");
ABI_TO_INSTRUCTION_SET_MAP.put("mips", "mips");
+ ABI_TO_INSTRUCTION_SET_MAP.put("mips64", "mips64");
ABI_TO_INSTRUCTION_SET_MAP.put("x86", "x86");
ABI_TO_INSTRUCTION_SET_MAP.put("x86_64", "x86_64");
ABI_TO_INSTRUCTION_SET_MAP.put("arm64-v8a", "arm64");
@@ -325,4 +326,14 @@ public final class VMRuntime {
return instructionSet;
}
+
+ public static boolean is64BitInstructionSet(String instructionSet) {
+ return "arm64".equals(instructionSet) ||
+ "x86_64".equals(instructionSet) ||
+ "mips64".equals(instructionSet);
+ }
+
+ public static boolean is64BitAbi(String abi) {
+ return is64BitInstructionSet(getInstructionSet(abi));
+ }
}