0da1c5dcca
First commit of the 4.5 version (latest version available)
567 lines
25 KiB
HTML
567 lines
25 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<!--NewPage-->
|
|
<HTML>
|
|
<HEAD>
|
|
<!-- Generated by javadoc (build 1.6.0_33) on Tue Aug 20 12:20:44 EDT 2013 -->
|
|
<TITLE>
|
|
Instruction
|
|
</TITLE>
|
|
|
|
<META NAME="date" CONTENT="2013-08-20">
|
|
|
|
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
|
|
|
|
<SCRIPT type="text/javascript">
|
|
function windowTitle()
|
|
{
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="Instruction";
|
|
}
|
|
}
|
|
</SCRIPT>
|
|
<NOSCRIPT>
|
|
</NOSCRIPT>
|
|
|
|
</HEAD>
|
|
|
|
<BODY BGCOLOR="white" onload="windowTitle();">
|
|
<HR>
|
|
|
|
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<A NAME="navbar_top"><!-- --></A>
|
|
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
|
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
|
<TR>
|
|
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
|
<A NAME="navbar_top_firstrow"><!-- --></A>
|
|
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
|
<TR ALIGN="center" VALIGN="top">
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
|
</TR>
|
|
</TABLE>
|
|
</TD>
|
|
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
|
</EM>
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../mars/mips/instructions/ExtendedInstruction.html" title="class in mars.mips.instructions"><B>PREV CLASS</B></A>
|
|
<A HREF="../../../mars/mips/instructions/InstructionSet.html" title="class in mars.mips.instructions"><B>NEXT CLASS</B></A></FONT></TD>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../index.html?mars/mips/instructions/Instruction.html" target="_top"><B>FRAMES</B></A>
|
|
<A HREF="Instruction.html" target="_top"><B>NO FRAMES</B></A>
|
|
<SCRIPT type="text/javascript">
|
|
<!--
|
|
if(window==top) {
|
|
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
|
}
|
|
//-->
|
|
</SCRIPT>
|
|
<NOSCRIPT>
|
|
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
|
</NOSCRIPT>
|
|
|
|
|
|
</FONT></TD>
|
|
</TR>
|
|
<TR>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
|
</TR>
|
|
</TABLE>
|
|
<A NAME="skip-navbar_top"></A>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
|
|
<HR>
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<H2>
|
|
<FONT SIZE="-1">
|
|
mars.mips.instructions</FONT>
|
|
<BR>
|
|
Class Instruction</H2>
|
|
<PRE>
|
|
<A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
|
|
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>mars.mips.instructions.Instruction</B>
|
|
</PRE>
|
|
<DL>
|
|
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../mars/mips/instructions/BasicInstruction.html" title="class in mars.mips.instructions">BasicInstruction</A>, <A HREF="../../../mars/mips/instructions/ExtendedInstruction.html" title="class in mars.mips.instructions">ExtendedInstruction</A></DD>
|
|
</DL>
|
|
<HR>
|
|
<DL>
|
|
<DT><PRE>public abstract class <B>Instruction</B><DT>extends <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL>
|
|
</PRE>
|
|
|
|
<P>
|
|
Base class to represent member of MIPS instruction set.
|
|
<P>
|
|
|
|
<P>
|
|
<DL>
|
|
<DT><B>Author:</B></DT>
|
|
<DD>Pete Sanderson and Ken Vollmar</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<P>
|
|
<!-- =========== FIELD SUMMARY =========== -->
|
|
|
|
<A NAME="field_summary"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
|
<B>Field Summary</B></FONT></TH>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>protected <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../mars/mips/instructions/Instruction.html#description">description</A></B></CODE>
|
|
|
|
<BR>
|
|
Description of instruction for display to user</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>protected <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../mars/mips/instructions/Instruction.html#exampleFormat">exampleFormat</A></B></CODE>
|
|
|
|
<BR>
|
|
Example usage of this instruction.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../mars/mips/instructions/Instruction.html#INSTRUCTION_LENGTH">INSTRUCTION_LENGTH</A></B></CODE>
|
|
|
|
<BR>
|
|
Length in bytes of a machine instruction.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../mars/mips/instructions/Instruction.html#INSTRUCTION_LENGTH_BITS">INSTRUCTION_LENGTH_BITS</A></B></CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>protected <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../mars/mips/instructions/Instruction.html#mnemonic">mnemonic</A></B></CODE>
|
|
|
|
<BR>
|
|
The instruction name.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static char[]</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../mars/mips/instructions/Instruction.html#operandMask">operandMask</A></B></CODE>
|
|
|
|
<BR>
|
|
Characters used in instruction mask to indicate bit positions
|
|
for 'f'irst, 's'econd, and 't'hird operands.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>protected <A HREF="../../../mars/assembler/TokenList.html" title="class in mars.assembler">TokenList</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../mars/mips/instructions/Instruction.html#tokenList">tokenList</A></B></CODE>
|
|
|
|
<BR>
|
|
List of tokens generated by tokenizing example usage (see <tt>exampleFormat</tt>).</TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
|
|
<A NAME="constructor_summary"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
|
<B>Constructor Summary</B></FONT></TH>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE><B><A HREF="../../../mars/mips/instructions/Instruction.html#Instruction()">Instruction</A></B>()</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
|
|
<A NAME="method_summary"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
|
<B>Method Summary</B></FONT></TH>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>protected void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../mars/mips/instructions/Instruction.html#createExampleTokenList()">createExampleTokenList</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Used to build a token list from the example instruction
|
|
provided as constructor argument.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>protected <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../mars/mips/instructions/Instruction.html#extractOperator(java.lang.String)">extractOperator</A></B>(<A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> example)</CODE>
|
|
|
|
<BR>
|
|
Used by subclass constructors to extract operator mnemonic from the
|
|
instruction example.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../mars/mips/instructions/Instruction.html#getDescription()">getDescription</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Get string describing the instruction.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../mars/mips/instructions/Instruction.html#getExampleFormat()">getExampleFormat</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Get string descriptor of instruction's format.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../mars/mips/instructions/Instruction.html#getInstructionLength()">getInstructionLength</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Get length in bytes that this instruction requires in its binary form.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../mars/mips/instructions/Instruction.html#getName()">getName</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Get operation mnemonic</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../mars/assembler/TokenList.html" title="class in mars.assembler">TokenList</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../mars/mips/instructions/Instruction.html#getTokenList()">getTokenList</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Get TokenList corresponding to correct instruction syntax.</TD>
|
|
</TR>
|
|
</TABLE>
|
|
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
|
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<P>
|
|
|
|
<!-- ============ FIELD DETAIL =========== -->
|
|
|
|
<A NAME="field_detail"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
|
<B>Field Detail</B></FONT></TH>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<A NAME="INSTRUCTION_LENGTH"><!-- --></A><H3>
|
|
INSTRUCTION_LENGTH</H3>
|
|
<PRE>
|
|
public static final int <B>INSTRUCTION_LENGTH</B></PRE>
|
|
<DL>
|
|
<DD>Length in bytes of a machine instruction. MIPS is a RISC architecture
|
|
so all instructions are the same length. Currently set to 4.
|
|
<P>
|
|
<DL>
|
|
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#mars.mips.instructions.Instruction.INSTRUCTION_LENGTH">Constant Field Values</A></DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="INSTRUCTION_LENGTH_BITS"><!-- --></A><H3>
|
|
INSTRUCTION_LENGTH_BITS</H3>
|
|
<PRE>
|
|
public static final int <B>INSTRUCTION_LENGTH_BITS</B></PRE>
|
|
<DL>
|
|
<DL>
|
|
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#mars.mips.instructions.Instruction.INSTRUCTION_LENGTH_BITS">Constant Field Values</A></DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="operandMask"><!-- --></A><H3>
|
|
operandMask</H3>
|
|
<PRE>
|
|
public static char[] <B>operandMask</B></PRE>
|
|
<DL>
|
|
<DD>Characters used in instruction mask to indicate bit positions
|
|
for 'f'irst, 's'econd, and 't'hird operands.
|
|
<P>
|
|
<DL>
|
|
</DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="mnemonic"><!-- --></A><H3>
|
|
mnemonic</H3>
|
|
<PRE>
|
|
protected <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>mnemonic</B></PRE>
|
|
<DL>
|
|
<DD>The instruction name.
|
|
<P>
|
|
<DL>
|
|
</DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="exampleFormat"><!-- --></A><H3>
|
|
exampleFormat</H3>
|
|
<PRE>
|
|
protected <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>exampleFormat</B></PRE>
|
|
<DL>
|
|
<DD>Example usage of this instruction. Is provided as subclass constructor argument.
|
|
<P>
|
|
<DL>
|
|
</DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="description"><!-- --></A><H3>
|
|
description</H3>
|
|
<PRE>
|
|
protected <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>description</B></PRE>
|
|
<DL>
|
|
<DD>Description of instruction for display to user
|
|
<P>
|
|
<DL>
|
|
</DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="tokenList"><!-- --></A><H3>
|
|
tokenList</H3>
|
|
<PRE>
|
|
protected <A HREF="../../../mars/assembler/TokenList.html" title="class in mars.assembler">TokenList</A> <B>tokenList</B></PRE>
|
|
<DL>
|
|
<DD>List of tokens generated by tokenizing example usage (see <tt>exampleFormat</tt>).
|
|
<P>
|
|
<DL>
|
|
</DL>
|
|
</DL>
|
|
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
|
|
<A NAME="constructor_detail"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
|
<B>Constructor Detail</B></FONT></TH>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<A NAME="Instruction()"><!-- --></A><H3>
|
|
Instruction</H3>
|
|
<PRE>
|
|
public <B>Instruction</B>()</PRE>
|
|
<DL>
|
|
</DL>
|
|
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
|
|
<A NAME="method_detail"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
|
<B>Method Detail</B></FONT></TH>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<A NAME="getName()"><!-- --></A><H3>
|
|
getName</H3>
|
|
<PRE>
|
|
public <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getName</B>()</PRE>
|
|
<DL>
|
|
<DD>Get operation mnemonic
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>operation mnemonic (e.g. addi, sw)</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getExampleFormat()"><!-- --></A><H3>
|
|
getExampleFormat</H3>
|
|
<PRE>
|
|
public <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getExampleFormat</B>()</PRE>
|
|
<DL>
|
|
<DD>Get string descriptor of instruction's format. This is an example MIPS
|
|
assembler instruction usage which contains the operator and all operands.
|
|
Operands are separated by commas, an operand that begins with a '$'
|
|
represents a register, and an integer operand represents an immediate value
|
|
or address. Here are two examples: "nor $1,$2,$3" and "sw $1,100($2)"
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>String representing example instruction format.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getDescription()"><!-- --></A><H3>
|
|
getDescription</H3>
|
|
<PRE>
|
|
public <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getDescription</B>()</PRE>
|
|
<DL>
|
|
<DD>Get string describing the instruction. This is not used internally by
|
|
MARS, but is for display to the user.
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>String describing the instruction.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getTokenList()"><!-- --></A><H3>
|
|
getTokenList</H3>
|
|
<PRE>
|
|
public <A HREF="../../../mars/assembler/TokenList.html" title="class in mars.assembler">TokenList</A> <B>getTokenList</B>()</PRE>
|
|
<DL>
|
|
<DD>Get TokenList corresponding to correct instruction syntax.
|
|
For example, the instruction with format "sw $1,100($2)" yields token list
|
|
<operator><register_number><integer><left_paren><register_number><right_parent>
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>TokenList object representing correct instruction usage.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getInstructionLength()"><!-- --></A><H3>
|
|
getInstructionLength</H3>
|
|
<PRE>
|
|
public int <B>getInstructionLength</B>()</PRE>
|
|
<DL>
|
|
<DD>Get length in bytes that this instruction requires in its binary form.
|
|
Default is 4 (holds for all basic instructions), but can be overridden
|
|
in subclass.
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>int length in bytes of corresponding binary instruction(s).</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="extractOperator(java.lang.String)"><!-- --></A><H3>
|
|
extractOperator</H3>
|
|
<PRE>
|
|
protected <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>extractOperator</B>(<A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> example)</PRE>
|
|
<DL>
|
|
<DD>Used by subclass constructors to extract operator mnemonic from the
|
|
instruction example.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="createExampleTokenList()"><!-- --></A><H3>
|
|
createExampleTokenList</H3>
|
|
<PRE>
|
|
protected void <B>createExampleTokenList</B>()</PRE>
|
|
<DL>
|
|
<DD>Used to build a token list from the example instruction
|
|
provided as constructor argument. Parser uses this for syntax checking.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<HR>
|
|
|
|
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<A NAME="navbar_bottom"><!-- --></A>
|
|
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
|
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
|
<TR>
|
|
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
|
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
|
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
|
<TR ALIGN="center" VALIGN="top">
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
|
</TR>
|
|
</TABLE>
|
|
</TD>
|
|
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
|
</EM>
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../mars/mips/instructions/ExtendedInstruction.html" title="class in mars.mips.instructions"><B>PREV CLASS</B></A>
|
|
<A HREF="../../../mars/mips/instructions/InstructionSet.html" title="class in mars.mips.instructions"><B>NEXT CLASS</B></A></FONT></TD>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../index.html?mars/mips/instructions/Instruction.html" target="_top"><B>FRAMES</B></A>
|
|
<A HREF="Instruction.html" target="_top"><B>NO FRAMES</B></A>
|
|
<SCRIPT type="text/javascript">
|
|
<!--
|
|
if(window==top) {
|
|
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
|
}
|
|
//-->
|
|
</SCRIPT>
|
|
<NOSCRIPT>
|
|
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
|
</NOSCRIPT>
|
|
|
|
|
|
</FONT></TD>
|
|
</TR>
|
|
<TR>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
|
</TR>
|
|
</TABLE>
|
|
<A NAME="skip-navbar_bottom"></A>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
|
|
<HR>
|
|
|
|
</BODY>
|
|
</HTML>
|