|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
The InstrPrototype interface represents an object that is capable of building
Instr instances given an array of Operand instances. It also contains methods
that describe the instructions such as their name, their variant name, and their size in bytes.
| Method Summary | |
Instr |
build(int pc,
Operand[] ops)
The build() method constructs a new Instr instance with the given operands,
checking the operands against the constraints that are specific to each instruction. |
java.lang.String |
getName()
The getName() method returns the name of the instruction as a string. |
int |
getSize()
The getSize() method returns the size of the instruction in bytes. |
java.lang.String |
getVariant()
The getVariant() method returns the variant name of the instruction as a string. |
| Method Detail |
public Instr build(int pc,
Operand[] ops)
build() method constructs a new Instr instance with the given operands,
checking the operands against the constraints that are specific to each instruction.
pc - the address at which the instruction will be locatedops - the operands to the instruction
Instr instance representing the instruction with the given operandspublic int getSize()
getSize() method returns the size of the instruction in bytes. Since each prototype
corresponds to exactly one instruction variant, all instructions built by this prototype will have the
same size.
public java.lang.String getVariant()
getVariant() method returns the variant name of the instruction as a string. Since
instructions like load and store have multiple variants, they each have specific variant names to
distinguish them internally in the core of Avrora. For example, for "ld x+, (addr)", the variant is
"ldpi" (load with post increment), but the actual instruction is "ld", so this method will return
"ldpi".
public java.lang.String getName()
getName() method returns the name of the instruction as a string. For instructions
that are variants of instructions, this method returns the actual name of the instruction. For example,
for "ld x+, (addr)", the variant is "ldpi" (load with post increment), but the actual instruction is
"ld", so this method will return "ld".
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||