edu.arizona.cs.mbel.instructions
Class BGT
java.lang.Object
edu.arizona.cs.mbel.instructions.Instruction
edu.arizona.cs.mbel.instructions.BranchInstruction
edu.arizona.cs.mbel.instructions.BGT
- All Implemented Interfaces:
- InstructionTargeter, ShortFormInstruction
- public class BGT
- extends BranchInstruction
Branch on greater than.
Stack transition:
..., value1, value2 --> ...
Constructor Summary |
BGT(boolean shortF,
boolean un,
InstructionHandle ih)
Makes a BGT object with the given target handle, possibly unsigned or in short form |
BGT(int opcode,
ClassParser parse)
|
Method Summary |
protected void |
emit(ByteBuffer buffer,
ClassEmitter emitter)
Writes the instruction to the given buffer in raw byte form |
boolean |
equals(java.lang.Object o)
|
int |
getLength()
Returns the length in bytes of this instruction, as would be found on disk.
|
java.lang.String |
getName()
Returns the string representation of this instruction (may vary instance-to-instance) |
boolean |
isShort()
|
boolean |
isUnsignedOrUnordered()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
BGT
public static final int BGT
- See Also:
- Constant Field Values
BGT_S
public static final int BGT_S
- See Also:
- Constant Field Values
BGT_UN
public static final int BGT_UN
- See Also:
- Constant Field Values
BGT_UN_S
public static final int BGT_UN_S
- See Also:
- Constant Field Values
OPCODE_LIST
protected static final int[] OPCODE_LIST
BGT
public BGT(boolean shortF,
boolean un,
InstructionHandle ih)
throws InstructionInitException
- Makes a BGT object with the given target handle, possibly unsigned or in short form
- Parameters:
shortF
- true iff this is a short form instructionun
- true iff this is an unsigned comparison
BGT
public BGT(int opcode,
ClassParser parse)
throws java.io.IOException,
InstructionInitException
isShort
public boolean isShort()
isUnsignedOrUnordered
public boolean isUnsignedOrUnordered()
getName
public java.lang.String getName()
- Description copied from class:
Instruction
- Returns the string representation of this instruction (may vary instance-to-instance)
- Specified by:
getName
in class Instruction
- Returns:
- a string representing this instruction (i.e. "cpblk")
getLength
public int getLength()
- Description copied from class:
Instruction
- Returns the length in bytes of this instruction, as would be found on disk.
This value includes any prefixes prepended to this instruction.
- Overrides:
getLength
in class Instruction
emit
protected void emit(ByteBuffer buffer,
ClassEmitter emitter)
- Description copied from class:
Instruction
- Writes the instruction to the given buffer in raw byte form
- Overrides:
emit
in class Instruction
- Parameters:
buffer
- the buffer to write toemitter
- a ClassEmitter for reconciling references to tokens
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class BranchInstruction