< prev index next >

src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/CompiledMethodInfo.java

Print this page
rev 49736 : 8185505: AArch64: Port AOT to AArch64
Reviewed-by: duke

*** 1,7 **** /* ! * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 37,46 **** --- 37,48 ---- import jdk.vm.ci.hotspot.HotSpotCompiledCode; import jdk.vm.ci.hotspot.HotSpotResolvedObjectType; final class CompiledMethodInfo { + static final String archStr = System.getProperty("os.arch").toLowerCase(); + private static final int UNINITIALIZED_OFFSET = -1; private static class AOTMethodOffsets { /** * Offset in metaspace names section.
*** 302,315 **** return null; } boolean hasMark(Site call, MarkId id) { for (Mark m : compilationResult.getMarks()) { ! // TODO: X64-specific code. // Call instructions are aligned to 8 // bytes - 1 on x86 to patch address atomically, ! int adjOffset = (m.pcOffset & (-8)) + 7; // Mark points before aligning nops. if ((call.pcOffset == adjOffset) && MarkId.getEnum((int) m.id) == id) { return true; } } --- 304,324 ---- return null; } boolean hasMark(Site call, MarkId id) { for (Mark m : compilationResult.getMarks()) { ! int adjOffset = m.pcOffset; ! if (archStr.equals("aarch64")) { ! // The mark is at the end of a group of three instructions: ! // adrp; add; ldr ! adjOffset += 12; ! } else { ! // X64-specific code. // Call instructions are aligned to 8 // bytes - 1 on x86 to patch address atomically, ! adjOffset = (adjOffset & (-8)) + 7; ! } // Mark points before aligning nops. if ((call.pcOffset == adjOffset) && MarkId.getEnum((int) m.id) == id) { return true; } }
< prev index next >