Path: blob/master/runtime/compiler/arm/codegen/ARMAOTRelocation.hpp
6004 views
/*******************************************************************************1* Copyright (c) 2000, 2016 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 https://www.eclipse.org/legal/epl-2.0/6* or the Apache License, Version 2.0 which accompanies this distribution and7* is available at https://www.apache.org/licenses/LICENSE-2.0.8*9* This Source Code may also be made available under the following10* Secondary Licenses when the conditions for such availability set11* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU12* General Public License, version 2 with the GNU Classpath13* Exception [1] and GNU General Public License, version 2 with the14* OpenJDK Assembly Exception [2].15*16* [1] https://www.gnu.org/software/classpath/license.html17* [2] http://openjdk.java.net/legal/assembly-exception.html18*19* 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-exception20*******************************************************************************/2122#ifndef ARMAOTRELOCATION_INCL23#define ARMAOTRELOCATION_INCL2425#include "codegen/Relocation.hpp"2627//class TR::Instruction;2829namespace TR {3031class ARMRelocation32{33public:34TR_ALLOC(TR_Memory::ARMRelocation)3536ARMRelocation(TR::Instruction *src,37uint8_t *trg,38TR_ExternalRelocationTargetKind k):39_srcInstruction(src), _relTarget(trg), _kind(k)40{}4142TR::Instruction *getSourceInstruction() {return _srcInstruction;}43void setSourceInstruction(TR::Instruction *i) {_srcInstruction = i;}4445uint8_t *getRelocationTarget() {return _relTarget;}46void setRelocationTarget(uint8_t *t) {_relTarget = t;}4748TR_ExternalRelocationTargetKind getKind() {return _kind;}49void setKind(TR_ExternalRelocationTargetKind k) {_kind = k;}5051virtual void mapRelocation(TR::CodeGenerator *codeGen) = 0;5253private:54TR::Instruction *_srcInstruction;55uint8_t *_relTarget;56TR_ExternalRelocationTargetKind _kind;57};5859class ARMPairedRelocation: public TR::ARMRelocation60{61public:62ARMPairedRelocation(TR::Instruction *src1,63TR::Instruction *src2,64uint8_t *trg,65TR_ExternalRelocationTargetKind k,66TR::Node *node) :67TR::ARMRelocation(src1, trg, k), _src2Instruction(src2), _node(node)68{}6970TR::Instruction *getSource2Instruction() {return _src2Instruction;}71void setSource2Instruction(TR::Instruction *src) {_src2Instruction = src;}72TR::Node* getNode(){return _node;}73virtual void mapRelocation(TR::CodeGenerator *codeGen);7475private:76TR::Instruction *_src2Instruction;77TR::Node *_node;78};7980}8182#endif83848586