Skip to content

Commit

Permalink
Merge pull request #6640 from jamesgua/nonextended
Browse files Browse the repository at this point in the history
Remove duplicate and non-extended methods in Instruction
  • Loading branch information
knn-k authored Aug 9, 2022
2 parents 325d650 + 0590b8c commit 33b7bc8
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 25 deletions.
8 changes: 1 addition & 7 deletions compiler/aarch64/codegen/OMRInstruction.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018, 2021 IBM Corp. and others
* Copyright (c) 2018, 2022 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
Expand Down Expand Up @@ -113,12 +113,6 @@ class OMR_EXTENSIBLE Instruction : public OMR::Instruction
*/
virtual uint8_t *generateBinaryEncoding();

/**
* @brief Gets the opcode of the instruction
* @return opcode of the instruction
*/
TR::InstOpCode& getOpCode() {return _opcode;}

/**
* @brief Answers if this instruction is a label or not
* @return true if this instruction is a label, false otherwise
Expand Down
3 changes: 0 additions & 3 deletions compiler/arm/codegen/OMRInstruction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,7 @@ class OMR_EXTENSIBLE Instruction : public OMR::Instruction

virtual Kind getKind() { return IsNotExtended; }

TR::InstOpCode& getOpCode() {return _opcode;}
TR::InstOpCode::Mnemonic getOpCodeValue() {return _opcode.getOpCodeValue();}
TR::InstOpCode::Mnemonic getRecordFormOpCode() {return _opcode.getRecordFormOpCodeValue();}
TR::InstOpCode::Mnemonic setOpCodeValue(TR::InstOpCode::Mnemonic op) {return _opcode.setOpCodeValue(op);}

void ARMNeedsGCMap(uint32_t mask);

Expand Down
5 changes: 1 addition & 4 deletions compiler/p/codegen/OMRInstruction.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2021 IBM Corp. and others
* Copyright (c) 2000, 2022 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
Expand Down Expand Up @@ -71,10 +71,7 @@ class OMR_EXTENSIBLE Instruction : public OMR::Instruction
virtual int32_t estimateBinaryLength(int32_t currentEstimate);
virtual uint8_t *generateBinaryEncoding();

TR::InstOpCode& getOpCode() {return _opcode;}
TR::InstOpCode::Mnemonic getOpCodeValue() {return _opcode.getOpCodeValue();}
TR::InstOpCode::Mnemonic getRecordFormOpCode() {return _opcode.getRecordFormOpCodeValue();}
TR::InstOpCode::Mnemonic setOpCodeValue(TR::InstOpCode::Mnemonic op) {return _opcode.setOpCodeValue(op);}

virtual TR::Register *getTrg1Register() {return NULL;}

Expand Down
8 changes: 1 addition & 7 deletions compiler/riscv/codegen/OMRInstruction.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2019, 2021 IBM Corp. and others
* Copyright (c) 2019, 2022 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
Expand Down Expand Up @@ -115,12 +115,6 @@ class OMR_EXTENSIBLE Instruction : public OMR::Instruction
*/
virtual uint8_t *generateBinaryEncoding();

/**
* @brief Gets the opcode of the instruction
* @return opcode of the instruction
*/
TR::InstOpCode& getOpCode() {return _opcode;}

/**
* @brief Removes this instruction from instruction list
*/
Expand Down
4 changes: 0 additions & 4 deletions compiler/x/codegen/OMRInstruction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,6 @@ class OMR_EXTENSIBLE Instruction : public OMR::Instruction
virtual char *description() { return "X86"; }
virtual Kind getKind() { return IsNotExtended; }

TR::InstOpCode& getOpCode() { return _opcode; }
TR::InstOpCode::Mnemonic getOpCodeValue() { return _opcode.getOpCodeValue(); }
TR::InstOpCode::Mnemonic setOpCodeValue(TR::InstOpCode::Mnemonic op) { return _opcode.setOpCodeValue(op); }

OMR::X86::Encoding getEncodingMethod() { return _encodingMethod; }
void setEncodingMethod(OMR::X86::Encoding method) { _encodingMethod = method; }

Expand Down

0 comments on commit 33b7bc8

Please sign in to comment.