public class OneOperandInstruction extends Instruction
| Modifier and Type | Field and Description |
|---|---|
Object |
operand
The instruction's operand.
|
opcode| Constructor and Description |
|---|
OneOperandInstruction(int opcode)
Construct a OneOperandInstruction whose operand is to be filled in later.
|
OneOperandInstruction(int opcode,
Object operand)
Construct a OneOperandInstruction.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
getOperand(int index)
Get one of the instruction's non-immediate operands.
|
int |
getOperandCount() |
Label |
getTarget()
Get the target of a branch instruction.
|
boolean |
hasOperands() |
void |
setTarget(Label target)
Set the target of a branch instruction.
|
String |
toString() |
decodeOp, decodeOpcodeName, getImmediate, getOpcode, isBranch, isExecutable, isImmediate, isReturn, isTargetableInstruction, isTransferOfControl, setImmediate, setOperands, setTempRegisters, unsupportedpublic Object operand
public OneOperandInstruction(int opcode,
Object operand)
opcode - - the instruction's opcode.operand - - the instruction's operand.public OneOperandInstruction(int opcode)
opcode - - the instruction's opcode. Must be one of the approved
opcodes.public String toString()
toString in class Instructionpublic int getOperandCount()
getOperandCount in class Instructionpublic boolean hasOperands()
hasOperands in class Instructionpublic Object getOperand(int index)
InstructiongetOperand in class Instructionindex - - the index of the desired operand.public Label getTarget()
getTarget in class Instructionpublic void setTarget(Label target)
setTarget in class Instructiontarget - - the AET Label this instruction targets.Copyright © 2016 The Apache Software Foundation. All rights reserved.