📄 jopinstr.java
字号:
/*** Definition of JVM instructions for JopSim, Jopa,...** 2005-05-27 added Native to jopsys_* mapping for Flavius JOPizer*/package com.jopdesign.tools;import java.util.*;public class JopInstr{ public final static int IMP_ASM = 0; public final static int IMP_JAVA = 1; public final static int IMP_NO = 2; private String name; private int len; // in byte codes (0 means variabe len!) private int imp; // is implemented in JOP private int cnt; private static Map map = new HashMap(); // mapping of native methods private static Map natMap = new HashMap(); public static int get(String s) { Integer i = (Integer) map.get(s); if (i==null) { return -1; } else { return i.intValue(); } } public static int getNative(String s) { s = (String) natMap.get(s); if (s==null) { return -1; } else { return get(s); } } private JopInstr(String s, int i, int j, int k) { name = s; len = i; imp = j; cnt = k; } public static String name(int i) { return ia[i].name; } public static int cnt(int i) { return ia[i].cnt; } public static int len(int i) { return ia[i].len; } public static int imp(int i) { return ia[i].imp; } private static JopInstr[] ia = new JopInstr[] { new JopInstr("nop", 1, IMP_ASM, 1), // 0x00 new JopInstr("aconst_null", 1, IMP_ASM, 1), // 0x01 new JopInstr("iconst_m1", 1, IMP_ASM, 1), // 0x02 new JopInstr("iconst_0", 1, IMP_ASM, 1), // 0x03 new JopInstr("iconst_1", 1, IMP_ASM, 1), // 0x04 new JopInstr("iconst_2", 1, IMP_ASM, 1), // 0x05 new JopInstr("iconst_3", 1, IMP_ASM, 1), // 0x06 new JopInstr("iconst_4", 1, IMP_ASM, 1), // 0x07 new JopInstr("iconst_5", 1, IMP_ASM, 1), // 0x08 new JopInstr("lconst_0", 1, IMP_ASM, 2), // 0x09 new JopInstr("lconst_1", 1, IMP_ASM, 2), // 0x0A new JopInstr("fconst_0", 1, IMP_NO, 1), // 0x0B new JopInstr("fconst_1", 1, IMP_NO, 1), // 0x0C new JopInstr("fconst_2", 1, IMP_NO, 1), // 0x0D new JopInstr("dconst_0", 1, IMP_NO, 1), // 0x0E new JopInstr("dconst_1", 1, IMP_NO, 1), // 0x0F new JopInstr("bipush", 2, IMP_ASM, 2), // 0x10 new JopInstr("sipush", 3, IMP_ASM, 3), // 0x11 new JopInstr("ldc", 2, IMP_ASM, 2), // 0x12 new JopInstr("ldc_w", 3, IMP_NO, 1), // 0x13 new JopInstr("ldc2_w", 3, IMP_ASM, 17), // 0x14 new JopInstr("iload", 2, IMP_ASM, 2), // 0x15 new JopInstr("lload", 2, IMP_NO, 1), // 0x16 new JopInstr("fload", 2, IMP_NO, 1), // 0x17 new JopInstr("dload", 2, IMP_NO, 1), // 0x18 new JopInstr("aload", 2, IMP_ASM, 2), // 0x19 new JopInstr("iload_0", 1, IMP_ASM, 1), // 0x1A new JopInstr("iload_1", 1, IMP_ASM, 1), // 0x1B new JopInstr("iload_2", 1, IMP_ASM, 1), // 0x1C new JopInstr("iload_3", 1, IMP_ASM, 1), // 0x1D new JopInstr("lload_0", 1, IMP_ASM, 2), // 0x1E new JopInstr("lload_1", 1, IMP_ASM, 2), // 0x1F new JopInstr("lload_2", 1, IMP_ASM, 2), // 0x20 new JopInstr("lload_3", 1, IMP_ASM, 12), // 0x21 new JopInstr("fload_0", 1, IMP_NO, 1), // 0x22 new JopInstr("fload_1", 1, IMP_NO, 1), // 0x23 new JopInstr("fload_2", 1, IMP_NO, 1), // 0x24 new JopInstr("fload_3", 1, IMP_NO, 1), // 0x25 new JopInstr("dload_0", 1, IMP_NO, 1), // 0x26 new JopInstr("dload_1", 1, IMP_NO, 1), // 0x27 new JopInstr("dload_2", 1, IMP_NO, 1), // 0x28 new JopInstr("dload_3", 1, IMP_NO, 1), // 0x29 new JopInstr("aload_0", 1, IMP_ASM, 1), // 0x2A new JopInstr("aload_1", 1, IMP_ASM, 1), // 0x2B new JopInstr("aload_2", 1, IMP_ASM, 1), // 0x2C new JopInstr("aload_3", 1, IMP_ASM, 1), // 0x2D new JopInstr("iaload", 1, IMP_ASM, 17), // 0x2E new JopInstr("laload", 1, IMP_NO, 1), // 0x2F new JopInstr("faload", 1, IMP_ASM, 17), // 0x30 new JopInstr("daload", 1, IMP_NO, 1), // 0x31 new JopInstr("aaload", 1, IMP_ASM, 17), // 0x32 new JopInstr("baload", 1, IMP_ASM, 17), // 0x33 new JopInstr("caload", 1, IMP_ASM, 17), // 0x34 new JopInstr("saload", 1, IMP_ASM, 17), // 0x35 new JopInstr("istore", 2, IMP_ASM, 2), // 0x36 new JopInstr("lstore", 2, IMP_NO, 1), // 0x37 new JopInstr("fstore", 2, IMP_NO, 1), // 0x38 new JopInstr("dstore", 2, IMP_NO, 1), // 0x39 new JopInstr("astore", 2, IMP_ASM, 2), // 0x3A new JopInstr("istore_0", 1, IMP_ASM, 1), // 0x3B new JopInstr("istore_1", 1, IMP_ASM, 1), // 0x3C new JopInstr("istore_2", 1, IMP_ASM, 1), // 0x3D new JopInstr("istore_3", 1, IMP_ASM, 1), // 0x3E new JopInstr("lstore_0", 1, IMP_ASM, 2), // 0x3F new JopInstr("lstore_1", 1, IMP_ASM, 2), // 0x40 new JopInstr("lstore_2", 1, IMP_ASM, 2), // 0x41 new JopInstr("lstore_3", 1, IMP_ASM, 12), // 0x42 new JopInstr("fstore_0", 1, IMP_NO, 1), // 0x43 new JopInstr("fstore_1", 1, IMP_NO, 1), // 0x44 new JopInstr("fstore_2", 1, IMP_NO, 1), // 0x45 new JopInstr("fstore_3", 1, IMP_NO, 1), // 0x46 new JopInstr("dstore_0", 1, IMP_NO, 1), // 0x47 new JopInstr("dstore_1", 1, IMP_NO, 1), // 0x48 new JopInstr("dstore_2", 1, IMP_NO, 1), // 0x49 new JopInstr("dstore_3", 1, IMP_NO, 1), // 0x4A new JopInstr("astore_0", 1, IMP_ASM, 1), // 0x4B new JopInstr("astore_1", 1, IMP_ASM, 1), // 0x4C new JopInstr("astore_2", 1, IMP_ASM, 1), // 0x4D new JopInstr("astore_3", 1, IMP_ASM, 1), // 0x4E new JopInstr("iastore", 1, IMP_ASM, 18), // 0x4F new JopInstr("lastore", 1, IMP_NO, 1), // 0x50 new JopInstr("fastore", 1, IMP_ASM, 18), // 0x51 new JopInstr("dastore", 1, IMP_NO, 1), // 0x52 new JopInstr("aastore", 1, IMP_ASM, 18), // 0x53 new JopInstr("bastore", 1, IMP_ASM, 18), // 0x54 new JopInstr("castore", 1, IMP_ASM, 18), // 0x55 new JopInstr("sastore", 1, IMP_ASM, 18), // 0x56 new JopInstr("pop", 1, IMP_ASM, 1), // 0x57 new JopInstr("pop2", 1, IMP_NO, 1), // 0x58 new JopInstr("dup", 1, IMP_ASM, 1), // 0x59 new JopInstr("dup_x1", 1, IMP_ASM, 5), // 0x5A new JopInstr("dup_x2", 1, IMP_NO, 1), // 0x5B new JopInstr("dup2", 1, IMP_ASM, 6), // 0x5C new JopInstr("dup2_x1", 1, IMP_NO, 1), // 0x5D new JopInstr("dup2_x2", 1, IMP_NO, 1), // 0x5E new JopInstr("swap", 1, IMP_NO, 1), // 0x5F new JopInstr("iadd", 1, IMP_ASM, 1), // 0x60 new JopInstr("ladd", 1, IMP_NO, 1), // 0x61 new JopInstr("fadd", 1, IMP_NO, 1), // 0x62 new JopInstr("dadd", 1, IMP_NO, 1), // 0x63 new JopInstr("isub", 1, IMP_ASM, 1), // 0x64 new JopInstr("lsub", 1, IMP_NO, 1), // 0x65 new JopInstr("fsub", 1, IMP_NO, 1), // 0x66 new JopInstr("dsub", 1, IMP_NO, 1), // 0x67 new JopInstr("imul", 1, IMP_ASM, 37), // 0x68 new JopInstr("lmul", 1, IMP_NO, 1), // 0x69 new JopInstr("fmul", 1, IMP_NO, 1), // 0x6A new JopInstr("dmul", 1, IMP_NO, 1), // 0x6B new JopInstr("idiv", 1, IMP_ASM, 1300), // 0x6C new JopInstr("ldiv", 1, IMP_NO, 1), // 0x6D new JopInstr("fdiv", 1, IMP_NO, 1), // 0x6E new JopInstr("ddiv", 1, IMP_NO, 1), // 0x6F new JopInstr("irem", 1, IMP_ASM, 1300), // 0x70 new JopInstr("lrem", 1, IMP_NO, 1), // 0x71 new JopInstr("frem", 1, IMP_NO, 1), // 0x72 new JopInstr("drem", 1, IMP_NO, 1), // 0x73 new JopInstr("ineg", 1, IMP_ASM, 4), // 0x74 new JopInstr("lneg", 1, IMP_NO, 1), // 0x75 new JopInstr("fneg", 1, IMP_NO, 1), // 0x76 new JopInstr("dneg", 1, IMP_NO, 1), // 0x77 new JopInstr("ishl", 1, IMP_ASM, 1), // 0x78 new JopInstr("lshl", 1, IMP_NO, 1), // 0x79 new JopInstr("ishr", 1, IMP_ASM, 1), // 0x7A
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -