diff options
author | Narayan Kamath <narayan@google.com> | 2014-07-08 17:12:54 +0100 |
---|---|---|
committer | Narayan Kamath <narayan@google.com> | 2014-07-14 09:58:25 +0100 |
commit | 51b69d37a34a44e045a87d0950a0602be415c126 (patch) | |
tree | 2632853a484b34d2c8642ebddfcf3bb3ebc5113d /libart | |
parent | 097fdde0002d792f86137405c4e3c94fbee1a09a (diff) | |
download | libcore-51b69d37a34a44e045a87d0950a0602be415c126.zip libcore-51b69d37a34a44e045a87d0950a0602be415c126.tar.gz libcore-51b69d37a34a44e045a87d0950a0602be415c126.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.
(cherry picked from commit 32f32721e65c93a3aaf8a792b7742aabe7e29e7e)
Change-Id: I10fedcbee1318d132d2ac517ddf8cdca02a51cda
Diffstat (limited to 'libart')
-rw-r--r-- | libart/src/main/java/dalvik/system/VMRuntime.java | 11 |
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)); + } } |