Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

javaopc.cc

Go to the documentation of this file.
00001 /* 
00002  *      HT Editor
00003  *      javaopc.cc
00004  *
00005  *      Copyright (C) 1999-2002 Stefan Weyergraf (stefan@weyergraf.de)
00006  *
00007  *      This program is free software; you can redistribute it and/or modify
00008  *      it under the terms of the GNU General Public License version 2 as
00009  *      published by the Free Software Foundation.
00010  *
00011  *      This program is distributed in the hope that it will be useful,
00012  *      but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *      GNU General Public License for more details.
00015  *
00016  *      You should have received a copy of the GNU General Public License
00017  *      along with this program; if not, write to the Free Software
00018  *      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00019  */
00020 
00021 #include "javaopc.h"
00022 
00023 #include <stdio.h>
00024 
00025 #define B               JOPC_TYPE_BYTE | JOPC_SIZE_VAR
00026 #define S               JOPC_TYPE_SHORT | JOPC_SIZE_VAR
00027 #define Sw      JOPC_TYPE_SHORT | JOPC_SIZE_WIDE
00028 #define Cs      JOPC_TYPE_CONST | JOPC_SIZE_SMALL
00029 #define Cw      JOPC_TYPE_CONST | JOPC_SIZE_WIDE
00030 #define O       JOPC_TYPE_LOCAL | JOPC_SIZE_VAR
00031 #define Ls      JOPC_TYPE_LABEL | JOPC_SIZE_SMALL
00032 #define Lw      JOPC_TYPE_LABEL | JOPC_SIZE_WIDE
00033 
00034 javaopc_insn java_insns[256] = {
00035 // 0x0 - 0xf
00036 {"nop"},
00037 {"aconst_null"},
00038 {"iconst_m1"},
00039 {"iconst_0"},
00040 {"iconst_1"},
00041 {"iconst_2"},
00042 {"iconst_3"},
00043 {"iconst_4"},
00044 {"iconst_5"},
00045 {"lconst_0"},
00046 {"lconst_1"},
00047 {"fconst_0"},
00048 {"fconst_1"},
00049 {"fconst_2"},
00050 {"dconst_0"},
00051 {"dconst_1"},
00052 // 0x10-0x1f
00053 {"bipush", {B}},
00054 {"sipush", {S}},
00055 {"ldc", {Cs}},
00056 {"ldc_w", {Cw}},
00057 {"ldc2_w", {Cw}},
00058 {"iload", {O}},
00059 {"lload", {O}},
00060 {"fload", {O}},
00061 {"dload", {O}},
00062 {"aload", {O}},
00063 {"iload_0"},
00064 {"iload_1"},
00065 {"iload_2"},
00066 {"iload_3"},
00067 {"lload_0"},
00068 {"lload_1"},
00069 // 0x20-0x2f
00070 {"lload_2"},
00071 {"lload_3"},
00072 {"fload_0"},
00073 {"fload_1"},
00074 {"fload_2"},  
00075 {"fload_3"},
00076 {"dload_0"},
00077 {"dload_1"},
00078 {"dload_2"},
00079 {"dload_3"},
00080 {"aload_0"},
00081 {"aload_1"},
00082 {"aload_2"},
00083 {"aload_3"},
00084 {"iaload"},
00085 {"laload"},
00086 // 0x30-0x3f
00087 {"faload"},
00088 {"daload"},
00089 {"aaload"},
00090 {"baload"},
00091 {"caload"},
00092 {"saload"},
00093 {"istore", {O}},
00094 {"lstore", {O}},
00095 {"fstore", {O}},
00096 {"dstore", {O}},
00097 {"astore", {O}},
00098 {"istore_0"},
00099 {"istore_1"},
00100 {"istore_2"},
00101 {"istore_3"},
00102 {"lstore_0"},
00103 // 0x40-0x4f
00104 {"lstore_1"},
00105 {"lstore_2"},
00106 {"lstore_3"},
00107 {"fstore_0"},
00108 {"fstore_1"},
00109 {"fstore_2"},
00110 {"fstore_3"},
00111 {"dstore_0"},
00112 {"dstore_1"},
00113 {"dstore_2"},
00114 {"dstore_3"},
00115 {"astore_0"},
00116 {"astore_1"},
00117 {"astore_2"},
00118 {"astore_3"},
00119 {"iastore"},
00120 // 0x50-0x5f
00121 {"lastore"},
00122 {"fastore"},
00123 {"dastore"},
00124 {"aastore"},
00125 {"bastore"},
00126 {"castore"},
00127 {"sastore"},
00128 {"pop"},
00129 {"pop2"},
00130 {"dup"},
00131 {"dup_x1"},
00132 {"dup_x2"},
00133 {"dup2"},
00134 {"dup2_x1"},
00135 {"dup2_x2"},
00136 {"swap"},
00137 // 0x60-0x6f
00138 {"iadd"},
00139 {"ladd"},
00140 {"fadd"},
00141 {"dadd"},
00142 {"isub"},
00143 {"lsub"},
00144 {"fsub"},
00145 {"dsub"},
00146 {"imul"},
00147 {"lmul"},
00148 {"fmul"},
00149 {"dmul"},
00150 {"idiv"},
00151 {"ldiv"},
00152 {"fdiv"},
00153 {"ddiv"},
00154 // 0x70-0x7f
00155 {"irem"},
00156 {"lrem"},
00157 {"frem"},
00158 {"drem"},
00159 {"ineg"},
00160 {"lneg"},
00161 {"fneg"},
00162 {"dneg"},
00163 {"ishl"},
00164 {"lshl"},
00165 {"ishr"},
00166 {"lshr"},
00167 {"iushr"},
00168 {"lushr"},
00169 {"iand"},
00170 {"land"},
00171 // 0x80-0x8f
00172 {"ior"},
00173 {"lor"},
00174 {"ixor"},
00175 {"lxor"},
00176 {"iinc", {O, B}},
00177 {"i2l"},
00178 {"i2f"},
00179 {"i2d"},
00180 {"l2i"},
00181 {"l2f"},
00182 {"l2d"},
00183 {"f2i"},
00184 {"f2l"},
00185 {"f2d"},
00186 {"d2i"},
00187 {"d2l"},
00188 // 0x90-0x9f
00189 {"d2f"},
00190 {"i2b"},
00191 {"i2c"},
00192 {"i2s"},
00193 {"lcmp"},
00194 {"fcmpl"},
00195 {"fcmpg"},
00196 {"dcmpl"},
00197 {"dcmpg"},
00198 {"ifeq", {Ls}},
00199 {"ifne", {Ls}},
00200 {"iflt", {Ls}},
00201 {"ifge", {Ls}},
00202 {"ifgt", {Ls}},
00203 {"ifle", {Ls}},
00204 {"if_icmpeq", {Ls}},
00205 // 0xa0-0xaf
00206 {"if_icmpne", {Ls}},
00207 {"if_icmplt", {Ls}},
00208 {"if_icmpge", {Ls}},
00209 {"if_icmpgt", {Ls}},
00210 {"if_icmple", {Ls}},
00211 {"if_acmpeq", {Ls}},
00212 {"if_acmpne", {Ls}},
00213 {"goto", {Ls}},
00214 {"jsr", {Ls}},
00215 {"ret", {O}},
00216 {"tableswitch"},
00217 {"lookupswitch"},
00218 {"ireturn"},
00219 {"lreturn"},
00220 {"freturn"},
00221 {"dreturn"},
00222 // 0xb0-0xbf
00223 {"areturn"},
00224 {"return"},
00225 {"getstatic", {Cw}},
00226 {"putstatic", {Cw}},
00227 {"getfield", {Cw}},
00228 {"putfield", {Cw}},
00229 {"invokevirtual", {Cw}},
00230 {"invokespecial", {Cw}},
00231 {"invokestatic", {Cw}},
00232 {"invokeinterface", {Cw, S}},
00233 {"xxxunusedxxx"},
00234 {"new", {Cw}},
00235 {"newarray"},
00236 {"anewarray"},
00237 {"arraylength"},
00238 {"athrow"},
00239 // 0xc0-0xcf
00240 {"checkcast"},
00241 {"instanceof", {Cw}},
00242 {"monitorenter"},
00243 {"monitorexit"},
00244 {"wide"},
00245 {"multianewarray", {S}},    //?
00246 {"ifnull", {Ls}},
00247 {"ifnonnull", {Ls}},
00248 {"goto_w", {Lw}},
00249 {"jsr_w", {Lw}},
00250 {"breakpoint"},
00251 {"ldc_quick"},
00252 {"ldc_w_quick"},
00253 {"ldc2_w_quick"},
00254 {"getfield_quick"},
00255 {"putfield_quick"},
00256 // 0xd0-0xdf
00257 {"getfield2_quick"},
00258 {"putfield2_quick"},
00259 {"getstatic_quick"},
00260 {"putstatic_quick"},
00261 {"getstatic2_quick"},
00262 {"putstatic2_quick"},
00263 {"invokevirtual_quick"},
00264 {"invokenonvirtual_quick"},
00265 {"invokesuper_quick"},
00266 {"invokestatic_quick"},
00267 {"invokeinterface_quick"},
00268 {"invokevirtualobject_quick"},
00269 {NULL},
00270 {"new_quick"},
00271 {"anewarray_quick"},
00272 {"multianewarray_quick"},
00273 // 0xe0-0xef
00274 
00275 // e0-e3
00276 {"checkcast_quick"},
00277 {"instanceof_quick"},
00278 {"invokevirtual_quick_w"},
00279 {"getfield_quick_w"},
00280 // e4-e7
00281 {"putfield_quick_w"}, {NULL}, {NULL}, {NULL},
00282 // e8-eb
00283 {NULL}, {NULL}, {NULL}, {NULL},
00284 // ec-ef
00285 {NULL}, {NULL}, {NULL}, {NULL},
00286 
00287 // f0-f3
00288 {NULL}, {NULL}, {NULL}, {NULL},
00289 // f4-f7
00290 {NULL}, {NULL}, {NULL}, {NULL},
00291 // f8-fb
00292 {NULL}, {NULL}, {NULL}, {NULL},
00293 // fc-ff
00294 {NULL}, {NULL},
00295 {"impdep1"},
00296 {"impdep2"}
00297 };
00298 

Generated on Fri May 7 21:15:40 2004 by doxygen 1.3.5