From 32f32721e65c93a3aaf8a792b7742aabe7e29e7e Mon Sep 17 00:00:00 2001 From: Narayan Kamath Date: Tue, 8 Jul 2014 17:12:54 +0100 Subject: 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 --- libart/src/main/java/dalvik/system/VMRuntime.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libart') 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)); + } } -- cgit v1.1