miSim

misim
Interface Aliases

All Known Implementing Classes:
PicAliases

public interface Aliases

The Aliases interface allows a processor type to specify a number of instructions that are aliases for the core processor instruction set


Method Summary
 int aliasCount()
          Return the number of aliases that we are defining
 java.lang.String getAlias(int index)
          Return a given alias instruction
 int getInstructionCount(int index)
           
 int getOpcode(int alias, int instruction)
          Return the opcode for an instruction generated by this alias
 int getParamIndex(int alias, int instruction, int index)
          Return the index in the instruction parameter list for the given alias parameter.
 int optionalParams(int index)
          Return the number of optional parameters for this alias
 int requiredParams(int index)
          Return the number of required parameters for this alias
 

Method Detail

aliasCount

public int aliasCount()
Return the number of aliases that we are defining
Returns:
The number of Alias instructions

getAlias

public java.lang.String getAlias(int index)
Return a given alias instruction
Parameters:
index - The index of the alias
Returns:
String The alias instruction

requiredParams

public int requiredParams(int index)
Return the number of required parameters for this alias

optionalParams

public int optionalParams(int index)
Return the number of optional parameters for this alias

getInstructionCount

public int getInstructionCount(int index)
Returns:
number of opcodes this alias instruction codes to

getOpcode

public int getOpcode(int alias,
                     int instruction)
Return the opcode for an instruction generated by this alias
Parameters:
alias - The alias being processed
instruction - Which instruction we require an opcode for
Returns:
The opcode for the instruction

getParamIndex

public int getParamIndex(int alias,
                         int instruction,
                         int index)
Return the index in the instruction parameter list for the given alias parameter. If the given alias parameter is not used for this instruction, return -1
Parameters:
alias - The alias being processed
instruction - Which instruction within this alias
index - The index of the alias parameter
Returns:
The index for the instruction parameter, or -1

miSim