Skip to content

Commit

Permalink
Merge pull request #5085 from knn-k/aarch64runtime2
Browse files Browse the repository at this point in the history
AArch64: Declare undefined functions in JIT
  • Loading branch information
0xdaryl authored Mar 21, 2019
2 parents a4cfa38 + d18a353 commit 5b54880
Show file tree
Hide file tree
Showing 7 changed files with 133 additions and 4 deletions.
4 changes: 4 additions & 0 deletions runtime/compiler/aarch64/codegen/J9TreeEvaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@

#include "codegen/TreeEvaluator.hpp"

void VMgenerateCatchBlockBBStartPrologue(TR::Node *node, TR::Instruction *fenceInstruction, TR::CodeGenerator *cg)
{
TR_UNIMPLEMENTED();
}
26 changes: 26 additions & 0 deletions runtime/compiler/aarch64/runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
################################################################################
# Copyright (c) 2019, 2019 IBM Corp. and others
#
# This program and the accompanying materials are made available under
# the terms of the Eclipse Public License 2.0 which accompanies this
# distribution and is available at https://www.eclipse.org/legal/epl-2.0/
# or the Apache License, Version 2.0 which accompanies this distribution and
# is available at https://www.apache.org/licenses/LICENSE-2.0.
#
# This Source Code may also be made available under the following
# Secondary Licenses when the conditions for such availability set
# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
# General Public License, version 2 with the GNU Classpath
# Exception [1] and GNU General Public License, version 2 with the
# OpenJDK Assembly Exception [2].
#
# [1] https://www.gnu.org/software/classpath/license.html
# [2] http://openjdk.java.net/legal/assembly-exception.html
#
# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
################################################################################

j9jit_files(
aarch64/runtime/Recomp.cpp
aarch64/runtime/Recompilation.spp
)
64 changes: 64 additions & 0 deletions runtime/compiler/aarch64/runtime/Recomp.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*******************************************************************************
* Copyright (c) 2019, 2019 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
* distribution and is available at https://www.eclipse.org/legal/epl-2.0/
* or the Apache License, Version 2.0 which accompanies this distribution and
* is available at https://www.apache.org/licenses/LICENSE-2.0.
*
* This Source Code may also be made available under the following
* Secondary Licenses when the conditions for such availability set
* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
* General Public License, version 2 with the GNU Classpath
* Exception [1] and GNU General Public License, version 2 with the
* OpenJDK Assembly Exception [2].
*
* [1] https://www.gnu.org/software/classpath/license.html
* [2] http://openjdk.java.net/legal/assembly-exception.html
*
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
*******************************************************************************/

#include "control/Recompilation.hpp"

// Called at runtime to get the body info from the start PC
//
TR_PersistentJittedBodyInfo *J9::Recompilation::getJittedBodyInfoFromPC(void *startPC)
{
TR_UNIMPLEMENTED();
return NULL;
}

bool J9::Recompilation::isAlreadyPreparedForRecompile(void *startPC)
{
TR_UNIMPLEMENTED();
return FALSE;
}

void J9::Recompilation::fixUpMethodCode(void *startPC)
{
TR_UNIMPLEMENTED();
}

void J9::Recompilation::methodHasBeenRecompiled(void *oldStartPC, void *newStartPC, TR_FrontEnd *fe)
{
TR_UNIMPLEMENTED();
}

void J9::Recompilation::methodCannotBeRecompiled(void *oldStartPC, TR_FrontEnd *fe)
{
TR_UNIMPLEMENTED();
}

void J9::Recompilation::invalidateMethodBody(void *startPC, TR_FrontEnd *fe)
{
TR_UNIMPLEMENTED();
}

#if defined(TR_HOST_ARM64)
void fixupMethodInfoAddressInCodeCache(void *startPC, void *bodyInfo)
{
TR_UNIMPLEMENTED();
}
#endif
32 changes: 32 additions & 0 deletions runtime/compiler/aarch64/runtime/Recompilation.spp
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*******************************************************************************
* Copyright (c) 2019, 2019 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
* distribution and is available at https://www.eclipse.org/legal/epl-2.0/
* or the Apache License, Version 2.0 which accompanies this distribution and
* is available at https://www.apache.org/licenses/LICENSE-2.0.
*
* This Source Code may also be made available under the following
* Secondary Licenses when the conditions for such availability set
* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
* General Public License, version 2 with the GNU Classpath
* Exception [1] and GNU General Public License, version 2 with the
* OpenJDK Assembly Exception [2].
*
* [1] https://www.gnu.org/software/classpath/license.html
* [2] http://openjdk.java.net/legal/assembly-exception.html
*
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
*******************************************************************************/

