sparcloop.java
来自「用Java实现的编译器。把源代码编译成SPARC汇编程序」· Java 代码 · 共 60 行
JAVA
60 行
// $Id: SPARCImmed.java,v 1.5 2000/10/21 23:18:10 mdeeds Exp $package java6035.tools.ASM;/** * SPARCLoOp is a representation for the * %lo operator, which takes in a label as a parameter. * */public class SPARCLoOp extends SPARCImmed{ protected int sparc_op_kind() { return SPARCIMMED; } public String toString() { if (lab!=null) return new String("%lo("+ lab + ")"); else return new String("%lo("+ value + ")"); } /** the label */ private String lab=null; private long value; /** * Creates a %lo operator with label as the argument **/ public SPARCLoOp(ASMLabel label) { super(0); this.lab = label.toString(); } /** * Creates a %lo operator with label as the argument **/ public SPARCLoOp(long a) { super(0); this.lab = null; this.value = a; } public boolean equals(Object o) { if (o instanceof SPARCLoOp && (lab.toString()).equals(((SPARCHiOp)o).toString())) return true; return false; } public int hashCode() { return (int)(this.value); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?