Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/javavm/export/classfile_constants.h
38813 views
/*1* Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425#ifndef CLASSFILE_CONSTANTS_H26#define CLASSFILE_CONSTANTS_H2728#ifdef __cplusplus29extern "C" {30#endif3132/* Classfile version number for this information */33#define JVM_CLASSFILE_MAJOR_VERSION 5234#define JVM_CLASSFILE_MINOR_VERSION 03536/* Flags */3738enum {39JVM_ACC_PUBLIC = 0x0001,40JVM_ACC_PRIVATE = 0x0002,41JVM_ACC_PROTECTED = 0x0004,42JVM_ACC_STATIC = 0x0008,43JVM_ACC_FINAL = 0x0010,44JVM_ACC_SYNCHRONIZED = 0x0020,45JVM_ACC_SUPER = 0x0020,46JVM_ACC_VOLATILE = 0x0040,47JVM_ACC_BRIDGE = 0x0040,48JVM_ACC_TRANSIENT = 0x0080,49JVM_ACC_VARARGS = 0x0080,50JVM_ACC_NATIVE = 0x0100,51JVM_ACC_INTERFACE = 0x0200,52JVM_ACC_ABSTRACT = 0x0400,53JVM_ACC_STRICT = 0x0800,54JVM_ACC_SYNTHETIC = 0x1000,55JVM_ACC_ANNOTATION = 0x2000,56JVM_ACC_ENUM = 0x400057};5859/* Used in newarray instruction. */6061enum {62JVM_T_BOOLEAN = 4,63JVM_T_CHAR = 5,64JVM_T_FLOAT = 6,65JVM_T_DOUBLE = 7,66JVM_T_BYTE = 8,67JVM_T_SHORT = 9,68JVM_T_INT = 10,69JVM_T_LONG = 1170};7172/* Constant Pool Entries */7374enum {75JVM_CONSTANT_Utf8 = 1,76JVM_CONSTANT_Unicode = 2, /* unused */77JVM_CONSTANT_Integer = 3,78JVM_CONSTANT_Float = 4,79JVM_CONSTANT_Long = 5,80JVM_CONSTANT_Double = 6,81JVM_CONSTANT_Class = 7,82JVM_CONSTANT_String = 8,83JVM_CONSTANT_Fieldref = 9,84JVM_CONSTANT_Methodref = 10,85JVM_CONSTANT_InterfaceMethodref = 11,86JVM_CONSTANT_NameAndType = 12,87JVM_CONSTANT_MethodHandle = 15, // JSR 29288JVM_CONSTANT_MethodType = 16, // JSR 29289JVM_CONSTANT_InvokeDynamic = 1890};9192/* JVM_CONSTANT_MethodHandle subtypes */93enum {94JVM_REF_getField = 1,95JVM_REF_getStatic = 2,96JVM_REF_putField = 3,97JVM_REF_putStatic = 4,98JVM_REF_invokeVirtual = 5,99JVM_REF_invokeStatic = 6,100JVM_REF_invokeSpecial = 7,101JVM_REF_newInvokeSpecial = 8,102JVM_REF_invokeInterface = 9103};104105/* StackMapTable type item numbers */106107enum {108JVM_ITEM_Top = 0,109JVM_ITEM_Integer = 1,110JVM_ITEM_Float = 2,111JVM_ITEM_Double = 3,112JVM_ITEM_Long = 4,113JVM_ITEM_Null = 5,114JVM_ITEM_UninitializedThis = 6,115JVM_ITEM_Object = 7,116JVM_ITEM_Uninitialized = 8117};118119/* Type signatures */120121enum {122JVM_SIGNATURE_ARRAY = '[',123JVM_SIGNATURE_BYTE = 'B',124JVM_SIGNATURE_CHAR = 'C',125JVM_SIGNATURE_CLASS = 'L',126JVM_SIGNATURE_ENDCLASS = ';',127JVM_SIGNATURE_ENUM = 'E',128JVM_SIGNATURE_FLOAT = 'F',129JVM_SIGNATURE_DOUBLE = 'D',130JVM_SIGNATURE_FUNC = '(',131JVM_SIGNATURE_ENDFUNC = ')',132JVM_SIGNATURE_INT = 'I',133JVM_SIGNATURE_LONG = 'J',134JVM_SIGNATURE_SHORT = 'S',135JVM_SIGNATURE_VOID = 'V',136JVM_SIGNATURE_BOOLEAN = 'Z'137};138139/* Opcodes */140141enum {142JVM_OPC_nop = 0,143JVM_OPC_aconst_null = 1,144JVM_OPC_iconst_m1 = 2,145JVM_OPC_iconst_0 = 3,146JVM_OPC_iconst_1 = 4,147JVM_OPC_iconst_2 = 5,148JVM_OPC_iconst_3 = 6,149JVM_OPC_iconst_4 = 7,150JVM_OPC_iconst_5 = 8,151JVM_OPC_lconst_0 = 9,152JVM_OPC_lconst_1 = 10,153JVM_OPC_fconst_0 = 11,154JVM_OPC_fconst_1 = 12,155JVM_OPC_fconst_2 = 13,156JVM_OPC_dconst_0 = 14,157JVM_OPC_dconst_1 = 15,158JVM_OPC_bipush = 16,159JVM_OPC_sipush = 17,160JVM_OPC_ldc = 18,161JVM_OPC_ldc_w = 19,162JVM_OPC_ldc2_w = 20,163JVM_OPC_iload = 21,164JVM_OPC_lload = 22,165JVM_OPC_fload = 23,166JVM_OPC_dload = 24,167JVM_OPC_aload = 25,168JVM_OPC_iload_0 = 26,169JVM_OPC_iload_1 = 27,170JVM_OPC_iload_2 = 28,171JVM_OPC_iload_3 = 29,172JVM_OPC_lload_0 = 30,173JVM_OPC_lload_1 = 31,174JVM_OPC_lload_2 = 32,175JVM_OPC_lload_3 = 33,176JVM_OPC_fload_0 = 34,177JVM_OPC_fload_1 = 35,178JVM_OPC_fload_2 = 36,179JVM_OPC_fload_3 = 37,180JVM_OPC_dload_0 = 38,181JVM_OPC_dload_1 = 39,182JVM_OPC_dload_2 = 40,183JVM_OPC_dload_3 = 41,184JVM_OPC_aload_0 = 42,185JVM_OPC_aload_1 = 43,186JVM_OPC_aload_2 = 44,187JVM_OPC_aload_3 = 45,188JVM_OPC_iaload = 46,189JVM_OPC_laload = 47,190JVM_OPC_faload = 48,191JVM_OPC_daload = 49,192JVM_OPC_aaload = 50,193JVM_OPC_baload = 51,194JVM_OPC_caload = 52,195JVM_OPC_saload = 53,196JVM_OPC_istore = 54,197JVM_OPC_lstore = 55,198JVM_OPC_fstore = 56,199JVM_OPC_dstore = 57,200JVM_OPC_astore = 58,201JVM_OPC_istore_0 = 59,202JVM_OPC_istore_1 = 60,203JVM_OPC_istore_2 = 61,204JVM_OPC_istore_3 = 62,205JVM_OPC_lstore_0 = 63,206JVM_OPC_lstore_1 = 64,207JVM_OPC_lstore_2 = 65,208JVM_OPC_lstore_3 = 66,209JVM_OPC_fstore_0 = 67,210JVM_OPC_fstore_1 = 68,211JVM_OPC_fstore_2 = 69,212JVM_OPC_fstore_3 = 70,213JVM_OPC_dstore_0 = 71,214JVM_OPC_dstore_1 = 72,215JVM_OPC_dstore_2 = 73,216JVM_OPC_dstore_3 = 74,217JVM_OPC_astore_0 = 75,218JVM_OPC_astore_1 = 76,219JVM_OPC_astore_2 = 77,220JVM_OPC_astore_3 = 78,221JVM_OPC_iastore = 79,222JVM_OPC_lastore = 80,223JVM_OPC_fastore = 81,224JVM_OPC_dastore = 82,225JVM_OPC_aastore = 83,226JVM_OPC_bastore = 84,227JVM_OPC_castore = 85,228JVM_OPC_sastore = 86,229JVM_OPC_pop = 87,230JVM_OPC_pop2 = 88,231JVM_OPC_dup = 89,232JVM_OPC_dup_x1 = 90,233JVM_OPC_dup_x2 = 91,234JVM_OPC_dup2 = 92,235JVM_OPC_dup2_x1 = 93,236JVM_OPC_dup2_x2 = 94,237JVM_OPC_swap = 95,238JVM_OPC_iadd = 96,239JVM_OPC_ladd = 97,240JVM_OPC_fadd = 98,241JVM_OPC_dadd = 99,242JVM_OPC_isub = 100,243JVM_OPC_lsub = 101,244JVM_OPC_fsub = 102,245JVM_OPC_dsub = 103,246JVM_OPC_imul = 104,247JVM_OPC_lmul = 105,248JVM_OPC_fmul = 106,249JVM_OPC_dmul = 107,250JVM_OPC_idiv = 108,251JVM_OPC_ldiv = 109,252JVM_OPC_fdiv = 110,253JVM_OPC_ddiv = 111,254JVM_OPC_irem = 112,255JVM_OPC_lrem = 113,256JVM_OPC_frem = 114,257JVM_OPC_drem = 115,258JVM_OPC_ineg = 116,259JVM_OPC_lneg = 117,260JVM_OPC_fneg = 118,261JVM_OPC_dneg = 119,262JVM_OPC_ishl = 120,263JVM_OPC_lshl = 121,264JVM_OPC_ishr = 122,265JVM_OPC_lshr = 123,266JVM_OPC_iushr = 124,267JVM_OPC_lushr = 125,268JVM_OPC_iand = 126,269JVM_OPC_land = 127,270JVM_OPC_ior = 128,271JVM_OPC_lor = 129,272JVM_OPC_ixor = 130,273JVM_OPC_lxor = 131,274JVM_OPC_iinc = 132,275JVM_OPC_i2l = 133,276JVM_OPC_i2f = 134,277JVM_OPC_i2d = 135,278JVM_OPC_l2i = 136,279JVM_OPC_l2f = 137,280JVM_OPC_l2d = 138,281JVM_OPC_f2i = 139,282JVM_OPC_f2l = 140,283JVM_OPC_f2d = 141,284JVM_OPC_d2i = 142,285JVM_OPC_d2l = 143,286JVM_OPC_d2f = 144,287JVM_OPC_i2b = 145,288JVM_OPC_i2c = 146,289JVM_OPC_i2s = 147,290JVM_OPC_lcmp = 148,291JVM_OPC_fcmpl = 149,292JVM_OPC_fcmpg = 150,293JVM_OPC_dcmpl = 151,294JVM_OPC_dcmpg = 152,295JVM_OPC_ifeq = 153,296JVM_OPC_ifne = 154,297JVM_OPC_iflt = 155,298JVM_OPC_ifge = 156,299JVM_OPC_ifgt = 157,300JVM_OPC_ifle = 158,301JVM_OPC_if_icmpeq = 159,302JVM_OPC_if_icmpne = 160,303JVM_OPC_if_icmplt = 161,304JVM_OPC_if_icmpge = 162,305JVM_OPC_if_icmpgt = 163,306JVM_OPC_if_icmple = 164,307JVM_OPC_if_acmpeq = 165,308JVM_OPC_if_acmpne = 166,309JVM_OPC_goto = 167,310JVM_OPC_jsr = 168,311JVM_OPC_ret = 169,312JVM_OPC_tableswitch = 170,313JVM_OPC_lookupswitch = 171,314JVM_OPC_ireturn = 172,315JVM_OPC_lreturn = 173,316JVM_OPC_freturn = 174,317JVM_OPC_dreturn = 175,318JVM_OPC_areturn = 176,319JVM_OPC_return = 177,320JVM_OPC_getstatic = 178,321JVM_OPC_putstatic = 179,322JVM_OPC_getfield = 180,323JVM_OPC_putfield = 181,324JVM_OPC_invokevirtual = 182,325JVM_OPC_invokespecial = 183,326JVM_OPC_invokestatic = 184,327JVM_OPC_invokeinterface = 185,328JVM_OPC_invokedynamic = 186,329JVM_OPC_new = 187,330JVM_OPC_newarray = 188,331JVM_OPC_anewarray = 189,332JVM_OPC_arraylength = 190,333JVM_OPC_athrow = 191,334JVM_OPC_checkcast = 192,335JVM_OPC_instanceof = 193,336JVM_OPC_monitorenter = 194,337JVM_OPC_monitorexit = 195,338JVM_OPC_wide = 196,339JVM_OPC_multianewarray = 197,340JVM_OPC_ifnull = 198,341JVM_OPC_ifnonnull = 199,342JVM_OPC_goto_w = 200,343JVM_OPC_jsr_w = 201,344JVM_OPC_MAX = 201345};346347/* Opcode length initializer, use with something like:348* unsigned char opcode_length[JVM_OPC_MAX+1] = JVM_OPCODE_LENGTH_INITIALIZER;349*/350#define JVM_OPCODE_LENGTH_INITIALIZER { \3511, /* nop */ \3521, /* aconst_null */ \3531, /* iconst_m1 */ \3541, /* iconst_0 */ \3551, /* iconst_1 */ \3561, /* iconst_2 */ \3571, /* iconst_3 */ \3581, /* iconst_4 */ \3591, /* iconst_5 */ \3601, /* lconst_0 */ \3611, /* lconst_1 */ \3621, /* fconst_0 */ \3631, /* fconst_1 */ \3641, /* fconst_2 */ \3651, /* dconst_0 */ \3661, /* dconst_1 */ \3672, /* bipush */ \3683, /* sipush */ \3692, /* ldc */ \3703, /* ldc_w */ \3713, /* ldc2_w */ \3722, /* iload */ \3732, /* lload */ \3742, /* fload */ \3752, /* dload */ \3762, /* aload */ \3771, /* iload_0 */ \3781, /* iload_1 */ \3791, /* iload_2 */ \3801, /* iload_3 */ \3811, /* lload_0 */ \3821, /* lload_1 */ \3831, /* lload_2 */ \3841, /* lload_3 */ \3851, /* fload_0 */ \3861, /* fload_1 */ \3871, /* fload_2 */ \3881, /* fload_3 */ \3891, /* dload_0 */ \3901, /* dload_1 */ \3911, /* dload_2 */ \3921, /* dload_3 */ \3931, /* aload_0 */ \3941, /* aload_1 */ \3951, /* aload_2 */ \3961, /* aload_3 */ \3971, /* iaload */ \3981, /* laload */ \3991, /* faload */ \4001, /* daload */ \4011, /* aaload */ \4021, /* baload */ \4031, /* caload */ \4041, /* saload */ \4052, /* istore */ \4062, /* lstore */ \4072, /* fstore */ \4082, /* dstore */ \4092, /* astore */ \4101, /* istore_0 */ \4111, /* istore_1 */ \4121, /* istore_2 */ \4131, /* istore_3 */ \4141, /* lstore_0 */ \4151, /* lstore_1 */ \4161, /* lstore_2 */ \4171, /* lstore_3 */ \4181, /* fstore_0 */ \4191, /* fstore_1 */ \4201, /* fstore_2 */ \4211, /* fstore_3 */ \4221, /* dstore_0 */ \4231, /* dstore_1 */ \4241, /* dstore_2 */ \4251, /* dstore_3 */ \4261, /* astore_0 */ \4271, /* astore_1 */ \4281, /* astore_2 */ \4291, /* astore_3 */ \4301, /* iastore */ \4311, /* lastore */ \4321, /* fastore */ \4331, /* dastore */ \4341, /* aastore */ \4351, /* bastore */ \4361, /* castore */ \4371, /* sastore */ \4381, /* pop */ \4391, /* pop2 */ \4401, /* dup */ \4411, /* dup_x1 */ \4421, /* dup_x2 */ \4431, /* dup2 */ \4441, /* dup2_x1 */ \4451, /* dup2_x2 */ \4461, /* swap */ \4471, /* iadd */ \4481, /* ladd */ \4491, /* fadd */ \4501, /* dadd */ \4511, /* isub */ \4521, /* lsub */ \4531, /* fsub */ \4541, /* dsub */ \4551, /* imul */ \4561, /* lmul */ \4571, /* fmul */ \4581, /* dmul */ \4591, /* idiv */ \4601, /* ldiv */ \4611, /* fdiv */ \4621, /* ddiv */ \4631, /* irem */ \4641, /* lrem */ \4651, /* frem */ \4661, /* drem */ \4671, /* ineg */ \4681, /* lneg */ \4691, /* fneg */ \4701, /* dneg */ \4711, /* ishl */ \4721, /* lshl */ \4731, /* ishr */ \4741, /* lshr */ \4751, /* iushr */ \4761, /* lushr */ \4771, /* iand */ \4781, /* land */ \4791, /* ior */ \4801, /* lor */ \4811, /* ixor */ \4821, /* lxor */ \4833, /* iinc */ \4841, /* i2l */ \4851, /* i2f */ \4861, /* i2d */ \4871, /* l2i */ \4881, /* l2f */ \4891, /* l2d */ \4901, /* f2i */ \4911, /* f2l */ \4921, /* f2d */ \4931, /* d2i */ \4941, /* d2l */ \4951, /* d2f */ \4961, /* i2b */ \4971, /* i2c */ \4981, /* i2s */ \4991, /* lcmp */ \5001, /* fcmpl */ \5011, /* fcmpg */ \5021, /* dcmpl */ \5031, /* dcmpg */ \5043, /* ifeq */ \5053, /* ifne */ \5063, /* iflt */ \5073, /* ifge */ \5083, /* ifgt */ \5093, /* ifle */ \5103, /* if_icmpeq */ \5113, /* if_icmpne */ \5123, /* if_icmplt */ \5133, /* if_icmpge */ \5143, /* if_icmpgt */ \5153, /* if_icmple */ \5163, /* if_acmpeq */ \5173, /* if_acmpne */ \5183, /* goto */ \5193, /* jsr */ \5202, /* ret */ \52199, /* tableswitch */ \52299, /* lookupswitch */ \5231, /* ireturn */ \5241, /* lreturn */ \5251, /* freturn */ \5261, /* dreturn */ \5271, /* areturn */ \5281, /* return */ \5293, /* getstatic */ \5303, /* putstatic */ \5313, /* getfield */ \5323, /* putfield */ \5333, /* invokevirtual */ \5343, /* invokespecial */ \5353, /* invokestatic */ \5365, /* invokeinterface */ \5375, /* invokedynamic */ \5383, /* new */ \5392, /* newarray */ \5403, /* anewarray */ \5411, /* arraylength */ \5421, /* athrow */ \5433, /* checkcast */ \5443, /* instanceof */ \5451, /* monitorenter */ \5461, /* monitorexit */ \5470, /* wide */ \5484, /* multianewarray */ \5493, /* ifnull */ \5503, /* ifnonnull */ \5515, /* goto_w */ \5525 /* jsr_w */ \553}554555#ifdef __cplusplus556} /* extern "C" */557#endif /* __cplusplus */558559#endif /* CLASSFILE_CONSTANTS */560561562