.file "Recompilation.s"

.globl _initialInvokeExactThunkGlue
.globl _revertToInterpreterGlue

_initialInvokeExactThunkGlue:
hlt #0 // Not implemented yet

_revertToInterpreterGlue:
hlt #0 // Not implemented yet
4 changes: 3 additions & 1 deletion runtime/compiler/build/files/host/aarch64.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@
JIT_PRODUCT_BACKEND_SOURCES+= \
omr/compiler/aarch64/runtime/CodeSync.cpp

JIT_PRODUCT_SOURCE_FILES+=
JIT_PRODUCT_SOURCE_FILES+= \
compiler/aarch64/runtime/Recomp.cpp \
compiler/aarch64/runtime/Recompilation.spp
1 change: 1 addition & 0 deletions runtime/compiler/build/files/target/aarch64.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
JIT_PRODUCT_BACKEND_SOURCES+= \
omr/compiler/aarch64/codegen/ARM64BinaryEncoding.cpp \
omr/compiler/aarch64/codegen/ARM64Debug.cpp \
omr/compiler/aarch64/codegen/ARM64HelperCallSnippet.cpp \
omr/compiler/aarch64/codegen/ARM64Instruction.cpp \
omr/compiler/aarch64/codegen/ARM64OutOfLineCodeSection.cpp \
omr/compiler/aarch64/codegen/ARM64SystemLinkage.cpp \
Expand Down
6 changes: 3 additions & 3 deletions runtime/compiler/control/CompilationThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1221,7 +1221,7 @@ TR::CompilationInfo::disableAOTCompilations()
#endif


#if defined(J9VM_INTERP_AOT_RUNTIME_SUPPORT) && defined(J9VM_OPT_SHARED_CLASSES) && (defined(TR_HOST_X86) || defined(TR_HOST_POWER) || defined(TR_HOST_S390) || defined(TR_HOST_ARM))
#if defined(J9VM_INTERP_AOT_RUNTIME_SUPPORT) && defined(J9VM_OPT_SHARED_CLASSES) && (defined(TR_HOST_X86) || defined(TR_HOST_POWER) || defined(TR_HOST_S390) || defined(TR_HOST_ARM) || defined(TR_HOST_ARM64))

// Note: this method must be called only when we know that AOT mode for shared classes is enabled !!
bool TR::CompilationInfo::isRomClassForMethodInSharedCache(J9Method *method, J9JavaVM *javaVM)
Expand Down Expand Up @@ -5844,7 +5844,7 @@ TR::CompilationInfoPerThreadBase::outputVerboseMMapEntries(
#pragma option_override(TR::CompilationInfo::compile(J9VMThread *, TR_MethodToBeCompiled *, bool), "OPT(SPILL,256)")
#endif

#if defined(J9VM_INTERP_AOT_RUNTIME_SUPPORT) && defined(J9VM_OPT_SHARED_CLASSES) && (defined(TR_HOST_X86) || defined(TR_HOST_POWER) || defined(TR_HOST_S390) || defined(TR_HOST_ARM))
#if defined(J9VM_INTERP_AOT_RUNTIME_SUPPORT) && defined(J9VM_OPT_SHARED_CLASSES) && (defined(TR_HOST_X86) || defined(TR_HOST_POWER) || defined(TR_HOST_S390) || defined(TR_HOST_ARM) || defined(TR_HOST_ARM64))
TR_MethodMetaData *
TR::CompilationInfoPerThreadBase::installAotCachedMethod(
J9VMThread *vmThread,
Expand Down Expand Up @@ -6002,7 +6002,7 @@ TR::CompilationInfoPerThreadBase::installAotCachedMethod(
}
return metaData;
}
#endif // defined(J9VM_INTERP_AOT_RUNTIME_SUPPORT) && defined(J9VM_OPT_SHARED_CLASSES) && (defined(TR_HOST_X86) || defined(TR_HOST_POWER) || defined(TR_HOST_S390) || defined(TR_HOST_ARM))
#endif // defined(J9VM_INTERP_AOT_RUNTIME_SUPPORT) && defined(J9VM_OPT_SHARED_CLASSES) && (defined(TR_HOST_X86) || defined(TR_HOST_POWER) || defined(TR_HOST_S390) || defined(TR_HOST_ARM) || defined(TR_HOST_ARM64))

//--------------- queueAOTUpgrade ----------
// The entry currently being processed will be cloned with the clone being an upgrade
Expand Down

0 comments on commit 5b54880

Please sign in to comment.