Path: blob/master/runtime/compiler/aarch64/codegen/J9InstructionDelegate.hpp
6004 views
/*******************************************************************************1* Copyright (c) 2019, 2020 IBM Corp. and others2*3* This program and the accompanying materials are made available under4* the terms of the Eclipse Public License 2.0 which accompanies this5* distribution and is available at http://eclipse.org/legal/epl-2.06* or the Apache License, Version 2.0 which accompanies this distribution7* and is available at https://www.apache.org/licenses/LICENSE-2.0.8*9* This Source Code may also be made available under the following Secondary10* Licenses when the conditions for such availability set forth in the11* Eclipse Public License, v. 2.0 are satisfied: GNU General Public License,12* version 2 with the GNU Classpath Exception [1] and GNU General Public13* License, version 2 with the OpenJDK Assembly Exception [2].14*15* [1] https://www.gnu.org/software/classpath/license.html16* [2] http://openjdk.java.net/legal/assembly-exception.html17*18* 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-exception19*******************************************************************************/2021#ifndef J9_ARM64_INSTRUCTIONDELEGATE_INCL22#define J9_ARM64_INSTRUCTIONDELEGATE_INCL2324/*25* The following #define and typedef must appear before any #includes in this file26*/27#ifndef J9_INSTRUCTIONDELEGATE_CONNECTOR28#define J9_INSTRUCTIONDELEGATE_CONNECTOR29namespace J9 { namespace ARM64 { class InstructionDelegate; } }30namespace J9 { typedef J9::ARM64::InstructionDelegate InstructionDelegateConnector; }31#else32#error J9::ARM64::InstructionDelegate expected to be a primary connector, but a J9 connector is already defined33#endif3435#include "compiler/codegen/J9InstructionDelegate.hpp"36#include "infra/Annotations.hpp"3738namespace TR { class ARM64ImmSymInstruction; }39namespace TR { class ARM64Trg1MemInstruction; }40namespace TR { class ARM64MemInstruction; }4142namespace J943{4445namespace ARM6446{4748class OMR_EXTENSIBLE InstructionDelegate : public J9::InstructionDelegate49{50protected:5152InstructionDelegate() {}5354public:5556/**57* @brief Sets the return address to CallSnippet for Label target58* @param[in] cg : CodeGenerator59* @param[in] ins : instruction associated with CallSnippet60* @param[in] cursor : instruction cursor61*/62static void encodeBranchToLabel(TR::CodeGenerator *cg, TR::ARM64ImmSymInstruction *ins, uint8_t *cursor);6364/**65* @brief Determines if this instruction will throw an implicit null pointer exception and sets appropriate flags66* @param[in] cg : CodeGenerator67* @param[in] instr : instruction with memory reference68*/69static void setupImplicitNullPointerException(TR::CodeGenerator *cg, TR::ARM64Trg1MemInstruction *instr);7071/**72* @brief Determines if this instruction will throw an implicit null pointer exception and sets appropriate flags73* @param[in] cg : CodeGenerator74* @param[in] instr : instruction with memory reference75*/76static void setupImplicitNullPointerException(TR::CodeGenerator *cg, TR::ARM64MemInstruction *instr);7778};7980}8182}8384#endif858687