Path: blob/master/runtime/compiler/x/codegen/Instruction.hpp
6004 views
/*******************************************************************************1* Copyright (c) 2000, 2021 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 TRJ9_X86_INSTRUCTION_INCL23#define TRJ9_X86_INSTRUCTION_INCL2425#include "codegen/J9Instruction.hpp"2627namespace TR28{29class Instruction;3031class OMR_EXTENSIBLE Instruction : public J9::InstructionConnector32{33public:3435// TODO: need to fix the TR::InstOpCode initialization once TR::InstOpCode class is done3637/*38* Generic constructors39*/40inline Instruction(TR::Node *node, TR::InstOpCode::Mnemonic op, TR::CodeGenerator *cg);4142inline Instruction(TR::InstOpCode::Mnemonic op, TR::Instruction *precedingInstruction, TR::CodeGenerator *cg);434445/*46* X86 specific constructors, need to call initializer to perform proper construction47*/48inline Instruction(TR::RegisterDependencyConditions *cond, TR::Node *node, TR::InstOpCode::Mnemonic op, TR::CodeGenerator *cg);4950inline Instruction(TR::RegisterDependencyConditions *cond, TR::InstOpCode::Mnemonic op, TR::Instruction *precedingInstruction, TR::CodeGenerator *cg);5152};5354}5556#include "codegen/J9Instruction_inlines.hpp"5758TR::Instruction::Instruction(TR::Node *node, TR::InstOpCode::Mnemonic op, TR::CodeGenerator *cg) :59J9::InstructionConnector(cg, TR::InstOpCode::bad, node)60{61self()->setOpCodeValue(op);62self()->initialize();63}6465TR::Instruction::Instruction(TR::InstOpCode::Mnemonic op, TR::Instruction *precedingInstruction, TR::CodeGenerator *cg) :66J9::InstructionConnector(cg, precedingInstruction, TR::InstOpCode::bad)67{68self()->setOpCodeValue(op);69self()->initialize();70}7172TR::Instruction::Instruction(TR::RegisterDependencyConditions *cond, TR::Node *node, TR::InstOpCode::Mnemonic op, TR::CodeGenerator *cg) :73J9::InstructionConnector(cg, TR::InstOpCode::bad, node)74{75self()->setOpCodeValue(op);76self()->setDependencyConditions(cond);77self()->initialize(cg, cond, op, true);78}7980TR::Instruction::Instruction(TR::RegisterDependencyConditions *cond, TR::InstOpCode::Mnemonic op, TR::Instruction *precedingInstruction, TR::CodeGenerator *cg) :81J9::InstructionConnector(cg, precedingInstruction, TR::InstOpCode::bad)82{83self()->setOpCodeValue(op);84self()->setDependencyConditions(cond);85self()->initialize(cg, cond, op);86}878889#endif909192