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, unsupported
public 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 Instruction
public int getOperandCount()
getOperandCount
in class Instruction
public boolean hasOperands()
hasOperands
in class Instruction
public Object getOperand(int index)
Instruction
getOperand
in class Instruction
index
- - the index of the desired operand.public Label getTarget()
getTarget
in class Instruction
public void setTarget(Label target)
setTarget
in class Instruction
target
- - the AET Label this instruction targets.Copyright © 2016 The Apache Software Foundation. All rights reserved.