⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sparcinstruction.java

📁 用Java实现的编译器。把源代码编译成SPARC汇编程序
💻 JAVA
字号:
// $Id: SPARCInstruction.java,v 1.5 1999/11/04 16:53:41 deberg Exp $package java6035.tools.ASM;/** * SPARCInstruction represents a SPARC instruction. */public class SPARCInstruction extends ASMEntry{    protected int asmkind() { return SPARCINSTRUCTION; }    protected int opcode;    protected SPARCOperand dest;    protected SPARCOperand src1;    protected SPARCOperand src2;    protected String comment;    /**     * Constructs a SPARCInstruction object. Note, you should use instruction     * constructors in SPARCOpcode in most cases.     */    public SPARCInstruction	(int opcode, SPARCOperand src1, SPARCOperand src2, 	 SPARCOperand dest, String comment)    {		this.opcode = opcode;		this.dest = dest;		this.src1 = src1;		this.src2 = src2;        this.comment = comment;    }    public SPARCInstruction	(int opcode, SPARCOperand src1, SPARCOperand src2, SPARCOperand dest)    {        this(opcode, src1, src2, dest, null);    }    /**     * Returns the opcode of the instruction.     */    public int getOpcode()    {	return opcode;    }    /**     * Returns the destination operand.     */    public SPARCOperand getDest()    {	return dest;    }    /**     * Replaces the destination operand with a new one.     */    public void setDest(SPARCOperand dest)    {	this.dest = dest;    }    /**     * Returns the first src operand.     */    public SPARCOperand getSrc1()    {		return src1;    }    /**     * Replaces the first src operand with a new one.     */    public void setSrc1(SPARCOperand src)    {		this.src1 = src;    }    /**     * Returns the second src operand.     */    public SPARCOperand getSrc2()    {	return src2;    }    /**     * Replaces the second src operand with a new one.     */    public void setSrc2(SPARCOperand src)    {	this.src2 = src;    }    public String getComment()    {        return comment;    }    public void setComment(String comment)    {        this.comment = comment;    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -